Skip to content

Commit a9a1dea

Browse files
Merge branch 'develop' of https://github.com/su2code/SU2 into update_MLPCpp
2 parents 7f6889f + 492ada9 commit a9a1dea

File tree

8 files changed

+41
-22
lines changed

8 files changed

+41
-22
lines changed

.github/workflows/regression.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ jobs:
209209
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
210210
with:
211211
# -t <Tutorials-branch> -c <Testcases-branch>
212-
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
212+
args: -b ${{github.ref}} -t develop -c fix_aachen_test_case -s ${{matrix.testscript}}
213213
- name: Cleanup
214214
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
215215
with:
@@ -255,7 +255,7 @@ jobs:
255255
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536
256256
with:
257257
# -t <Tutorials-branch> -c <Testcases-branch>
258-
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan"
258+
args: -b ${{github.ref}} -t develop -c fix_aachen_test_case -s ${{matrix.testscript}} -a "--tsan"
259259
- name: Cleanup
260260
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536
261261
with:
@@ -300,7 +300,7 @@ jobs:
300300
uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536
301301
with:
302302
# -t <Tutorials-branch> -c <Testcases-branch>
303-
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--asan"
303+
args: -b ${{github.ref}} -t develop -c fix_aachen_test_case -s ${{matrix.testscript}} -a "--asan"
304304
- name: Cleanup
305305
uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536
306306
with:

