|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Nicola Fontana
Join Date: Nov 2021
Posts: 8
Rep Power: 5 ![]() |
Hello everyone,
I'm trying to run a simulation of a compressible flow inside a converging nozzle, and I was able to obtain convergence for a simple geometry (just the nozzle without other region). Then I wanted to understand the effect of different shape, like the presence of an outlow region and an inflow channel as shown in figure, and also different settings (NS intead of euler). I tried different settings ( MUSCL on/off, Multigrid on/off, different CFL number) but I was never able to obtain convergence. I can't figure out if the problem is in the mesh, or in the configuration file. Could someone help me to understand what's wrong with this simulation and how to obtain convergence? Thank you in advance. Here is the .cfg file: Code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % SU2 configuration file % % Case description: Air flow in converging nozzle % % % % Author: Nicola Fontana % % Institution: % % Date: 24.11.2021 % % File Version 7.2 % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% % Physical governing equations (EULER, NAVIER_STOKES, % FEM_EULER, FEM_NAVIER_STOKES, FEM_RANS, FEM_LES, % WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, % POISSON_EQUATION) SOLVER = EULER %SOLVER = NAVIER_STOKES %SOLVER= RANS % Specify turbulence model (NONE, SA, SA_NEG, SST, SA_E, SA_COMP, SA_E_COMP) %KIND_TURB_MODEL= SA % Mathematical problem (DIRECT, CONTINUOUS_ADJOINT, DISCRETE_ADJOINT) MATH_PROBLEM= DIRECT % Restart solution (NO, YES) RESTART_SOL= NO % System of measurements (SI, US) % International system of units (SI): ( meters, kilograms, Kelvins, % Newtons = kg m/s^2, Pascals = N/m^2, % Density = kg/m^3, Speed = m/s, % Equiv. Area = m^2 ) SYSTEM_MEASUREMENTS= SI % -------------------- COMPRESSIBLE FREE-STREAM DEFINITION --------------------% % Mach number (non-dimensional, based on the free-stream values) MACH_NUMBER= 0.01 % Angle of attack (degrees, only for compressible flows) AOA= 0.0 % Side-slip angle (degrees, only for compressible flows) SIDESLIP_ANGLE= 0.0 % Init option to choose between Reynolds (default) or thermodynamics quantities % for initializing the solution (REYNOLDS, TD_CONDITIONS) INIT_OPTION= TD_CONDITIONS % 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= 101300 % Free-stream temperature (288.15 K, 518.67 R by default) FREESTREAM_TEMPERATURE= 290 % Compressible flow non-dimensionalization (DIMENSIONAL, FREESTREAM_PRESS_EQ_ONE, % FREESTREAM_VEL_EQ_MACH, FREESTREAM_VEL_EQ_ONE) %REF_DIMENSIONALIZATION= DIMENSIONAL % Reynolds number (non-dimensional, based on the free-stream values) %REYNOLDS_NUMBER= 540000 % Reynolds length (1 m, 1 inch by default) REYNOLDS_LENGTH= 1 % -------------------- BOUNDARY CONDITION DEFINITION --------------------------% % Inlet boundary type (TOTAL_CONDITIONS, MASS_FLOW) INLET_TYPE= TOTAL_CONDITIONS % Navier-Stokes (no-slip), constant heat flux wall marker(s) (NONE = no marker) % Format: ( marker name, constant heat flux (J/m^2), ... ) %MARKER_HEATFLUX= ( wall, 0.0 ) % Euler wall boundary marker(s) (NONE = no marker) MARKER_EULER = ( wall, outletup ) % Symmetry boundary marker(s) (NONE = no marker) MARKER_SYM= ( symmetry ) % Riemann boundary marker(s) (NONE = no marker) % Format: (marker, data kind flag, list of data) %MARKER_RIEMANN= ( inlet, TOTAL_CONDITIONS_PT, 101300, 298.15, 1.0, 0.0, 0.0, outlet, STATIC_PRESSURE, 100000, 0.0, 0.0, 0.0, 0.0 ) % Farfield marker (NONE = no marker) %MARKER_FAR = ( inlet ) % Inlet boundary marker(s) (NONE = no marker) % Format: ( inlet marker, total temperature, total pressure, flow_direction_x, % flow_direction_y, flow_direction_z, ... ) where flow_direction is % a unit vector. MARKER_INLET= ( inlet, 288.6, 102010.0, 1.0, 0.0, 0.0 ) %MARKER_INLET= ( inlet, 388.6, 203010.0, 1.0, 0.0, 0.0 ) % Outlet boundary marker(s) (NONE = no marker) % Format: ( outlet marker, back pressure (static), ... ) MARKER_OUTLET= ( outlet, 100300.0 ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES) NUM_METHOD_GRAD= GREEN_GAUSS % CFL number (initial value for the adaptive CFL number) CFL_NUMBER= 10 % 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.1, 2.0, 10.0, 10000.0 ) % Runge-Kutta alpha coefficients RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) % Maximum Delta Time in local time stepping simulations %MAX_DELTA_TIME= 1E6 % Number of total iterations ITER= 5000 % ----------- SLOPE LIMITER AND DISSIPATION SENSOR DEFINITION -----------------% % Monotonic Upwind Scheme for Conservation Laws (TVD) in the flow equations. % Required for 2nd order upwind schemes (NO, YES) %MUSCL_FLOW= YES % Slope limiter (NONE, VENKATAKRISHNAN, VENKATAKRISHNAN_WANG, % BARTH_JESPERSEN, VAN_ALBADA_EDGE) %SLOPE_LIMITER_FLOW= NONE % Monotonic Upwind Scheme for Conservation Laws (TVD) in the turbulence equations. % Required for 2nd order upwind schemes (NO, YES) %MUSCL_TURB= NO % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % Linear solver or smoother for implicit formulations (BCGSTAB, FGMRES, SMOOTHER_JACOBI, % SMOOTHER_ILU, SMOOTHER_LUSGS, % SMOOTHER_LINELET) LINEAR_SOLVER= FGMRES % Preconditioner of the Krylov linear solver (ILU, LU_SGS, LINELET, JACOBI) LINEAR_SOLVER_PREC= ILU % Minimum error of the linear solver for implicit formulations LINEAR_SOLVER_ERROR= 1E-10 % Max number of iterations of the linear solver for the implicit formulation LINEAR_SOLVER_ITER= 20 % -------------------------- MULTIGRID PARAMETERS -----------------------------% % MULTIGRID: OFF % Multi-grid levels (0 = no multi-grid) %MGLEVEL= 0 % MULTIGRID: ON % Multi-Grid Levels (0 = no multi-grid) %MGLEVEL= 3 % 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= 1.0 % Damping factor for the correction prolongation %MG_DAMP_PROLONGATION= 1.0 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % Convective numerical method (JST, LAX-FRIEDRICH, CUSP, ROE, AUSM, AUSMPLUSUP, AUSMPLUSUP2, HLLC, % TURKEL_PREC, MSW, FDS) CONV_NUM_METHOD_FLOW= JST % 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 ------------------% % ONLY IF TURB=ON % Convective numerical method (SCALAR_UPWIND) %CONV_NUM_METHOD_TURB= SCALAR_UPWIND % 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 field (see available fields with the -d flag at the command line) CONV_FIELD= RMS_DENSITY % Min value of the residual (log10 of the residual) CONV_RESIDUAL_MINVAL= -10 % Start convergence criteria at iteration number CONV_STARTITER= 10 % Number of elements to apply the criteria CONV_CAUCHY_ELEMS= 100 % Epsilon to control the series convergence CONV_CAUCHY_EPS= 1E-10 % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% % Mesh input file MESH_FILENAME= 3.Nozzle_InOut.su2 % Mesh input file format (SU2, CGNS) MESH_FORMAT= SU2 % Mesh output file MESH_OUT_FILENAME= mesh_out.su2 % Restart flow input file SOLUTION_FILENAME= solution_flow.dat % Output file format (TECPLOT, TECPLOT_BINARY, PARAVIEW, PARAVIEW_BINARY, % FIELDVIEW, FIELDVIEW_BINARY) TABULAR_FORMAT= CSV % Output file convergence history (w/o extension) CONV_FILENAME= history % Output file restart flow RESTART_FILENAME= restart_flow.dat % Output file flow (w/o extension) variables VOLUME_FILENAME= flow % Output file surface flow coefficient (w/o extension) SURFACE_FILENAME= surface_flow % Writing solution file frequency OUTPUT_WRT_FREQ= 1000 % Screen output SCREEN_OUTPUT= (INNER_ITER, RMS_DENSITY, RMS_TKE, RMS_DISSIPATION, LIFT, DRAG) |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 736
Rep Power: 21 ![]() |
How quickly does it diverge, immediately, or gradually over a number of iterations? If it is gradually, you could have a look at the residuals in the paraview file and see if the residuals are high at a specific location. In that case it might be mesh related and you have to refine your mesh or improve the mesh quality.
You can also have a look at the convergence of the linear solver by adding LINSOL_ITER LINSOL_RESIDUAL to SCREEN_OUTPUT and see if it converges. You can put CFL_ADAPT= NO to enforce a constant and low CFL. The CFL should be low enough that LINSOL_RESIDUAL reaches the residual criterion LINEAR_SOLVER_ERROR in the number of iterations LINEAR_SOLVER_ITER Somebody with more knowledge on compressible flows is better suited to comment on other aspects like choice of numerical scheme etc. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Nicola Fontana
Join Date: Nov 2021
Posts: 8
Rep Power: 5 ![]() |
Thank you for your reply.
I was able to obtain convergence of the solution with the following settings: Code:
% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% % Physical governing equations (EULER, NAVIER_STOKES, % FEM_EULER, FEM_NAVIER_STOKES, FEM_RANS, FEM_LES, % WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY, % POISSON_EQUATION) SOLVER = EULER %SOLVER = NAVIER_STOKES %SOLVER= RANS % Specify turbulence model (NONE, SA, SA_NEG, SST, SA_E, SA_COMP, SA_E_COMP) %KIND_TURB_MODEL= SA % Mathematical problem (DIRECT, CONTINUOUS_ADJOINT, DISCRETE_ADJOINT) MATH_PROBLEM= DIRECT % Restart solution (NO, YES) RESTART_SOL= YES % System of measurements (SI, US) % International system of units (SI): ( meters, kilograms, Kelvins, % Newtons = kg m/s^2, Pascals = N/m^2, % Density = kg/m^3, Speed = m/s, % Equiv. Area = m^2 ) SYSTEM_MEASUREMENTS= SI % -------------------- COMPRESSIBLE FREE-STREAM DEFINITION --------------------% % Mach number (non-dimensional, based on the free-stream values) MACH_NUMBER= 0.1 % Angle of attack (degrees, only for compressible flows) AOA= 0.0 % Side-slip angle (degrees, only for compressible flows) SIDESLIP_ANGLE= 0.0 % Init option to choose between Reynolds (default) or thermodynamics quantities % for initializing the solution (REYNOLDS, TD_CONDITIONS) INIT_OPTION= TD_CONDITIONS % 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= 101300 % Free-stream temperature (288.15 K, 518.67 R by default) FREESTREAM_TEMPERATURE= 290 % Compressible flow non-dimensionalization (DIMENSIONAL, FREESTREAM_PRESS_EQ_ONE, % FREESTREAM_VEL_EQ_MACH, FREESTREAM_VEL_EQ_ONE) %REF_DIMENSIONALIZATION= DIMENSIONAL % Reynolds number (non-dimensional, based on the free-stream values) %REYNOLDS_NUMBER= 540000 % Reynolds length (1 m, 1 inch by default) REYNOLDS_LENGTH= 1 % -------------------- BOUNDARY CONDITION DEFINITION --------------------------% % Inlet boundary type (TOTAL_CONDITIONS, MASS_FLOW) INLET_TYPE= TOTAL_CONDITIONS % Navier-Stokes (no-slip), constant heat flux wall marker(s) (NONE = no marker) % Format: ( marker name, constant heat flux (J/m^2), ... ) %MARKER_HEATFLUX= ( wall, 0.0 ) % Euler wall boundary marker(s) (NONE = no marker) MARKER_EULER = ( wall, outletup ) % Symmetry boundary marker(s) (NONE = no marker) MARKER_SYM= ( symmetry ) % Riemann boundary marker(s) (NONE = no marker) % Format: (marker, data kind flag, list of data) %MARKER_RIEMANN= ( farfield, TOTAL_CONDITIONS_PT, 101300, 298.15, 1.0, 0.0, 0.0, outlet, STATIC_PRESSURE, 100000, 0.0, 0.0, 0.0, 0.0 ) % Farfield marker (NONE = no marker) %MARKER_FAR = ( farfield ) % Inlet boundary marker(s) (NONE = no marker) % Format: ( inlet marker, total temperature, total pressure, flow_direction_x, % flow_direction_y, flow_direction_z, ... ) where flow_direction is % a unit vector. MARKER_INLET= ( inlet, 288.6, 102010.0, 1.0, 0.0, 0.0 ) %MARKER_INLET= ( farfield, 388.6, 203010.0, 1.0, 0.0, 0.0 ) % Outlet boundary marker(s) (NONE = no marker) % Format: ( outlet marker, back pressure (static), ... ) MARKER_OUTLET= ( outlet, 100300.0 ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES) NUM_METHOD_GRAD= GREEN_GAUSS % CFL number (initial value for the adaptive CFL number) CFL_NUMBER= 10 % 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.1, 2.0, 10.0, 10000.0 ) % Runge-Kutta alpha coefficients RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) % Maximum Delta Time in local time stepping simulations %MAX_DELTA_TIME= 1E6 % Number of total iterations ITER= 5000 % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % Linear solver or smoother for implicit formulations (BCGSTAB, FGMRES, SMOOTHER_JACOBI, % SMOOTHER_ILU, SMOOTHER_LUSGS, % SMOOTHER_LINELET) LINEAR_SOLVER= FGMRES % Preconditioner of the Krylov linear solver (ILU, LU_SGS, LINELET, JACOBI) LINEAR_SOLVER_PREC= ILU % Minimum error of the linear solver for implicit formulations LINEAR_SOLVER_ERROR= 1E-6 % Max number of iterations of the linear solver for the implicit formulation LINEAR_SOLVER_ITER= 20 % -------------------------- MULTIGRID PARAMETERS -----------------------------% % MULTIGRID: OFF % Multi-grid levels (0 = no multi-grid) %MGLEVEL= 0 % MULTIGRID: ON % Multi-Grid Levels (0 = no multi-grid) MGLEVEL= 3 % Multi-grid cycle (V_CYCLE, W_CYCLE, FULLMG_CYCLE) MGCYCLE= V_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.7 % Damping factor for the correction prolongation MG_DAMP_PROLONGATION= 0.7 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % Convective numerical method (JST, LAX-FRIEDRICH, CUSP, ROE, AUSM, AUSMPLUSUP, AUSMPLUSUP2, HLLC, % TURKEL_PREC, MSW, FDS) CONV_NUM_METHOD_FLOW= ROE % 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 % ----------- SLOPE LIMITER AND DISSIPATION SENSOR DEFINITION -----------------% % Monotonic Upwind Scheme for Conservation Laws (TVD) in the flow equations. % Required for 2nd order upwind schemes (NO, YES) MUSCL_FLOW= NO % Slope limiter (NONE, VENKATAKRISHNAN, VENKATAKRISHNAN_WANG, % BARTH_JESPERSEN, VAN_ALBADA_EDGE) SLOPE_LIMITER_FLOW= VENKATAKRISHNAN % Coefficient for the Venkat s 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.05 % -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------% % ONLY IF TURB=ON % Convective numerical method (SCALAR_UPWIND) %CONV_NUM_METHOD_TURB= SCALAR_UPWIND % Monotonic Upwind Scheme for Conservation Laws (TVD) in the turbulence equations. %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 field (see available fields with the -d flag at the command line) %CONV_FIELD= RESIDUAL CONV_FIELD= RMS_DENSITY % Min value of the residual (log10 of the residual) CONV_RESIDUAL_MINVAL= -10 % Start convergence criteria at iteration number CONV_STARTITER= 10 % Number of elements to apply the criteria CONV_CAUCHY_ELEMS= 100 % Epsilon to control the series convergence CONV_CAUCHY_EPS= 1E-10 1. The residual act like in figure, due to my lack of experience, could I ask you if I can consider the solution correct? Residual_Conv.jpg Solution_Mach.JPG 2. The upper part of the outflow region was until now considered a "wall". But if I try to change it in "outlet" to simulate discharge in atmosphere, I can't get convergnece anymore, neither with the coarse mesh. The residual and the not converged solution are the follows: Outlet_NoConv.jpg NotConv_Solution.jpg What information can I get from this? Why a little change in boundary condition change so much? Thank you in advance, Nicola |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
PENG YAN
Join Date: Jul 2021
Location: Italy
Posts: 34
Rep Power: 5 ![]() |
Ciao Nicola,
I hope you are fine. I have some ideas about your questions. 1. if your nozzle is axisymmetric, you should set axisymmetric = YES. 2. You can try to set the boundary condition of your upper top from 'outlet' to 'farfield'. If you have further problems, please contact me for free. |
|
![]() |
![]() |
![]() |
Tags |
convergence, mesh, nozzle |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFG file for Nozzle | Nicola_Fontana | SU2 | 0 | November 26, 2021 06:42 |
Pump power for hoses feeding to nozzles | Rob Wilk | Main CFD Forum | 0 | February 24, 2021 10:37 |
Simulation of a simple De Laval Nozzle | RR16988 | FLUENT | 1 | June 8, 2015 15:23 |
Poor Convergence for Transient Subsonic Diffuser sims with flow separation | TWaung | CFX | 1 | April 16, 2009 09:25 |
subsonic nozzle flow, inlet-outlet BCs | felix | Main CFD Forum | 3 | May 15, 2006 11:37 |