From 5f6d08854539fff16bce13bc692a9b5c3b2519a0 Mon Sep 17 00:00:00 2001 From: Sigfried Haering Date: Wed, 12 Jun 2024 22:33:24 -0700 Subject: [PATCH] max iters for amg precon set to 1, updates to input files for two tests and reduced rel tol --- src/calorically_perfect.hpp | 10 ++++---- src/tomboulides.cpp | 1 + src/tomboulides.hpp | 9 ++++--- test/autoPeriodic.test | 2 +- test/inputs/input.autoPeriodic.ini | 25 +++++++++---------- test/inputs/input.sgsLoMach.ini | 23 ++++++++--------- test/interpInlet.test | 2 +- test/lomach-flow.test | 14 +++++------ test/lomach-lequere.test | 2 +- .../ref_solns/sgsLoMach/restart_output.sol.h5 | 2 +- test/sgsLoMach.test | 2 +- 11 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/calorically_perfect.hpp b/src/calorically_perfect.hpp index 95be425b4..6a5ed581a 100644 --- a/src/calorically_perfect.hpp +++ b/src/calorically_perfect.hpp @@ -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 */ diff --git a/src/tomboulides.cpp b/src/tomboulides.cpp index 6e3ca93cf..52deac957 100644 --- a/src/tomboulides.cpp +++ b/src/tomboulides.cpp @@ -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()); diff --git a/src/tomboulides.hpp b/src/tomboulides.hpp index 25f1eabdb..431b28635 100644 --- a/src/tomboulides.hpp +++ b/src/tomboulides.hpp @@ -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 diff --git a/test/autoPeriodic.test b/test/autoPeriodic.test index dc6a9d33e..1fb5cc41a 100755 --- a/test/autoPeriodic.test +++ b/test/autoPeriodic.test @@ -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 } diff --git a/test/inputs/input.autoPeriodic.ini b/test/inputs/input.autoPeriodic.ini index 56fc43205..a462938b6 100644 --- a/test/inputs/input.autoPeriodic.ini +++ b/test/inputs/input.autoPeriodic.ini @@ -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 @@ -49,4 +48,4 @@ numOutlets = 0 enablePeriodic = True periodicX = True periodicY = True -periodicZ = True \ No newline at end of file +periodicZ = True diff --git a/test/inputs/input.sgsLoMach.ini b/test/inputs/input.sgsLoMach.ini index a884829c6..ad3e812db 100644 --- a/test/inputs/input.sgsLoMach.ini +++ b/test/inputs/input.sgsLoMach.ini @@ -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 diff --git a/test/interpInlet.test b/test/interpInlet.test index e9fc0e30f..92df8c21e 100755 --- a/test/interpInlet.test +++ b/test/interpInlet.test @@ -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 } diff --git a/test/lomach-flow.test b/test/lomach-flow.test index a54cfaedd..4caec6700 100755 --- a/test/lomach-flow.test +++ b/test/lomach-flow.test @@ -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 @@ -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 } diff --git a/test/lomach-lequere.test b/test/lomach-lequere.test index 4738f3ac9..b6d1e1132 100755 --- a/test/lomach-lequere.test +++ b/test/lomach-lequere.test @@ -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 } diff --git a/test/ref_solns/sgsLoMach/restart_output.sol.h5 b/test/ref_solns/sgsLoMach/restart_output.sol.h5 index 333ab85e4..eb91f9a10 100644 --- a/test/ref_solns/sgsLoMach/restart_output.sol.h5 +++ b/test/ref_solns/sgsLoMach/restart_output.sol.h5 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1d285d59acd77b7cc383d646e8b2ddf10b1da771dad96bf0a5f46afa08df0bc +oid sha256:4c6c9716c42370668ad883e258709b93083b2d7f25c6f8afdc547b680611fc73 size 78744 diff --git a/test/sgsLoMach.test b/test/sgsLoMach.test index d572d711d..0309c3755 100755 --- a/test/sgsLoMach.test +++ b/test/sgsLoMach.test @@ -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 }