Common/include/CConfig.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ class CConfig {
11091109
bool Radiation; /*!< \brief Determines if a radiation model is incorporated. */
11101110
su2double CFL_Rad; /*!< \brief CFL Number for the radiation solver. */
11111111

1112-
array<su2double,5> default_cfl_adapt; /*!< \brief Default CFL adapt param array for the COption class. */
1112+
array<su2double,6> default_cfl_adapt; /*!< \brief Default CFL adapt param array for the COption class. */
11131113
su2double vel_init[3], /*!< \brief initial velocity array for the COption class. */
11141114
vel_inf[3], /*!< \brief freestream velocity array for the COption class. */
11151115
eng_cyl[7], /*!< \brief engine box array for the COption class. */

Common/src/CConfig.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,11 +1777,16 @@ void CConfig::SetConfig_Options() {
17771777
/* DESCRIPTION: Activate The adaptive CFL number. */
17781778
addBoolOption("CFL_ADAPT", CFL_Adapt, false);
17791779
/* !\brief CFL_ADAPT_PARAM
1780-
* DESCRIPTION: Parameters of the adaptive CFL number (factor down, factor up, CFL limit (min and max), acceptable linear residual )
1780+
* DESCRIPTION: Parameters of the adaptive CFL number (factor down, factor up, CFL limit (min and max)[, acceptable linear residual][, starting iteration]).
1781+
* Parameters in square brackets are optional, parameter "starting iteration" only valid with parameter "acceptable linear residual".
17811782
* Factor down generally <1.0, factor up generally > 1.0 to cause the CFL to increase when the under-relaxation parameter is 1.0
17821783
* and to decrease when the under-relaxation parameter is less than 0.1. Factor is multiplicative. \ingroup Config*/
1783-
default_cfl_adapt[0] = 1.0; default_cfl_adapt[1] = 1.0; default_cfl_adapt[2] = 10.0; default_cfl_adapt[3] = 100.0;
1784+
default_cfl_adapt[0] = 0.1;
1785+
default_cfl_adapt[1] = 1.2;
1786+
default_cfl_adapt[2] = 10.0;
1787+
default_cfl_adapt[3] = 100.0;
17841788
default_cfl_adapt[4] = 0.001;
1789+
default_cfl_adapt[5] = 0.0;
17851790
addDoubleListOption("CFL_ADAPT_PARAM", nCFL_AdaptParam, CFL_AdaptParam);
17861791
/* DESCRIPTION: Reduction factor of the CFL coefficient in the adjoint problem */
17871792
addDoubleOption("CFL_REDUCTION_ADJFLOW", CFLRedCoeff_AdjFlow, 0.8);
@@ -7230,7 +7235,8 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
72307235
if (!CFL_Adapt) cout << "No CFL adaptation." << endl;
72317236
else cout << "CFL adaptation. Factor down: "<< CFL_AdaptParam[0] <<", factor up: "<< CFL_AdaptParam[1]
72327237
<<",\n lower limit: "<< CFL_AdaptParam[2] <<", upper limit: " << CFL_AdaptParam[3]
7233-
<<",\n acceptable linear residual: "<< CFL_AdaptParam[4] << "." << endl;
7238+
<<",\n acceptable linear residual: "<< CFL_AdaptParam[4]
7239+
<<"'\n starting iteration: "<< CFL_AdaptParam[5] << "." << endl;
72347240

72357241
if (nMGLevels !=0) {
72367242
PrintingToolbox::CTablePrinter MGTable(&std::cout);

SU2_CFD/src/solvers/CSolver.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,6 +1717,7 @@ void CSolver::AdaptCFLNumber(CGeometry **geometry,
17171717
const su2double CFLMin = config->GetCFL_AdaptParam(2);
17181718
const su2double CFLMax = config->GetCFL_AdaptParam(3);
17191719
const su2double acceptableLinTol = config->GetCFL_AdaptParam(4);
1720+
const su2double startingIter = config->GetCFL_AdaptParam(5);
17201721
const bool fullComms = (config->GetComm_Level() == COMM_FULL);
17211722

17221723
/* Number of iterations considered to check for stagnation. */
@@ -1764,8 +1765,12 @@ void CSolver::AdaptCFLNumber(CGeometry **geometry,
17641765

17651766
/* Check if we should decrease or if we can increase, the 20% is to avoid flip-flopping. */
17661767
resetCFL = linRes > 0.99;
1767-
reduceCFL = linRes > 1.2*linTol;
1768-
canIncrease = linRes < linTol;
1768+
unsigned long iter = config->GetMultizone_Problem() ? config->GetOuterIter() : config->GetInnerIter();
1769+
1770+
/* only change CFL number when larger than starting iteration */
1771+
reduceCFL = (linRes > 1.2*linTol) && (iter >= startingIter);
1772+
1773+
canIncrease = (linRes < linTol) && (iter >= startingIter);
17691774

17701775
if ((iMesh == MESH_0) && (Res_Count > 0)) {
17711776
Old_Func = New_Func;

TestCases/parallel_regression.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,8 +1078,7 @@ def main():
10781078
Aachen_3D_restart.cfg_dir = "turbomachinery/Aachen_turbine"
10791079
Aachen_3D_restart.cfg_file = "aachen_3D_MP_restart.cfg"
10801080
Aachen_3D_restart.test_iter = 5
1081-
Aachen_3D_restart.enabled_with_asan = False
1082-
Aachen_3D_restart.test_vals = [-9.829186, -8.875103, -9.609509, -8.075211, -7.759491, -4.360714]
1081+
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]
10831082
test_list.append(Aachen_3D_restart)
10841083

10851084
# Jones APU Turbocharger restart

TestCases/serial_regression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ def main():
856856
Aachen_3D_restart.cfg_dir = "turbomachinery/Aachen_turbine"
857857
Aachen_3D_restart.cfg_file = "aachen_3D_MP_restart.cfg"
858858
Aachen_3D_restart.test_iter = 5
859-
Aachen_3D_restart.test_vals = [-9.829185, -8.875103, -9.609505, -8.075194, -7.759490, -4.360713]
859+
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]
860860
test_list.append(Aachen_3D_restart)
861861

862862
# Jones APU Turbocharger restart

TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg

100644100755
Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@ CONDUCTIVITY_MODEL= CONSTANT_PRANDTL
119119
%Navier-Stokes wall boundary marker(s) (NONE = no marker)
120120
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)
121121
%
122+
% ------------------------ WALL FUNCTION DEFINITION --------------------------%
123+
%
124+
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 )
125+
WALLMODEL_KAPPA= 0.41
126+
WALLMODEL_B= 5.5
127+
WALLMODEL_MINYPLUS= 5.0
128+
WALLMODEL_MAXITER= 200
129+
WALLMODEL_RELFAC= 0.5
130+
122131
% Periodic boundary marker(s) (NONE = no marker)
123132
% 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)
124133
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)
@@ -167,7 +176,7 @@ TURBULENT_MIXINGPLANE= YES
167176
RAMP_OUTLET_PRESSURE= NO
168177
%
169178
% Parameters of the outlet pressure ramp (starting outlet pressure, updating-iteration-frequency, total number of iteration for the ramp)
170-
RAMP_OUTLET_PRESSURE_COEFF= (140000.0, 10.0, 2000)
179+
RAMP_OUTLET_PRESSURE_COEFF= (140000.0, 150.0, 2000)
171180
%
172181
% Specify Kind of average process for linearizing the Navier-Stokes equation at inflow and outflow BC included mixing-plane
173182
% (ALGEBRAIC, AREA, MASSSFLUX, MIXEDOUT) default AREA
@@ -196,7 +205,7 @@ MARKER_MONITORING= (BLADE1, BLADE2, BLADE3)
196205
NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
197206
%
198207
% Courant-Friedrichs-Lewy condition of the finest grid
199-
CFL_NUMBER= 10
208+
CFL_NUMBER= 2
200209
%
201210
% Adaptive CFL number (NO, YES)
202211
CFL_ADAPT= NO
@@ -230,8 +239,8 @@ LIMITER_ITER= 999999
230239
% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------%
231240
%
232241
% Convective numerical method
233-
CONV_NUM_METHOD_FLOW= ROE
234-
ENTROPY_FIX_COEFF= 0.001
242+
CONV_NUM_METHOD_FLOW= JST
243+
ENTROPY_FIX_COEFF= 0.3
235244
%
236245
JST_SENSOR_COEFF= ( 0.5, 0.25 )
237246
% Spatial numerical order integration
@@ -294,7 +303,7 @@ CONV_RESIDUAL_MINVAL= -12
294303
CONV_STARTITER= 10
295304
%
296305
% Screen output fields (use 'SU2_CFD -d <config_file>' to view list of available fields)
297-
SCREEN_OUTPUT= (OUTER_ITER, RMS_DENSITY[0], RMS_DENSITY[1], RMS_DENSITY[2], RMS_MOMENTUM-X[0], RMS_MOMENTUM-Y[0], RMS_ENERGY[0])
306+
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])
298307
%
299308
% History output groups (use 'SU2_CFD -d <config_file>' to view list of available fields)
300309
HISTORY_OUTPUT= (ITER, RMS_RES, TURBO_PERF)
@@ -349,7 +358,7 @@ SURFACE_FILENAME= surface_flow
349358
SURFACE_ADJ_FILENAME= surface_adjoint
350359
%
351360
% Writing solution file frequency
352-
OUTPUT_WRT_FREQ= 500
361+
OUTPUT_WRT_FREQ= 1000
353362
%
354363
% Writing convergence history frequency
355364
HISTORY_WRT_FREQ_OUTER= 1

config_template.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,12 +1389,12 @@ CFL_NUMBER= 15.0
13891389
CFL_ADAPT= NO
13901390
%
13911391
% Parameters of the adaptive CFL number (factor-down, factor-up, CFL min value,
1392-
% CFL max value, acceptable linear solver convergence)
1393-
% Local CFL increases by factor-up until max if the solution rate of change is not limited,
1394-
% and acceptable linear convergence is achieved. It is reduced if rate is limited, or if there
1392+
% CFL max value, acceptable linear solver convergence, starting iteration)
1393+
% After the starting iteration has passed, local CFL increases by factor-up until max if the solution rate of
1394+
% change is not limited, and acceptable linear convergence is achieved. It is reduced if rate is limited, or if there
13951395
% is not enough linear convergence, or if the nonlinear residuals are stagnant and oscillatory.
13961396
% It is reset back to min when linear solvers diverge, or if nonlinear residuals increase too much.
1397-
CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1e10, 0.001 )
1397+
CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1e10, 0.001, 0)
13981398
%
13991399
% Maximum Delta Time in local time stepping simulations
14001400
MAX_DELTA_TIME= 1E6

0 commit comments

Comments
 (0)