[案例分析]基于SU2的二維超聲速空腔非定常流動計算

空腔外形在內埋武器艙、起落架艙、超燃沖壓發動機燃燒室等先進飛行器部件中有著廣泛應用。本文以參考文獻(Zhang and Rona, 1998, Journal of Sound and Vibration)提供的空腔外形為對象,采用ddes方法計算二維超聲速空腔流動,檢驗SU2對于超聲速非定常流場的模擬能力。

[案例分析]基于SU2的二維超聲速空腔非定常流動計算的圖1

圖 1 二維超聲速空腔試驗紋影結果

[案例分析]基于SU2的二維超聲速空腔非定常流動計算的圖2

2.網格生成

計算網格直接在pointwise軟件中生成,網格包括空腔內部及平板上方兩個網格塊。空腔內部網格塊為321×149個網格點,平板上方網格塊為1011×359個網格點。平板上方邊界層內第一層網格高度為4.5×10-7米。

[案例分析]基于SU2的二維超聲速空腔非定常流動計算的圖3

(a)二維空腔流動全局計算網格(i,j方向每8個網格點顯示1個)

[案例分析]基于SU2的二維超聲速空腔非定常流動計算的圖4

(b)二維空腔流動局部計算網格(i,j方向每4個網格點顯示1個)

3.SU2求解器設置

3.1 流場求解cfg文件設置

下面介紹二維超聲速空腔算例的參數設置。

% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------%
%
% Physical governing equations (EULER, NAVIER_STOKES,
%                               WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY,
%                               POISSON_EQUATION)                        
PHYSICAL_PROBLEM= NAVIER_STOKES
%
% Specify turbulent model (NONE, SA, SA_NEG, SST)
KIND_TURB_MODEL= SA
HYBRID_RANSLES= SA_EDDES
%
% Mathematical problem (DIRECT, CONTINUOUS_ADJOINT)
MATH_PROBLEM= DIRECT
%
% Restart solution (NO, YES)
RESTART_SOL= NO
%initialization
TESTCASE_TYPE= CAVITY
% -------------------- COMPRESSIBLE FREE-STREAM DEFINITION --------------------%
%
% Mach number (non-dimensional, based on the free-stream values)
MACH_NUMBER= 1.5
%
% Angle of attack (degrees, only for compressible flows)
AOA= 0.0
%
% Init option to choose between Reynolds (default) or thermodynamics quantities
% for initializing the solution (REYNOLDS, TD_CONDITIONS)
INIT_OPTION= REYNOLDS
%
% Free-stream option to choose between density and temperature (default) for
% initializing the solution (TEMPERATURE_FS, DENSITY_FS)
FREESTREAM_OPTION= TEMPERATURE_FS
%
% Free-stream pressure (101325.0 N/m^2, 2116.216 psf by default)
FREESTREAM_PRESSURE= 5.38E4
%
% Free-stream temperature (288.15 K by default)
FREESTREAM_TEMPERATURE= 200
%
% Reynolds number (non-dimensional, based on the free-stream values)
REYNOLDS_NUMBER= 1.35E6
%
% Reynolds length (1 m by default)
REYNOLDS_LENGTH= 0.045
%
% Compressible flow non-dimensionalization (DIMENSIONAL, FREESTREAM_PRESS_EQ_ONE,
%                              FREESTREAM_VEL_EQ_MACH, FREESTREAM_VEL_EQ_ONE)
REF_DIMENSIONALIZATION= FREESTREAM_VEL_EQ_ONE
% ---------------------- 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= 0.045
% ------------------------- UNSTEADY SIMULATION -------------------------------%
%
% Unsteady simulation (NO, TIME_STEPPING, DUAL_TIME_STEPPING-1ST_ORDER, 
%                      DUAL_TIME_STEPPING-2ND_ORDER, TIME_SPECTRAL)
%UNSTEADY_SIMULATION= NO
UNSTEADY_SIMULATION= DUAL_TIME_STEPPING-2ND_ORDER
%
% Time Step for dual time stepping simulations (s)
% U_inf = 425 - L=4.5E-2  dt=0.002 - 
UNST_TIMESTEP= 2.12E-7
%
% Total Physical Time for dual time stepping simulations (s)
UNST_TIME= 1.06E-2
%
% Unsteady Courant-Friedrichs-Lewy number of the finest grid
UNST_CFL_NUMBER= 0.0
%
% Number of internal iterations (dual time method)
UNST_INT_ITER= 30
%
% Iteration number to begin unsteady restarts
UNST_RESTART_ITER= 2
% -------------------- BOUNDARY CONDITION DEFINITION --------------------------%
%
% Navier-Stokes wall boundary marker(s) (NONE = no marker)
MARKER_HEATFLUX= ( wall-down, 0.0 )
% Format: (inlet marker, temperature, static pressure, velocity_x,
%           velocity_y, velocity_z, ... ), i.e. primitive variables specified.
MARKER_SUPERSONIC_INLET= ( inlet, 200,5.38E4,425.22,0,0 )
MARKER_SUPERSONIC_OUTLET= ( outlet )
MARKER_SYM= ( wall-up )
%
% Farfield boundary marker(s) (NONE = no marker)
%MARKER_FAR= ( FARFIELD )
%
% Marker(s) of the surface to be plotted or designed
MARKER_PLOTTING= ( wall-down )
%
% Marker(s) of the surface where the functional (Cd, Cl, etc.) will be evaluated
MARKER_MONITORING= (  wall-down )
% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------%
%
% Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES)
NUM_METHOD_GRAD= GREEN_GAUSS
%
% Courant-Friedrichs-Lewy condition of the finest grid
CFL_NUMBER= 10
%
% Adaptive CFL number (NO, YES)
CFL_ADAPT= NO
%
% Parameters of the adaptive CFL number (factor down, factor up, CFL min value,
%                                        CFL max value )
CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 )
%
% Number of total iterations
EXT_ITER= 50000
%
% Linear solver for the implicit formulation (BCGSTAB, FGMRES)
LINEAR_SOLVER= BCGSTAB
%
% Min error of the linear solver for the implicit formulation
LINEAR_SOLVER_ERROR= 1E-6
%
% Max number of iterations of the linear solver for the implicit formulation
LINEAR_SOLVER_ITER= 20
% -------------------------- 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, 2, 3, 3 )
%
% Multi-grid post-smoothing level
MG_POST_SMOOTH= ( 0, 0, 0, 0 )
%
% Jacobi implicit smoothing of the correction
MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 )
%
% Damping factor for the residual restriction
MG_DAMP_RESTRICTION= 0.95
%
% Damping factor for the correction prolongation
MG_DAMP_PROLONGATION= 0.95
% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------%
%
% Convective numerical method (JST, LAX-FRIEDRICH, CUSP, ROE, AUSM, HLLC,
%                              TURKEL_PREC, MSW)
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
%
% Slope limiter (VENKATAKRISHNAN, MINMOD)
SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
%
% Coefficient for the limiter (smooth regions)
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
% -------------------- 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
%
% Time discretization (EULER_IMPLICIT)
TIME_DISCRE_TURB= EULER_IMPLICIT
% ---------------- ADJOINT-FLOW NUMERICAL METHOD DEFINITION -------------------%
% Adjoint problem boundary condition (DRAG, LIFT, SIDEFORCE, MOMENT_X,
%                                     MOMENT_Y, MOMENT_Z, EFFICIENCY, 
%                                     EQUIVALENT_AREA, NEARFIELD_PRESSURE,
%                                     FORCE_X, FORCE_Y, FORCE_Z, THRUST, 
%                                     TORQUE, FREE_SURFACE, TOTAL_HEAT,
%                                     MAXIMUM_HEATFLUX, INVERSE_DESIGN_PRESSURE,
%                                     INVERSE_DESIGN_HEATFLUX)
OBJECTIVE_FUNCTION= DRAG
%
% Convective numerical method (JST, LAX-FRIEDRICH, ROE)
CONV_NUM_METHOD_ADJFLOW= JST
%
% Monotonic Upwind Scheme for Conservation Laws (TVD) in the adjoint flow equations.
%           Required for 2nd order upwind schemes (NO, YES)
MUSCL_ADJFLOW= YES
%
% Slope limiter (NONE, VENKATAKRISHNAN, BARTH_JESPERSEN, VAN_ALBADA_EDGE,
%                SHARP_EDGES, WALL_DISTANCE)
SLOPE_LIMITER_ADJFLOW= NONE
%
% Coefficient for the sharp edges limiter
ADJ_SHARP_LIMITER_COEFF= 3.0
%
% 2nd, and 4th order artificial dissipation coefficients
ADJ_JST_SENSOR_COEFF= ( 0.0, 0.01 )
%
% Reduction factor of the CFL coefficient in the adjoint problem
CFL_REDUCTION_ADJFLOW= 0.75
%
% Time discretization (RUNGE-KUTTA_EXPLICIT, EULER_IMPLICIT)
TIME_DISCRE_ADJFLOW= EULER_IMPLICIT
%
% Adjoint frozen viscosity (NO, YES)
FROZEN_VISC_CONT= YES
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
%
% Convergence criteria (CAUCHY, RESIDUAL)
%
CONV_CRITERIA= RESIDUAL
%
% Residual reduction (order of magnitude with respect to the initial value)
RESIDUAL_REDUCTION= 3
%
% Min value of the residual (log10 of the residual)
RESIDUAL_MINVAL= -15
%
% Start convergence criteria at iteration number
STARTCONV_ITER= 10
%
% Number of elements to apply the criteria
CAUCHY_ELEMS= 100
%
% Epsilon to control the series convergence
CAUCHY_EPS= 1E-6
%
% Function to apply the criteria (LIFT, DRAG, NEARFIELD_PRESS, SENS_GEOMETRY, 
% 	      	    		 SENS_MACH, DELTA_LIFT, DELTA_DRAG)
CAUCHY_FUNC_FLOW= DRAG
% ------------------------- INPUT/OUTPUT INFORMATION --------------------------%
%
% Mesh input file
MESH_FILENAME= cavity-LD3-fine.su2
%
% Mesh input file format (SU2, CGNS, NETCDF_ASCII)
MESH_FORMAT= SU2
%
% Mesh output file
MESH_OUT_FILENAME= mesh_out.su2
%
% Restart flow input file
SOLUTION_FLOW_FILENAME= restart_flow.dat
%
% Restart adjoint input file
SOLUTION_ADJ_FILENAME= solution_adj.dat
%
% Output file format (PARAVIEW, TECPLOT, STL)
OUTPUT_FORMAT= TECPLOT_BINARY
%
% Output file convergence history (w/o extension) 
CONV_FILENAME= history
%
% Output file restart flow
RESTART_FLOW_FILENAME= restart_flow.dat
%
% Output file restart adjoint
RESTART_ADJ_FILENAME= restart_adj.dat
%
% Output file flow (w/o extension) variables
VOLUME_FLOW_FILENAME= flow
%
% Output file adjoint (w/o extension) variables
VOLUME_ADJ_FILENAME= adjoint
%
% Output objective function gradient (using continuous adjoint)
GRAD_OBJFUNC_FILENAME= of_grad.dat
%
% Output file surface flow coefficient (w/o extension)
SURFACE_FLOW_FILENAME= surface_flow
%
% Output file surface adjoint coefficient (w/o extension)
SURFACE_ADJ_FILENAME= surface_adjoint
%
% Writing solution file frequency
WRT_SOL_FREQ= 100
%
% Writing convergence history frequency
WRT_CON_FREQ= 1
% Writing solution file frequency for physical time steps (dual time)
WRT_SOL_FREQ_DUALTIME= 30
WRT_SURF_FREQ_DUALTIME= 1

