Skip to content

Commit b3accfa

Browse files
committed
Added axisymmetric regression case
1 parent c913819 commit b3accfa

2 files changed

Lines changed: 232 additions & 0 deletions

File tree

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2+
% %
3+
% SU2 configuration file %
4+
% Case description: Axisymmetric supersonic converging-diverging air nozzle %
5+
% Author: Florian Dittmann %
6+
% Date: 2021.12.02 %
7+
% File Version 7.3.0 "Blackbird" %
8+
% %
9+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10+
11+
% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------%
12+
%
13+
% Physical governing equations (EULER, NAVIER_STOKES,
14+
% FEM_EULER, FEM_NAVIER_STOKES, FEM_RANS, FEM_LES,
15+
% WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY,
16+
% POISSON_EQUATION)
17+
SOLVER= RANS
18+
%
19+
% Specify turbulence model (NONE, SA, SA_NEG, SST, SA_E, SA_COMP, SA_E_COMP)
20+
KIND_TURB_MODEL= SST
21+
%
22+
% Mathematical problem (DIRECT, CONTINUOUS_ADJOINT, DISCRETE_ADJOINT)
23+
MATH_PROBLEM= DISCRETE_ADJOINT
24+
%
25+
% Restart solution (NO, YES)
26+
RESTART_SOL= NO
27+
%
28+
% System of measurements (SI, US)
29+
% International system of units (SI): ( meters, kilograms, Kelvins,
30+
% Newtons = kg m/s^2, Pascals = N/m^2,
31+
% Density = kg/m^3, Speed = m/s,
32+
% Equiv. Area = m^2 )
33+
% United States customary units (US): ( inches, slug, Rankines, lbf = slug ft/s^2,
34+
% psf = lbf/ft^2, Density = slug/ft^3,
35+
% Speed = ft/s, Equiv. Area = ft^2 )
36+
SYSTEM_MEASUREMENTS= SI
37+
%
38+
AXISYMMETRIC= YES
39+
%
40+
% -------------------- COMPRESSIBLE FREE-STREAM DEFINITION --------------------%
41+
%
42+
% Mach number (non-dimensional, based on the free-stream values)
43+
MACH_NUMBER= 1E-9
44+
%
45+
% Angle of attack (degrees, only for compressible flows)
46+
AOA= 0.0
47+
%
48+
% Side-slip angle (degrees, only for compressible flows)
49+
SIDESLIP_ANGLE= 0.0
50+
%
51+
% Init option to choose between Reynolds (default) or thermodynamics quantities
52+
% for initializing the solution (REYNOLDS, TD_CONDITIONS)
53+
INIT_OPTION= TD_CONDITIONS
54+
%
55+
% Free-stream option to choose between density and temperature (default) for
56+
% initializing the solution (TEMPERATURE_FS, DENSITY_FS)
57+
FREESTREAM_OPTION= TEMPERATURE_FS
58+
%
59+
% Free-stream pressure (101325.0 N/m^2, 2116.216 psf by default)
60+
FREESTREAM_PRESSURE= 1400000
61+
%
62+
% Free-stream temperature (288.15 K, 518.67 R by default)
63+
FREESTREAM_TEMPERATURE= 373.15
64+
%
65+
% Compressible flow non-dimensionalization (DIMENSIONAL, FREESTREAM_PRESS_EQ_ONE,
66+
% FREESTREAM_VEL_EQ_MACH, FREESTREAM_VEL_EQ_ONE)
67+
REF_DIMENSIONALIZATION= DIMENSIONAL
68+
69+
% ---- IDEAL GAS, POLYTROPIC, VAN DER WAALS AND PENG ROBINSON CONSTANTS -------%
70+
%
71+
% Fluid model (STANDARD_AIR, IDEAL_GAS, VW_GAS, PR_GAS,
72+
% CONSTANT_DENSITY, INC_IDEAL_GAS, INC_IDEAL_GAS_POLY)
73+
FLUID_MODEL= STANDARD_AIR
74+
75+
% --------------------------- VISCOSITY MODEL ---------------------------------%
76+
%
77+
% Viscosity model (SUTHERLAND, CONSTANT_VISCOSITY, POLYNOMIAL_VISCOSITY).
78+
VISCOSITY_MODEL= CONSTANT_VISCOSITY
79+
%
80+
% Molecular Viscosity that would be constant (1.716E-5 by default)
81+
MU_CONSTANT= 1.716E-5
82+
83+
% --------------------------- THERMAL CONDUCTIVITY MODEL ----------------------%
84+
%
85+
% Laminar Conductivity model (CONSTANT_CONDUCTIVITY, CONSTANT_PRANDTL,
86+
% POLYNOMIAL_CONDUCTIVITY).
87+
CONDUCTIVITY_MODEL= CONSTANT_PRANDTL
88+
%
89+
% Laminar Prandtl number (0.72 (air), only for CONSTANT_PRANDTL)
90+
PRANDTL_LAM= 0.72
91+
%
92+
% Turbulent Prandtl number (0.9 (air) by default)
93+
PRANDTL_TURB= 0.90
94+
95+
% -------------------- BOUNDARY CONDITION DEFINITION --------------------------%
96+
%
97+
% Navier-Stokes (no-slip), constant heat flux wall marker(s) (NONE = no marker)
98+
% Format: ( marker name, constant heat flux (J/m^2), ... )
99+
MARKER_HEATFLUX= ( WALL, 0.0 )
100+
%
101+
% Symmetry boundary marker(s) (NONE = no marker)
102+
MARKER_SYM= ( SYMMETRY )
103+
%
104+
% Riemann boundary marker(s) (NONE = no marker)
105+
% Format: (marker, data kind flag, list of data)
106+
MARKER_RIEMANN= ( INFLOW, TOTAL_CONDITIONS_PT, 1400000.0, 373.15, 1.0, 0.0, 0.0, OUTFLOW, STATIC_PRESSURE, 100000.0, 0.0, 0.0, 0.0, 0.0 )
107+
108+
% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------%
109+
%
110+
% Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES)
111+
NUM_METHOD_GRAD= GREEN_GAUSS
112+
%
113+
% CFL number (initial value for the adaptive CFL number)
114+
CFL_NUMBER= 1000.0
115+
%
116+
% Adaptive CFL number (NO, YES)
117+
CFL_ADAPT= NO
118+
%
119+
% Parameters of the adaptive CFL number (factor down, factor up, CFL min value,
120+
% CFL max value )
121+
CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1000.0 )
122+
%
123+
% Maximum Delta Time in local time stepping simulations
124+
MAX_DELTA_TIME= 1E6
125+
126+
% ----------- SLOPE LIMITER AND DISSIPATION SENSOR DEFINITION -----------------%
127+
%
128+
% Monotonic Upwind Scheme for Conservation Laws (TVD) in the flow equations.
129+
% Required for 2nd order upwind schemes (NO, YES)
130+
MUSCL_FLOW= YES
131+
%
132+
% Slope limiter (NONE, VENKATAKRISHNAN, VENKATAKRISHNAN_WANG,
133+
% BARTH_JESPERSEN, VAN_ALBADA_EDGE)
134+
SLOPE_LIMITER_FLOW= NONE
135+
136+
% ------------------------ LINEAR SOLVER DEFINITION ---------------------------%
137+
%
138+
% Linear solver or smoother for implicit formulations (BCGSTAB, FGMRES, SMOOTHER_JACOBI,
139+
% SMOOTHER_ILU, SMOOTHER_LUSGS,
140+
% SMOOTHER_LINELET)
141+
LINEAR_SOLVER= FGMRES
142+
%
143+
% Preconditioner of the Krylov linear solver (ILU, LU_SGS, LINELET, JACOBI)
144+
LINEAR_SOLVER_PREC= ILU
145+
%
146+
% Linear solver ILU preconditioner fill-in level (0 by default)
147+
LINEAR_SOLVER_ILU_FILL_IN= 0
148+
%
149+
% Minimum error of the linear solver for implicit formulations
150+
LINEAR_SOLVER_ERROR= 0.01
151+
%
152+
% Max number of iterations of the linear solver for the implicit formulation
153+
LINEAR_SOLVER_ITER= 10
154+
155+
% -------------------------- MULTIGRID PARAMETERS -----------------------------%
156+
%
157+
% Multi-grid levels (0 = no multi-grid)
158+
MGLEVEL= 0
159+
160+
% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------%
161+
%
162+
% Convective numerical method (JST, LAX-FRIEDRICH, CUSP, ROE, AUSM, AUSMPLUSUP, AUSMPLUSUP2, HLLC,
163+
% TURKEL_PREC, MSW, FDS)
164+
CONV_NUM_METHOD_FLOW= ROE
165+
%
166+
% Entropy fix coefficient (0.0 implies no entropy fixing, 1.0 implies scalar
167+
% artificial dissipation)
168+
ENTROPY_FIX_COEFF= 0.1
169+
%
170+
% Time discretization (RUNGE-KUTTA_EXPLICIT, EULER_IMPLICIT, EULER_EXPLICIT)
171+
TIME_DISCRE_FLOW= EULER_IMPLICIT
172+
%
173+
174+
% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------%
175+
%
176+
% Convective numerical method (SCALAR_UPWIND)
177+
CONV_NUM_METHOD_TURB= SCALAR_UPWIND
178+
%
179+
% Time discretization (EULER_IMPLICIT)
180+
TIME_DISCRE_TURB= EULER_IMPLICIT
181+
%
182+
% Reduction factor of the CFL coefficient in the turbulence problem
183+
CFL_REDUCTION_TURB= 1.0
184+
185+
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
186+
%
187+
% Number of total iterations
188+
ITER= 1000
189+
%
190+
% Min value of the residual (log10 of the residual)
191+
CONV_RESIDUAL_MINVAL= -12
192+
%
193+
% Start convergence criteria at iteration number
194+
CONV_STARTITER= 10
195+
196+
% ------------------------- INPUT/OUTPUT INFORMATION --------------------------%
197+
%
198+
% Mesh input file
199+
MESH_FILENAME= nozzle.su2
200+
%
201+
% Mesh input file format (SU2, CGNS)
202+
MESH_FORMAT= SU2
203+
%
204+
% Restart flow input file
205+
SOLUTION_FILENAME= solution_flow.dat
206+
%
207+
% Restart adjoint input file
208+
SOLUTION_ADJ_FILENAME= solution_adj.dat
209+
%
210+
% Output file restart adjoint
211+
RESTART_ADJ_FILENAME= restart_adj.dat
212+
%
213+
% Writing solution file frequency
214+
OUTPUT_WRT_FREQ= 1000
215+
%
216+
% Screen output
217+
SCREEN_OUTPUT= (INNER_ITER, RMS_ADJ_DENSITY, RMS_ADJ_ENERGY, RMS_ADJ_TKE, RMS_ADJ_DISSIPATION)

