Skip to content

Commit

Permalink
max iters for amg precon set to 1, updates to input files for two tes…
Browse files Browse the repository at this point in the history
…ts and reduced rel tol
  • Loading branch information
Sigfried Haering committed Jun 13, 2024
1 parent 2a03e52 commit 5f6d088
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 46 deletions.
10 changes: 5 additions & 5 deletions src/calorically_perfect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ class CaloricallyPerfectThermoChem : public ThermoChemModelBase {

// Linear-solver-related options
int smoother_poly_order_;
double smoother_poly_fraction_ = 0.1;
double smoother_poly_fraction_ = 0.75;
int smoother_eig_est_ = 10;
int smoother_passes_ = 1;
double smoother_relax_weight_ = 0.01;
double smoother_relax_omega_ = 0.001;
double hsmoother_relax_weight_ = 0.01;
double hsmoother_relax_omega_ = 0.001;
double smoother_relax_weight_ = 0.4;
double smoother_relax_omega_ = 0.01;
double hsmoother_relax_weight_ = 0.4;
double hsmoother_relax_omega_ = 0.01;

// solver tolerance options
int pl_solve_; /**< Verbosity level passed to mfem solvers */
Expand Down
1 change: 1 addition & 0 deletions src/tomboulides.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,7 @@ void Tomboulides::step() {
L_iorho_inv_pc_->SetRelaxType(amg_relax_);
L_iorho_inv_pc_->SetMaxLevels(amg_max_levels_);
L_iorho_inv_pc_->SetMaxIter(amg_max_iters_);
L_iorho_inv_pc_->SetTol(0);
// NOTE: other cycle types (i.e. not V-cycle) do not scale well in parallel, so option removed for now
// L_iorho_inv_pc_->SetCycleType(1);
L_iorho_inv_ortho_pc_ = new OrthoSolver(pfes_->GetComm());
Expand Down
9 changes: 5 additions & 4 deletions src/tomboulides.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,16 @@ class Tomboulides final : public FlowBase {
double smoother_poly_fraction_ = 0.75;
int smoother_eig_est_ = 10;
int smoother_passes_ = 1;
double smoother_relax_weight_ = 0.4;
double smoother_relax_weight_ =
0.4; // NOTE: setting relax wt to 0 should determine wt on a per-level basis but this does not seem to work
double smoother_relax_omega_ = 0.01;
double hsmoother_relax_weight_ = 0.4;
double hsmoother_relax_omega_ = 0.01;
double pressure_strength_thres_ = 0.6;
int amg_aggresive_ = 4;
int amg_max_levels_ = 100;
int amg_max_iters_ = 1;
int amg_relax_ = 0; // only 0 or 18 now
int amg_max_levels_ = 10; // 100;
int amg_max_iters_ = 1; // setting to zero is ~40% faster per step but effectively turns off precon?
int amg_relax_ = 0; // only 0 or 18 now

// Options: Jacobi, l1Jacobi, l1GS, l1GStr, lumpedJacobi,
// GS, OPFS, Chebyshev, Taubin, FIR
Expand Down
2 changes: 1 addition & 1 deletion test/autoPeriodic.test
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ setup() {
@test "[$TEST] verify tps output with input -> $RUNFILE" {
test -s $SOLN_FILE
test -s $REF_FILE
h5diff -r --delta=1e-12 $SOLN_FILE $REF_FILE /velocity
h5diff -r --delta=1e-11 $SOLN_FILE $REF_FILE /velocity
}
25 changes: 12 additions & 13 deletions test/inputs/input.autoPeriodic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,34 @@ type = loMach

[loMach]
flow-solver = tomboulides
thermo-solver = constant-property
mesh = meshes/flatBox.msh
uOrder = 1
pOrder = 1
nOrder = 1
order = 1
maxIters = 10
outputFreq = 10
fluid = dry_air
refLength = 0.05
equation_system = navier-stokes
enablePressureForcing = False
constantViscosity = 1.552e-5
constantDensity = 1.1839
enableGravity = False
gravity = '0 0 0'
openSystem = True
ambientPressure = 101326.
sgsModel = smagorinsky
sgsModelConstant = 0.09

[loMach/tomboulides]
ic = tgv2d
numerical-integ = false
ic = tgv2d_uniform

[loMach/constprop]
mu = 1.552e-5
rho = 1.1839

[io]
outdirBase = output

[time]
cfl = 0.5
integrator = curlcurl
dt_fixed = 1.0e-3
maxSolverIteration = 1000
solverRelTolerance = 1.0e-12
bdfOrder = 3

[initialConditions]
rho = 1.1839
Expand All @@ -49,4 +48,4 @@ numOutlets = 0
enablePeriodic = True
periodicX = True
periodicY = True
periodicZ = True
periodicZ = True
23 changes: 11 additions & 12 deletions test/inputs/input.sgsLoMach.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,34 @@ type = loMach

[loMach]
flow-solver = tomboulides
thermo-solver = constant-property
mesh = meshes/flatBox.msh
uOrder = 1
pOrder = 1
nOrder = 1
order = 1
maxIters = 10
outputFreq = 10
fluid = dry_air
refLength = 0.05
equation_system = navier-stokes
enablePressureForcing = False
constantViscosity = 1.552e-5
constantDensity = 1.1839
enableGravity = False
gravity = '0 0 0'
openSystem = True
ambientPressure = 101326.
sgsModel = smagorinsky
sgsModelConstant = 0.09

[loMach/tomboulides]
ic = tgv2d
numerical-integ = false
ic = tgv2d_uniform

[loMach/constprop]
mu = 1.552e-5
rho = 1.1839

[io]
outdirBase = output

[time]
cfl = 0.5
integrator = curlcurl
dt_fixed = 1.0e-3
maxSolverIteration = 1000
solverRelTolerance = 1.0e-12
bdfOrder = 3

[initialConditions]
rho = 1.1839
Expand Down
2 changes: 1 addition & 1 deletion test/interpInlet.test
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ setup() {
@test "[$TEST] verify tps output with input -> $RUNFILE" {
test -s $SOLN_FILE
test -s $REF_FILE
h5diff -r --relative=1e-12 $SOLN_FILE $REF_FILE /temperature/temperature
h5diff -r --relative=1e-11 $SOLN_FILE $REF_FILE /temperature/temperature
}
14 changes: 7 additions & 7 deletions test/lomach-flow.test
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ setup() {
$MPIRUN -n 2 $EXE --runFile $RUNFILE_LID_MOD

# check solutions are the same!
h5diff -r --delta=1e-12 restart_output-lid.sol.h5 restart_output-lid.sol.2.h5
h5diff -r --delta=1e-11 restart_output-lid.sol.h5 restart_output-lid.sol.2.h5

# delete intermediate files
rm -f restart_output-lid*.h5
Expand All @@ -149,22 +149,22 @@ setup() {
run $EXE --runFile $RUNFILE_PIPE
[[ ${status} -eq 0 ]]
test -s restart_output-pipe-lam.sol.h5
h5diff -r --delta=1e-12 restart_output-pipe-lam.sol.h5 $REF_SOLN_PIPE /velocity
h5diff -r --delta=1e-12 restart_output-pipe-lam.sol.h5 $REF_SOLN_PIPE /swirl
h5diff -r --delta=1e-11 restart_output-pipe-lam.sol.h5 $REF_SOLN_PIPE /velocity
h5diff -r --delta=1e-11 restart_output-pipe-lam.sol.h5 $REF_SOLN_PIPE /swirl
}

@test "[$TEST] check that Taylor-Couette (axisymmetric, with swirl) runs and verify result" {
run $EXE --runFile $RUNFILE_TC
[[ ${status} -eq 0 ]]
test -s restart_output-tc.sol.h5
h5diff -r --delta=1e-12 restart_output-tc.sol.h5 $REF_SOLN_TC /velocity
h5diff -r --delta=1e-12 restart_output-tc.sol.h5 $REF_SOLN_TC /swirl
h5diff -r --delta=1e-11 restart_output-tc.sol.h5 $REF_SOLN_TC /velocity
h5diff -r --delta=1e-11 restart_output-tc.sol.h5 $REF_SOLN_TC /swirl
}

@test "[$TEST] check pipe (axisymmetric) flow with algebraic rans model" {
run $EXE --runFile $RUNFILE_PIPE_ARANS
[[ ${status} -eq 0 ]]
test -s restart_output-pipe-arans.sol.h5
h5diff -r --delta=1e-12 restart_output-pipe-arans.sol.h5 $REF_SOLN_PIPE_ARANS /velocity
h5diff -r --delta=1e-12 restart_output-pipe-arans.sol.h5 $REF_SOLN_PIPE_ARANS /swirl
h5diff -r --delta=1e-11 restart_output-pipe-arans.sol.h5 $REF_SOLN_PIPE_ARANS /velocity
h5diff -r --delta=1e-11 restart_output-pipe-arans.sol.h5 $REF_SOLN_PIPE_ARANS /swirl
}
2 changes: 1 addition & 1 deletion test/lomach-lequere.test
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ setup() {
$EXE --runFile $RUNFILE

# check
h5diff -r --relative=1e-12 $SOLN_FILE $REF_SOLN /temperature/temperature
h5diff -r --relative=1e-10 $SOLN_FILE $REF_SOLN /temperature/temperature
h5diff -r --relative=1e-10 $SOLN_FILE $REF_SOLN /velocity/x-comp
h5diff -r --relative=1e-10 $SOLN_FILE $REF_SOLN /velocity/y-comp
}
Expand Down
2 changes: 1 addition & 1 deletion test/ref_solns/sgsLoMach/restart_output.sol.h5
Git LFS file not shown
2 changes: 1 addition & 1 deletion test/sgsLoMach.test
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ setup() {
@test "[$TEST] verify tps output with input -> $RUNFILE" {
test -s $SOLN_FILE
test -s $REF_FILE
h5diff -r --delta=1e-12 $SOLN_FILE $REF_FILE /velocity
h5diff -r --delta=1e-11 $SOLN_FILE $REF_FILE /velocity
}

0 comments on commit 5f6d088

Please sign in to comment.