3.2 并行運算腳本sh文件設置

在算例cfg文件所在目錄,創建如下內容的sh文件,采用sbatch命令提交即可。

#!/bin/bash
#SBATCH -N 7                               #并行節點數
#SBATCH -n 168                            #并行cpu數,=24*節點數
#SBATCH --job-name=cavity     #job的名稱
#SBATCH --ntasks-per-node=24    #每個節點用到的cpu數,無需修改
#SBATCH --output=%j.out             #算例運行過程中在屏幕上顯示的信息
#SBATCH --error=%j.err                #報錯信息
mpirun  SU2_CFD ddes_2d_cavity_unsteady.cfg         #流場求解
mpirun  SU2_SOL ddes_2d_cavity_unsteady.cfg        #輸出tecplot結果文件

4.結果分析

4.1 與試驗結果對比

圖3將SU2計算的二維超聲速空腔流場與試驗紋影進行了對比。可以看到計算結果清晰捕捉到了空腔前緣斜激波和各種運動波系結構,計算得到的波系結構形狀、相對位置等與試驗結果基本一致。

[案例分析]基于SU2的二維超聲速空腔非定常流動計算的圖5

(a)

[案例分析]基于SU2的二維超聲速空腔非定常流動計算的圖6

(b)

圖 3 試驗紋影結果與計算結果對比

4.2 腔內波系結構

[案例分析]基于SU2的二維超聲速空腔非定常流動計算的圖7

(a)

[案例分析]基于SU2的二維超聲速空腔非定常流動計算的圖8

(b)

圖 4 超聲速空腔內部流動結構

圖4展示了SU2計算得到的超聲速空腔內部流動結構。可以清晰看到空腔內部各種尺度的旋渦結構以及運動激波,以及各種流動結構之間的相互作用過程。

5.結論

采用SU2計算了二維超聲速空腔流場,計算得到的波系結構與試驗紋影結果符合一致,表明SU2具備模擬二維空腔等超聲速非定常流場的能力。

本文轉自知乎專欄:SU2:學習與應用,原帖地址:https://zhuanlan.zhihu.com/p/62405162,感謝原作者。

登錄后免費查看全文
立即登錄
App下載
技術鄰APP
工程師必備
  • 項目客服
  • 培訓客服
  • 平臺客服

TOP

3
2