Skip to content

Commit a2758c9

Browse files
Fix LM transition model restart and add automated regression test #2606
1 parent cc1a3a0 commit a2758c9

4 files changed

Lines changed: 42 additions & 2 deletions

File tree

SU2_CFD/src/solvers/CTransLMSolver.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,7 @@ void CTransLMSolver::LoadRestart(CGeometry** geometry, CSolver*** solver, CConfi
549549

550550
/*--- Note: Intermittency_Sep and Intermittency_Eff are derived variables computed in Postprocessing,
551551
* not solution variables stored in the restart file. They will be recomputed after this function
552-
* completes. Previously, this code incorrectly tried to read them from indices [index+2] and [index+3],
553-
* which caused a buffer overflow since only nVar=2 solution variables are stored per point. ---*/
552+
* completes. ---*/
554553

555554
/*--- Increment the overall counter for how many points have been loaded. ---*/
556555
counter++;

TestCases/serial_regression.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,16 @@ def main():
569569
schubauer_klebanoff_transition.test_iter = 10
570570
schubauer_klebanoff_transition.test_vals = [-8.284308, -13.239421, 0.000057, 0.007982]
571571
test_list.append(schubauer_klebanoff_transition)
572+
573+
# LM Transition model restart
574+
lm_transition_restart = TestCase('lm_transition_restart')
575+
lm_transition_restart.cfg_dir = "transition/LM_NACA0012"
576+
lm_transition_restart.cfg_file = "trans_LM_restart.cfg"
577+
lm_transition_restart.test_iter = 4
578+
lm_transition_restart.test_vals = [-1.654301, -5.151570, -2.075488, 0.000000, 0.000000]
579+
lm_transition_restart.tol = 0.001
580+
test_list.append(lm_transition_restart)
581+
572582

573583
#####################################
574584
### Cont. adj. compressible Euler ###
368 KB
Binary file not shown.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
SOLVER= RANS
2+
KIND_TURB_MODEL= SA
3+
KIND_TRANS_MODEL= LM
4+
FREESTREAM_INTERMITTENCY= 1.0
5+
FREESTREAM_TURBULENCEINTENSITY= 0.05
6+
MACH_NUMBER= 0.8
7+
AOA= 1.25
8+
REF_DIMENSIONALIZATION= DIMENSIONAL
9+
REF_LENGTH= 1.0
10+
REF_AREA= 1.0
11+
FREESTREAM_PRESSURE= 101325.0
12+
FREESTREAM_TEMPERATURE= 288.15
13+
REYNOLDS_NUMBER= 6.5E6
14+
REYNOLDS_LENGTH= 1.0
15+
MARKER_HEATFLUX= ( airfoil, 0.0 )
16+
MARKER_FAR= ( farfield )
17+
NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
18+
CFL_NUMBER= 1.0
19+
ITER= 5
20+
LINEAR_SOLVER= FGMRES
21+
LINEAR_SOLVER_ERROR= 1E-6
22+
LINEAR_SOLVER_ITER= 5
23+
CONV_NUM_METHOD_FLOW= JST
24+
CONV_NUM_METHOD_TURB= SCALAR_UPWIND
25+
MESH_FILENAME= ../../../QuickStart/mesh_NACA0012_inv.su2
26+
MESH_FORMAT= SU2
27+
SOLUTION_FILENAME= restart_flow.dat
28+
RESTART_FILENAME= restart_flow_out.dat
29+
RESTART_SOL= YES
30+
CONV_FIELD= RMS_DENSITY
31+
SCREEN_OUTPUT= (INNER_ITER, RMS_DENSITY, RMS_NU_TILDE, RMS_INTERMITTENCY, RMS_MOM_RE, LIFT, DRAG)

0 commit comments

Comments
 (0)