From aa54ab74fee88caaeb079784074cab8a8b7a37ed Mon Sep 17 00:00:00 2001 From: Alessandro Cappiello Date: Thu, 3 Oct 2024 16:29:43 +0200 Subject: [PATCH 01/13] updated Aachen config and regression test --- .github/workflows/regression.yml | 6 ++--- .../Aachen_turbine/aachen_3D_MP_restart.cfg | 23 +++++++++++++------ 2 files changed, 19 insertions(+), 10 deletions(-) mode change 100644 => 100755 TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 2502204b64c..d6e3c02fedd 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -209,7 +209,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} + args: -b ${{github.ref}} -t develop -c fix_aachen_testcase -s ${{matrix.testscript}} - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: @@ -255,7 +255,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan" + args: -b ${{github.ref}} -t develop -c fix_aachen_testcase -s ${{matrix.testscript}} -a "--tsan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536 with: @@ -300,7 +300,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--asan" + args: -b ${{github.ref}} -t develop -c fix_aachen_testcase -s ${{matrix.testscript}} -a "--asan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536 with: diff --git a/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg b/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg old mode 100644 new mode 100755 index 97f2e133e61..2f43ccffc39 --- a/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg +++ b/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg @@ -119,6 +119,15 @@ CONDUCTIVITY_MODEL= CONSTANT_PRANDTL %Navier-Stokes wall boundary marker(s) (NONE = no marker) MARKER_HEATFLUX= (BLADE1, 0.0, BLADE2, 0.0, BLADE3, 0.0, HUB1, 0.0, SHROUD1, 0.0, HUB2, 0.0, SHROUD2, 0.0, HUB3, 0.0, SHROUD3, 0.0) % +% ------------------------ WALL FUNCTION DEFINITION --------------------------% +% +MARKER_WALL_FUNCTIONS= ( BLADE1, STANDARD_WALL_FUNCTION , BLADE2, STANDARD_WALL_FUNCTION , BLADE3, STANDARD_WALL_FUNCTION , HUB1, STANDARD_WALL_FUNCTION , SHROUD1, STANDARD_WALL_FUNCTION , HUB2, STANDARD_WALL_FUNCTION , SHROUD2, STANDARD_WALL_FUNCTION , HUB3, STANDARD_WALL_FUNCTION , SHROUD3, STANDARD_WALL_FUNCTION ) +WALLMODEL_KAPPA= 0.41 +WALLMODEL_B= 5.5 +WALLMODEL_MINYPLUS= 5.0 +WALLMODEL_MAXITER= 200 +WALLMODEL_RELFAC= 0.5 + % Periodic boundary marker(s) (NONE = no marker) % Format: ( periodic marker, donor marker, rot_cen_x, rot_cen_y, rot_cen_z, rot_angle_x-axis, rot_angle_y-axis, rot_angle_z-axis, translation_x, translation_y, translation_z) MARKER_PERIODIC= (PER1_STATOR1, PER2_STATOR1, 0.0, 0.0, 0.0, 0.0, 0.0, 8.7804878, 0.0, 0.0, 0.0, PER1_ROTOR, PER2_ROTOR, 0.0, 0.0, 0.0, 0.0, 0.0, 8.7804878, 0.0, 0.0, 0.0, PER1_STATOR2, PER2_STATOR2, 0.0, 0.0, 0.0, 0.0, 0.0, 8.7804878, 0.0, 0.0, 0.0) @@ -164,10 +173,10 @@ MIXINGPLANE_INTERFACE_KIND= LINEAR_INTERPOLATION TURBULENT_MIXINGPLANE= YES % % Specify ramp option for Outlet pressure (YES, NO) default NO -RAMP_OUTLET_PRESSURE= NO +RAMP_OUTLET_PRESSURE= YES % % Parameters of the outlet pressure ramp (starting outlet pressure, updating-iteration-frequency, total number of iteration for the ramp) -RAMP_OUTLET_PRESSURE_COEFF= (140000.0, 10.0, 2000) +RAMP_OUTLET_PRESSURE_COEFF= (140000.0, 150.0, 2000) % % Specify Kind of average process for linearizing the Navier-Stokes equation at inflow and outflow BC included mixing-plane % (ALGEBRAIC, AREA, MASSSFLUX, MIXEDOUT) default AREA @@ -196,7 +205,7 @@ MARKER_MONITORING= (BLADE1, BLADE2, BLADE3) NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES % % Courant-Friedrichs-Lewy condition of the finest grid -CFL_NUMBER= 10 +CFL_NUMBER= 2 % % Adaptive CFL number (NO, YES) CFL_ADAPT= NO @@ -230,8 +239,8 @@ LIMITER_ITER= 999999 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % % Convective numerical method -CONV_NUM_METHOD_FLOW= ROE -ENTROPY_FIX_COEFF= 0.001 +CONV_NUM_METHOD_FLOW= JST +ENTROPY_FIX_COEFF= 0.3 % JST_SENSOR_COEFF= ( 0.5, 0.25 ) % Spatial numerical order integration @@ -294,7 +303,7 @@ CONV_RESIDUAL_MINVAL= -12 CONV_STARTITER= 10 % % Screen output fields (use 'SU2_CFD -d ' to view list of available fields) -SCREEN_OUTPUT= (OUTER_ITER, RMS_DENSITY[0], RMS_DENSITY[1], RMS_DENSITY[2], RMS_MOMENTUM-X[0], RMS_MOMENTUM-Y[0], RMS_ENERGY[0]) +SCREEN_OUTPUT= (OUTER_ITER, RMS_DENSITY[0], RMS_DENSITY[1], RMS_DENSITY[2], RMS_MOMENTUM-X[0], RMS_MOMENTUM-X[1], RMS_MOMENTUM-X[2], RMS_MOMENTUM-Y[0], RMS_MOMENTUM-Y[1], RMS_MOMENTUM-Y[2], RMS_MOMENTUM-Z[0], RMS_MOMENTUM-Z[1], RMS_MOMENTUM-Z[2], RMS_ENERGY[0], RMS_ENERGY[1], RMS_ENERGY[2]) % % History output groups (use 'SU2_CFD -d ' to view list of available fields) HISTORY_OUTPUT= (ITER, RMS_RES, TURBO_PERF) @@ -349,7 +358,7 @@ SURFACE_FILENAME= surface_flow SURFACE_ADJ_FILENAME= surface_adjoint % % Writing solution file frequency -OUTPUT_WRT_FREQ= 500 +OUTPUT_WRT_FREQ= 1000 % % Writing convergence history frequency HISTORY_WRT_FREQ_OUTER= 1 From 3a57fa35aa2f5a47b573debee911e16cbc8bb429 Mon Sep 17 00:00:00 2001 From: alecappiello Date: Thu, 17 Oct 2024 09:49:31 +0200 Subject: [PATCH 02/13] removing outlet pressure ramp --- .../turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg b/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg index 2f43ccffc39..05c383114b8 100755 --- a/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg +++ b/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg @@ -173,7 +173,7 @@ MIXINGPLANE_INTERFACE_KIND= LINEAR_INTERPOLATION TURBULENT_MIXINGPLANE= YES % % Specify ramp option for Outlet pressure (YES, NO) default NO -RAMP_OUTLET_PRESSURE= YES +RAMP_OUTLET_PRESSURE= NO % % Parameters of the outlet pressure ramp (starting outlet pressure, updating-iteration-frequency, total number of iteration for the ramp) RAMP_OUTLET_PRESSURE_COEFF= (140000.0, 150.0, 2000) From 618972c2e8b9bb6dcc6206e42f25aed59b75ba72 Mon Sep 17 00:00:00 2001 From: alecappiello Date: Thu, 17 Oct 2024 11:15:57 +0200 Subject: [PATCH 03/13] branch name change --- .github/workflows/regression.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index d6e3c02fedd..ca8bf820a84 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -209,7 +209,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c fix_aachen_testcase -s ${{matrix.testscript}} + args: -b ${{github.ref}} -t develop -c fix_aachen_test_case -s ${{matrix.testscript}} - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: @@ -255,7 +255,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c fix_aachen_testcase -s ${{matrix.testscript}} -a "--tsan" + args: -b ${{github.ref}} -t develop -c fix_aachen_test_case -s ${{matrix.testscript}} -a "--tsan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536 with: @@ -300,7 +300,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c fix_aachen_testcase -s ${{matrix.testscript}} -a "--asan" + args: -b ${{github.ref}} -t develop -c fix_aachen_test_case -s ${{matrix.testscript}} -a "--asan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536 with: From bb7d8ee060ac6f7c3107b1c48a6342655d1b097c Mon Sep 17 00:00:00 2001 From: alecappiello Date: Thu, 17 Oct 2024 16:24:31 +0200 Subject: [PATCH 04/13] updating regression test files --- TestCases/parallel_regression.py | 2 +- TestCases/serial_regression.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 4047b6b39ba..9d6622a14a1 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1083,7 +1083,7 @@ def main(): Aachen_3D_restart.cfg_file = "aachen_3D_MP_restart.cfg" Aachen_3D_restart.test_iter = 5 Aachen_3D_restart.enabled_with_asan = False - Aachen_3D_restart.test_vals = [-9.829186, -8.875103, -9.609509, -8.075211, -7.759491, -4.360714] + Aachen_3D_restart.test_vals = [-7.701448, -8.512241, -6.014939, -6.468738, -5.801759, -4.607179, -5.551037, -5.300771, -3.804188, -5.256055, -5.765160, -3.609605, -2.229276, -2.883962, -0.563469] test_list.append(Aachen_3D_restart) # Jones APU Turbocharger restart diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 08b45e3b3ff..9146f9a0778 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -860,7 +860,7 @@ def main(): Aachen_3D_restart.cfg_dir = "turbomachinery/Aachen_turbine" Aachen_3D_restart.cfg_file = "aachen_3D_MP_restart.cfg" Aachen_3D_restart.test_iter = 5 - Aachen_3D_restart.test_vals = [-9.829185, -8.875103, -9.609505, -8.075194, -7.759490, -4.360713] + Aachen_3D_restart.test_vals = [-7.701448, -8.512359, -6.014939, -6.468741, -5.801762, -4.607173, -5.551041, -5.300777, -3.804188, -5.256055, -5.765225, -3.609601, -2.229277, -2.883896, -0.563470] test_list.append(Aachen_3D_restart) # Jones APU Turbocharger restart From 6f7c44acca7ea67a1f78cb6452d711cbb4b15024 Mon Sep 17 00:00:00 2001 From: alecappiello Date: Thu, 17 Oct 2024 18:01:15 +0200 Subject: [PATCH 05/13] enabling asan in aachen parallel regression test --- TestCases/parallel_regression.py | 1 - 1 file changed, 1 deletion(-) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 5368d785abe..66aa66fb805 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1078,7 +1078,6 @@ def main(): Aachen_3D_restart.cfg_dir = "turbomachinery/Aachen_turbine" Aachen_3D_restart.cfg_file = "aachen_3D_MP_restart.cfg" Aachen_3D_restart.test_iter = 5 - Aachen_3D_restart.enabled_with_asan = False Aachen_3D_restart.test_vals = [-7.701448, -8.512241, -6.014939, -6.468738, -5.801759, -4.607179, -5.551037, -5.300771, -3.804188, -5.256055, -5.765160, -3.609605, -2.229276, -2.883962, -0.563469] test_list.append(Aachen_3D_restart) From 1329c92fed1a9b8f78228a94eacc5f01f899ac6a Mon Sep 17 00:00:00 2001 From: alecappiello Date: Fri, 18 Oct 2024 10:53:41 +0200 Subject: [PATCH 06/13] entropy fix coefficient removed --- TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg b/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg index 05c383114b8..f46e6a62b92 100755 --- a/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg +++ b/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg @@ -240,7 +240,6 @@ LIMITER_ITER= 999999 % % Convective numerical method CONV_NUM_METHOD_FLOW= JST -ENTROPY_FIX_COEFF= 0.3 % JST_SENSOR_COEFF= ( 0.5, 0.25 ) % Spatial numerical order integration From 112388a9a90adb83bcc19ef7ad6f050a311225ee Mon Sep 17 00:00:00 2001 From: EvertBunschoten Date: Fri, 18 Oct 2024 14:01:20 +0200 Subject: [PATCH 07/13] Updated MLPCpp module supporting additional input/output scaling methods --- meson_scripts/init.py | 2 +- subprojects/MLPCpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meson_scripts/init.py b/meson_scripts/init.py index 4ed6f053dc9..5bcac08a4c9 100755 --- a/meson_scripts/init.py +++ b/meson_scripts/init.py @@ -71,7 +71,7 @@ def init_submodules( github_repo_coolprop = "https://github.com/CoolProp/CoolProp" sha_version_mel = "46205ab019e5224559091375a6d71aabae6bc5b9" github_repo_mel = "https://github.com/pcarruscag/MEL" - sha_version_mlpcpp = "c19c53ea2b85ccfb185f1c6c87044dc0b5bc7ae0" + sha_version_mlpcpp = "c3176b664d3e8e492c1ef201f11b9699e9c3a94b" github_repo_mlpcpp = "https://github.com/EvertBunschoten/MLPCpp" medi_name = "MeDiPack" diff --git a/subprojects/MLPCpp b/subprojects/MLPCpp index c19c53ea2b8..c3176b664d3 160000 --- a/subprojects/MLPCpp +++ b/subprojects/MLPCpp @@ -1 +1 @@ -Subproject commit c19c53ea2b85ccfb185f1c6c87044dc0b5bc7ae0 +Subproject commit c3176b664d3e8e492c1ef201f11b9699e9c3a94b From af17332e3ca375c9de2ebaa9d6ed92a8280c26a3 Mon Sep 17 00:00:00 2001 From: EvertBunschoten Date: Fri, 18 Oct 2024 15:04:35 +0200 Subject: [PATCH 08/13] Updated inclusion ranges for robust scaler --- meson_scripts/init.py | 2 +- subprojects/MLPCpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meson_scripts/init.py b/meson_scripts/init.py index 5bcac08a4c9..943dd296a79 100755 --- a/meson_scripts/init.py +++ b/meson_scripts/init.py @@ -71,7 +71,7 @@ def init_submodules( github_repo_coolprop = "https://github.com/CoolProp/CoolProp" sha_version_mel = "46205ab019e5224559091375a6d71aabae6bc5b9" github_repo_mel = "https://github.com/pcarruscag/MEL" - sha_version_mlpcpp = "c3176b664d3e8e492c1ef201f11b9699e9c3a94b" + sha_version_mlpcpp = "443a031b6cf6a964af689ec016f9d67080c2a322" github_repo_mlpcpp = "https://github.com/EvertBunschoten/MLPCpp" medi_name = "MeDiPack" diff --git a/subprojects/MLPCpp b/subprojects/MLPCpp index c3176b664d3..443a031b6cf 160000 --- a/subprojects/MLPCpp +++ b/subprojects/MLPCpp @@ -1 +1 @@ -Subproject commit c3176b664d3e8e492c1ef201f11b9699e9c3a94b +Subproject commit 443a031b6cf6a964af689ec016f9d67080c2a322 From 7f6889f97389f1d73f5422bf9edef0445a3106c9 Mon Sep 17 00:00:00 2001 From: EvertBunschoten Date: Fri, 18 Oct 2024 15:25:27 +0200 Subject: [PATCH 09/13] Updated MLPCpp submodule sha tag --- meson_scripts/init.py | 2 +- subprojects/MLPCpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meson_scripts/init.py b/meson_scripts/init.py index 943dd296a79..e3df3e023ba 100755 --- a/meson_scripts/init.py +++ b/meson_scripts/init.py @@ -71,7 +71,7 @@ def init_submodules( github_repo_coolprop = "https://github.com/CoolProp/CoolProp" sha_version_mel = "46205ab019e5224559091375a6d71aabae6bc5b9" github_repo_mel = "https://github.com/pcarruscag/MEL" - sha_version_mlpcpp = "443a031b6cf6a964af689ec016f9d67080c2a322" + sha_version_mlpcpp = "6865a58b22f21a92977839d9c93eae9522402f55" github_repo_mlpcpp = "https://github.com/EvertBunschoten/MLPCpp" medi_name = "MeDiPack" diff --git a/subprojects/MLPCpp b/subprojects/MLPCpp index 443a031b6cf..6865a58b22f 160000 --- a/subprojects/MLPCpp +++ b/subprojects/MLPCpp @@ -1 +1 @@ -Subproject commit 443a031b6cf6a964af689ec016f9d67080c2a322 +Subproject commit 6865a58b22f21a92977839d9c93eae9522402f55 From ea397c20d523172a07ea755b3fdf6ff8e0758580 Mon Sep 17 00:00:00 2001 From: alecappiello Date: Tue, 22 Oct 2024 14:01:44 +0200 Subject: [PATCH 10/13] reintroducing entropy fix --- TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg b/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg index f46e6a62b92..05c383114b8 100755 --- a/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg +++ b/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg @@ -240,6 +240,7 @@ LIMITER_ITER= 999999 % % Convective numerical method CONV_NUM_METHOD_FLOW= JST +ENTROPY_FIX_COEFF= 0.3 % JST_SENSOR_COEFF= ( 0.5, 0.25 ) % Spatial numerical order integration From e0302a536cb0a2414a0d425d49a58bfbc6c150fc Mon Sep 17 00:00:00 2001 From: alecappiello Date: Wed, 23 Oct 2024 14:29:09 +0200 Subject: [PATCH 11/13] restoring original testcase repository for regression tests --- .github/workflows/regression.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index ca8bf820a84..2502204b64c 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -209,7 +209,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c fix_aachen_test_case -s ${{matrix.testscript}} + args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: @@ -255,7 +255,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c fix_aachen_test_case -s ${{matrix.testscript}} -a "--tsan" + args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536 with: @@ -300,7 +300,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c fix_aachen_test_case -s ${{matrix.testscript}} -a "--asan" + args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--asan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536 with: From 492ada99da032e525edafed74871c30931902b67 Mon Sep 17 00:00:00 2001 From: Lisa Bachmann Date: Fri, 25 Oct 2024 20:33:11 +0200 Subject: [PATCH 12/13] Feature CFL adaptation initial iteration (#2362) * Feature to define initial iteration to apply CFL adaption. A spark initialization was not possible with CFL adaptation, as the CFL number would increase too far before the spark initiates the combustion. This led to immediate flashback or blow-off. An additional parameter in the CFL adaptation defines the iteration, at which the CFL adaption should start. This allows the combustion to stabilize before the CFL number increases. Co-authored-by: Nijso Co-authored-by: TobiKattmann <31306376+TobiKattmann@users.noreply.github.com> Co-authored-by: Nijso Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com> --- Common/include/CConfig.hpp | 2 +- Common/src/CConfig.cpp | 12 +++++++++--- SU2_CFD/src/solvers/CSolver.cpp | 9 +++++++-- config_template.cfg | 8 ++++---- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index b14ffd6f2de..0c32f044288 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -1109,7 +1109,7 @@ class CConfig { bool Radiation; /*!< \brief Determines if a radiation model is incorporated. */ su2double CFL_Rad; /*!< \brief CFL Number for the radiation solver. */ - array default_cfl_adapt; /*!< \brief Default CFL adapt param array for the COption class. */ + array default_cfl_adapt; /*!< \brief Default CFL adapt param array for the COption class. */ su2double vel_init[3], /*!< \brief initial velocity array for the COption class. */ vel_inf[3], /*!< \brief freestream velocity array for the COption class. */ eng_cyl[7], /*!< \brief engine box array for the COption class. */ diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 4777616f550..8a60579189c 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1777,11 +1777,16 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: Activate The adaptive CFL number. */ addBoolOption("CFL_ADAPT", CFL_Adapt, false); /* !\brief CFL_ADAPT_PARAM - * DESCRIPTION: Parameters of the adaptive CFL number (factor down, factor up, CFL limit (min and max), acceptable linear residual ) + * DESCRIPTION: Parameters of the adaptive CFL number (factor down, factor up, CFL limit (min and max)[, acceptable linear residual][, starting iteration]). + * Parameters in square brackets are optional, parameter "starting iteration" only valid with parameter "acceptable linear residual". * Factor down generally <1.0, factor up generally > 1.0 to cause the CFL to increase when the under-relaxation parameter is 1.0 * and to decrease when the under-relaxation parameter is less than 0.1. Factor is multiplicative. \ingroup Config*/ - default_cfl_adapt[0] = 1.0; default_cfl_adapt[1] = 1.0; default_cfl_adapt[2] = 10.0; default_cfl_adapt[3] = 100.0; + default_cfl_adapt[0] = 0.1; + default_cfl_adapt[1] = 1.2; + default_cfl_adapt[2] = 10.0; + default_cfl_adapt[3] = 100.0; default_cfl_adapt[4] = 0.001; + default_cfl_adapt[5] = 0.0; addDoubleListOption("CFL_ADAPT_PARAM", nCFL_AdaptParam, CFL_AdaptParam); /* DESCRIPTION: Reduction factor of the CFL coefficient in the adjoint problem */ addDoubleOption("CFL_REDUCTION_ADJFLOW", CFLRedCoeff_AdjFlow, 0.8); @@ -7230,7 +7235,8 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { if (!CFL_Adapt) cout << "No CFL adaptation." << endl; else cout << "CFL adaptation. Factor down: "<< CFL_AdaptParam[0] <<", factor up: "<< CFL_AdaptParam[1] <<",\n lower limit: "<< CFL_AdaptParam[2] <<", upper limit: " << CFL_AdaptParam[3] - <<",\n acceptable linear residual: "<< CFL_AdaptParam[4] << "." << endl; + <<",\n acceptable linear residual: "<< CFL_AdaptParam[4] + <<"'\n starting iteration: "<< CFL_AdaptParam[5] << "." << endl; if (nMGLevels !=0) { PrintingToolbox::CTablePrinter MGTable(&std::cout); diff --git a/SU2_CFD/src/solvers/CSolver.cpp b/SU2_CFD/src/solvers/CSolver.cpp index 3b8c9e0e3ce..e446c3f1133 100644 --- a/SU2_CFD/src/solvers/CSolver.cpp +++ b/SU2_CFD/src/solvers/CSolver.cpp @@ -1717,6 +1717,7 @@ void CSolver::AdaptCFLNumber(CGeometry **geometry, const su2double CFLMin = config->GetCFL_AdaptParam(2); const su2double CFLMax = config->GetCFL_AdaptParam(3); const su2double acceptableLinTol = config->GetCFL_AdaptParam(4); + const su2double startingIter = config->GetCFL_AdaptParam(5); const bool fullComms = (config->GetComm_Level() == COMM_FULL); /* Number of iterations considered to check for stagnation. */ @@ -1764,8 +1765,12 @@ void CSolver::AdaptCFLNumber(CGeometry **geometry, /* Check if we should decrease or if we can increase, the 20% is to avoid flip-flopping. */ resetCFL = linRes > 0.99; - reduceCFL = linRes > 1.2*linTol; - canIncrease = linRes < linTol; + unsigned long iter = config->GetMultizone_Problem() ? config->GetOuterIter() : config->GetInnerIter(); + + /* only change CFL number when larger than starting iteration */ + reduceCFL = (linRes > 1.2*linTol) && (iter >= startingIter); + + canIncrease = (linRes < linTol) && (iter >= startingIter); if ((iMesh == MESH_0) && (Res_Count > 0)) { Old_Func = New_Func; diff --git a/config_template.cfg b/config_template.cfg index ff9e9f11297..8a953b7be78 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -1389,12 +1389,12 @@ CFL_NUMBER= 15.0 CFL_ADAPT= NO % % Parameters of the adaptive CFL number (factor-down, factor-up, CFL min value, -% CFL max value, acceptable linear solver convergence) -% Local CFL increases by factor-up until max if the solution rate of change is not limited, -% and acceptable linear convergence is achieved. It is reduced if rate is limited, or if there +% CFL max value, acceptable linear solver convergence, starting iteration) +% After the starting iteration has passed, local CFL increases by factor-up until max if the solution rate of +% change is not limited, and acceptable linear convergence is achieved. It is reduced if rate is limited, or if there % is not enough linear convergence, or if the nonlinear residuals are stagnant and oscillatory. % It is reset back to min when linear solvers diverge, or if nonlinear residuals increase too much. -CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1e10, 0.001 ) +CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1e10, 0.001, 0) % % Maximum Delta Time in local time stepping simulations MAX_DELTA_TIME= 1E6 From 1ce35d4d54954dcb51e1c552bdf063d5e800741a Mon Sep 17 00:00:00 2001 From: EvertBunschoten Date: Thu, 31 Oct 2024 14:51:08 +0100 Subject: [PATCH 13/13] Set correct descriptions for gprof and MLPCpp support --- meson_options.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index 08fbac80669..55782c62ff8 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -20,8 +20,8 @@ option('extra-deps', type : 'string', value : '', description: 'comma-separated option('enable-mpp', type : 'boolean', value : false, description: 'enable Mutation++ support') option('install-mpp', type : 'boolean', value : false, description: 'install Mutation++ in the directory defined with --prefix') option('enable-coolprop', type : 'boolean', value : false, description: 'enable CoolProp support') -option('enable-mlpcpp', type : 'boolean', value : false, description: 'enable profiling through gprof') -option('enable-gprof', type : 'boolean', value : false, description: 'enable MLPCpp support') +option('enable-mlpcpp', type : 'boolean', value : false, description: 'enable MLPCpp support') +option('enable-gprof', type : 'boolean', value : false, description: 'enable profiling through gprof') option('opdi-backend', type : 'combo', choices : ['auto', 'macro', 'ompt'], value : 'auto', description: 'OpDiLib backend choice') option('codi-tape', type : 'combo', choices : ['JacobianLinear', 'JacobianReuse', 'JacobianMultiUse', 'PrimalLinear', 'PrimalReuse', 'PrimalMultiUse'], value : 'JacobianLinear', description: 'CoDiPack tape choice') option('opdi-shared-read-opt', type : 'boolean', value : true, description : 'OpDiLib shared reading optimization')