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/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index edf4a11ccd0..66aa66fb805 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1078,8 +1078,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.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 5703330af18..fae9d1ba727 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -856,7 +856,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 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..05c383114b8 --- 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) @@ -167,7 +176,7 @@ TURBULENT_MIXINGPLANE= 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, 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 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 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') diff --git a/meson_scripts/init.py b/meson_scripts/init.py index 4ed6f053dc9..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 = "c19c53ea2b85ccfb185f1c6c87044dc0b5bc7ae0" + sha_version_mlpcpp = "6865a58b22f21a92977839d9c93eae9522402f55" github_repo_mlpcpp = "https://github.com/EvertBunschoten/MLPCpp" medi_name = "MeDiPack" diff --git a/subprojects/MLPCpp b/subprojects/MLPCpp index c19c53ea2b8..6865a58b22f 160000 --- a/subprojects/MLPCpp +++ b/subprojects/MLPCpp @@ -1 +1 @@ -Subproject commit c19c53ea2b85ccfb185f1c6c87044dc0b5bc7ae0 +Subproject commit 6865a58b22f21a92977839d9c93eae9522402f55