|
[Sponsors] |
May 26, 2021, 07:12 |
CFL RAMPING IN v 7.1.1
|
#1 |
Senior Member
|
Hi guys,
I just noticed something strange in v 7.1.1 I also run 7.0.8 Same case in 7.1.1 converges to e-13 after 81876 iterations. In 7.0.8 converges to e-13 after 12771 iterations. Both ramp CFL by this: % Courant-Friedrichs-Lewy condition of the finest grid CFL_NUMBER= 5.0 % % Adaptive CFL number (NO, YES) CFL_ADAPT= YES % % Parameters of the adaptive CFL number (factor down, factor up, CFL min value, % CFL max value ) CFL_ADAPT_PARAM= ( 0.2, 1.15, 1.0, 35.0 ) %------------------------------------------------------------------------- However, I noticed in 7.1.1 after e-11 something it reduces the CFL spontaneously and suddenly from the max value to the min value! Help me understand what's happening? It is a steady low-speed case running by compressible solver. Best |
|
May 26, 2021, 09:07 |
|
#2 |
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 13 |
We updated the adaptive strategy in version 7.1.0 https://github.com/su2code/SU2/pull/1036
If you share your config I can try to point out how you can tune the CFL adaptation. |
|
May 26, 2021, 10:19 |
|
#3 | |
Senior Member
|
Quote:
Here is the config... nothing fancy there.. % ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% % % Physical governing equations (EULER, NAVIER_STOKES, % WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, % POISSON_EQUATION) SOLVER= RANS % % Specify turbulent model (NONE, SA, SA_NEG, SST) KIND_TURB_MODEL= SST %KIND_TRANS_MODEL = BC % Free-stream turbulence intensity %FREESTREAM_TURBULENCEINTENSITY= 0.05 % % Free-stream ratio between turbulent and laminar viscosity %FREESTREAM_TURB2LAMVISCRATIO= 10.0 % % Mathematical problem (DIRECT, CONTINUOUS_ADJOINT, DISCRETE_ADJOINT) MATH_PROBLEM= DIRECT % % Restart solution (NO, YES) RESTART_SOL= NO %DIRECT_DIFF=DESIGN_VARIABLES OBJECTIVE_FUNCTION= DRAG % -------------------- COMPRESSIBLE FREE-STREAM DEFINITION --------------------% % % Mach number (non-dimensional, based on the free-stream values) MACH_NUMBER= 0.15 % % Reynolds number (non-dimensional, based on the free-stream values) REYNOLDS_NUMBER= 10.0E6 % % Reynolds length (1 m by default) REYNOLDS_LENGTH= 1.0 % % Angle of attack (degrees, only for compressible flows) AOA= 5.0 % % Free-stream temperature (288.15 K by default) FREESTREAM_TEMPERATURE= 288.15 % % ---------------------- REFERENCE VALUE DEFINITION ---------------------------% % % Reference origin for moment computation REF_ORIGIN_MOMENT_X = 0.25 REF_ORIGIN_MOMENT_Y = 0.00 REF_ORIGIN_MOMENT_Z = 0.00 % % Reference length for pitching, rolling, and yawing non-dimensional moment REF_LENGTH= 1.0 % % Reference area for force coefficients (0 implies automatic calculation) REF_AREA= 1.0 % % Flow non-dimensionalization (DIMENSIONAL, FREESTREAM_PRESS_EQ_ONE, % FREESTREAM_VEL_EQ_MACH, FREESTREAM_VEL_EQ_ONE) REF_DIMENSIONALIZATION= FREESTREAM_VEL_EQ_ONE % -------------------- BOUNDARY CONDITION DEFINITION --------------------------% % % Navier-Stokes wall boundary marker(s) (NONE = no marker) MARKER_HEATFLUX= ( airfoil, 0.0 ) % % Farfield boundary marker(s) (NONE = no marker) MARKER_FAR= ( farfield ) % ------------------------ SURFACES IDENTIFICATION ----------------------------% % % Marker(s) of the surface to be plotted or designed MARKER_PLOTTING= ( airfoil ) % % Marker(s) of the surface where the functional (Cd, Cl, etc.) will be evaluated MARKER_MONITORING= ( airfoil ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % % Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES, LEAST_SQUARES) NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES % % Courant-Friedrichs-Lewy condition of the finest grid CFL_NUMBER= 5.0 % % Adaptive CFL number (NO, YES) CFL_ADAPT= YES % % Parameters of the adaptive CFL number (factor down, factor up, CFL min value, % CFL max value ) CFL_ADAPT_PARAM= ( 0.2, 1.15, 1.0, 35.0 ) % % Runge-Kutta alpha coefficients % RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % % Linear solver for implicit formulations (LU_SGS, BCGSTAB, % GMRESBCGSTAB, FGMRES) LINEAR_SOLVER= FGMRES % % Preconditioner of the Krylov linear solver (JACOBI, LINELET, LU_SGS, ILU) LINEAR_SOLVER_PREC= ILU % % Minimum error of the linear solver for implicit formulations LINEAR_SOLVER_ERROR= 1E-8 % % Max number of iterations of the linear solver for the implicit formulation LINEAR_SOLVER_ITER= 30 % % Relaxation factor for smoother-type solvers (LINEAR_SOLVER= SMOOTHER) LINEAR_SOLVER_SMOOTHER_RELAXATION= 1.0 % -------------------------- MULTIGRID PARAMETERS -----------------------------% % % Multi-Grid Levels (0 = no multi-grid) MGLEVEL= 0 % % Multi-grid cycle (V_CYCLE, W_CYCLE, FULLMG_CYCLE) MGCYCLE= W_CYCLE % % Multi-grid pre-smoothing level MG_PRE_SMOOTH= ( 1, 4, 6, 6 ) % % Multi-grid post-smoothing level MG_POST_SMOOTH= ( 3, 3, 3, 3 ) % % Jacobi implicit smoothing of the correction MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 ) % % Damping factor for the residual restriction MG_DAMP_RESTRICTION= 0.97 % % Damping factor for the correction prolongation MG_DAMP_PROLONGATION= 0.97 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % % Convective numerical method (JST, LAX-FRIEDRICH, CUSP, ROE, AUSM, HLLC, % TURKEL_PREC, MSW, FDS, SLAU2) CONV_NUM_METHOD_FLOW= JST % % Monotonic Upwind Scheme for Conservation Laws (TVD) in the flow equations. % Required for 2nd order upwind schemes (NO, YES) %MUSCL_FLOW= YES % % Entropy fix coefficient (0.0 implies no entropy fixing, 1.0 implies scalar % artificial dissipation) %ENTROPY_FIX_COEFF= 0.28 %USE_VECTORIZATION= YES % %USE_VECTORIZATION= YES % Slope limiter (NONE, VENKATAKRISHNAN, VENKATAKRISHNAN_WANG, % BARTH_JESPERSEN, VAN_ALBADA_EDGE) SLOPE_LIMITER_FLOW= NONE % % Coefficient for the Venkats limiter (upwind scheme). A larger values decrease % the extent of limiting, values approaching zero cause % lower-order approximation to the solution (0.05 by default) VENKAT_LIMITER_COEFF= 0.03 % % 2nd and 4th order artificial dissipation coefficients JST_SENSOR_COEFF= ( 0.5, 0.02 ) % % Time discretization (RUNGE-KUTTA_EXPLICIT, EULER_IMPLICIT, EULER_EXPLICIT) TIME_DISCRE_FLOW= EULER_IMPLICIT CENTRAL_JACOBIAN_FIX_FACTOR= 2.0 % -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------% % % Convective numerical method (SCALAR_UPWIND) CONV_NUM_METHOD_TURB= SCALAR_UPWIND % % Monotonic Upwind Scheme for Conservation Laws (TVD) in the turbulence equations. % Required for 2nd order upwind schemes (NO, YES) MUSCL_TURB= NO % % Slope limiter (VENKATAKRISHNAN, MINMOD) SLOPE_LIMITER_TURB= VENKATAKRISHNAN % % Time discretization (EULER_IMPLICIT) TIME_DISCRE_TURB= EULER_IMPLICIT % % Reduction factor of the CFL coefficient in the turbulence problem % CFL_REDUCTION_TURB= 1.0 % --------------------------- CONVERGENCE PARAMETERS --------------------------% % % Convergence criteria (CAUCHY, RESIDUAL) CONV_CRITERIA= RESIDUAL % % Convergence field %CONV_FIELD= RMS_DENSITY %CONV_FIELD= REL_RMS_DENSITY %CONV_FIELD=REL_RMS_ADJ_DENSITY % % Min value of the residual (log10 of the residual) CONV_RESIDUAL_MINVAL= -13 % % Start convergence criteria at iteration number CONV_STARTITER= 10 % % Number of total iterations ITER= 100000 |
||
May 26, 2021, 12:38 |
|
#4 |
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 13 |
The only situations that causes a sudden reversion to min CFL are:
1- An increase in residuals by more than 2 orders of magnitude over 100 iterations 2- Divergence of the linear solver The CFL is reduced (by 0.2 in your case) if the residuals appear to stagnate or if the linear solver does not converge to an acceptable tolerance. If in your case the CFL goes 35 -> 7 -> 1.4 -> 1, this is what is happening (i.e. reduction rather dropping straight to min). This acceptable tolerance is the maximum of the linear solver tolerance (1e-8 in your case) and the 5th parameter in CFL_ADAPT whose default is 0.001. The complete strategy is explained in the config_template.cfg file. You may find this advice on tuning the linear solver parameters helpful https://su2code.github.io/docs_v7/Li...id-simulations (in summary 1e-8 is way too low, and 30 iterations is a lot). If your problem does not respond well to higher CFL, i.e. diverges or stagnates, you may instead try to reduce CENTRAL_JACOBIAN_FIX_FACTOR from its default of 4 to 2-3, to check if this improves the convergence rate. |
|
May 26, 2021, 13:46 |
|
#5 | |
Senior Member
|
Quote:
I assume none of those situations applies here. That's weird. Actually I can increase the CFL to 1e+05 and it converges very well. I just updated my Desktop's SU2 from 7.0.8 to 7.1.1 because I was getting slightly different CL and CD from CFD solver and then the shape optimization's outcome in FADO was something very different. The only reason I don't increase the CFL more than 35 is because some of the shapes are deformed aggressively, so to make sure the solver converges to e-13 even for those I had to not increase it so much. However, for the initial shape, CFL ramping of v 7.1.1 after e-11 drops the CFL to the minimum value for no reason. That's my question. And then one direct solution has to iteration over 100K to get to e-13 while the solution already almost got converged around 7k. No sudden increase in residual's values as you see in attached histogram and no divergence of linear solver. It gets to e-13 eventually but with minimum CFL from e-11 to e-13. For v 7.0.8 there was no sudden CFL drop after e-11 and it was converging like in 7000 iterations to e-13 without any problem. This case in general has a very nice convergence behavior. I was curious what possibly could be the reason for sudden drop of CFL when everything is fine. I had it converged to e-13 for density based jst and l2roe and pressure based jst and fds and with 7 different levels of grid refinement. I just wondering what's happening for that particular case. The CENTRAL_JACOBIAN_FIX_FACTOR is already 2.0 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFL Adapt parameter | DLuo | SU2 | 7 | May 19, 2024 19:28 |
Is CFL number (or Courant number) omnipotent? | Vignesh2508 | Main CFD Forum | 11 | February 28, 2019 13:56 |
Test Case CFL Number Issues with Software Update | JBCFD | SU2 | 3 | July 14, 2017 13:05 |
Utility of providing the CFL and the time-step simultaneously | Lise | STAR-CCM+ | 1 | January 31, 2017 09:22 |
CFL ramp option | curky | SU2 | 1 | April 11, 2013 14:25 |