TestCases/parallel_regression_AD.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,21 @@ def main():
168168
discadj_incomp_turb_NACA0012_sst.tol = 0.00001
169169
test_list.append(discadj_incomp_turb_NACA0012_sst)
170170

171+
####################################################################
172+
### Disc. Adj. Axisymmetric RANS ###
173+
####################################################################
174+
175+
# Adjoint Axisymmetric RANS
176+
discadj_axisymmetric_rans_nozzle = TestCase('discadj_axisymmetric_rans')
177+
discadj_axisymmetric_rans_nozzle.cfg_dir = "axisymmetric_rans/air_nozzle"
178+
discadj_axisymmetric_rans_nozzle.cfg_file = "air_nozzle_adj.cfg"
179+
discadj_axisymmetric_rans_nozzle.test_iter = 10
180+
discadj_axisymmetric_rans_nozzle.test_vals = [10.000000, -10.391857, -15.524696, -7.715907, -17.350541]
181+
discadj_axisymmetric_rans_nozzle.su2_exec = "parallel_computation.py -f"
182+
discadj_axisymmetric_rans_nozzle.timeout = 1600
183+
discadj_axisymmetric_rans_nozzle.tol = 0.00001
184+
test_list.append(discadj_axisymmetric_rans_nozzle)
185+
171186
#######################################################
172187
### Unsteady Disc. adj. compressible RANS ###
173188
#######################################################

0 commit comments

Comments
 (0)