Skip to content

Commit b478e40

Browse files
authored
Merge pull request #1538 from su2code/vandv_regressions
Regression script for the V&V repo
2 parents a503f74 + 63fd45a commit b478e40

3 files changed

Lines changed: 177 additions & 1 deletion

File tree

.github/workflows/regression.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ jobs:
6060
strategy:
6161
fail-fast: false
6262
matrix:
63-
testscript: ['tutorials.py', 'parallel_regression.py', 'parallel_regression_AD.py', 'serial_regression.py', 'serial_regression_AD.py', 'hybrid_regression.py', 'hybrid_regression_AD.py']
63+
testscript: ['vandv.py', 'tutorials.py', 'parallel_regression.py', 'parallel_regression_AD.py', 'serial_regression.py', 'serial_regression_AD.py', 'hybrid_regression.py', 'hybrid_regression_AD.py']
6464
include:
65+
- testscript: 'vandv.py'
66+
tag: MPI
6567
- testscript: 'tutorials.py'
6668
tag: MPI
6769
- testscript: 'parallel_regression.py'

TestCases/vandv.py

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#!/usr/bin/env python
2+
3+
## \file vandv.py
4+
# \brief Regression tests for the V&V repository.
5+
# \note Rules for adding cases here:
6+
# - Use the SU2 --dry_run mode for configs of large tests.
7+
# - Restart from converged results for medium problems.
8+
# - Run small cases (<20s) to convergence.
9+
# \version 7.3.0 "Blackbird"
10+
#
11+
# SU2 Project Website: https://su2code.github.io
12+
#
13+
# The SU2 Project is maintained by the SU2 Foundation
14+
# (http://su2foundation.org)
15+
#
16+
# Copyright 2012-2022, SU2 Contributors (cf. AUTHORS.md)
17+
#
18+
# SU2 is free software; you can redistribute it and/or
19+
# modify it under the terms of the GNU Lesser General Public
20+
# License as published by the Free Software Foundation; either
21+
# version 2.1 of the License, or (at your option) any later version.
22+
#
23+
# SU2 is distributed in the hope that it will be useful,
24+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
25+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26+
# Lesser General Public License for more details.
27+
#
28+
# You should have received a copy of the GNU Lesser General Public
29+
# License along with SU2. If not, see <http://www.gnu.org/licenses/>.
30+
31+
import sys
32+
from TestCase import TestCase
33+
34+
def main():
35+
'''This program runs a subset of the V&V cases.'''
36+
37+
test_list = []
38+
39+
##########################
40+
### Compressible RANS ###
41+
##########################
42+
43+
# 30P30N
44+
channel = TestCase('30P30N')
45+
channel.cfg_dir = "vandv/rans/30p30n"
46+
channel.cfg_file = "config.cfg"
47+
channel.test_iter = 20
48+
channel.test_vals = [-10.628370, -10.299097, -10.485327, -10.238060, -13.517229, 0.050962, 2.828563, 1.317849, -0.227233]
49+
test_list.append(channel)
50+
51+
#################
52+
### RUN TESTS ###
53+
#################
54+
55+
for test in test_list:
56+
test.su2_exec = "mpirun -n 2 SU2_CFD"
57+
test.timeout = 300
58+
test.tol = 1e-5
59+
#end
60+
61+
pass_list = [ test.run_test() for test in test_list ]
62+
63+
# Tests summary
64+
print('==================================================================')
65+
print('Summary of the V&V tests')
66+
print('python version:', sys.version)
67+
for i, test in enumerate(test_list):
68+
if (pass_list[i]):
69+
print(' passed - %s'%test.tag)
70+
else:
71+
print('* FAILED - %s'%test.tag)
72+
73+
if all(pass_list):
74+
sys.exit(0)
75+
else:
76+
sys.exit(1)
77+
# done
78+
79+
if __name__ == '__main__':
80+
main()
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
% ------------------------------- SOLVER -------------------------------- %
2+
%
3+
SOLVER= RANS
4+
KIND_TURB_MODEL= SA
5+
REF_DIMENSIONALIZATION= FREESTREAM_VEL_EQ_MACH
6+
%
7+
% ----------------------------- FREESTREAM ------------------------------ %
8+
%
9+
MACH_NUMBER= 0.17
10+
AOA= 5.5
11+
INIT_OPTION= REYNOLDS
12+
FREESTREAM_OPTION= TEMPERATURE_FS
13+
FREESTREAM_TEMPERATURE= 295.56
14+
REYNOLDS_NUMBER= 1.71E6
15+
REYNOLDS_LENGTH= 0.4572
16+
%
17+
% -------------------------- REFERENCE VALUES --------------------------- %
18+
%
19+
REF_AREA= 0.4572
20+
REF_LENGTH= 0.4572
21+
REF_ORIGIN_MOMENT_X= 0.0
22+
REF_ORIGIN_MOMENT_Y= 0.0
23+
REF_ORIGIN_MOMENT_Z= 0.0
24+
%
25+
% ------------------------- BOUNDARY CONDITIONS ------------------------- %
26+
%
27+
MARKER_HEATFLUX= ( wall, 0.0 )
28+
MARKER_FAR= ( farfield )
29+
MARKER_PLOTTING= ( wall )
30+
MARKER_MONITORING= ( wall )
31+
%
32+
% ---------------------------- FLUID MODELS ----------------------------- %
33+
%
34+
FLUID_MODEL= STANDARD_AIR
35+
GAMMA_VALUE= 1.4
36+
GAS_CONSTANT= 287.058
37+
%
38+
VISCOSITY_MODEL= SUTHERLAND
39+
MU_REF= 1.716E-5
40+
MU_T_REF= 273.15
41+
SUTHERLAND_CONSTANT= 110.4
42+
%
43+
CONDUCTIVITY_MODEL= CONSTANT_PRANDTL
44+
PRANDTL_LAM= 0.72
45+
PRANDTL_TURB= 0.90
46+
%
47+
% ----------------------- SPATIAL DISCRETIZATION ------------------------ %
48+
%
49+
NUM_METHOD_GRAD= GREEN_GAUSS
50+
CONV_NUM_METHOD_FLOW= ROE
51+
ENTROPY_FIX_COEFF= 1e-5
52+
MUSCL_FLOW= YES
53+
SLOPE_LIMITER_FLOW= VAN_ALBADA_EDGE
54+
%
55+
CONV_NUM_METHOD_TURB= SCALAR_UPWIND
56+
MUSCL_TURB= NO
57+
%
58+
% ---------- PSEUDOTIME INTEGRATION / CONVERGENCE ACCELERATION ---------- %
59+
%
60+
USE_VECTORIZATION= YES
61+
TIME_DISCRE_FLOW= EULER_IMPLICIT
62+
TIME_DISCRE_TURB= EULER_IMPLICIT
63+
%
64+
CFL_NUMBER= 40
65+
CFL_REDUCTION_TURB= 1.0
66+
CFL_ADAPT= NO
67+
%
68+
LINEAR_SOLVER= FGMRES
69+
LINEAR_SOLVER_PREC= ILU
70+
LINEAR_SOLVER_ERROR= 0.2
71+
LINEAR_SOLVER_ITER= 4
72+
%
73+
MGLEVEL= 0
74+
NEWTON_KRYLOV= YES
75+
NEWTON_KRYLOV_IPARAM= ( 0, 0, 1 ) % n0, np, ft
76+
NEWTON_KRYLOV_DPARAM= ( 0.0, 1e-20, -3, 1e-5 ) % r0, tp, rf, e
77+
%
78+
% ------------------------ CONVERGENCE CRITERIA ------------------------- %
79+
%
80+
ITER= 10000
81+
CONV_RESIDUAL_MINVAL= -11.5
82+
%
83+
% --------------------------- INPUT / OUTPUT ---------------------------- %
84+
%
85+
MESH_FILENAME= 2D_L1_coarse_r1.su2
86+
MESH_FORMAT= SU2
87+
RESTART_SOL= YES
88+
OUTPUT_WRT_FREQ= 1000
89+
SCREEN_WRT_FREQ_INNER= 1
90+
HISTORY_OUTPUT= ( ITER, RMS_RES, AERO_COEFF )
91+
SCREEN_OUTPUT= ( INNER_ITER, RMS_DENSITY, RMS_MOMENTUM-X, RMS_MOMENTUM-Y,\
92+
RMS_ENERGY, RMS_NU_TILDE, DRAG, LIFT, MOMENT_Z,\
93+
LINSOL_RESIDUAL )
94+

0 commit comments

Comments
 (0)