From 9b3b97878e45ff8da9eb543eb18fe32653566ca0 Mon Sep 17 00:00:00 2001 From: rois1995 Date: Wed, 21 Oct 2026 10:58:45 +0200 Subject: [PATCH 01/25] Replace configuration options that SU2 no longer has Rename options that were renamed in the code (KIND_SOLVER and PHYSICAL_PROBLEM to SOLVER, KT_CONSTANT to THERMAL_CONDUCTIVITY_CONSTANT, RAMP_ROTATING_FRAME to RAMP_MOTION_FRAME, UNST_ADJOINT_START_ITER to UNST_ADJOINT_ITER, CFL to CFL_NUMBER, SPECIES_USE_STRONG_BC to MARKER_SPECIES_STRONG_BC), fix the MAKER_SPECIES_STRONG_BC typo and remove CONV_CRITERIA, which CONV_FIELD replaces. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NSfEWrhpF27TnrkJH74sv8 --- _docs_v7/Configuration-File.md | 2 +- _docs_v7/Multizone.md | 2 +- _docs_v7/Physical-Definition.md | 4 ++-- .../compressible_flow/Aachen_Turbine/Aachen_Turbine.md | 8 ++++---- _tutorials/compressible_flow/NICFD_nozzle/NICFD_nozzle.md | 4 ++-- .../Unsteady_Shape_Opt_NACA0012.md | 2 +- .../incompressible_flow/Inc_Combustion/Inc_Combustion.md | 2 +- .../Inc_Laminar_Cavity/Inc_Laminar_Cavity.md | 2 +- .../Inc_Species_Transport/Inc_Species_Transport.md | 6 +++--- .../Unsteady_FSI_Python/Dynamic_FSI_Python.md | 1 - _tutorials/multiphysics/steady_cht/Static_CHT.md | 2 +- _tutorials/multiphysics/unfinished_tutorials/Basic_RHT.md | 3 +-- .../unfinished_tutorials/Coupled_RHT_Adjoint.md | 3 +-- .../unfinished_tutorials/Turbulent_RHT_CHT.md | 2 +- 14 files changed, 20 insertions(+), 23 deletions(-) diff --git a/_docs_v7/Configuration-File.md b/_docs_v7/Configuration-File.md index 7ea2aa7b..13a8aa98 100644 --- a/_docs_v7/Configuration-File.md +++ b/_docs_v7/Configuration-File.md @@ -12,7 +12,7 @@ The SU2 configuration file name typically carries a name of the form *filename.c The configuration file consists of only three elements: - **Options**. An option in the file has the following syntax: option_name = value, where option_name is the name of the option and value is the desired option value. The value element may be a scalar data type, a list of data types, or a more complicated structure. The "=" sign must come immediately after the option_name element and is not optional. Lists of data types may be formatted for appearance using commas, ()-braces, {}-braces, and []-braces, though this is not required. Semicolons are semantically relevant for several option types and may not be used as convenience delimiters. SU2 will exit with an error if there are options in the config file which do not exist or if there are options with improper formatting. Some example option formats are given below. - `FREESTREAM_VELOCITY = ( 5.0, 0.00, 0.00 ) % braces and commas can be used for list options` - - `REF_ORIGIN_MOMENT= 0.25 0.0 0.0 % however, braces and commas are optional for lists` + - `MOTION_ORIGIN= 0.25 0.0 0.0 % however, braces and commas are optional for lists` - `KIND_TURB_MODEL = NONE % space between elements is not significant` - **Comments**. On a given line in the file, any text appearing after a % is considered a comment and is ignored by SU2. Additional % signs after the first on a given line are not significant. - **White space**. Empty lines are ignored. On text lines that define options, white space (tabs, spaces) can be used to format the appearance of the file diff --git a/_docs_v7/Multizone.md b/_docs_v7/Multizone.md index f902f15a..1673e698 100644 --- a/_docs_v7/Multizone.md +++ b/_docs_v7/Multizone.md @@ -86,7 +86,7 @@ While for the single-physics problems the usage of sub-config files is optional, % main_config.cfg % ------------------------ MULTI-PHYSICS SETUP --------------------------------% % Problem definition -PHYSICAL_PROBLEM= MULTIPHYSICS +SOLVER= MULTIPHYSICS % The list of config files CONFIG_LIST = (configFlow.cfg, configSolid.cfg) diff --git a/_docs_v7/Physical-Definition.md b/_docs_v7/Physical-Definition.md index 09d52bf7..16652ba9 100644 --- a/_docs_v7/Physical-Definition.md +++ b/_docs_v7/Physical-Definition.md @@ -167,7 +167,7 @@ The reference values $$\rho_{ref}, T_{ref}, v_{ref}$$ equal the initial state va | --- | --- | | `*_RANS` | 7.4.0 | -This section describes how to setup turbulence models for RANS simulations. Turbulence is activated using the option `KIND_SOLVER= RANS`, or `KIND_SOLVER= INC_RANS` +This section describes how to setup turbulence models for RANS simulations. Turbulence is activated using the option `SOLVER= RANS`, or `SOLVER= INC_RANS` A turbulence model can then be selected via the option `KIND_TURB_MODEL` Different submodels and parameters are specified via the different options listed below. The turbulent Prandtl number can be modified with the option `PRANDTL_TURB` (the default is 0.9). @@ -226,7 +226,7 @@ Modifications from each of these three groups can be combined, for example `SST_ | --- | --- | | `*_RANS` | 7.5.0 | -This section describes how to setup transition models for RANS simulations. Transition is activated using the option `KIND_SOLVER= RANS`, or `KIND_SOLVER= INC_RANS` together with a choice of `KIND_TRANS_MODEL` (different from `NONE`). +This section describes how to setup transition models for RANS simulations. Transition is activated using the option `SOLVER= RANS`, or `SOLVER= INC_RANS` together with a choice of `KIND_TRANS_MODEL` (different from `NONE`). Currently, the only valid option for `KIND_TRANS_MODEL` is `LM`, for Langtry-Menter transition models. Different submodels and correlations are then specified via `LM_OPTIONS` (for example `LM_OPTIONS= LM2015, MENTER_LANGTRY`). diff --git a/_tutorials/compressible_flow/Aachen_Turbine/Aachen_Turbine.md b/_tutorials/compressible_flow/Aachen_Turbine/Aachen_Turbine.md index c59324f2..0ca33178 100644 --- a/_tutorials/compressible_flow/Aachen_Turbine/Aachen_Turbine.md +++ b/_tutorials/compressible_flow/Aachen_Turbine/Aachen_Turbine.md @@ -94,7 +94,7 @@ CONFIG_LIST=(stator1.cfg, rotor.cfg, stator2.cfg) #### Sub-config Files The most important information that must be specified in the sub-config files concerns the grid movement. To activate it, the `GRID_MOVEMENT` option must be specified, together with the `MOTION_ORIGIN` and angular velocity (`ROTATION_RATE`) components about the rotation axis.\ For the solver initialization the motion Mach number is specified via the `MACH_MOTION`. \ -Finally, a smoother convergence can be achieved via the `RAMP_ROTATING_FRAME`. Although not used in the present case, it can be activated similarly to the outlet pressure ramp, describe later in this tutorial. +Finally, a smoother convergence can be achieved via the `RAMP_MOTION_FRAME`. Although not used in the present case, it can be activated similarly to the outlet pressure ramp, describe later in this tutorial. These options are shown for the rotor sub-config file in the following box. @@ -109,13 +109,13 @@ MOTION_ORIGIN= 0.0 0.0 0.0 % Angular velocity vector in rad/s ROTATION_RATE= 0.0 0.0 -366.52 -RAMP_ROTATING_FRAME= NO +RAMP_MOTION_FRAME= NO % Parameters of the rotating frame ramp: starting rotational speed, updating-iteration-frequency, total number of iterations for the ramp -RAMP_ROTATING_FRAME_COEFF= (0.0, 150.0, 2000) +RAMP_MOTION_FRAME_COEFF= (0.0, 150.0, 2000) ``` ### Boundary Conditions @@ -271,7 +271,7 @@ WALLMODEL_RELFAC= 0.5 #### Ramps -To ease the convergence of turbomachinery cases, particularly when the pressure ratio of the machine is large, the use of ramps can be beneficial. These can be applied to both rotational speed and outlet pressure via ```RAMP_OUTLET_PRESSURE``` and ```RAMP_ROTATING_FRAME```. \ +To ease the convergence of turbomachinery cases, particularly when the pressure ratio of the machine is large, the use of ramps can be beneficial. These can be applied to both rotational speed and outlet pressure via ```RAMP_OUTLET_PRESSURE``` and ```RAMP_MOTION_FRAME```. \ For the sake of completeness, the use of the outlet pressure ramp is demonstrated presenting in the following box the syntax to activate it. ``` diff --git a/_tutorials/compressible_flow/NICFD_nozzle/NICFD_nozzle.md b/_tutorials/compressible_flow/NICFD_nozzle/NICFD_nozzle.md index daa72054..1263ac04 100644 --- a/_tutorials/compressible_flow/NICFD_nozzle/NICFD_nozzle.md +++ b/_tutorials/compressible_flow/NICFD_nozzle/NICFD_nozzle.md @@ -128,7 +128,7 @@ CRITICAL_PRESSURE= 1437500 ACENTRIC_FACTOR= 0.524 ``` -In addition, the models for transport coefficients can also be customized by exploring the viscosity and thermal conductivity options. By default with compressible flow, the laminar viscosity is governed by Sutherland’s law, and the thermal conductivity is assumed to depend on a constant Prandtl number. However, in the case of the Peng-Robinson-Stryjek-Vera equation of state (`PR_GAS`), the `CONSTANT_VISCOSITY` and `CONSTANT_CONDUCTIVITY` options are the only available. The values of the dynamic viscosity and thermal conductivity are imposed by entering the values for `MU_CONSTANT` and `KT_CONSTANT`. +In addition, the models for transport coefficients can also be customized by exploring the viscosity and thermal conductivity options. By default with compressible flow, the laminar viscosity is governed by Sutherland’s law, and the thermal conductivity is assumed to depend on a constant Prandtl number. However, in the case of the Peng-Robinson-Stryjek-Vera equation of state (`PR_GAS`), the `CONSTANT_VISCOSITY` and `CONSTANT_CONDUCTIVITY` options are the only available. The values of the dynamic viscosity and thermal conductivity are imposed by entering the values for `MU_CONSTANT` and `THERMAL_CONDUCTIVITY_CONSTANT`. ``` % --------------------------- VISCOSITY MODEL ---------------------------------% @@ -146,7 +146,7 @@ MU_CONSTANT= 1.21409E-05 CONDUCTIVITY_MODEL= CONSTANT_CONDUCTIVITY % % Molecular Thermal Conductivity that would be constant (0.0257 by default) -KT_CONSTANT= 0.030542828 +THERMAL_CONDUCTIVITY_CONSTANT= 0.030542828 ``` Characteristics-based Riemann boundary conditions are imposed on the INFLOW and OUTFLOW boundaries. diff --git a/_tutorials/design_features/Unsteady_Shape_Opt_NACA0012/Unsteady_Shape_Opt_NACA0012.md b/_tutorials/design_features/Unsteady_Shape_Opt_NACA0012/Unsteady_Shape_Opt_NACA0012.md index 9750fba9..7baef1bd 100644 --- a/_tutorials/design_features/Unsteady_Shape_Opt_NACA0012/Unsteady_Shape_Opt_NACA0012.md +++ b/_tutorials/design_features/Unsteady_Shape_Opt_NACA0012/Unsteady_Shape_Opt_NACA0012.md @@ -207,7 +207,7 @@ With each design iteration, the direct and adjoint solutions are used to compute WINDOW_START_ITER = 350 % %Iteration number to begin the reverse time integration in the direct solver for the unsteady adjoint. - UNST_ADJOINT_START_ITER = 600 + UNST_ADJOINT_ITER = 600 % %Number of iterations to average the objective ITER_AVERAGE_OBJ = 250 diff --git a/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md b/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md index 81001ecf..ff45ffae 100644 --- a/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md +++ b/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md @@ -350,7 +350,7 @@ SPECIES_INIT=(-0.575, 2.227e3, 1.447e-2) MARKER_INLET_SPECIES = (inlet, -0.575, 2.227e3, 1.447e-2, 0) MARKER_INLET=(inlet, 300.0, 0.565,1,0,0) -MAKER_SPECIES_STRONG_BC=(burner_wall, cylinder_wall) +MARKER_SPECIES_STRONG_BC=(burner_wall, cylinder_wall) MARKER_ISOTHERMAL= (burner_wall, 350, cylinder_wall, 400) ``` ### Convective scheme diff --git a/_tutorials/incompressible_flow/Inc_Laminar_Cavity/Inc_Laminar_Cavity.md b/_tutorials/incompressible_flow/Inc_Laminar_Cavity/Inc_Laminar_Cavity.md index 0c5dca9d..c87a7fb2 100644 --- a/_tutorials/incompressible_flow/Inc_Laminar_Cavity/Inc_Laminar_Cavity.md +++ b/_tutorials/incompressible_flow/Inc_Laminar_Cavity/Inc_Laminar_Cavity.md @@ -108,7 +108,7 @@ MU_CONSTANT= 1.716e-5 CONDUCTIVITY_MODEL= CONSTANT_CONDUCTIVITY % % Molecular Thermal Conductivity that would be constant (0.0257 by default) -KT_CONSTANT= 0.0246295028571 +THERMAL_CONDUCTIVITY_CONSTANT= 0.0246295028571 ``` Lastly, in order to impose gravity, we apply a body force in the negative y-direction as follows: diff --git a/_tutorials/incompressible_flow/Inc_Species_Transport/Inc_Species_Transport.md b/_tutorials/incompressible_flow/Inc_Species_Transport/Inc_Species_Transport.md index bd32055c..61e3095b 100644 --- a/_tutorials/incompressible_flow/Inc_Species_Transport/Inc_Species_Transport.md +++ b/_tutorials/incompressible_flow/Inc_Species_Transport/Inc_Species_Transport.md @@ -59,7 +59,7 @@ The options as of now are fairly limited. Species transport is switched on by se The number of species transport equations is not set individually but deduced from the number of values given in the respective lists for species options. SU2 checks whether the same amount of values is given in each option and solves the appropriate amount of equations. `MARKER_INLET_SPECIES` is one of these options and has to be used alongside a usual `MARKER_INLET`. For outlets, symmetries or walls this is not necessary. -The option `SPECIES_USE_STRONG_BC` should be left to `NO` and is an experimental option where a switch to strongly enforced boundary conditions can be made. +The option `MARKER_SPECIES_STRONG_BC` is experimental and is not used here. It lets you list the markers where the boundary conditions of the species solver are enforced strongly. For `CONV_NUM_METHOD_SPECIES= SCALAR_UPWIND` a second order MUSCL reconstruction and multiple limiters are available. @@ -88,8 +88,8 @@ SCHMIDT_NUMBER_TURBULENT= 0.7 % (inlet_marker, Species1, Species2, ..., SpeciesN-1, inlet_marker2, Species1, Species2, ...) MARKER_INLET_SPECIES= (inlet, 0.5, ..., inlet2, 0.6, ...) % -% Use strong inlet and outlet BC in the species solver -SPECIES_USE_STRONG_BC= NO +% Markers where strong BCs are applied in the species solver (experimental, not used here) +% MARKER_SPECIES_STRONG_BC= ( inlet ) % % Convective numerical method for species transport (SCALAR_UPWIND) CONV_NUM_METHOD_SPECIES= SCALAR_UPWIND diff --git a/_tutorials/multiphysics/Unsteady_FSI_Python/Dynamic_FSI_Python.md b/_tutorials/multiphysics/Unsteady_FSI_Python/Dynamic_FSI_Python.md index a728d66f..6bd929f9 100644 --- a/_tutorials/multiphysics/Unsteady_FSI_Python/Dynamic_FSI_Python.md +++ b/_tutorials/multiphysics/Unsteady_FSI_Python/Dynamic_FSI_Python.md @@ -179,7 +179,6 @@ The relative residual cannot be used as this is reset at each inner iteration. T residuals are already quite low. For this reason we will use: ``` -CONV_CRITERIA = RESIDUAL CONV_FIELD= RMS_DENSITY CONV_RESIDUAL_MINVAL= -9.0 ``` diff --git a/_tutorials/multiphysics/steady_cht/Static_CHT.md b/_tutorials/multiphysics/steady_cht/Static_CHT.md index 0d8712fa..f7bfd0d1 100644 --- a/_tutorials/multiphysics/steady_cht/Static_CHT.md +++ b/_tutorials/multiphysics/steady_cht/Static_CHT.md @@ -132,7 +132,7 @@ MATERIAL_DENSITY= 0.00021 SPECIFIC_HEAT_CP = 1004.703 % % Solid thermal conductivity (W/m*K) -KT_CONSTANT= 0.1028 +THERMAL_CONDUCTIVITY_CONSTANT= 0.1028 ``` ### Running SU2 diff --git a/_tutorials/multiphysics/unfinished_tutorials/Basic_RHT.md b/_tutorials/multiphysics/unfinished_tutorials/Basic_RHT.md index 4906e311..c6efe251 100644 --- a/_tutorials/multiphysics/unfinished_tutorials/Basic_RHT.md +++ b/_tutorials/multiphysics/unfinished_tutorials/Basic_RHT.md @@ -75,7 +75,7 @@ VISCOSITY_MODEL= CONSTANT_VISCOSITY MU_CONSTANT= 1.716e-5 CONDUCTIVITY_MODEL= CONSTANT_CONDUCTIVITY -KT_CONSTANT= 0.0246295028571 +THERMAL_CONDUCTIVITY_CONSTANT= 0.0246295028571 BODY_FORCE= YES BODY_FORCE_VECTOR= ( 0.0, -9.81, 0.0 ) @@ -125,7 +125,6 @@ The convergence of the problem is controlled using ``` INNER_ITER= 2000 -CONV_CRITERIA = RESIDUAL CONV_FIELD = RMS_PRESSURE, RMS_VELOCITY-X, RMS_TEMPERATURE CONV_RESIDUAL_MINVAL = -8 ``` diff --git a/_tutorials/multiphysics/unfinished_tutorials/Coupled_RHT_Adjoint.md b/_tutorials/multiphysics/unfinished_tutorials/Coupled_RHT_Adjoint.md index 36ba4dbb..3960af80 100644 --- a/_tutorials/multiphysics/unfinished_tutorials/Coupled_RHT_Adjoint.md +++ b/_tutorials/multiphysics/unfinished_tutorials/Coupled_RHT_Adjoint.md @@ -51,7 +51,7 @@ We start the tutorial by definining the problem as an incompressible, Navier Sto SOLVER = INC_NAVIER_STOKES ``` -and we set the properties for the flow to obtain a ```Re = 40``` based on the cylinder diameter. We use standard settings for the linear solver and a FDS scheme for the convective terms. The problem admits a relatively high ```CFL = 1.0E4```. +and we set the properties for the flow to obtain a ```Re = 40``` based on the cylinder diameter. We use standard settings for the linear solver and a FDS scheme for the convective terms. The problem admits a relatively high ```CFL_NUMBER = 1.0E4```. ``` INC_DENSITY_MODEL = VARIABLE @@ -106,7 +106,6 @@ Finally, we are interested in the drag coefficient of the cylinder. Therefore, w ``` INNER_ITER = 5000 -CONV_CRITERIA = CAUCHY CONV_FIELD = DRAG CONV_CAUCHY_ELEMS = 50 diff --git a/_tutorials/multiphysics/unfinished_tutorials/Turbulent_RHT_CHT.md b/_tutorials/multiphysics/unfinished_tutorials/Turbulent_RHT_CHT.md index f381022b..ae86d429 100644 --- a/_tutorials/multiphysics/unfinished_tutorials/Turbulent_RHT_CHT.md +++ b/_tutorials/multiphysics/unfinished_tutorials/Turbulent_RHT_CHT.md @@ -232,7 +232,7 @@ VISCOSITY_MODEL = CONSTANT_VISCOSITY MU_CONSTANT = 1e-5 CONDUCTIVITY_MODEL = CONSTANT_CONDUCTIVITY -KT_CONSTANT = 0.01 +THERMAL_CONDUCTIVITY_CONSTANT = 0.01 FLUID_MODEL = INC_IDEAL_GAS SPECIFIC_HEAT_CP = 1000 From e8671db5036815745d6994898dd1e43f60493623 Mon Sep 17 00:00:00 2001 From: rois1995 Date: Wed, 21 Oct 2026 15:24:41 +0200 Subject: [PATCH 02/25] Fix option names, values and units that disagree with the SU2 code Each change was checked against SU2 develop 11c177b904: solver names, SST default version and keywords, scalar schemes, shape_optimization.py options, turbomachinery ramp options, INCONSISTENT_DISC, flamelet and species options and value counts, reference temperature and contact resistance units. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NSfEWrhpF27TnrkJH74sv8 --- _docs_v7/Convective-Schemes.md | 4 ++-- _docs_v7/Execution.md | 4 +++- _docs_v7/Multizone.md | 2 +- _docs_v7/Physical-Definition.md | 4 ++-- _docs_v7/Solver-Setup.md | 2 +- .../Aachen_Turbine/Aachen_Turbine.md | 12 ++++++------ .../compressible_flow/NICFD_nozzle/NICFD_nozzle.md | 4 ++-- .../Inviscid_2D_Unconstrained_NACA0012.md | 2 +- .../Inc_Combustion/Inc_Combustion.md | 10 +++++----- .../Inc_Species_Transport/Inc_Species_Transport.md | 2 +- ..._Species_Transport_Composition_Dependent_Model.md | 2 +- .../Inc_Turbulent_NACA0012/Inc_Turbulent_NACA0012.md | 2 +- .../multiphysics/contact_resistance_cht/SS_CR_CHT.md | 10 +++++----- 13 files changed, 31 insertions(+), 29 deletions(-) diff --git a/_docs_v7/Convective-Schemes.md b/_docs_v7/Convective-Schemes.md index 62d25c6d..21292a15 100755 --- a/_docs_v7/Convective-Schemes.md +++ b/_docs_v7/Convective-Schemes.md @@ -100,7 +100,7 @@ Some of the schemes above have tunning parameters or accept extra options, the f | --- | --- | | `RANS`, `INC_RANS` | 8.0.0 | -For compressible flows the only method available is `SCALAR_UPWIND` which must be selected via option `CONV_NUM_METHOD_TURB`. -For incompressible flows the `BOUNDED_SCALAR` method is also available, this includes a divergence correction to prevent spurious production/destruction of the transported scalar while convergence is not reached. +The method is selected via option `CONV_NUM_METHOD_TURB`. Two methods are available, for both compressible and incompressible flows: `SCALAR_UPWIND` and `BOUNDED_SCALAR`. +The `BOUNDED_SCALAR` method includes a divergence correction to prevent spurious production/destruction of the transported scalar while convergence is not reached. These methods do not have any special parameters. diff --git a/_docs_v7/Execution.md b/_docs_v7/Execution.md index 03b1032b..ab1be390 100644 --- a/_docs_v7/Execution.md +++ b/_docs_v7/Execution.md @@ -107,8 +107,10 @@ Options: * `-f FILE, --file=FILE` read config from FILE * `-r NAME, --name=NAME` try to restart from project file NAME * `-n PARTITIONS, --partitions=PARTITIONS` number of PARTITIONS -* `-g GRADIENT, --gradient=GRADIENT` Method for computing the GRADIENT (ADJOINT, DISCRETE_ADJOINT, FINDIFF, NONE) +* `-g GRADIENT, --gradient=GRADIENT` Method for computing the GRADIENT (CONTINUOUS_ADJOINT, DISCRETE_ADJOINT, FINDIFF, NONE), default DISCRETE_ADJOINT +* `-o OPTIMIZATION, --optimization=OPTIMIZATION` OPTIMIZATION technique (SLSQP, CG, BFGS, POWELL), default SLSQP * `-q QUIET, --quiet=QUIET` True/False Quiet all SU2 output (optimizer output only) +* `-z ZONES, --zones=ZONES` Number of ZONES ### Python wrapper scripts diff --git a/_docs_v7/Multizone.md b/_docs_v7/Multizone.md index 1673e698..c0742e6b 100644 --- a/_docs_v7/Multizone.md +++ b/_docs_v7/Multizone.md @@ -80,7 +80,7 @@ ROTATION_RATE = 0.0 0.0 160.0 ### How to set up a multi-physics problem ### -While for the single-physics problems the usage of sub-config files is optional, setting up a multi-physics problem heavily relies on this feature. A good way to start is to first create a separate config file for each individual zone. If it is possible, also try to run each zone independently (with appropriate boundary conditions) to find proper numerical settings. To couple the zones create a new config file with the option `MATH_PROBLEM` set to `MULTIPHYSICS`. Then specify the list of config files with `CONFIG_LIST`. These two options are mandatory. To set a coupling between the zones the `MARKER_ZONE_INTERFACE` option can be used (same way as for the [single-physics problem](#singlephysics)). As an example consider the following main config file: +While for the single-physics problems the usage of sub-config files is optional, setting up a multi-physics problem heavily relies on this feature. A good way to start is to first create a separate config file for each individual zone. If it is possible, also try to run each zone independently (with appropriate boundary conditions) to find proper numerical settings. To couple the zones create a new config file with the option `SOLVER` set to `MULTIPHYSICS`. Then specify the list of config files with `CONFIG_LIST`. These two options are mandatory. To set a coupling between the zones the `MARKER_ZONE_INTERFACE` option can be used (same way as for the [single-physics problem](#singlephysics)). As an example consider the following main config file: ``` % main_config.cfg diff --git a/_docs_v7/Physical-Definition.md b/_docs_v7/Physical-Definition.md index 16652ba9..3795354e 100644 --- a/_docs_v7/Physical-Definition.md +++ b/_docs_v7/Physical-Definition.md @@ -201,7 +201,7 @@ SU2 implements the "Standard" (1994) and 2003 versions of the SST model along wi **Note:** Currently all versions are "modified" i.e. the turbulence kinetic energy (TKE) is not included in the viscous stress tensor. -The main model is selected using `KIND_TURB_MODEL= SST` and the version and modifications via the `SST_OPTIONS` list. If this list is empty SU2 defaults to the baseline 1994 model, `V1994m` (see warning below). The options allow for a version and a set of modifiers to the version. +The main model is selected using `KIND_TURB_MODEL= SST` and the version and modifications via the `SST_OPTIONS` list. If this list is empty SU2 defaults to the 2003 model, `V2003m`. The options allow for a version and a set of modifiers to the version. The freestream and inlet conditions are specified via the options `FREESTREAM_TURBULENCEINTENSITY= 0.05` (5%) and `FREESTREAM_TURB2LAMVISCRATIO= 10` (ratio of turbulent to laminar viscosity). **Note:** The default values for these options are suitable for internal flows but may be too high for external aerodynamics problems. @@ -212,7 +212,7 @@ The following modifications are allowed: - `V2003m` - SST-2003m (no known inconsistencies). - Production modifications: - `VORTICITY` - Uses vorticity to compute the source term instead of strain-rate magnitude. - - `KATO_LAUNDER` - Uses the Kato-Launder modification (vorticity times strain-rate). + - `KATO-LAUNDER` - Uses the Kato-Launder modification (vorticity times strain-rate). - `UQ` - Production is computed using a modified stress tensor for [uncertainty quantification](https://su2code.github.io/tutorials/UQ_NACA0012/). **Note** with this modification TKE is always included in the stress tensor. - Corrections: - `SUSTAINING` - SST with controlled decay. diff --git a/_docs_v7/Solver-Setup.md b/_docs_v7/Solver-Setup.md index 65a0c996..526d5389 100644 --- a/_docs_v7/Solver-Setup.md +++ b/_docs_v7/Solver-Setup.md @@ -36,7 +36,7 @@ SU2 is capable of dealing with different kinds of physical problems. The kind of |`INC_EULER` | **Incompressible Euler's equation** | Finite-Volume method | |`INC_NAVIER_STOKES` | **Incompressible Navier-Stokes' equation** | Finite-Volume method| |`INC_RANS` | **Incompressible Reynolds-averaged Navier-Stokes' equation** | Finite-Volume method| -|`HEAT_EQUATION_FVM` | **Heat equation** | Finite-Volume method | +|`HEAT_EQUATION` | **Heat equation** | Finite-Volume method | |`ELASTICITY` | **Equations of elasticity** | Finite-Element method | |`FEM_EULER` | **Euler's equation** | Discontinuous Galerkin FEM | |`FEM_NAVIER_STOKES`| **Navier-Stokes' equation** | Discontinuous Galerkin FEM | diff --git a/_tutorials/compressible_flow/Aachen_Turbine/Aachen_Turbine.md b/_tutorials/compressible_flow/Aachen_Turbine/Aachen_Turbine.md index 0ca33178..5510a868 100644 --- a/_tutorials/compressible_flow/Aachen_Turbine/Aachen_Turbine.md +++ b/_tutorials/compressible_flow/Aachen_Turbine/Aachen_Turbine.md @@ -225,7 +225,7 @@ If needed, extra under relaxation factor for the Giles BC at the hub and shroud GILES_EXTRA_RELAXFACTOR = (0.05, 0.05) ``` -Finally, the kind of average process for linearizing the Navier-Stokes equation at inflow and outflow boundaries, including mixing-plane(s), can be controlled by ```AVERAGE_PROCESS_KIND```. Possible options are: ```ALGEBRAIC```, ```AREA```, ```MASSSFLUX```, ```MIXEDOUT```. The default one is ```AREA```, however, only the ```MIXEDOUT``` option guarantees that the mixing plane treatment is conservative.\ +Finally, the kind of average process for linearizing the Navier-Stokes equation at inflow and outflow boundaries, including mixing-plane(s), can be controlled by ```AVERAGE_PROCESS_KIND```. Possible options are: ```ALGEBRAIC```, ```AREA```, ```MASSFLUX```, ```MIXEDOUT```. The default one is ```AREA```, however, only the ```MIXEDOUT``` option guarantees that the mixing plane treatment is conservative.\ The following box shows the setting to be used for the current case. ``` @@ -271,15 +271,15 @@ WALLMODEL_RELFAC= 0.5 #### Ramps -To ease the convergence of turbomachinery cases, particularly when the pressure ratio of the machine is large, the use of ramps can be beneficial. These can be applied to both rotational speed and outlet pressure via ```RAMP_OUTLET_PRESSURE``` and ```RAMP_MOTION_FRAME```. \ +To ease the convergence of turbomachinery cases, particularly when the pressure ratio of the machine is large, the use of ramps can be beneficial. These can be applied to both rotational speed and outlet pressure via ```RAMP_OUTLET``` and ```RAMP_MOTION_FRAME```. \ For the sake of completeness, the use of the outlet pressure ramp is demonstrated presenting in the following box the syntax to activate it. ``` % Specify ramp option for Outlet pressure (YES, NO) default NO -RAMP_OUTLET_PRESSURE= YES +RAMP_OUTLET= YES % % Parameters of the outlet pressure ramp (starting outlet pressure, updating-iteration-frequency, total number of iteration for the ramp) -RAMP_OUTLET_PRESSURE_COEFF= (140000.0, 150.0, 2000) +RAMP_OUTLET_COEFF= (140000.0, 150.0, 2000) ``` @@ -290,7 +290,7 @@ To have SU2_CFD computing the typical turbomachinery performance indexes, the tu Additionally, the inlet and outlet boundary to each zone must be specified in stream-wise order via the ```MARKER_TURBOMACHINERY```, as well as the inlet and the outlet boundaries of the full machine via the ```MARKER_ANALYZE```. -Finally, the performance averaging method, i.e. AREA, MASSSFLUX, MIXEDOUT, etc., must be specified via the ```PERFORMANCE_AVERAGE_PROCESS_KIND```. In case the MIXEDOUT option is selected, the parameters for the Newton method used for the mixed out process can be specified via ```MIXEDOUT_COEFF```. +Finally, the performance averaging method, i.e. AREA, MASSFLUX, MIXEDOUT, etc., must be specified via the ```PERFORMANCE_AVERAGE_PROCESS_KIND```. In case the MIXEDOUT option is selected, the parameters for the Newton method used for the mixed out process can be specified via ```MIXEDOUT_COEFF```. The following box summarizes the setup for the Turbo Performance and Analysis of the current case. @@ -306,7 +306,7 @@ MARKER_TURBOMACHINERY= (INFLOW_STATOR1, OUTFLOW_STATOR1, MARKER_ANALYZE = (INFLOW_STATOR1, OUTFLOW_STATOR2) -% (ALGEBRAIC, AREA, MASSSFLUX, MIXEDOUT) default AREA +% (ALGEBRAIC, AREA, MASSFLUX, MIXEDOUT) default AREA PERFORMANCE_AVERAGE_PROCESS_KIND= MIXEDOUT %Parameters of the Newton method for the MIXEDOUT average algorithm (under relaxation factor, tolerance, max number of iterations) diff --git a/_tutorials/compressible_flow/NICFD_nozzle/NICFD_nozzle.md b/_tutorials/compressible_flow/NICFD_nozzle/NICFD_nozzle.md index 1263ac04..a5fbbab5 100644 --- a/_tutorials/compressible_flow/NICFD_nozzle/NICFD_nozzle.md +++ b/_tutorials/compressible_flow/NICFD_nozzle/NICFD_nozzle.md @@ -128,7 +128,7 @@ CRITICAL_PRESSURE= 1437500 ACENTRIC_FACTOR= 0.524 ``` -In addition, the models for transport coefficients can also be customized by exploring the viscosity and thermal conductivity options. By default with compressible flow, the laminar viscosity is governed by Sutherland’s law, and the thermal conductivity is assumed to depend on a constant Prandtl number. However, in the case of the Peng-Robinson-Stryjek-Vera equation of state (`PR_GAS`), the `CONSTANT_VISCOSITY` and `CONSTANT_CONDUCTIVITY` options are the only available. The values of the dynamic viscosity and thermal conductivity are imposed by entering the values for `MU_CONSTANT` and `THERMAL_CONDUCTIVITY_CONSTANT`. +In addition, the models for transport coefficients can also be customized by exploring the viscosity and thermal conductivity options. By default with compressible flow, the laminar viscosity is governed by Sutherland’s law, and the thermal conductivity is assumed to depend on a constant Prandtl number. In this tutorial, constant values are used instead, with the `CONSTANT_VISCOSITY` and `CONSTANT_CONDUCTIVITY` options. The values of the dynamic viscosity and thermal conductivity are imposed by entering the values for `MU_CONSTANT` and `THERMAL_CONDUCTIVITY_CONSTANT`. ``` % --------------------------- VISCOSITY MODEL ---------------------------------% @@ -166,7 +166,7 @@ The parameters specified in the config excerpt below are: MARKER_RIEMANN= ( INFLOW, TOTAL_CONDITIONS_PT, 904388, 542.13, 1.0, 0.0, 0.0, OUTFLOW, STATIC_PRESSURE, 200000, 0.0, 0.0, 0.0, 0.0 ) ``` -In this test case, CFL adaptation is employed to accelerate convergence to steady state. Within this procedure, the CFL value at each iteration is determined based on the residual value at the current and previous iteration, as *CFL = CFL * (residual_old / residual_new)^power*. The value of *power* is given by the parameters `factor down` or `factor up` provided at the entry `CFL_ADAPT_PARAM`. The value of *power* is chosen depending on whether *residual_new* is greater or lower than the *residual_old*. The user can choose to only increase the CFL by setting the first entry of `CFL_ADAPT_PARAM` to `0`. +In this test case, CFL adaptation is employed to accelerate convergence to steady state. Within this procedure, the local CFL value is multiplied by a factor at each iteration. It is multiplied by `factor up` when the full solution update is applied and the linear solver converges well. It is multiplied by `factor down` when the update has to be strongly under-relaxed, when the linear solver does not converge well, or when the residuals oscillate. Otherwise the CFL value is kept. Both factors are given in `CFL_ADAPT_PARAM`, and the CFL value always stays between `CFL min value` and `CFL max value`. ``` % CFL number (initial value for the adaptive CFL number) diff --git a/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012/Inviscid_2D_Unconstrained_NACA0012.md b/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012/Inviscid_2D_Unconstrained_NACA0012.md index 115fcff4..4f28f429 100644 --- a/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012/Inviscid_2D_Unconstrained_NACA0012.md +++ b/_tutorials/design_features/Inviscid_2D_Unconstrained_NACA0012/Inviscid_2D_Unconstrained_NACA0012.md @@ -95,7 +95,7 @@ For this inviscid case, we have selected a modified version of the JST scheme fo If you are having trouble converging your adjoint calculation, we often recommend adjusting the level of dissipation, along with reducing the CFL condition with the `CFL_REDUCTION_ADJFLOW` option, or even imposing a hard limit on the value of the adjoint density variable using the `LIMIT_ADJFLOW` option. While increasing the dissipation or limiting the adjoint variables can sometimes help to stabilize a solution, **note that overly increasing the dissipation or imposing limits that are too strict can result in decreased accuracy**. One should fully investigate the effect of these parameters, and ideally, a gradient accuracy/verification study should be performed (one can always compare against finite differencing). -As a side note, in case you are planning to use the discrete adjoint mode, SU2 software will not use these parameters unless you activate the option `INCONSISTENT_AD` +As a side note, in case you are planning to use the discrete adjoint mode, SU2 software will not use these parameters unless you activate the option `INCONSISTENT_DISC` Now, we present the options that specify the optimal shape design problem: ``` diff --git a/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md b/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md index ff45ffae..03796705 100644 --- a/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md +++ b/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md @@ -151,7 +151,7 @@ The manifold should also contain the following thermo-chemical data. The variabl 3. Dynamic viscosity (`ViscosityDyn`)[] 4. Thermal conductivity (`Conductivity`)[W m^-1 K^-1] 5. Diffusivity (`DiffusionCoefficient`)[m^2 s^-1] -6. Density (`Density`) [kg m^-3] or mixture molar weight (`MolarWeightMix`) [kg mol^-1] +6. Density (`Density`) [kg m^-3] or mixture molar weight (`MolarWeightMix`) [g mol^-1] The distinction between storing the fluid density or molar weight depends on the configuration file setting for `INC_DENSITY_MODEL`. MOre on that the section on configuration file settings. @@ -214,7 +214,7 @@ $$ \end{equation} $$ -where $$p$$ is the free-stream pressure, $$R_u$$ the universal gas constant, and $$W_M$$ and $$T$$ the mean molecular weight and temperature respectively, which are obtained from the manifold. Finally, the option for `INC_ENERGY_EQUATION` should be set to `YES` when solving FGM problems. In order to enable preferential +where $$p$$ is the free-stream pressure, $$R_u$$ the universal gas constant, and $$W_M$$ and $$T$$ the mean molecular weight and temperature respectively, which are obtained from the manifold. Finally, the option `INC_ENERGY_EQUATION` has no effect for FGM problems: SU2 turns it off, because the temperature is looked up from the manifold. In order to enable preferential diffusion, set the option `PREFERENTIAL_DIFFUSION` to `YES` (set by default to `NO`). In the current example for the hydrogen burner, the following options are used: @@ -309,7 +309,7 @@ The second option is through an artificial spark, enabled through setting `FLAME - `iter_start`: (outer) iteration after which the spark will be applied. - `duration`: number of (outer) iterations for which the artificial spark will be applied. -The source terms applied to the controlling variables are defined under the option `SPARK_REACTION_RATES`. This option expects an array with the same length as `CONTROLLING_VARIABLE_NAMES` containing the source terms applied to the controlling variables within the spark sphere. +The source terms applied to the controlling variables are defined under the option `SPARK_REACTION_RATES`. This option expects one value for each transported scalar, that is for each controlling variable in `CONTROLLING_VARIABLE_NAMES` and each passive species in `USER_SCALAR_NAMES`. These are the source terms applied within the spark sphere. The final and default option for initializing the solution is to perform a cold flow analysis without a flame front. This option is enabled through setting `FLAME_INIT_METHOD=NONE`. @@ -317,7 +317,7 @@ In the current example, the `SPARK` ignition method is used. Here, an artificial ``` FLAME_INIT_METHOD= SPARK SPARK_INIT= (0.001, 0.0004, 0.00, 1e-4, 100, 5) -SPARK_REACTION_RATES=(1000, 0, 0) +SPARK_REACTION_RATES=(1000, 0, 0, 0) ``` The spark will be initialized at iteration 100 and will remain active for another 5 iterations. This should be sufficient to artificially ignite the mixture and have the flame front propagate naturally. @@ -346,7 +346,7 @@ is iterated until the temperature difference $$T_b - T(\mathcal{y},h_i,Z)$$ is l For the current example, the equivalence ratio at the inlet was set to 0.5, translating to a mixture fraction of 1.447e-2. The reactants are presumed at a temperature of 300K at the inlet, while isothermal wall boundary conditions are applied on the burner wall (350K) and heat exchanger emulator (400K). The iso-thermal wall boundary conditions are defined as strong boundary conditions, meaning that the total enthalpy is locally enforced to achieve the imposed temperature. ``` -SPECIES_INIT=(-0.575, 2.227e3, 1.447e-2) +SPECIES_INIT=(-0.575, 2.227e3, 1.447e-2, 0) MARKER_INLET_SPECIES = (inlet, -0.575, 2.227e3, 1.447e-2, 0) MARKER_INLET=(inlet, 300.0, 0.565,1,0,0) diff --git a/_tutorials/incompressible_flow/Inc_Species_Transport/Inc_Species_Transport.md b/_tutorials/incompressible_flow/Inc_Species_Transport/Inc_Species_Transport.md index 61e3095b..6f6390ed 100644 --- a/_tutorials/incompressible_flow/Inc_Species_Transport/Inc_Species_Transport.md +++ b/_tutorials/incompressible_flow/Inc_Species_Transport/Inc_Species_Transport.md @@ -55,7 +55,7 @@ The material properties specific to the species transport equations are: All available options concerning species transport are listed below as they occur in the [config_template.cfg](https://github.com/su2code/SU2/blob/master/config_template.cfg). -The options as of now are fairly limited. Species transport is switched on by setting `KIND_SCALAR_MODEL= SPECIES_TRANSPORT`. The `DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY` is currently the only available therefore the only additional choice the value of `DIFFUSIVITY_CONSTANT`. For the `SCHMIDT_NUMBER_TURBULENT` please consult [the respective theory](/docs_v7/Theory/#species-transport). +The options as of now are fairly limited. Species transport is switched on by setting `KIND_SCALAR_MODEL= SPECIES_TRANSPORT`. This tutorial uses `DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY`, therefore the only additional choice is the value of `DIFFUSIVITY_CONSTANT`. The other available models are `CONSTANT_SCHMIDT`, `UNITY_LEWIS` and `CONSTANT_LEWIS`. For the `SCHMIDT_NUMBER_TURBULENT` please consult [the respective theory](/docs_v7/Theory/#species-transport). The number of species transport equations is not set individually but deduced from the number of values given in the respective lists for species options. SU2 checks whether the same amount of values is given in each option and solves the appropriate amount of equations. `MARKER_INLET_SPECIES` is one of these options and has to be used alongside a usual `MARKER_INLET`. For outlets, symmetries or walls this is not necessary. diff --git a/_tutorials/incompressible_flow/Inc_Species_Transport_Composition_Dependent_Model/Inc_Species_Transport_Composition_Dependent_Model.md b/_tutorials/incompressible_flow/Inc_Species_Transport_Composition_Dependent_Model/Inc_Species_Transport_Composition_Dependent_Model.md index 90820c70..f627b52b 100644 --- a/_tutorials/incompressible_flow/Inc_Species_Transport_Composition_Dependent_Model/Inc_Species_Transport_Composition_Dependent_Model.md +++ b/_tutorials/incompressible_flow/Inc_Species_Transport_Composition_Dependent_Model/Inc_Species_Transport_Composition_Dependent_Model.md @@ -131,7 +131,7 @@ MU_CONSTANT= 1.1102E-05, 1.8551E-05 MIXING_VISCOSITY_MODEL = WILKE ``` -The Species transport is switched on by setting `KIND_SCALAR_MODEL= SPECIES_TRANSPORT`. For the mass diffusivity, the following models are available `DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY, CONSTANT_SCHMIDT, UNITY_LEWIS, CONSTANT_LEWIS` , where `CONSTANT_DIFFUSIVITY` is the default model. For the first two, a constant value must be specified in the.cfg file for all species, as it is done in the species transport tutorial [Inc_Species_Transport](/tutorials/Inc_Species_Transport/). For the UNITY_LEWIS, no values must be provided because the diffusivity is computed using the mixture thermal conductivity, density and heat capacity at constant pressure; for more information, please see $$^{3}$$. For highly diffusive gases, such as hydrogen, the `CONSTANT_LEWIS` option could be used. For this option, the Lewis numbers of the N-1 species for which a transport equation is being solved must be provided as a list using the option `CONSTANT_LEWIS_NUMBER= Le_1, Le_2, ..., Le_N_1`. Finally, for turbulent simulations, the turbulent diffusivity is computed based on the `SCHMIDT_NUMBER_TURBULENT`. For reference, please consult [the respective theory](/docs_v7/Theory/#species-transport). +The Species transport is switched on by setting `KIND_SCALAR_MODEL= SPECIES_TRANSPORT`. For the mass diffusivity, the following models are available `DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY, CONSTANT_SCHMIDT, UNITY_LEWIS, CONSTANT_LEWIS` , where `CONSTANT_DIFFUSIVITY` is the default model. For the first two, a constant value must be specified in the.cfg file for all species, as it is done in the species transport tutorial [Inc_Species_Transport](/tutorials/Inc_Species_Transport/). For the UNITY_LEWIS, no values must be provided because the diffusivity is computed using the mixture thermal conductivity, density and heat capacity at constant pressure; for more information, please see $$^{3}$$. For highly diffusive gases, such as hydrogen, the `CONSTANT_LEWIS` option could be used. For this option, the Lewis numbers of all N species of the mixture must be provided as a list using the option `CONSTANT_LEWIS_NUMBER= Le_1, Le_2, ..., Le_N`. This is one value more than the number of values in `SPECIES_INIT`. Finally, for turbulent simulations, the turbulent diffusivity is computed based on the `SCHMIDT_NUMBER_TURBULENT`. For reference, please consult [the respective theory](/docs_v7/Theory/#species-transport). Finally, for the SST model, it is possible to provide the intensity and turbulent-to-laminar viscosity ratios per inlet. For this option, we use the following structure: `MARKER_INLET_TURBULENT= (inlet_1, TurbIntensity_1, TurbLamViscRatio_1, inlet_2, TurbIntensity_2, TurbLamViscRatio_2, ...)`. diff --git a/_tutorials/incompressible_flow/Inc_Turbulent_NACA0012/Inc_Turbulent_NACA0012.md b/_tutorials/incompressible_flow/Inc_Turbulent_NACA0012/Inc_Turbulent_NACA0012.md index ab71b92a..3eb31911 100644 --- a/_tutorials/incompressible_flow/Inc_Turbulent_NACA0012/Inc_Turbulent_NACA0012.md +++ b/_tutorials/incompressible_flow/Inc_Turbulent_NACA0012/Inc_Turbulent_NACA0012.md @@ -80,7 +80,7 @@ INC_VELOCITY_REF= 1.0 INC_TEMPERATURE_REF = 1.0 ``` -The `INC_NONDIM` option controls your non-dim. scheme for incompressible flow problems. The default behavior is `INC_NONDIM= INITIAL_VALUES`, which automatically sets rho_ref = `INC_DENSITY_INIT`, v_ref = `INC_VELOCITY_INIT` (magnitude), and T_ref = `INC_VELOCITY_INIT`. No options are required for this mode. Alternatively, the user can specify custom reference values in order to separate the initialization and non-dim. values. To do so, set `INC_NONDIM= REFERENCE_VALUES` and prescribe values for `INC_DENSITY_REF`, `INC_VELOCITY_REF`, and `INC_TEMPERATURE_REF`. If you wish to perform a dimensional simulation you can pick the `INC_NONDIM= DIMENSIONAL` option, which is equivalent to choosing `INC_NONDIM= REFERENCE_VALUES` and setting the reference values to 1.0. +The `INC_NONDIM` option controls your non-dim. scheme for incompressible flow problems. The default behavior is `INC_NONDIM= INITIAL_VALUES`, which automatically sets rho_ref = `INC_DENSITY_INIT`, v_ref = `INC_VELOCITY_INIT` (magnitude), and T_ref = `INC_TEMPERATURE_INIT`. No options are required for this mode. Alternatively, the user can specify custom reference values in order to separate the initialization and non-dim. values. To do so, set `INC_NONDIM= REFERENCE_VALUES` and prescribe values for `INC_DENSITY_REF`, `INC_VELOCITY_REF`, and `INC_TEMPERATURE_REF`. If you wish to perform a dimensional simulation you can pick the `INC_NONDIM= DIMENSIONAL` option, which is equivalent to choosing `INC_NONDIM= REFERENCE_VALUES` and setting the reference values to 1.0. Don't forget that SU2 will print all input dimensional values, the selected reference values, and the resulting non-dim. values to the console before the start of a calculation. This information is useful for verifying that the desired non-dim. has been set and also for re-dimensionalizion of outputs after the calculation. diff --git a/_tutorials/multiphysics/contact_resistance_cht/SS_CR_CHT.md b/_tutorials/multiphysics/contact_resistance_cht/SS_CR_CHT.md index 4b89540c..502fd7cf 100644 --- a/_tutorials/multiphysics/contact_resistance_cht/SS_CR_CHT.md +++ b/_tutorials/multiphysics/contact_resistance_cht/SS_CR_CHT.md @@ -42,7 +42,7 @@ $$ q_{w} = \frac{T - T_w}{\frac{l}{k} + R_c} $$ -Here, $R_c$ is the contact resistance with the units $m K W^{-1}$, or the inverse of the heat transfer coefficient. For ideal contact, $R_c$ is equal to zero. This results in the temperature on both sides of the interface to be equal. Applying a non-zero value for $R_c$ restricts the heat transfer between the two solid domains, resulting in a temperature discontinuity. To illustrate this, consider the following set-up with two solid domains. +Here, $R_c$ is the contact resistance with the units $m^2 K W^{-1}$, or the inverse of the heat transfer coefficient. For ideal contact, $R_c$ is equal to zero. This results in the temperature on both sides of the interface to be equal. Applying a non-zero value for $R_c$ restricts the heat transfer between the two solid domains, resulting in a temperature discontinuity. To illustrate this, consider the following set-up with two solid domains. ![Solid domain set-up](../../../tutorials_files/multiphysics/contact_resistance_cht/solid_domains.png) Figure 1: Two solid domains subject to iso-thermal boundary conditions connected by a zone interface. @@ -79,7 +79,7 @@ Solid domain 2 has the material properties of copper: - Specific heat = 4420 J/(kg-K) - Thermal conductivity = 61 W/(m-K) -The two solid blocks each are subject to an iso-thermal wall boundary condition, which drives the transfer of heat between the solid domains and the fluid. The interface type for all domains was set to ```DIRECT_TEMPERATURE_ROBIN_HEATFLUX```, with a contact resistance value of 1.0e-04 K-m/W applied to the interface between Solid 1 and Solid 2. All other boundaries were defined as symmetry boundary conditions. +The two solid blocks each are subject to an iso-thermal wall boundary condition, which drives the transfer of heat between the solid domains and the fluid. The interface type for all domains was set to ```DIRECT_TEMPERATURE_ROBIN_HEATFLUX```, with a contact resistance value of 1.0e-04 m^2-K/W applied to the interface between Solid 1 and Solid 2. All other boundaries were defined as symmetry boundary conditions. ### Mesh Description @@ -140,15 +140,15 @@ The effect of the application of contact resistance becomes clear when visualizi ![Temperature solution lines](../../../tutorials_files/multiphysics/contact_resistance_cht/solution_temperature_lines.png) Figure 6: Temperature trends across the heat transfer interfaces. -The temperature trends across the solid-fluid interfaces (green, red) are continuous, the temperature trend across the solid-solid interface (purple) shows a discontinuity at the interface as a result of the application of contact resistance. This effect can be exaggerated when increasing the value for the contact resistance. For example, when applying a contact resistance value of 10 W-m/K, +The temperature trends across the solid-fluid interfaces (green, red) are continuous, the temperature trend across the solid-solid interface (purple) shows a discontinuity at the interface as a result of the application of contact resistance. This effect can be exaggerated when increasing the value for the contact resistance. For example, when applying a contact resistance value of 10 m^2-K/W, ``` CHT_INTERFACE_CONTACT_RESISTANCE = (10.0,0,0) ``` the two solid domains are currently essentially insulated from one another. This results in the following temperature solution. ![Temperature solution](../../../tutorials_files/multiphysics/contact_resistance_cht/solution_temperature_n.png) -Figure 7: Temperature solution for a contact resistance value of 10.0 W-m/K. +Figure 7: Temperature solution for a contact resistance value of 10.0 m^2-K/W. ![Temperature solution lines](../../../tutorials_files/multiphysics/contact_resistance_cht/solution_temperature_lines_n.png) -Figure 8: Temperature trends across the interfaces for a contact resistance value of 10.0 W-m/K. +Figure 8: Temperature trends across the interfaces for a contact resistance value of 10.0 m^2-K/W. From e573fc8bc0bfdf027864a5a961d6419cdbd7b883 Mon Sep 17 00:00:00 2001 From: rois1995 Date: Wed, 21 Oct 2026 15:24:41 +0200 Subject: [PATCH 03/25] Add draft case setup guides Nine draft guides (RANS external aero, incompressible, unsteady and DES, transition, turbomachinery, heat transfer and CHT, species and combustion, shape optimization, non-ideal flows) in a new menu section. Settings come from the code, tutorials and test cases; each statement names its source, and advice that needs an expert check is marked "to be reviewed". Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NSfEWrhpF27TnrkJH74sv8 --- _data/docs_v7.yml | 12 + _docs_v7/Setup-Guide-Heat-Transfer-CHT.md | 305 +++++++++++++++ _docs_v7/Setup-Guide-Incompressible.md | 309 +++++++++++++++ _docs_v7/Setup-Guide-NICFD.md | 287 ++++++++++++++ _docs_v7/Setup-Guide-RANS-External-Aero.md | 354 ++++++++++++++++++ _docs_v7/Setup-Guide-Shape-Optimization.md | 328 ++++++++++++++++ _docs_v7/Setup-Guide-Species-Combustion.md | 416 +++++++++++++++++++++ _docs_v7/Setup-Guide-Transition.md | 293 +++++++++++++++ _docs_v7/Setup-Guide-Turbomachinery.md | 316 ++++++++++++++++ _docs_v7/Setup-Guide-Unsteady-DES.md | 389 +++++++++++++++++++ 10 files changed, 3009 insertions(+) create mode 100644 _docs_v7/Setup-Guide-Heat-Transfer-CHT.md create mode 100644 _docs_v7/Setup-Guide-Incompressible.md create mode 100644 _docs_v7/Setup-Guide-NICFD.md create mode 100644 _docs_v7/Setup-Guide-RANS-External-Aero.md create mode 100644 _docs_v7/Setup-Guide-Shape-Optimization.md create mode 100644 _docs_v7/Setup-Guide-Species-Combustion.md create mode 100644 _docs_v7/Setup-Guide-Transition.md create mode 100644 _docs_v7/Setup-Guide-Turbomachinery.md create mode 100644 _docs_v7/Setup-Guide-Unsteady-DES.md diff --git a/_data/docs_v7.yml b/_data/docs_v7.yml index 69224b75..fc8ebcf5 100644 --- a/_data/docs_v7.yml +++ b/_data/docs_v7.yml @@ -47,6 +47,18 @@ - Multizone - Execution +- title: Case Setup Guides + docs_v7: + - Setup-Guide-RANS-External-Aero + - Setup-Guide-Incompressible + - Setup-Guide-Unsteady-DES + - Setup-Guide-Transition + - Setup-Guide-Turbomachinery + - Setup-Guide-Heat-Transfer-CHT + - Setup-Guide-Species-Combustion + - Setup-Guide-Shape-Optimization + - Setup-Guide-NICFD + - title: Developer Docs docs_v7: - Gitting-Started diff --git a/_docs_v7/Setup-Guide-Heat-Transfer-CHT.md b/_docs_v7/Setup-Guide-Heat-Transfer-CHT.md new file mode 100644 index 00000000..fd5e8e9e --- /dev/null +++ b/_docs_v7/Setup-Guide-Heat-Transfer-CHT.md @@ -0,0 +1,305 @@ +--- +title: "Setup Guide: Heat Transfer and Conjugate Heat Transfer" +permalink: /docs_v7/Setup-Guide-Heat-Transfer-CHT/ +--- + +> **Draft.** The settings below come from the SU2 code, the tutorials and the test cases. The advice parts need a review by experienced users. + +**Source tags.** A tag at the end of a statement says where it comes from. A tag on the line that introduces a list or a table covers the whole list or table. + +- **(code)**: read in the SU2 source. Option defaults come from `Common/src/CConfig.cpp`. +- **(test case)**: used in a test case config. +- **(tutorial)**: used in a tutorial. +- **(docs)**: stated in another page of this website. +- **(advice)**: general CFD practice. +- **(to be reviewed)**: added after any of the above when the statement needs a check by an experienced user. + +--- + +- [When to use this guide](#when-to-use-this-guide) +- [Start from](#start-from) +- [Settings that matter](#settings-that-matter) +- [Check convergence and results](#check-convergence-and-results) +- [Common problems](#common-problems) +- [Related tutorials and test cases](#related-tutorials-and-test-cases) + +--- + +## When to use this guide + +Use this guide when temperature matters in your simulation: + +- a fluid with heated or cooled walls, +- heat conduction in a solid alone, +- conjugate heat transfer (CHT): heat flows between a fluid zone and one or more solid zones, and SU2 solves all zones together. + +The examples use the incompressible solver. CHT also works with the compressible `NAVIER_STOKES` solver; see the test case [`coupled_cht/comp_2d`](https://github.com/su2code/SU2/blob/develop/TestCases/coupled_cht/comp_2d/cht_2d_3cylinders.cfg). +For the fluid settings, read [Setup Guide: Incompressible Flows](../Setup-Guide-Incompressible/) first. +For the general multizone setup, read [Basics of Multi-Zone Computations](../Multizone/). + +Every option is listed in the [option reference](../Option-Reference/). +Every output field is listed in the [output fields reference](../Output-Fields-Reference/). + +## Start from + +This setup is a 2D laminar air flow around three cylinders. Each cylinder is a solid zone with a hot core at 350 K. +It is the test case [`coupled_cht/incomp_2d`](https://github.com/su2code/SU2/blob/develop/TestCases/coupled_cht/incomp_2d/cht_2d_3cylinders.cfg) with fewer options. The [steady CHT tutorial](/tutorials/Static_CHT/) uses the same case. +Changes to the test case: `OUTER_ITER` is raised from 11 to 2000, and `HISTORY_OUTPUT` and `OUTPUT_FILES` are added to the main file. +The mesh `mesh_cht_3cyl.su2` holds all four zones. It is in the folder `coupled_cht/incomp_2d` of the [TestCases repository](https://github.com/su2code/TestCases). + +Main config file `cht_2d_3cylinders.cfg`: + +``` +SOLVER= MULTIPHYSICS +CONFIG_LIST= (flow_cylinder.cfg, solid_cylinder1.cfg, solid_cylinder2.cfg, solid_cylinder3.cfg) +% +% Pairs of markers that touch: fluid side, solid side +MARKER_ZONE_INTERFACE= (cylinder_outer1, cylinder_inner1, cylinder_outer2, cylinder_inner2, cylinder_outer3, cylinder_inner3) +MARKER_CHT_INTERFACE= (cylinder_outer1, cylinder_inner1, cylinder_outer2, cylinder_inner2, cylinder_outer3, cylinder_inner3) +CHT_COUPLING_METHOD= DIRECT_TEMPERATURE_ROBIN_HEATFLUX +% +TIME_DOMAIN= NO +OUTER_ITER= 2000 +% +MESH_FILENAME= mesh_cht_3cyl.su2 +MESH_FORMAT= SU2 +HISTORY_OUTPUT= (ITER, BGS_RES[0], BGS_RES[1], HEAT[0]) +OUTPUT_FILES= (RESTART, PARAVIEW_MULTIBLOCK) +``` + +Fluid zone `flow_cylinder.cfg`: + +``` +SOLVER= INC_NAVIER_STOKES +KIND_TURB_MODEL= NONE +% +INC_DENSITY_MODEL= VARIABLE +INC_ENERGY_EQUATION= YES +INC_DENSITY_INIT= 0.000210322 +INC_VELOCITY_INIT= ( 3.40297, 0.0, 0.0 ) +INC_TEMPERATURE_INIT= 288.15 +INC_NONDIM= DIMENSIONAL +FLUID_MODEL= INC_IDEAL_GAS +SPECIFIC_HEAT_CP= 1004.703 +MOLECULAR_WEIGHT= 28.96 +VISCOSITY_MODEL= CONSTANT_VISCOSITY +MU_CONSTANT= 1.7893e-05 +CONDUCTIVITY_MODEL= CONSTANT_PRANDTL +PRANDTL_LAM= 0.72 +% +MARKER_FAR= ( farfield ) +MARKER_MONITORING= ( cylinder_outer1, cylinder_outer2, cylinder_outer3 ) +% +NUM_METHOD_GRAD= GREEN_GAUSS +CONV_NUM_METHOD_FLOW= FDS +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= NONE +TIME_DISCRE_FLOW= EULER_IMPLICIT +CFL_NUMBER= 10.0 +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= ILU +LINEAR_SOLVER_ERROR= 1E-15 +LINEAR_SOLVER_ITER= 5 +``` + +Solid zone `solid_cylinder1.cfg` (zones 2 and 3 are the same, with `core2` and `core3`): + +``` +SOLVER= HEAT_EQUATION +INC_NONDIM= DIMENSIONAL +FREESTREAM_TEMPERATURE= 350.0 +% +MATERIAL_DENSITY= 0.000210322 +SPECIFIC_HEAT_CP= 1004.703 +THERMAL_CONDUCTIVITY_CONSTANT= 0.1028 +% +MARKER_ISOTHERMAL= ( core1, 350.0 ) +% +NUM_METHOD_GRAD= GREEN_GAUSS +TIME_DISCRE_HEAT= EULER_IMPLICIT +CFL_NUMBER= 10.0 +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= ILU +LINEAR_SOLVER_ERROR= 1E-15 +LINEAR_SOLVER_ITER= 5 +``` + +The zone files do not list the interface markers as boundary conditions. `MARKER_CHT_INTERFACE` in the main file sets them, and the zone files inherit every option of the main file ([Multizone](../Multizone/#multiphysics)). + +## Settings that matter + +### Thermal wall conditions in the fluid + +These conditions need the energy equation in the fluid: `INC_ENERGY_EQUATION= YES` for the incompressible solver. + +- `MARKER_ISOTHERMAL= ( marker, T [K] )`: fixed wall temperature. Use it when you know the wall temperature. +- `MARKER_HEATFLUX= ( marker, q [W/m²] )`: fixed heat flux. Zero gives an adiabatic wall. With `INTEGRATED_HEATFLUX= YES`, the value is a total heat rate in W, spread over the marker area ([Markers and BC](../Markers-and-BC/#constant-heatflux-no-slip-wall)). In SU2 a positive value adds heat to the domain (to be reviewed). +- `MARKER_HEATTRANSFER= ( marker, h [W/(m² K)], T_inf [K] )`: the wall heat flux is h·(T_inf − T_wall). Use it to model a wall that you do not mesh, such as a thin wall to an outside fluid. h = 0 gives an adiabatic wall; a very large h gives a wall at T_inf ([Markers and BC](../Markers-and-BC/#heat-transfer-or-convection-no-slip-wall)). + +`MARKER_HEATTRANSFER` is implemented for the flow solvers only. The heat equation solver for solids does not implement it (code). + +### Temperature without coupling to the flow + +If the temperature does not change the flow (constant density and constant properties), you have two options: + +- `INC_DENSITY_MODEL= CONSTANT` with `INC_ENERGY_EQUATION= YES`: the flow solver also solves for temperature, one way ([laminar flat plate tutorial](/tutorials/Inc_Laminar_Flat_Plate/)). +- `WEAKLY_COUPLED_HEAT_EQUATION= YES` with `INC_ENERGY_EQUATION= NO`: SU2 solves the temperature with the separate heat solver, using the flow velocity (code). Its numerics use `CONV_NUM_METHOD_HEAT`, `MUSCL_HEAT`, `TIME_DISCRE_HEAT` and `TIMESTEP_HEAT`. Example: [`disc_adj_heat/primal.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/disc_adj_heat/primal.cfg). + +For incompressible CHT, SU2 stops unless the fluid zone has `INC_ENERGY_EQUATION= YES` (code). So in CHT, use the energy equation, not the weakly coupled heat equation. + +### Heat conduction in a solid + +Set `SOLVER= HEAT_EQUATION` in the solid zone. This solver solves for temperature only. + +- `THERMAL_CONDUCTIVITY_CONSTANT` [W/(m K)], `MATERIAL_DENSITY` [kg/m³] and `SPECIFIC_HEAT_CP` [J/(kg K)] define the material. +- The defaults are meant for other uses: 0.0257 W/(m K) for air, 7854 kg/m³ for steel, 1004.703 J/(kg K) for air (code). So always set all three. +- `FREESTREAM_TEMPERATURE` (default 288.15 K) is the initial solid temperature (code). +- Boundary conditions: `MARKER_ISOTHERMAL`, `MARKER_HEATFLUX`, `MARKER_PERIODIC`, and the CHT interface. +- All solid test cases use `INC_NONDIM= DIMENSIONAL` (test case). + +In a steady run, only the conductivity changes the final temperature. Density and specific heat matter in unsteady runs (advice, to be reviewed). + +A solid alone runs as a normal single-zone case, for example [`solid_heat_conduction/periodic_pins/configSolid.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/solid_heat_conduction/periodic_pins/configSolid.cfg). + +### Zones and config files + +A CHT case is a multiphysics case ([Multizone](../Multizone/#multiphysics)): + +1. Write one config file per zone. Each one sets `SOLVER`, and the boundary conditions and numerics of the zone. +2. Write a main config file with `SOLVER= MULTIPHYSICS` and `CONFIG_LIST`, the list of zone files. The order in `CONFIG_LIST` gives the zone number, starting at 0. +3. Options that are the same in all zones can go in the main file. The zone files inherit them ([Multizone](../Multizone/#multiphysics)). + +The mesh: + +- One file for all zones: `MULTIZONE_MESH= YES` (default). This works with the SU2 mesh format, with `NZONE=` and `IZONE=` in the mesh file ([Multizone](../Multizone/#multizone-mesh)). +- One file per zone: `MULTIZONE_MESH= NO`, and `MESH_FILENAME` in each zone file. The [contact resistance tutorial](/tutorials/SS_CR_CHT/) uses three mesh files. + +Run each zone alone first, with a fixed temperature or heat flux at the interface, to find numerical settings that work (advice). [Multizone](../Multizone/#multiphysics) gives the same advice. + +### Interface markers + +Each interface has two markers, one on each side. List the pairs in the main file: + +- `MARKER_ZONE_INTERFACE`: pairs of markers that exchange data. +- `MARKER_CHT_INTERFACE`: the same pairs, marked as heat transfer interfaces. + +All CHT test cases and tutorials list the pairs in both options (test case, tutorial). + +### Coupling method + +`CHT_COUPLING_METHOD` decides what crosses the interface (code): + +- `DIRECT_TEMPERATURE_ROBIN_HEATFLUX` (default): the fluid gets the solid wall temperature. The solid gets a heat flux computed from its own wall temperature and the fluid temperature next to the wall. This is a Robin condition, which mixes temperature and heat flux. All CHT test cases use this method (test case). +- `DIRECT_TEMPERATURE_NEUMANN_HEATFLUX`: the solid gets the heat flux computed by the fluid. This is a Neumann condition, a prescribed flux. +- `AVERAGED_TEMPERATURE_ROBIN_HEATFLUX` and `AVERAGED_TEMPERATURE_NEUMANN_HEATFLUX`: the fluid wall temperature is a conductivity-weighted average of the temperatures on both sides. + +The Robin methods need the fluid conductivity. With `CONDUCTIVITY_MODEL= POLYNOMIAL_CONDUCTIVITY` in an incompressible fluid zone, SU2 stops (code). +Start with the default, because it is the only method used in the tests (advice, to be reviewed). + +### Interface interpolation + +The two sides of an interface do not need matching meshes ([Multizone](../Multizone/)). +`KIND_INTERPOLATION` chooses how SU2 moves values between them (code): + +- `NEAREST_NEIGHBOR` (default): each point takes the value of the closest point on the other side. `NUM_NEAREST_NEIGHBORS` (default 1) sets how many neighbors SU2 uses. +- `ISOPARAMETRIC`: interpolation inside the faces of the other side. +- `RADIAL_BASIS_FUNCTION`: smooth interpolation with radial basis functions (`KIND_RADIAL_BASIS_FUNCTION`). + +`WEIGHTED_AVERAGE` is the sliding mesh method for fluid-fluid interfaces, not for CHT. +SU2 uses the method of the donor zone, so set it in the main file to apply it everywhere (code). +No CHT test case changes the default (test case). +With very different mesh sizes on the two sides, `ISOPARAMETRIC` or `RADIAL_BASIS_FUNCTION` can give a smoother interface temperature than `NEAREST_NEIGHBOR` (advice, to be reviewed). + +### Contact resistance between solids + +`CHT_INTERFACE_CONTACT_RESISTANCE` models imperfect contact between two solids: the temperature jumps across the interface ([tutorial](/tutorials/SS_CR_CHT/)). + +These rules come from the code (code): + +- Give one value per interface pair, or one value for all pairs. Values must not be negative. +- It acts only between two `HEAT_EQUATION` zones, and only with the two `..._ROBIN_HEATFLUX` coupling methods. On fluid-solid interfaces it has no effect. +- The heat flux is (T − T_wall) / (d/k + R), where d is the distance from the wall to the next point and k the conductivity. So R is in m²·K/W, the inverse of a heat transfer coefficient. + +The tutorial gives the values in the order of the pairs in `MARKER_CHT_INTERFACE`: `CHT_INTERFACE_CONTACT_RESISTANCE= (1e-4, 0, 0)` (tutorial). + +### Outer and inner iterations + +SU2 solves the zones one after the other and exchanges interface data between them. One pass over all zones is an outer iteration. + +- `OUTER_ITER` (main file): the number of outer iterations of a steady case, or per time step of an unsteady case. +- `INNER_ITER` (default 1): the iterations of each zone inside one outer iteration (code, tutorial). You can set it per zone file. +- `MULTIZONE_SOLVER`: `BLOCK_GAUSS_SEIDEL` (default) or `BLOCK_JACOBI` (code). In general terms, Gauss-Seidel uses the newest data of the zones already solved, and Jacobi uses the data of the previous outer iteration (advice). +- `RELAXATION_FACTOR_CHT` (default 1.0, no relaxation): the new interface value is factor × new + (1 − factor) × old (code). +- `ITER` is not allowed in multizone cases: SU2 stops. Use `OUTER_ITER` and `INNER_ITER` (code). + +The solid often converges more slowly than the fluid, because heat conduction has no convection to carry information. A large `CFL_NUMBER` in the solid zone helps; the solid test case uses 1e8 when run alone (advice, to be reviewed). + +### Unsteady CHT + +Set the time settings in the main file ([unsteady CHT tutorial](/tutorials/Inc_Heated_Cylinders_Unsteady/)): + +``` +TIME_DOMAIN= YES +TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER +TIME_STEP= 0.05 +MAX_TIME= 100.0 +TIME_ITER= 3 +OUTER_ITER= 10 +``` + +These values are from the test case [`coupled_cht/incomp_2d_unsteady`](https://github.com/su2code/SU2/blob/develop/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg) (test case). The tutorial uses `OUTER_ITER= 200` to converge the coupling in each time step (tutorial). + +- Choose `TIME_STEP` from the time scale of the flow, for example the vortex shedding period ([tutorial](/tutorials/Inc_Heated_Cylinders_Unsteady/)). +- In unsteady runs, the solid density and specific heat matter, so set real material values. +- Solids often respond much more slowly than the fluid. Reaching a periodic state can take many time steps (advice, to be reviewed). + +## Check convergence and results + +- **Coupling residuals.** In a multizone case, SU2 prints for each zone the change between outer iterations: the block Gauss-Seidel (BGS) residuals. Fields such as `BGS_PRESSURE[0]` and `BGS_TEMPERATURE[1]` are per zone; the number in brackets is the zone. Add the group `BGS_RES[i]` to `HISTORY_OUTPUT` for zone i. +- **Default stop rule.** Without `CONV_FIELD`, a multizone case monitors `AVG_BGS_RES[0]`, the averaged BGS residual of zone 0 (code). Set `CONV_FIELD` and `CONV_RESIDUAL_MINVAL` in the main file to monitor what you need, for example the solid temperature. The pin array test case sets `CONV_RESIDUAL_MINVAL` in its main file (test case). +- **Field names.** SU2 ignores unknown names in `CONV_FIELD` and prints `Ignoring Convergence Field(s)` at the start (code). +- **Heat balance.** Monitor `TOTAL_HEATFLUX` and `AVG_TEMPERATURE` (group `HEAT`) on the interface markers, through `MARKER_MONITORING` in each zone. At convergence, the heat that leaves the solid through the interface should equal the heat that enters the fluid (advice, to be reviewed: check the sign convention of each zone). +- **Per-zone history.** `WRT_ZONE_HIST= YES` writes a history file per zone. `WRT_ZONE_CONV= YES` prints the convergence of each zone (code). +- **Visual check.** `OUTPUT_FILES= (RESTART, PARAVIEW_MULTIBLOCK)` writes one ParaView file with all zones. The temperature should be continuous across solid-fluid interfaces ([contact resistance tutorial](/tutorials/SS_CR_CHT/)). + +## Common problems + +| Symptom | Likely cause | What to try | +|---|---|---| +| SU2 stops: "You probably want to set INC_ENERGY_EQUATION= YES for the fluid solver". | The incompressible fluid zone has no energy equation (code). | Set `INC_ENERGY_EQUATION= YES` in the fluid zone file. | +| SU2 stops: "ITER must not be used when running multizone". | `ITER` in a zone file or in the main file (code). | Use `OUTER_ITER` in the main file, and `INNER_ITER` if needed. | +| SU2 stops: "Polynomial Conductivity model not implemented for CHT interface". | `POLYNOMIAL_CONDUCTIVITY` with a Robin coupling method (code). | Use `CONSTANT_CONDUCTIVITY` or `CONSTANT_PRANDTL` in the fluid, or a Neumann coupling method. | +| SU2 stops: "Number of CHT interfaces does not match number of contact resistances". | Wrong number of values in `CHT_INTERFACE_CONTACT_RESISTANCE` (code). | Give one value per interface pair, or a single value. | +| The solid stays at its initial temperature. | The interface markers are missing from `MARKER_CHT_INTERFACE` or `MARKER_ZONE_INTERFACE`, or the marker names do not match the mesh (advice). | Check the start-up output: it prints the interface type between each pair of zones. Check the marker names. | +| A wall with `MARKER_HEATTRANSFER` in a solid zone behaves as adiabatic. | The heat equation solver does not implement this condition (code). | Mesh the outer fluid, or use `MARKER_HEATFLUX` or `MARKER_ISOTHERMAL`. | +| The solid temperatures settle far too slowly. | A small CFL number in the solid, or `INNER_ITER= 1` with a very stiff solid (advice). | Raise `CFL_NUMBER` in the solid zone, or raise `INNER_ITER` in the solid zone file (to be reviewed). | +| The outer iterations oscillate. | Strong coupling between zones (advice). | Try `RELAXATION_FACTOR_CHT` below 1, for example 0.5 (to be reviewed). | +| The solid material behaves like steel or like air. | `MATERIAL_DENSITY`, `SPECIFIC_HEAT_CP` or `THERMAL_CONDUCTIVITY_CONSTANT` left at their defaults (code). | Set all three in each solid zone file. | +| The temperature looks blocky along a non-matching interface. | `NEAREST_NEIGHBOR` interpolation between very different meshes (advice). | Try `KIND_INTERPOLATION= ISOPARAMETRIC` (to be reviewed). | +| The result files of different zones overwrite each other. | `MULTIZONE_ADAPT_FILENAME= NO` (advice). | Keep the default `YES`, which adds the zone number to the restart and solution file names (code). | + +## Related tutorials and test cases + +Tutorials: + +- [Laminar Flat Plate with Heat Transfer](/tutorials/Inc_Laminar_Flat_Plate/): isothermal wall, energy equation with constant density. +- [Laminar Buoyancy-driven Cavity](/tutorials/Inc_Laminar_Cavity/): natural convection. +- [Steady CHT, heated cylinders](/tutorials/Static_CHT/): the start setup above. +- [Unsteady CHT, heated cylinders](/tutorials/Inc_Heated_Cylinders_Unsteady/). +- [Solid-to-Solid CHT with Contact Resistance](/tutorials/SS_CR_CHT/). +- [Streamwise Periodic Flow](/tutorials/Inc_Streamwise_Periodic/): includes a CHT pin array. + +Test cases: + +- [`coupled_cht/incomp_2d`](https://github.com/su2code/SU2/blob/develop/TestCases/coupled_cht/incomp_2d/cht_2d_3cylinders.cfg): steady incompressible CHT. +- [`coupled_cht/incomp_2d_unsteady`](https://github.com/su2code/SU2/blob/develop/TestCases/coupled_cht/incomp_2d_unsteady/cht_2d_3cylinders.cfg): unsteady incompressible CHT. +- [`coupled_cht/comp_2d`](https://github.com/su2code/SU2/blob/develop/TestCases/coupled_cht/comp_2d/cht_2d_3cylinders.cfg): compressible CHT. +- [`incomp_navierstokes/streamwise_periodic/chtPinArray_2d/configMaster.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/configMaster.cfg) and [`chtPinArray_3d`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configMaster.cfg): CHT with streamwise periodic flow and heat flux in the pins. +- [`incomp_navierstokes/streamwise_periodic/chtPinArray_2d/BC_HeatTransfer.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/BC_HeatTransfer.cfg): the fluid alone, with `MARKER_HEATTRANSFER` in place of the solid. +- [`solid_heat_conduction/periodic_pins/configSolid.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/solid_heat_conduction/periodic_pins/configSolid.cfg): a solid alone. +- [`disc_adj_heat/primal.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/disc_adj_heat/primal.cfg): weakly coupled heat equation. +- [`flamelet/03_laminar_premixed_ch4_flame_cht_cfd`](https://github.com/su2code/SU2/blob/develop/TestCases/flamelet/03_laminar_premixed_ch4_flame_cht_cfd/lam_prem_ch4_cht_cfd_master.cfg): CHT with a flame. + +User guide pages: [Basics of Multi-Zone Computations](../Multizone/), [Markers and BC](../Markers-and-BC/), [Theory: Heat Conduction](../Theory/#heat-conduction), [Solver Setup](../Solver-Setup/), [Custom Output](../Custom-Output/). + +Last checked against SU2 develop `11c177b904`. diff --git a/_docs_v7/Setup-Guide-Incompressible.md b/_docs_v7/Setup-Guide-Incompressible.md new file mode 100644 index 00000000..167e9ebc --- /dev/null +++ b/_docs_v7/Setup-Guide-Incompressible.md @@ -0,0 +1,309 @@ +--- +title: "Setup Guide: Incompressible Flows" +permalink: /docs_v7/Setup-Guide-Incompressible/ +--- + +> **Draft.** The settings below come from the SU2 code, the tutorials and the test cases. The advice parts need a review by experienced users. + +**Source tags.** A tag at the end of a statement says where it comes from. A tag on the line that introduces a list or a table covers the whole list or table. + +- **(code)**: read in the SU2 source. Option defaults come from `Common/src/CConfig.cpp`. +- **(test case)**: used in a test case config. +- **(tutorial)**: used in a tutorial. +- **(docs)**: stated in another page of this website. +- **(advice)**: general CFD practice. +- **(to be reviewed)**: added after any of the above when the statement needs a check by an experienced user. + +--- + +- [When to use this guide](#when-to-use-this-guide) +- [Start from](#start-from) +- [Settings that matter](#settings-that-matter) +- [Check convergence and results](#check-convergence-and-results) +- [Common problems](#common-problems) +- [Related tutorials and test cases](#related-tutorials-and-test-cases) + +--- + +## When to use this guide + +Use this guide for a flow where the density does not depend on the pressure. +This covers liquids and low-speed gas flows. It also covers low-speed gas flows with heat transfer, where the density changes only with temperature. +As a rule of thumb, the Mach number is below about 0.3 (advice). + +This guide covers the solvers `INC_EULER`, `INC_NAVIER_STOKES` and `INC_RANS`. +For mixing gases and flames, continue with [Setup Guide: Species Transport and Combustion](../Setup-Guide-Species-Combustion/). +For coupled heat transfer between fluid and solid, continue with [Setup Guide: Heat Transfer and Conjugate Heat Transfer](../Setup-Guide-Heat-Transfer-CHT/). + +Every option is listed in the [option reference](../Option-Reference/). +Every output field is listed in the [output fields reference](../Output-Fields-Reference/). + +## Start from + +This config is a laminar flow through a pipe bend. It has a velocity inlet, a pressure outlet, adiabatic walls and a symmetry plane. +It is the test case [`incomp_navierstokes/bend/lam_bend.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_navierstokes/bend/lam_bend.cfg) with fewer options. +Changes to the test case: `ITER` is raised from 11 to 2000, and `MARKER_ANALYZE` and `HISTORY_OUTPUT` are added to check the mass flow. +The mesh `mesh_bend_coarse.cgns` is in the folder `incomp_navierstokes/bend` of the [TestCases repository](https://github.com/su2code/TestCases). + +``` +% ------------- Problem -------------% +SOLVER= INC_NAVIER_STOKES +KIND_TURB_MODEL= NONE +MATH_PROBLEM= DIRECT +RESTART_SOL= NO +% +% ------------- Fluid and initial state -------------% +INC_DENSITY_MODEL= CONSTANT +INC_ENERGY_EQUATION= NO +INC_DENSITY_INIT= 1.2886 +INC_VELOCITY_INIT= ( 0.1, 0.0, 0.0 ) +INC_TEMPERATURE_INIT= 288.15 +INC_NONDIM= INITIAL_VALUES +VISCOSITY_MODEL= CONSTANT_VISCOSITY +MU_CONSTANT= 1.716E-5 +% +% ------------- Boundary conditions -------------% +INC_INLET_TYPE= VELOCITY_INLET +MARKER_INLET= ( INLET, 288.15, 0.1, 1.0, 0.0, 0.0 ) +INC_OUTLET_TYPE= PRESSURE_OUTLET +MARKER_OUTLET= ( OUTLET, 0.0 ) +MARKER_HEATFLUX= ( WALL1, 0.0, WALL2, 0.0 ) +MARKER_SYM= ( SYMMETRY ) +MARKER_MONITORING= ( WALL1, WALL2 ) +MARKER_ANALYZE= ( INLET, OUTLET ) +% +% ------------- Numerics -------------% +NUM_METHOD_GRAD= GREEN_GAUSS +CONV_NUM_METHOD_FLOW= FDS +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= NONE +TIME_DISCRE_FLOW= EULER_IMPLICIT +CFL_NUMBER= 1e2 +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= ILU +LINEAR_SOLVER_ERROR= 1E-15 +LINEAR_SOLVER_ITER= 5 +% +% ------------- Convergence and output -------------% +ITER= 2000 +CONV_FIELD= RMS_PRESSURE +CONV_RESIDUAL_MINVAL= -8 +CONV_STARTITER= 10 +MESH_FILENAME= mesh_bend_coarse.cgns +MESH_FORMAT= CGNS +SCREEN_OUTPUT= (INNER_ITER, RMS_PRESSURE, RMS_VELOCITY-X, SURFACE_MASSFLOW) +HISTORY_OUTPUT= (ITER, RMS_RES, FLOW_COEFF, FLOW_COEFF_SURF) +``` + +## Settings that matter + +### Solver + +Choose the solver with `SOLVER`: + +- `INC_EULER`: no viscosity. Use it for quick checks of pressure fields, for example on a hydrofoil. SU2 stops if you combine it with a density model other than `CONSTANT`, or with `INC_ENERGY_EQUATION= YES` (code). +- `INC_NAVIER_STOKES`: laminar flow. +- `INC_RANS`: turbulent flow. Choose the turbulence model with `KIND_TURB_MODEL` (`SA` or `SST`). + +For `INC_RANS`, the inlet turbulence comes from `FREESTREAM_TURBULENCEINTENSITY` (default 0.05) and `FREESTREAM_TURB2LAMVISCRATIO` (default 10), the ratio of turbulent to laminar viscosity (code). +You can set other values per inlet with `MARKER_INLET_TURBULENT`: two values per marker for `SST` (intensity, viscosity ratio), one value for `SA` (viscosity ratio) (code). + +### Density-based or pressure-based solver + +`KIND_INCOMP_SYSTEM` selects how SU2 couples pressure and velocity (code): + +- `DENSITY_BASED` (default): SU2 adds a pseudo-time derivative of the pressure to the continuity equation. This is called artificial compressibility, a form of preconditioning. SU2 then solves pressure, velocity and temperature together, in one coupled system. All tutorials on this page use it. +- `PRESSURE_BASED`: a segregated method of the SIMPLE type, which solves the equations one after the other. Choose `SIMPLE` (default) or `SIMPLEC` with `KIND_PB_ITER`. It uses `CONV_NUM_METHOD_FLOW= UDS` (upwind) or `CDS` (centered). + +With `PRESSURE_BASED`, SU2 stops if you use multigrid (`MGLEVEL` above 0), an adjoint, `MARKER_PERIODIC`, streamwise periodic flow, or `TIME_MARCHING= TIME_STEPPING` (code). +If you need the pressure-based solver, start from the test case [`incomp_navierstokes/bend/pb_lam_bend.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_navierstokes/bend/pb_lam_bend.cfg). +The rest of this page is about the density-based solver. + +### Density model and energy equation + +`INC_DENSITY_MODEL` decides how the density can change. `INC_ENERGY_EQUATION` switches the temperature equation on or off. The table shows what the code does (code): + +| `INC_DENSITY_MODEL` | Density | Energy equation | `FLUID_MODEL` | +|---|---|---|---| +| `CONSTANT` (default) | constant | your choice | SU2 sets `CONSTANT_DENSITY` | +| `BOUSSINESQ` | constant, plus a buoyancy force from temperature | always on | SU2 sets `CONSTANT_DENSITY` | +| `VARIABLE` | from the ideal gas law, changes with temperature | always on without species | `INC_IDEAL_GAS`, `INC_IDEAL_GAS_POLY`, `FLUID_MIXTURE` or `FLUID_FLAMELET` | +| `FLAMELET` | read from a flamelet table | handled by the flamelet solver | `FLUID_FLAMELET` | + +How to choose: + +- **No heat transfer, or temperature as a passive quantity.** Use `CONSTANT`. With `INC_ENERGY_EQUATION= YES`, SU2 solves for temperature, but the temperature does not change the flow. This one-way coupling is used in the [laminar flat plate tutorial](/tutorials/Inc_Laminar_Flat_Plate/) (tutorial). Set `SPECIFIC_HEAT_CP` (default 1004.703 J/(kg K)). +- **Small temperature differences with buoyancy.** Use `BOUSSINESQ`. The buoyancy force uses `THERMAL_EXPANSION_COEFF` (default 0.00347 1/K) and the difference to `INC_TEMPERATURE_INIT`. Gravity is fixed at 9.81 m/s², along the negative y axis in 2D and the negative z axis in 3D. You cannot add `BODY_FORCE= YES`: SU2 stops (code). +- **Large temperature differences in a gas.** Use `VARIABLE` with `FLUID_MODEL= INC_IDEAL_GAS` (constant specific heat) or `INC_IDEAL_GAS_POLY` (specific heat as a polynomial of temperature, set with `CP_POLYCOEFFS`, five coefficients). Set `MOLECULAR_WEIGHT` in g/mol (default 28.96) and `SPECIFIC_HEAT_CP`. +- **Mixtures of gases.** Use `VARIABLE` with `FLUID_MODEL= FLUID_MIXTURE`. See the [species guide](../Setup-Guide-Species-Combustion/). + +When you set `INC_DENSITY_MODEL` to `CONSTANT` or `BOUSSINESQ`, SU2 replaces your `FLUID_MODEL` with `CONSTANT_DENSITY`. Other fluid models only take effect with `VARIABLE` or `FLAMELET` (code). + +### Operating pressure of an ideal gas + +With `VARIABLE` density, SU2 computes the density from an operating pressure, the molecular weight and the temperature. +The operating (thermodynamic) pressure is constant in space. The flow pressure in SU2 is a gauge pressure on top of it ([Theory](../Theory/#incompressible-navier-stokes)). + +`INIT_OPTION_INC` decides which of the two you prescribe (code): + +- `DENSITY_INIT`: SU2 scales `THERMODYNAMIC_PRESSURE` so that the density at `INC_TEMPERATURE_INIT` equals `INC_DENSITY_INIT`. This is the default for `INC_IDEAL_GAS` and `INC_IDEAL_GAS_POLY`. +- `OPERATING_PRESSURE`: SU2 uses `THERMODYNAMIC_PRESSURE` (default 101325 Pa) and computes the density. This is the default for `FLUID_MIXTURE` and `FLUID_FLAMELET`. + +The buoyancy cavity test case uses `DENSITY_INIT` with a very small `INC_DENSITY_INIT` to reach a chosen Rayleigh number (test case). + +### Gravity for variable density + +For natural convection with `VARIABLE` density, set `BODY_FORCE= YES` and `BODY_FORCE_VECTOR= ( 0.0, -9.81, 0.0 )` (an acceleration in m/s²), as in the [buoyancy cavity tutorial](/tutorials/Inc_Laminar_Cavity/). +With variable density, the force is (ρ − ρ₀)·g, where ρ₀ is the initial density. So the computed pressure does not contain the hydrostatic pressure of the initial density (code). + +### Viscosity and conductivity + +- `VISCOSITY_MODEL`: the default is `SUTHERLAND`. SU2 stops if you use it with constant density, so set `VISCOSITY_MODEL= CONSTANT_VISCOSITY` and `MU_CONSTANT` (default 1.716e-5 kg/(m s)) (code). Sutherland's law is allowed with `INC_IDEAL_GAS`, `INC_IDEAL_GAS_POLY` and `FLUID_MIXTURE`. `POLYNOMIAL_VISCOSITY` uses `MU_POLYCOEFFS`. +- `CONDUCTIVITY_MODEL`: the default `CONSTANT_PRANDTL` computes the conductivity from viscosity, specific heat and `PRANDTL_LAM` (default 0.72). `CONSTANT_CONDUCTIVITY` uses `THERMAL_CONDUCTIVITY_CONSTANT` (default 0.0257 W/(m K)). `POLYNOMIAL_CONDUCTIVITY` uses `KT_POLYCOEFFS`. +- `TURBULENT_CONDUCTIVITY_MODEL`: `CONSTANT_PRANDTL_TURB` (default) uses `PRANDTL_TURB` (default 0.9). `NONE` switches the turbulent heat transport off. + +The defaults are values for air. For water or another liquid, set all of them (advice). + +### Initial state and non-dimensionalization + +`INC_DENSITY_INIT`, `INC_VELOCITY_INIT` and `INC_TEMPERATURE_INIT` set the initial field. The initial pressure is always zero. +They also set the free-stream state used at `MARKER_FAR` markers, the Reynolds number printed on screen, and the free-stream turbulence level (code). + +`INC_NONDIM` chooses the reference values that SU2 divides by internally (code): + +- `INITIAL_VALUES` (default): the reference density, velocity and temperature are the initial values. The reference velocity is the magnitude of `INC_VELOCITY_INIT`. +- `REFERENCE_VALUES`: you set `INC_DENSITY_REF`, `INC_VELOCITY_REF` and `INC_TEMPERATURE_REF` (all default to 1.0). +- `DIMENSIONAL`: all reference values are 1, so SU2 works in SI units. + +The reference pressure is the reference density times the reference velocity squared. +The inputs in the config file are always in SI units ([NACA 0012 tutorial](/tutorials/Inc_Turbulent_NACA0012/)). +The volume and restart files contain the solver variables. So pressure, velocity and temperature in these files are divided by the reference values, unless you use `DIMENSIONAL` (code). +SU2 prints the reference values and the non-dimensional values at the start of the run. Use them to convert results back to SI units. + +Advice: + +- Use `DIMENSIONAL` if you want SI values in the output files. Almost all CHT, species, flamelet and streamwise periodic test cases use it (test case). The choice should not change the converged solution (advice, to be reviewed). +- Do not use `INITIAL_VALUES` with a zero `INC_VELOCITY_INIT`, for example in a closed cavity: the reference velocity becomes zero. Set a small non-zero velocity (the buoyancy cavity test uses 1 m/s), or use `DIMENSIONAL` (code). +- Streamwise periodic flow needs `INC_NONDIM= DIMENSIONAL` (code). + +### Inlets + +`MARKER_INLET` sets the inlet markers. `INC_INLET_TYPE` gives one type per inlet marker, in the same order (code): + +- `VELOCITY_INLET`: `MARKER_INLET= ( marker, temperature [K], velocity magnitude [m/s], nx, ny, nz )`. The direction vector does not need unit length. The temperature is needed even without the energy equation, but then SU2 does not use it ([Markers and BC](../Markers-and-BC/)). +- `PRESSURE_INLET`: `MARKER_INLET= ( marker, temperature [K], total gauge pressure [Pa], nx, ny, nz )`. SU2 adjusts the inlet velocity to reach the total pressure. `INC_INLET_DAMPING` (default 0.1) damps these updates. + +The incompressible solver has no mass flow inlet (code). +To prescribe a mass flow, use a velocity inlet (velocity = mass flow / (density × area)) or a mass flow outlet. + +For a measured or computed inlet profile, set `SPECIFIED_INLET_PROFILE= YES` and `INLET_FILENAME`, as in the [laminar step tutorial](/tutorials/Inc_Laminar_Step/). + +### Outlets + +`MARKER_OUTLET` sets the outlet markers. `INC_OUTLET_TYPE` gives one type per outlet marker (code): + +- `PRESSURE_OUTLET`: `MARKER_OUTLET= ( marker, gauge pressure [Pa] )`. This is the usual choice. Zero is a good value, because the pressure level is arbitrary in incompressible flow (advice). +- `MASS_FLOW_OUTLET`: `MARKER_OUTLET= ( marker, mass flow [kg/s] )`. SU2 adjusts the outlet pressure to reach the target. `INC_OUTLET_DAMPING` (default 0.1) damps these updates. + +Put the outlet far enough downstream that no recirculation crosses it (advice, to be reviewed). + +### Walls and far field + +- `MARKER_HEATFLUX= ( marker, heat flux [W/m²] )`: no-slip wall. Zero means adiabatic. +- `MARKER_ISOTHERMAL= ( marker, temperature [K] )`: no-slip wall at a fixed temperature. +- `MARKER_HEATTRANSFER= ( marker, h [W/(m² K)], T_inf [K] )`: wall with a heat transfer coefficient. +- `MARKER_EULER`: slip wall, for `INC_EULER`. +- `MARKER_SYM`: symmetry plane. +- `MARKER_FAR`: far field. It uses `INC_VELOCITY_INIT`, zero gauge pressure and `INC_TEMPERATURE_INIT` (code). + +The [heat transfer guide](../Setup-Guide-Heat-Transfer-CHT/) explains the thermal wall conditions. + +### Convective scheme and gradients + +For the density-based solver, `CONV_NUM_METHOD_FLOW` accepts these schemes (code): + +- `FDS` (flux difference splitting, an upwind scheme). Almost all incompressible test cases use it. It has no tuning parameters ([Convective Schemes](../Convective-Schemes/#incompressible-flow)). +- `JST` and `LAX-FRIEDRICH` (centered schemes with artificial dissipation). + +`MUSCL_FLOW= YES` (default) makes the scheme second order. The default limiter is `VENKATAKRISHNAN`, but most incompressible test cases use `SLOPE_LIMITER_FLOW= NONE` (code, test case). +Add a limiter only if the solution shows wiggles, or if the run diverges near sharp gradients (advice, to be reviewed). + +For `INC_RANS`, the test cases use `CONV_NUM_METHOD_TURB= SCALAR_UPWIND`. `BOUNDED_SCALAR` is also available for incompressible flow. It corrects for a non-zero velocity divergence during convergence ([Convective Schemes](../Convective-Schemes/#turbulence-and-scalarspecies-equations)). + +### Artificial compressibility factor + +The density-based solver scales its pseudo-time pressure term with β² = max(4.1, `BETA_FACTOR`) × (maximum velocity)². So `BETA_FACTOR` (default 4.1) changes the result only when you set it above 4.1 (code). +A larger value can make the pressure-velocity coupling more robust, but slower (advice, to be reviewed). Most users keep the default. + +### Streamwise periodic flow + +Use streamwise periodic flow for one module of a repeating geometry, such as a channel with a row of pins. Read [Streamwise Periodicity](../Streamwise-Periodicity/) and the [tutorial](/tutorials/Inc_Streamwise_Periodic/). + +- Join the periodic faces with `MARKER_PERIODIC= ( periodic, donor, rotation center (3), rotation angles (3), translation (3) )`. +- Use `KIND_STREAMWISE_PERIODIC= PRESSURE_DROP` with `STREAMWISE_PERIODIC_PRESSURE_DROP` [Pa] (default 1.0), or `MASSFLOW` with `STREAMWISE_PERIODIC_MASSFLOW` [kg/s]. With `MASSFLOW`, SU2 adapts the pressure drop and damps the update with `INC_OUTLET_DAMPING` (code). +- With the energy equation, `STREAMWISE_PERIODIC_TEMPERATURE= YES` makes the temperature periodic too. It allows only `MARKER_HEATFLUX` and `MARKER_SYM`, no `MARKER_ISOTHERMAL` (code). With `NO`, SU2 removes heat at the outlet; set the amount with `STREAMWISE_PERIODIC_OUTLET_HEAT` [W]. +- SU2 stops unless `INC_NONDIM= DIMENSIONAL`. `INC_EULER` and `AXISYMMETRIC= YES` are not supported (code). + +### Iterations and CFL number + +- Steady runs: set `ITER` (default 1000) or `INNER_ITER`. `CFL_NUMBER` sets the pseudo-time step (default 1.25) (code). The incompressible test cases use CFL numbers from 10 to 1000, and up to 50000 in a streamwise periodic case, all with `TIME_DISCRE_FLOW= EULER_IMPLICIT` (test case). +- `CFL_ADAPT= YES` with `CFL_ADAPT_PARAM` lets SU2 raise the CFL number while the residuals fall, as in the NACA 0012 RANS test case (test case). +- Unsteady runs: set `TIME_DOMAIN= YES`, `TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER`, `TIME_STEP`, `TIME_ITER` and `INNER_ITER`. See the [von Karman tutorial](/tutorials/Inc_Von_Karman/) and [Solver Setup](../Solver-Setup/). +- `MGLEVEL` (default 0) adds multigrid levels. Some inviscid and laminar test cases use 3 levels (test case). + +## Check convergence and results + +- **Residuals.** The default convergence field is `RMS_PRESSURE` for the density-based solver and `RMS_VELOCITY-X` for the pressure-based solver (code). Set `CONV_FIELD` and `CONV_RESIDUAL_MINVAL` (log10 of the residual, default −14). A drop of 4 to 6 orders is a common target for steady engineering cases (advice, to be reviewed). +- **Field names.** SU2 ignores unknown names in `CONV_FIELD` and prints `Ignoring Convergence Field(s)` at the start. If all names are unknown, the convergence check is off and the run goes on to `ITER` (code). +- **Integrated values.** Monitor a value you care about, for example `DRAG` on `MARKER_MONITORING` markers, or `SURFACE_PRESSURE_DROP` on `MARKER_ANALYZE` markers. A stop based on a coefficient uses `CONV_CAUCHY_ELEMS` and `CONV_CAUCHY_EPS` ([Solver Setup](../Solver-Setup/#setting-convergence-criteria)). +- **Mass balance.** Add the inlets and outlets to `MARKER_ANALYZE`, and `FLOW_COEFF_SURF` to `HISTORY_OUTPUT`. The history file then has the mass flow of each marker. Inlet and outlet mass flows should agree to a small fraction of a percent at convergence (advice, to be reviewed). +- **Reference values.** Read the table of reference and non-dimensional values printed at the start of the run. Check that density, viscosity and Reynolds number are what you intended. +- **Energy equation.** With the energy equation, `RMS_ENTHALPY` is the residual of the energy equation (code). `TOTAL_HEATFLUX` gives the heat flux through the `MARKER_MONITORING` markers. + +## Common problems + +| Symptom | Likely cause | What to try | +|---|---|---| +| SU2 stops: "Sutherland's law only valid for ideal gases in incompressible flows". | The default `VISCOSITY_MODEL` is `SUTHERLAND` (code). | Set `VISCOSITY_MODEL= CONSTANT_VISCOSITY` and `MU_CONSTANT`. | +| SU2 stops: "Inlet types for incompressible problem improperly specified". | `INC_INLET_TYPE` has fewer entries than `MARKER_INLET` has markers (code). | Give one type per inlet marker, for example `INC_INLET_TYPE= VELOCITY_INLET, PRESSURE_INLET`. The same applies to `INC_OUTLET_TYPE`. | +| SU2 stops: "Variable density incompressible solver limited to ideal gases". | `INC_DENSITY_MODEL= VARIABLE` with the default `FLUID_MODEL= STANDARD_AIR` (code). | Set `FLUID_MODEL= INC_IDEAL_GAS` or `INC_IDEAL_GAS_POLY`. | +| SU2 stops: "Inviscid incompressible problems must be constant density". | `INC_EULER` with variable density or with the energy equation (code). | Use `INC_NAVIER_STOKES`, or `INC_DENSITY_MODEL= CONSTANT` and `INC_ENERGY_EQUATION= NO`. | +| The density does not follow `THERMODYNAMIC_PRESSURE`. | With `INC_IDEAL_GAS`, the default `INIT_OPTION_INC= DENSITY_INIT` rescales the operating pressure to match `INC_DENSITY_INIT` (code). | Set `INIT_OPTION_INC= OPERATING_PRESSURE`, or choose an `INC_DENSITY_INIT` that matches your pressure. | +| `FLUID_MODEL` seems to have no effect. | `INC_DENSITY_MODEL` is `CONSTANT` or `BOUSSINESQ`, so SU2 uses `CONSTANT_DENSITY` (code). | Use `INC_DENSITY_MODEL= VARIABLE`. | +| Non-physical values or a division by zero at the start of a closed-cavity case. | `INC_VELOCITY_INIT` is zero with `INC_NONDIM= INITIAL_VALUES` (code). | Set a small non-zero initial velocity, or use `INC_NONDIM= DIMENSIONAL`. | +| The temperature hits a limit; SU2 reports non-physical points. | The temperature left `TEMPERATURE_LIMITS` (default 0 K to 5000 K), so SU2 rejects the update in those points (code). | Lower the CFL number and check the thermal boundary values. Widen `TEMPERATURE_LIMITS` only if the range is physical. | +| The residuals stall or oscillate. | The CFL number is too high, or the flow is in reality unsteady (advice). | Lower `CFL_NUMBER` or use `CFL_ADAPT`. If the flow sheds vortices, run it unsteady (to be reviewed). | +| A pressure inlet case converges slowly. | The damped velocity update at the inlet (code). | Try a larger `INC_INLET_DAMPING` (to be reviewed). | +| A streamwise periodic case stops at the start. | `INC_NONDIM` is not `DIMENSIONAL`, or an isothermal wall is used with `STREAMWISE_PERIODIC_TEMPERATURE= YES` (code). | Set `INC_NONDIM= DIMENSIONAL`. Use `MARKER_HEATFLUX`, or set `STREAMWISE_PERIODIC_TEMPERATURE= NO`. | +| The flow from a pressure inlet or a far field goes the wrong way. | The direction vector or `INC_VELOCITY_INIT` points the wrong way (advice). | Check the signs of the direction components against the mesh axes. | + +## Related tutorials and test cases + +Tutorials: + +- [Inviscid Hydrofoil](/tutorials/Inc_Inviscid_Hydrofoil/): `INC_EULER`. +- [Laminar Flat Plate with Heat Transfer](/tutorials/Inc_Laminar_Flat_Plate/): constant density with the energy equation. +- [Laminar Buoyancy-driven Cavity](/tutorials/Inc_Laminar_Cavity/): `VARIABLE` density, `INC_IDEAL_GAS`, gravity. +- [Laminar Backward-facing Step](/tutorials/Inc_Laminar_Step/): inlet profile from a file. +- [Turbulent Flat Plate](/tutorials/Inc_Turbulent_Flat_Plate/) and [Turbulent NACA 0012](/tutorials/Inc_Turbulent_NACA0012/): `INC_RANS` and non-dimensionalization. +- [Turbulent Bend with wall functions](/tutorials/Inc_Turbulent_Bend/). +- [Unsteady von Karman vortex shedding](/tutorials/Inc_Von_Karman/): unsteady incompressible flow. +- [Streamwise Periodic Flow](/tutorials/Inc_Streamwise_Periodic/). +- [Wind velocity and pollutant dispersion in a city](/tutorials/Inc_Urban_City/). + +Test cases (density-based unless noted): + +- [`incomp_euler/naca0012/incomp_NACA0012.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_euler/naca0012/incomp_NACA0012.cfg): inviscid airfoil. +- [`incomp_euler/nozzle/inv_nozzle.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_euler/nozzle/inv_nozzle.cfg): `PRESSURE_INLET` with `MASS_FLOW_OUTLET`. +- [`incomp_navierstokes/bend/lam_bend.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_navierstokes/bend/lam_bend.cfg): the start config above. +- [`incomp_navierstokes/cylinder/incomp_cylinder.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_navierstokes/cylinder/incomp_cylinder.cfg): laminar external flow with `MARKER_FAR`. +- [`incomp_navierstokes/cylinder/poly_cylinder.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_navierstokes/cylinder/poly_cylinder.cfg): `INC_IDEAL_GAS_POLY` with polynomial viscosity and conductivity. +- [`incomp_navierstokes/buoyancy_cavity/lam_buoyancy_cavity.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_navierstokes/buoyancy_cavity/lam_buoyancy_cavity.cfg): natural convection. +- [`incomp_navierstokes/streamwise_periodic/pipeSlice_3d/sp_pipeSlice_3d_dp_hf_tp.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_navierstokes/streamwise_periodic/pipeSlice_3d/sp_pipeSlice_3d_dp_hf_tp.cfg): streamwise periodic pipe. +- [`incomp_rans/naca0012/naca0012.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_rans/naca0012/naca0012.cfg): `INC_RANS` with `SA` and `CFL_ADAPT`. +- [`incomp_rans/naca0012/naca0012_SST_SUST.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_rans/naca0012/naca0012_SST_SUST.cfg): `INC_RANS` with `SST`. +- [`incomp_navierstokes/bend/pb_lam_bend.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/incomp_navierstokes/bend/pb_lam_bend.cfg): pressure-based solver. + +User guide pages: [Physical Definition](../Physical-Definition/#flow-condition-incompressible), [Markers and BC](../Markers-and-BC/), [Theory](../Theory/#incompressible-navier-stokes), [Convective Schemes](../Convective-Schemes/), [Solver Setup](../Solver-Setup/), [Custom Output](../Custom-Output/). + +Last checked against SU2 develop `11c177b904`. diff --git a/_docs_v7/Setup-Guide-NICFD.md b/_docs_v7/Setup-Guide-NICFD.md new file mode 100644 index 00000000..0db7ea0c --- /dev/null +++ b/_docs_v7/Setup-Guide-NICFD.md @@ -0,0 +1,287 @@ +--- +title: "Setup Guide: Non-Ideal Compressible Flows" +permalink: /docs_v7/Setup-Guide-NICFD/ +--- + +> **Draft.** The settings below come from the SU2 code, the tutorials and the test cases. The advice parts need a review by experienced users. + +**Source tags.** A tag at the end of a statement says where it comes from. A tag on the line that introduces a list or a table covers the whole list or table. + +- **(code)**: read in the SU2 source. Option defaults come from `Common/src/CConfig.cpp`. +- **(test case)**: used in a test case config. +- **(tutorial)**: used in a tutorial. +- **(docs)**: stated in another page of this website. +- **(advice)**: general CFD practice. +- **(to be reviewed)**: added after any of the above when the statement needs a check by an experienced user. + +--- + +- [When to use this guide](#when-to-use-this-guide) +- [Start from](#start-from) +- [Settings that matter](#settings-that-matter) +- [Check convergence and results](#check-convergence-and-results) +- [Common problems](#common-problems) +- [Related tutorials and test cases](#related-tutorials-and-test-cases) + +--- + +## When to use this guide + +Use this guide when the ideal gas law does not describe your fluid well. This happens for dense vapours and for gases near their critical point: for example organic fluids in ORC turbines, supercritical CO2 in compressors, or refrigerants in nozzles. This field is called NICFD (non-ideal compressible fluid dynamics). + +The guide covers the compressible solvers (`SOLVER= EULER`, `NAVIER_STOKES` or `RANS`) with a non-ideal fluid model. These solvers do not model phase change: the fluid must stay a single-phase gas or a supercritical fluid. + +Terms used below: + +- **Equation of state (EOS)**: the relation between pressure, density, temperature and energy of the fluid. +- **Critical point**: the pressure and temperature above which liquid and vapour can no longer be told apart. Near it, the fluid properties change fast. +- **Acentric factor**: a number that describes the shape of the molecule. Cubic equations of state such as Peng-Robinson use it. +- **Two-phase region**: the states where liquid and vapour coexist. Inside it, a cubic EOS gives non-physical values, for example a negative square of the speed of sound. + +In this guide, (advice) also covers general thermodynamics practice. + +## Start from + +The block below is built from the regression test [nicf/coolprop/fluidModel.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/nicf/coolprop/fluidModel.cfg). That test runs the supersonic nozzle of the [NICFD nozzle tutorial](/tutorials/NICFD_nozzle/) with CoolProp. + +- We replaced the CoolProp fluid with the Peng-Robinson fluid block of the tutorial (siloxane MDM), so that the config runs with a normal SU2 build. +- We set `RESTART_SOL= NO`, and removed the comments and the file names. +- We replaced `LIFT` and `DRAG` in the screen output with `NONPHYSICAL_POINTS`. +- The mesh `coolprop_nozzle.su2` is in the [TestCases repository](https://github.com/su2code/TestCases). + +``` +SOLVER= RANS +KIND_TURB_MODEL= SST +MATH_PROBLEM= DIRECT +RESTART_SOL= NO +% +MACH_NUMBER= 1E-9 +INIT_OPTION= TD_CONDITIONS +FREESTREAM_OPTION= TEMPERATURE_FS +FREESTREAM_PRESSURE= 904388 +FREESTREAM_TEMPERATURE= 542.13 +REF_DIMENSIONALIZATION= DIMENSIONAL +% +FLUID_MODEL= PR_GAS +GAMMA_VALUE= 1.01767 +GAS_CONSTANT= 35.17 +CRITICAL_TEMPERATURE= 565.3609 +CRITICAL_PRESSURE= 1437500 +ACENTRIC_FACTOR= 0.524 +% +VISCOSITY_MODEL= CONSTANT_VISCOSITY +MU_CONSTANT= 1.21409E-05 +CONDUCTIVITY_MODEL= CONSTANT_CONDUCTIVITY +THERMAL_CONDUCTIVITY_CONSTANT= 0.030542828 +% +MARKER_HEATFLUX= ( WALL, 0.0 ) +MARKER_SYM= ( SYMMETRY ) +MARKER_RIEMANN= ( INFLOW, TOTAL_CONDITIONS_PT, 904388, 542.13, 1.0, 0.0, 0.0, OUTFLOW, STATIC_PRESSURE, 200000.0, 0.0, 0.0, 0.0, 0.0 ) +% +NUM_METHOD_GRAD= GREEN_GAUSS +CFL_NUMBER= 10.0 +CFL_ADAPT= YES +CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1000.0 ) +MAX_DELTA_TIME= 1E6 +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= ILU +LINEAR_SOLVER_ILU_FILL_IN= 0 +LINEAR_SOLVER_ERROR= 1E-6 +LINEAR_SOLVER_ITER= 10 +CONV_NUM_METHOD_FLOW= ROE +ENTROPY_FIX_COEFF= 0.1 +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= NONE +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +MUSCL_TURB= NO +% +% The test stops after 101 iterations. Raise ITER for a converged result. +ITER= 101 +CONV_RESIDUAL_MINVAL= -24 +CONV_STARTITER= 10 +SCREEN_OUTPUT= (INNER_ITER, RMS_DENSITY, RMS_TKE, RMS_DISSIPATION, NONPHYSICAL_POINTS) +MESH_FILENAME= coolprop_nozzle.su2 +MESH_FORMAT= SU2 +OUTPUT_WRT_FREQ= 50 +``` + +To use CoolProp instead, replace the fluid block with the one of the test case: `FLUID_MODEL= COOLPROP` and `FLUID_NAME= nitrogen` (test case). The inlet and outlet values of the test then describe nitrogen, not MDM. + +## Settings that matter + +### Build options + +These rules come from the code (code): + +- CoolProp needs `-Denable-coolprop=true` at configure time. +- The data-driven model with neural networks needs `-Denable-mlpcpp=true`. The data-driven tutorial uses it too (tutorial). +- CoolProp cannot be used with the AD builds, so there is no discrete adjoint with CoolProp. +- `VW_GAS` and `PR_GAS` need no extra build option. + +See [Build SU2 on Linux/MacOS](../Build-SU2-Linux-MacOS/). + +### Fluid model + +Choose the equation of state with `FLUID_MODEL` (code): + +| Value | Model | Parameters | +|---|---|---| +| `STANDARD_AIR`, `IDEAL_GAS` | ideal gas | `GAMMA_VALUE`, `GAS_CONSTANT` | +| `VW_GAS` | van der Waals | `GAMMA_VALUE`, `GAS_CONSTANT`, `CRITICAL_TEMPERATURE`, `CRITICAL_PRESSURE` | +| `PR_GAS` | Peng-Robinson | as `VW_GAS`, plus `ACENTRIC_FACTOR` | +| `COOLPROP` | multiparameter EOS from the CoolProp library | `FLUID_NAME` | +| `DATADRIVEN_FLUID` | look-up table or neural network | `INTERPOLATION_METHOD`, `FILENAMES_INTERPOLATOR`, `USE_PINN`, `DATADRIVEN_NEWTON_RELAXATION` | + +How to choose (advice, to be reviewed): + +- `VW_GAS` is the simplest non-ideal model. It is mainly useful for qualitative studies and code tests. +- `PR_GAS` is a common choice for organic fluids. It gives fair accuracy away from the critical point. The NICFD nozzle tutorial uses it (tutorial). +- `COOLPROP` is the most accurate near the critical point, but each property evaluation is slower. +- `DATADRIVEN_FLUID` gives accuracy close to the reference EOS at a lower cost. First you must build a table, or train a network, for your fluid and your range of states. + +Parameters and their defaults (code): + +- `GAMMA_VALUE` (default 1.4) and `GAS_CONSTANT` (default 287.058 J/(kg K)). For `VW_GAS` and `PR_GAS`, take the ratio of specific heats in the dilute-gas limit, that is, at low pressure (tutorial). These models use a constant ideal-gas heat capacity, derived from `GAMMA_VALUE`. `GAS_CONSTANT` is the universal gas constant divided by the molar mass of the fluid (advice). +- `CRITICAL_TEMPERATURE` (default 131.00 K), `CRITICAL_PRESSURE` (default 3588550.0 Pa), `ACENTRIC_FACTOR` (default 0.035). The defaults do not describe your fluid, so always set these values. +- `CRITICAL_DENSITY` exists (default 263.0) and the test cases set it, but the finite-volume solvers do not use it. +- `FLUID_NAME` (default `nitrogen`) is the CoolProp name of the fluid. With `COOLPROP`, SU2 takes the critical point and the acentric factor from CoolProp, so the `CRITICAL_*` options are not needed. + +Data-driven options (code): + +- `INTERPOLATION_METHOD`: `LUT` (look-up table, default) or `MLP` (multi-layer perceptron, a neural network). The comment in the code says that the default is `MLP`, but the code sets `LUT`. +- `FILENAMES_INTERPOLATOR`: the `.mlp` files of the networks, or one `.drg` table file for `LUT`. The file types are from `config_template.cfg`. +- `USE_PINN= YES` uses a physics-informed network, default `NO`. The network gives the entropy as a function of density and internal energy. SU2 computes the other properties from its derivatives, which keeps them consistent (tutorial). +- `DATADRIVEN_NEWTON_RELAXATION` (default 1.0) relaxes the Newton solver that finds the state from other pairs of properties. +- The [data-driven tutorial](/tutorials/NICFD_nozzle_datadriven/) shows how to make the network with SU2 DataMiner. + +### Reference values + +- `REF_DIMENSIONALIZATION` (default `DIMENSIONAL`) sets how SU2 scales the variables. See [Physical Definition](../Physical-Definition/). +- `COOLPROP` must run with `DIMENSIONAL`. Otherwise SU2 stops with "CoolProp can not be used with non-dimensionalization" (code). +- `DATADRIVEN_FLUID`: the test case and the tutorial use `DIMENSIONAL` (test case, tutorial). The code builds this model without reference scaling, so keep `DIMENSIONAL` (code, to be reviewed). +- `PR_GAS` and `VW_GAS` work with both. The transonic stator test uses `DIMENSIONAL`, and the LS89 cascade test uses `FREESTREAM_PRESS_EQ_ONE` (test case). + +### Transport properties + +Viscosity, `VISCOSITY_MODEL` (code): + +- `CONSTANT_VISCOSITY` with `MU_CONSTANT` (default 1.716E-5 Pa s, the value of air). +- `SUTHERLAND` with `MU_REF`, `MU_T_REF`, `SUTHERLAND_CONSTANT` (default model). Sutherland's law is a fit for dilute gases (advice). +- `COOLPROP`: viscosity from CoolProp, for the fluids listed in the code. `FLUID_NAME` must match the list exactly, for example `Nitrogen`, `CarbonDioxide`, `R134a`. +- `POLYNOMIAL_VISCOSITY` works only with the incompressible solvers. + +Thermal conductivity, `CONDUCTIVITY_MODEL` (code): + +- `CONSTANT_CONDUCTIVITY` with `THERMAL_CONDUCTIVITY_CONSTANT` (default 0.0257 W/(m K), the value of air). +- `CONSTANT_PRANDTL` with `PRANDTL_LAM` (default 0.72) (default model). +- `COOLPROP`: conductivity from CoolProp, with the same exact-name rule as the viscosity. +- `POLYNOMIAL_CONDUCTIVITY` works only with the incompressible solvers. + +`PRANDTL_TURB` (default 0.9) sets the turbulent heat conduction in RANS (code). + +What the examples use: + +- `PR_GAS` tests and tutorial: `CONSTANT_VISCOSITY` and `CONSTANT_CONDUCTIVITY` (test case, tutorial). The tutorial says that these are the only models available with `PR_GAS`. The current code accepts the other models too (code). Whether they suit a dense gas is to be reviewed. +- Data-driven test: `CONSTANT_VISCOSITY` and `CONSTANT_PRANDTL` (test case). +- CoolProp test `transportModel.cfg`: `COOLPROP` for both (test case). + +With `CONDUCTIVITY_MODEL= COOLPROP`, also set `TURBULENT_CONDUCTIVITY_MODEL= NONE`. With the default `CONSTANT_PRANDTL_TURB`, the code replaces the CoolProp conductivity with `THERMAL_CONDUCTIVITY_CONSTANT` (code, to be reviewed). The compressible solvers add the turbulent part of the heat flux from `PRANDTL_TURB` in any case (code). + +### Boundary conditions + +- With a non-ideal fluid, `MARKER_INLET`, `MARKER_OUTLET` and `MARKER_FAR` are not allowed. SU2 stops with "Riemann Boundary conditions or Giles must be used ..." (code). +- Use `MARKER_RIEMANN` for inlets and outlets. It is a characteristic condition, built on the waves that enter and leave the domain, and it uses the fluid model (tutorial). Format: (marker, kind, value 1, value 2, direction 1, direction 2, direction 3) (code). + +Riemann kinds accepted by the general Riemann condition (code): + +| Kind | Use | Values | +|---|---|---| +| `TOTAL_CONDITIONS_PT` | subsonic inlet | total pressure, total temperature, flow direction | +| `DENSITY_VELOCITY` | inlet | density, velocity magnitude, flow direction | +| `STATIC_PRESSURE` | subsonic outlet | static pressure, then four zeros | +| `STATIC_SUPERSONIC_INFLOW_PT` | supersonic inlet | static pressure, static temperature, Mach number components | +| `STATIC_SUPERSONIC_INFLOW_PD` | supersonic inlet | static pressure, static density, Mach number components | + +Other kinds in the Riemann list, such as `SUPERSONIC_OUTFLOW`, stop the run with "Invalid Riemann input!" unless turbomachinery markers are set (code). The supersonic edge test uses `STATIC_PRESSURE` with a low value at its supersonic outlet (test case). + +- `MARKER_GILES` is a non-reflecting condition. It needs `MARKER_TURBOMACHINERY` (code). The [data-driven tutorial](/tutorials/NICFD_nozzle_datadriven/) uses it on a nozzle, with an outlet pressure ramp (tutorial). See [Setup Guide: Turbomachinery](../Setup-Guide-Turbomachinery/) for its kinds and options. +- Walls: `MARKER_HEATFLUX`, `MARKER_EULER` and `MARKER_SYM` work as usual (test case). + +### Initialization + +- Use `INIT_OPTION= TD_CONDITIONS` (test case, tutorial). The default `REYNOLDS` recomputes the pressure from the Reynolds number (code), which does not suit internal flows (advice). +- The nozzle tests start from the inlet total state at rest: `FREESTREAM_PRESSURE` and `FREESTREAM_TEMPERATURE` equal to the inlet total values, and `MACH_NUMBER= 1E-9` (test case). +- `FREESTREAM_OPTION= DENSITY_FS` gives the state from pressure and density, instead of pressure and temperature. The supersonic edge tests use it (test case). +- Make sure that the initial state lies in the single-phase region, away from the saturation curve (advice). +- Check the initial state that SU2 prints before the first iteration (tutorial). + +### Schemes and limiters + +- With a non-ideal fluid, only `ROE`, `HLLC` and `JST` are allowed for `CONV_NUM_METHOD_FLOW` (code). The test cases use `ROE` (test case). +- The nozzle tests raise `ENTROPY_FIX_COEFF` to 0.1 (default 0.001) (test case). The entropy fix adds dissipation to the Roe scheme where wave speeds are close to zero (advice). +- Second order: the nozzle tutorial uses `MUSCL_FLOW= YES` with `SLOPE_LIMITER_FLOW= NONE` (tutorial). The LS89 cascade test, with shocks, uses `VENKATAKRISHNAN` (test case). Use a limiter when the flow has shocks (advice). +- The nozzle tests use `CFL_ADAPT= YES` with `CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1000.0 )` (test case). The four values are the factor down, the factor up, and the minimum and maximum CFL (code). +- The edge and LS89 tests use multigrid (`MGLEVEL= 3`) (test case). + +Near the critical point (advice, to be reviewed): + +- The speed of sound and the heat capacity change fast there. Small errors in the reconstructed states can give non-physical states. Start first order (`MUSCL_FLOW= NO`) or with `RAMP_MUSCL`, then switch to second order. +- Start with a low CFL number, and let `CFL_ADAPT` raise it. +- Use a limiter, for example `VENKATAKRISHNAN`, if non-physical points appear near steep gradients. +- Refine the mesh where the flow passes close to the critical point. + +What SU2 does with non-physical states (code): + +- After each update, SU2 checks the density, pressure, temperature and square of the speed of sound of each point. If one is negative, SU2 goes back to the previous solution at that point and counts the point. The count is the history field `NONPHYSICAL_POINTS`. +- When a second-order reconstruction gives a negative pressure or density on an edge, SU2 uses first-order values on that edge. +- At start-up, SU2 prints "Warning. The original solution contains N points that are not physical." when the initial state is non-physical. + +## Check convergence and results + +- **Non-physical points.** Watch `NONPHYSICAL_POINTS`. It should drop to zero long before convergence (advice). +- **Residuals.** Watch the residuals (`RMS_DENSITY`, ...) as for any compressible case. See [Solver Setup](../Solver-Setup/). +- **Mass flow.** Check the mass flow balance between inlet and outlet, for example with `MARKER_ANALYZE` and `SURFACE_MASSFLOW` (advice). +- **Phase.** Check where the flow lies on a pressure-temperature or temperature-entropy diagram of the fluid. All points must stay outside the two-phase region (advice). +- **Non-ideal effects.** Compute the compressibility factor Z = p / (rho R T) in post-processing. Values far from 1 show where the non-ideal effects matter (tutorial). SU2 does not write Z as an output field (code). +- **Data-driven model.** With `DATADRIVEN_FLUID`, look at the volume field `EXTRAPOLATION`. It marks points where the state is outside the range of the training data. `FLUIDMODEL_NEWTONITER` shows how many Newton iterations the fluid model needed (code). +- **Experiments.** Compare with experiments where you can. The NICFD nozzle tutorial compares pressure and Mach number on the nozzle axis with measurements (tutorial). + +## Common problems + +| Symptom | Likely cause | What to try | +|---|---|---| +| SU2 stops: "Riemann Boundary conditions or Giles must be used for inlet and outlet with Not Ideal Compressible Fluids". | `MARKER_INLET`, `MARKER_OUTLET` or `MARKER_FAR` with a non-ideal fluid (code). | Use `MARKER_RIEMANN` or `MARKER_GILES`. | +| SU2 stops: "Only ROE Upwind, HLLC Upwind scheme, and JST scheme can be used for Non-Ideal Compressible Fluids". | Another convective scheme (code). | Use `ROE`, `HLLC` or `JST`. | +| SU2 stops: "CoolProp can not be used with non-dimensionalization." | `REF_DIMENSIONALIZATION` is not `DIMENSIONAL` (code). | Set `REF_DIMENSIONALIZATION= DIMENSIONAL`. | +| SU2 stops: "SU2 was not compiled with CoolProp (-Denable-coolprop=true)". | A build without CoolProp (code). | Rebuild with `-Denable-coolprop=true`, without AD. | +| SU2 stops: "SU2 was not compiled with MLPCpp enabled (-Denable-mlpcpp=true)." | A build without MLPCpp (code). | Rebuild with `-Denable-mlpcpp=true`. | +| SU2 stops: "Viscosity model not available for this fluid in CoolProp library." (or the same for conductivity). | `FLUID_NAME` is not in the list of the transport model, or is spelled with other capitals (code). | Use the exact name, for example `Nitrogen`, or use a constant model. | +| SU2 stops: "POLYNOMIAL_VISCOSITY and POLYNOMIAL_CONDUCTIVITY are for incompressible only currently." | A polynomial transport model with a compressible solver (code). | Use a constant model or `COOLPROP`. | +| `NONPHYSICAL_POINTS` stays above zero, or the speed of sound is negative. | States inside the two-phase region, where a cubic EOS has no physical solution; or too large a step at start-up (advice). | Check the boundary values against the saturation curve. Lower the CFL, start first order, and refine near the critical point (to be reviewed). | +| Strange results close to saturation with `COOLPROP`. | In a two-phase state, the code raises the temperature by 0.1 K and evaluates the speed of sound of the gas phase (code). | Keep the flow out of the two-phase region: the results there are not reliable. | +| The results look like air. | `CRITICAL_*`, `ACENTRIC_FACTOR`, `GAMMA_VALUE`, `GAS_CONSTANT`, `MU_CONSTANT` or `THERMAL_CONDUCTIVITY_CONSTANT` left at their defaults, which are air values (code). | Set all fluid and transport parameters for your fluid. | +| The CoolProp conductivity has no effect. | `TURBULENT_CONDUCTIVITY_MODEL` is left at `CONSTANT_PRANDTL_TURB` (code). | Set `TURBULENT_CONDUCTIVITY_MODEL= NONE` (to be reviewed). | +| `EXTRAPOLATION` is 1 in parts of the domain. | The data-driven model is used outside its training range (code). | Generate data and retrain over a wider range of density and energy. | +| The inlet flow angle is wrong on a 2D inlet that is not normal to x. | In 2D, SU2 reads the direction of the Riemann `TOTAL_CONDITIONS_PT` inlet relative to the boundary normal. In 3D, it reads it as x, y, z components (code, to be reviewed). | In 2D, give the direction as (normal, tangential) components. | +| The run diverges at the start with a large pressure ratio. | The outlet pressure is applied at once (advice). | With `MARKER_GILES`, use `RAMP_OUTLET` as in the data-driven tutorial (tutorial). With `MARKER_RIEMANN`, start with a higher outlet pressure and lower it in steps (to be reviewed). | + +## Related tutorials and test cases + +Tutorials: + +- [Non-ideal compressible flow in a supersonic nozzle](/tutorials/NICFD_nozzle/): Peng-Robinson, Riemann boundaries, comparison with experiments. +- [Non-ideal compressible flows with physics-informed neural networks](/tutorials/NICFD_nozzle_datadriven/): data-driven model, SU2 DataMiner, Giles boundaries. +- [Aachen turbine stage with mixing plane](/tutorials/Aachen_Turbine/): turbomachinery setup, which also applies to non-ideal fluids. + +Test cases (SU2 repository): + +- [nicf/coolprop](https://github.com/su2code/SU2/tree/develop/TestCases/nicf/coolprop): CoolProp fluid model (`fluidModel.cfg`) and CoolProp transport models (`transportModel.cfg`). +- [nicf/datadriven](https://github.com/su2code/SU2/blob/develop/TestCases/nicf/datadriven/datadriven_nozzle.cfg): data-driven model with a physics-informed network. +- [nicf/edge](https://github.com/su2code/SU2/tree/develop/TestCases/nicf/edge): supersonic flow over an edge with `PR_GAS` and `VW_GAS`, Euler, multigrid. +- [nicf/LS89](https://github.com/su2code/SU2/tree/develop/TestCases/nicf/LS89): turbine cascade with `PR_GAS`, SA and SST models. +- [turbomachinery/transonic_stator_2D](https://github.com/su2code/SU2/blob/develop/TestCases/turbomachinery/transonic_stator_2D/transonic_stator_restart.cfg): stator with `PR_GAS` and Giles boundaries. +- [turbomachinery/centrifugal_stage](https://github.com/su2code/SU2/blob/develop/TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg) uses `PR_GAS` but old option names; it is not part of the regression tests. + +User guide pages: [Physical Definition](../Physical-Definition/), [Markers and Boundary Conditions](../Markers-and-BC/), [Convective Schemes](../Convective-Schemes/), [Slope Limiters and Shock Resolution](../Slope-Limiters-and-Shock-Resolution/), [Theory](../Theory/), [Option reference](../Option-Reference/), [Output fields](../Output-Fields-Reference/). + +Last checked against SU2 develop `11c177b904`. diff --git a/_docs_v7/Setup-Guide-RANS-External-Aero.md b/_docs_v7/Setup-Guide-RANS-External-Aero.md new file mode 100644 index 00000000..8afa2d8b --- /dev/null +++ b/_docs_v7/Setup-Guide-RANS-External-Aero.md @@ -0,0 +1,354 @@ +--- +title: "Setup Guide: Steady RANS for External Aerodynamics" +permalink: /docs_v7/Setup-Guide-RANS-External-Aero/ +--- + +> **Draft.** The settings below come from the SU2 code, the tutorials and the test cases. The advice parts need a review by experienced users. + +**Source tags.** A tag at the end of a statement says where it comes from. A tag on the line that introduces a list or a table covers the whole list or table. + +- **(code)**: read in the SU2 source. Option defaults come from `Common/src/CConfig.cpp`. +- **(test case)**: used in a test case config. +- **(tutorial)**: used in a tutorial. +- **(docs)**: stated in another page of this website. +- **(advice)**: general CFD practice. +- **(to be reviewed)**: added after any of the above when the statement needs a check by an experienced user. + +--- + +- [When to use this guide](#when-to-use-this-guide) +- [Start from](#start-from) +- [Settings that matter](#settings-that-matter) +- [Check convergence and results](#check-convergence-and-results) +- [Common problems](#common-problems) +- [Related tutorials and test cases](#related-tutorials-and-test-cases) + +--- + +## When to use this guide + +Use this guide for a steady, compressible, turbulent flow around a body in open air: an airfoil, a wing, a fuselage or a full aircraft. +"Steady" means that the flow settles to one state that does not change in time. + +Use another guide if: + +- the flow does not settle, for example with vortex shedding or large separated regions. See [Setup Guide: Unsteady Flows and DES](../Setup-Guide-Unsteady-DES/). +- large laminar regions matter, for example at low Reynolds numbers. See [Setup Guide: Laminar-Turbulent Transition](../Setup-Guide-Transition/). + +## Start from + +This config comes from the ONERA M6 wing tutorial: `compressible_flow/Turbulent_ONERAM6/turb_ONERAM6.cfg` in the [Tutorials repository](https://github.com/su2code/Tutorials/blob/develop/compressible_flow/Turbulent_ONERAM6/turb_ONERAM6.cfg). +We removed the adjoint, design and output file name options, and the options that have no effect with these settings. All other values are unchanged. +The mesh file is in the same tutorial folder. + +``` +% ------------- Problem ------------------------------------------------% +SOLVER= RANS +KIND_TURB_MODEL= SA +MATH_PROBLEM= DIRECT +RESTART_SOL= NO +% +% ------------- Free stream (from Mach and Reynolds number) ------------% +MACH_NUMBER= 0.8395 +AOA= 3.06 +SIDESLIP_ANGLE= 0.0 +INIT_OPTION= REYNOLDS +FREESTREAM_OPTION= TEMPERATURE_FS +FREESTREAM_TEMPERATURE= 288.15 +REYNOLDS_NUMBER= 11.72E6 +REYNOLDS_LENGTH= 0.64607 +REF_DIMENSIONALIZATION= FREESTREAM_VEL_EQ_ONE +% +% ------------- Gas and viscosity --------------------------------------% +FLUID_MODEL= STANDARD_AIR +VISCOSITY_MODEL= SUTHERLAND +MU_REF= 1.716E-5 +MU_T_REF= 273.15 +SUTHERLAND_CONSTANT= 110.4 +CONDUCTIVITY_MODEL= CONSTANT_PRANDTL +PRANDTL_LAM= 0.72 +PRANDTL_TURB= 0.90 +% +% ------------- Reference values for the coefficients ------------------% +REF_ORIGIN_MOMENT_X= 0.25 +REF_ORIGIN_MOMENT_Y= 0.00 +REF_ORIGIN_MOMENT_Z= 0.00 +REF_LENGTH= 0.64607 +REF_AREA= 0 +% +% ------------- Boundary conditions ------------------------------------% +MARKER_HEATFLUX= ( WING, 0.0 ) +MARKER_FAR= ( FARFIELD ) +MARKER_SYM= ( SYMMETRY ) +MARKER_PLOTTING= ( WING ) +MARKER_MONITORING= ( WING ) +% +% ------------- Numerics -----------------------------------------------% +NUM_METHOD_GRAD= GREEN_GAUSS +CFL_NUMBER= 100.0 +CFL_ADAPT= NO +ITER= 999999 +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= ILU +LINEAR_SOLVER_ERROR= 1E-10 +LINEAR_SOLVER_ITER= 10 +MGLEVEL= 0 +CONV_NUM_METHOD_FLOW= JST +JST_SENSOR_COEFF= ( 0.5, 0.02 ) +TIME_DISCRE_FLOW= EULER_IMPLICIT +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +MUSCL_TURB= NO +TIME_DISCRE_TURB= EULER_IMPLICIT +% +% ------------- Convergence: stop when the drag stops changing ---------% +CONV_FIELD= DRAG +CONV_STARTITER= 10 +CONV_CAUCHY_ELEMS= 100 +CONV_CAUCHY_EPS= 1E-6 +% +% ------------- Input and output ---------------------------------------% +MESH_FILENAME= mesh_ONERAM6_turb_hexa_43008.su2 +MESH_FORMAT= SU2 +SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_DENSITY, RMS_NU_TILDE, LIFT, DRAG) +``` + +The tutorial page [Turbulent ONERA M6](/tutorials/Turbulent_ONERAM6/) explains the free-stream and convergence options of this config. + +## Settings that matter + +### Turbulence model: SA or SST + +Set `SOLVER= RANS` and pick the model with `KIND_TURB_MODEL`. With `SOLVER= RANS`, SU2 stops with an error if `KIND_TURB_MODEL` is `NONE` (code). + +**Spalart-Allmaras (`SA`).** SA solves one transport equation, for a modified eddy viscosity. + +- With an empty `SA_OPTIONS`, SU2 runs SA without the ft2 term ("SA-noft2") (docs, code). +- `SA_OPTIONS` accepts `NEGATIVE`, `EDWARDS`, `WITHFT2`, `QCR2000`, `COMPRESSIBILITY`, `ROTATION`, `BCM` and `EXPERIMENTAL` (code). +- SA-neg needs the ft2 term: write `SA_OPTIONS= NEGATIVE, WITHFT2`. Without `WITHFT2`, SU2 stops with an error unless you add `EXPERIMENTAL` (code). The test cases use both forms (test case). +- The free-stream value of the SA variable is `FREESTREAM_NU_FACTOR` times the free-stream kinematic viscosity. The default is `3.0` (code, docs). +- Most SU2 external aerodynamics tests use SA: ONERA M6, the SA versions of RAE2822, and 30P30N (test case). + +**Menter SST (`SST`).** SST solves two transport equations: one for the turbulent kinetic energy k, one for the specific dissipation rate omega. + +- With an empty `SST_OPTIONS`, SU2 runs the 2003 version, "SST-2003m". This is set in `ParseSSTOptions` in `option_structure.hpp` (code). Some older pages say that the default is `V1994m`; the code uses `V2003m`. +- The other `SST_OPTIONS` values are `V1994m`, `V2003m`, `SUSTAINING`, `VORTICITY`, `KATO-LAUNDER`, `UQ`, `COMPRESSIBILITY-WILCOX`, `COMPRESSIBILITY-SARKAR` and `DIMENSIONLESS_LIMIT`. Write `KATO-LAUNDER` with a dash (code). +- SST needs free-stream values for k and omega. They come from `FREESTREAM_TURBULENCEINTENSITY` (a fraction: `0.001` means 0.1 %) and `FREESTREAM_TURB2LAMVISCRATIO` (eddy viscosity over laminar viscosity). The defaults are `0.05` and `10.0` (code). These defaults suit internal flows and may be too high for external aerodynamics (docs). +- External aerodynamics tests use, for example, `FREESTREAM_TURBULENCEINTENSITY= 0.001` with `FREESTREAM_TURB2LAMVISCRATIO= 100.0` (RAE2822 SST), or `0.001` with `0.1` (NACA0012 SST with `SUSTAINING`) (test case). +- In SST, k decays between the far field and the body. Two options stop this decay. `SST_OPTIONS= SUSTAINING` adds source terms that keep the free-stream values (docs). `TURB_FIXED_VALUES= YES` holds k and omega at the far-field values in an upstream region set by `TURB_FIXED_VALUES_DOMAIN` (code). The test `rans/naca0012/turb_NACA0012_sst_fixedvalues.cfg` uses the second one (test case). + +**Which one to pick.** + +- SA is robust and widely used for attached flows over wings and airfoils (advice). +- SST is often preferred when adverse pressure gradients and separation matter (advice, to be reviewed). +- If the two models give different lift or drag, treat the difference as model uncertainty. Look at the flow where they differ (advice). + +See [Physical Definition](../Physical-Definition/#turbulence-models) for the full option list. + +### Convective scheme: JST or an upwind scheme + +The convective scheme computes the flux of mass, momentum and energy through each cell face. Set it with `CONV_NUM_METHOD_FLOW`. It has no default, so always set it (code). + +**JST** (Jameson-Schmidt-Turkel) is a central scheme with added artificial dissipation. + +- The two dissipation coefficients are `JST_SENSOR_COEFF= (2nd order, 4th order)`. The default is `( 0.5, 0.02 )` (code, docs). +- JST is robust and allows high CFL numbers. It over-predicts viscous drag on coarse meshes or at low Reynolds numbers (docs). +- `JST_MAT` uses matrix dissipation and gives better viscous drag on such meshes (docs). +- The ONERA M6 tutorial and the RAE2822 tests use JST (tutorial, test case). + +**Upwind schemes** use the direction of the waves in the flow. `ROE` is the most used (test case). The others are `L2ROE` and `LMROE` (low Mach number variants), `AUSMPLUSUP`, `AUSMPLUSUP2`, `SLAU`, `SLAU2`, `HLLC` and `MSW` (docs, code). + +- An upwind scheme is first order unless you turn on MUSCL reconstruction, see the next section (docs). +- `ENTROPY_FIX_COEFF` sets a lower bound on the Roe dissipation. The default is `0.001` (code). The 30P30N validation case uses `1e-5` (test case). +- The tests `rans/oneram6/turb_ONERAM6.cfg` and `rans/naca0012/turb_NACA0012_sst.cfg` use `ROE` (test case). + +**Turbulence equations.** Use `CONV_NUM_METHOD_TURB= SCALAR_UPWIND`. All external aerodynamics tests use it (test case). The code also accepts `BOUNDED_SCALAR`, and the RAE2822 tests use it (code, test case). `MUSCL_TURB` defaults to `NO`, so the turbulence convection is first order unless you change it (code). Most tests keep `MUSCL_TURB= NO` (test case). + +See [Convective Schemes](../Convective-Schemes/). + +### MUSCL reconstruction and slope limiters + +MUSCL reconstruction makes an upwind scheme second order. It uses the solution gradient to compute the values on each side of a face. A slope limiter reduces this gradient near shocks and steep changes, so that the solution does not oscillate. + +- `MUSCL_FLOW` defaults to `YES` and `SLOPE_LIMITER_FLOW` defaults to `VENKATAKRISHNAN` (code). MUSCL has no effect on central schemes such as JST (docs). +- For transonic flows with shocks, keep a limiter. The ONERA M6 test uses `VENKATAKRISHNAN` with `VENKAT_LIMITER_COEFF= 1.0` (test case). +- For subsonic flows without shocks, you can turn the limiter off. The NACA0012 SST test at Mach 0.15 uses `SLOPE_LIMITER_FLOW= NONE` and `MUSCL_KAPPA_FLOW= 0.5` (test case). +- `VENKAT_LIMITER_COEFF` defaults to `0.05`. Larger values limit less (code). For `VENKATAKRISHNAN`, its effect depends on the cell size in mesh units. So the right value changes with the mesh and with the non-dimensional scaling (docs). +- `VAN_ALBADA_EDGE` is another option. The 30P30N validation case uses it (test case). +- `LIMITER_ITER` freezes the limiter after this many iterations. The default is `999999` (code). Freezing can help when the residuals stall because the limiter keeps switching (advice, to be reviewed). +- `NUM_METHOD_GRAD` sets the gradient method (default `WEIGHTED_LEAST_SQUARES`). `NUM_METHOD_GRAD_RECON` can set a different method for MUSCL only. By default MUSCL uses `NUM_METHOD_GRAD` (code). + +See [Slope Limiters and Shock Resolution](../Slope-Limiters-and-Shock-Resolution/). + +### CFL number and adaptive CFL + +SU2 marches a steady case in pseudo-time. The CFL number sets the local pseudo-time step. A higher CFL converges in fewer iterations, but each iteration needs a harder linear solve. + +- The default `CFL_NUMBER` is `1.25` (code). Implicit RANS runs use much higher values: `100` in the ONERA M6 tutorial, `1000` in the RAE2822 SA and NACA0012 SST tests (tutorial, test case). +- `CFL_ADAPT= YES` lets SU2 change the CFL during the run. `CFL_NUMBER` is then the starting value (code). +- `CFL_ADAPT_PARAM` has up to six values: factor down, factor up, minimum CFL, maximum CFL, acceptable linear solver residual, start iteration. Missing values take the defaults `( 0.1, 1.2, 10.0, 100.0, 0.001, 0 )` (code). +- The comments in `config_template.cfg` explain the rules. The CFL goes up by the "factor up" while the solution update is not limited and the linear solver converges well enough. It goes down when the update is limited, when the linear solver does not converge enough, or when the residuals stall or oscillate. It returns to the minimum if the linear solver diverges or the residuals grow too much (code). +- Examples: the E387 transition tutorial uses `CFL_NUMBER= 1` with `CFL_ADAPT_PARAM= ( 0.1, 2.0, 40.0, 1e10, 0.001 )`. The 30P30N case uses `CFL_ADAPT_PARAM= ( 1, 1.05, 10, 400 )` (tutorial, test case). +- `CFL_REDUCTION_TURB` scales the CFL of the turbulence equations. The default is `1.0` (code). The RAE2822 SST test uses `0.5` (test case). +- Add `AVG_CFL` to `SCREEN_OUTPUT` to see the CFL during the run (test case). + +### Multigrid + +Multigrid also solves the equations on coarser versions of the mesh. This removes large-scale errors faster. + +- `MGLEVEL` sets the number of coarse levels. The default is `0` (off) (code). +- `MGCYCLE` is `V_CYCLE` (default), `W_CYCLE` or `FULLMG_CYCLE` (code). +- The RAE2822 tests use `MGLEVEL= 3` with `JST`, `MGCYCLE= V_CYCLE`, `MG_DAMP_RESTRICTION= 0.75` and `MG_DAMP_PROLONGATION= 0.75` (test case). The code default for both damping factors is `0.5` (code). +- With a central scheme, the coarse levels always use the Lax-Friedrich scheme. MUSCL has no effect on coarse levels (docs). +- If the run is unstable with multigrid, reduce `MGLEVEL` or turn multigrid off (advice). + +### Linear solver and preconditioner + +Each implicit iteration solves a linear system. You do not need to solve it exactly: only the final nonlinear residual matters for accuracy (docs). + +The defaults are `LINEAR_SOLVER= FGMRES`, `LINEAR_SOLVER_PREC= ILU`, `LINEAR_SOLVER_ERROR= 1E-6` and `LINEAR_SOLVER_ITER= 10` (code). + +The [Linear Solvers and Preconditioners](../Linear-Solvers-and-Preconditioners/) page gives this advice (docs): + +- Use the loosest tolerance that keeps the run stable, usually between `0.05` and `0.001`. +- About 10 linear iterations are enough for upwind schemes. Central schemes may need up to 50. +- Use `ILU` at high CFL. `LU_SGS` can be faster at low CFL because it has no setup cost. +- If memory is a problem, use `RESTARTED_FGMRES` or `BCGSTAB`. + +Two more points (test case): + +- Add `LINSOL_ITER` and `LINSOL_RESIDUAL` to `SCREEN_OUTPUT` to see how well the linear solver converges. +- A Newton-Krylov method is also available with `NEWTON_KRYLOV= YES`. The 30P30N validation case shows its parameters. + +### Convergence criteria + +`CONV_FIELD` names the output fields that decide when the run stops. For the compressible solver the default is `RMS_DENSITY` (code). If you list several fields, all of them must meet their criterion (code). + +**Residual fields** (such as `RMS_DENSITY`): the run stops when the log10 of the residual falls below `CONV_RESIDUAL_MINVAL`. The default is `-14` (code). + +**Coefficient fields** (such as `LIFT` or `DRAG`) use a Cauchy criterion. This criterion looks at how much the coefficient changes from one iteration to the next (code): + +- At each iteration, SU2 computes the change of the coefficient divided by the coefficient. If the coefficient is smaller than 0.1 in size, SU2 divides by 0.1 instead. +- SU2 averages this value over the last `CONV_CAUCHY_ELEMS` iterations (default `100`). +- The run stops when the average is below `CONV_CAUCHY_EPS` (default `1E-10`). +- `CONV_STARTITER` (default `5`) sets the first iteration where SU2 checks the criteria. + +The ONERA M6 tutorial stops on `CONV_FIELD= DRAG` with `CONV_CAUCHY_EPS= 1E-6` (tutorial). +A coefficient can look converged while the residuals are still high, so check both (advice). + +`ITER` sets the maximum number of iterations. The default is `1000` (code). + +See [Solver Setup](../Solver-Setup/#setting-convergence-criteria). + +### Fixed lift (fixed CL) + +In fixed-CL mode, SU2 changes the angle of attack until the lift coefficient reaches a target. These rules come from the code (code): + +- `FIXED_CL_MODE= YES` turns it on. `TARGET_CL` is the target (default `0.0`). `AOA` is the starting angle. +- `DCL_DALPHA` is your estimate of the lift slope, per degree. The default is `0.2`, also in `config_template.cfg`. SU2 changes the angle by (target CL − current CL) / `DCL_DALPHA`. +- SU2 updates the angle when the convergence criteria are met but CL is still away from the target. It also updates it at the latest every `UPDATE_AOA_ITER_LIMIT` iterations (default `200`). +- The lift counts as reached when it is within `CONV_CAUCHY_EPS`/2 of the target. So `CONV_CAUCHY_EPS` sets both the convergence tolerance and the lift tolerance. +- At the end, SU2 runs `ITER_DCL_DALPHA` more iterations (default `500`) to compute dCL/dalpha by finite differences. These are added to `ITER`. Set `ITER_DCL_DALPHA= 0` to skip this step. +- Fixed-CL mode is for compressible solvers only. +- Add the `AOA` history field to see the angle during the run. + +The RAE2822 design tutorial runs SA in fixed-CL mode with `TARGET_CL= 0.724`, `DCL_DALPHA= 0.2`, `UPDATE_AOA_ITER_LIMIT= 100`, `ITER_DCL_DALPHA= 500` and `CONV_CAUCHY_EPS= 1E-6` (tutorial). The fixed-CL test case `fixed_cl/naca0012/inv_NACA0012.cfg` is inviscid (test case). + +### Free stream from Mach and Reynolds number + +With `INIT_OPTION= REYNOLDS` (the default), SU2 builds the free stream from the Mach number and the Reynolds number (code, tutorial): + +1. It computes the speed of sound from `FREESTREAM_TEMPERATURE` and the gas constants. +2. It computes the velocity from `MACH_NUMBER`, `AOA` and `SIDESLIP_ANGLE`. +3. It computes the viscosity with the viscosity model. +4. It computes the density from `REYNOLDS_NUMBER` and `REYNOLDS_LENGTH`. +5. It computes the pressure from the gas law. `FREESTREAM_PRESSURE` is ignored. + +Things to check: + +- The mesh must be in meters. `REYNOLDS_LENGTH` is the length (in mesh units) that the Reynolds number refers to, for example the chord (tutorial). +- With `INIT_OPTION= TD_CONDITIONS`, SU2 uses `FREESTREAM_PRESSURE` and `FREESTREAM_TEMPERATURE` instead, and ignores the Reynolds number (tutorial). +- SU2 prints a table of free-stream values before the first iteration. Check it (tutorial). +- `REF_DIMENSIONALIZATION` sets the scaling of the equations. The default is `DIMENSIONAL` (code). The tests also use `FREESTREAM_VEL_EQ_ONE`, `FREESTREAM_VEL_EQ_MACH` and `FREESTREAM_PRESS_EQ_ONE` (tutorial, test case). + +**Reference values for the coefficients** (code). `REF_LENGTH` is used for moments. `REF_AREA` is used for all force coefficients. With `REF_AREA= 0`, SU2 computes the area as the projection of the body on the y plane (2D) or the z plane (3D). `REF_ORIGIN_MOMENT_X`, `_Y` and `_Z` set the moment reference point. + +See [Physical Definition](../Physical-Definition/#free-stream-definition-compressible). + +### Far-field and wall boundary conditions + +- `MARKER_FAR` sets a far-field boundary. SU2 imposes the free-stream state there with a characteristic-based condition (docs, tutorial). +- Place the far-field boundary far from the body, often 50 to 100 chords for airfoils, so that it does not change the lift (advice, to be reviewed). +- `MARKER_HEATFLUX= ( wall, 0.0 )` is an adiabatic no-slip wall. All external aerodynamics tests use it (test case). `MARKER_ISOTHERMAL` sets a wall temperature instead (docs). +- `MARKER_SYM` is a symmetry plane, for example at the root of a half wing (tutorial). +- `MARKER_MONITORING` lists the surfaces whose forces give `LIFT`, `DRAG` and the other coefficients (code). `MARKER_PLOTTING` lists the surfaces written to the surface output files (tutorial). + +See [Markers and Boundary Conditions](../Markers-and-BC/). + +### Near-wall mesh, y+ and wall functions + +y+ is the distance of the first point from the wall, in wall units. It tells you if the mesh resolves the thin layer next to the wall. + +- Without wall functions, the first point must be in the viscous sublayer: y+ below 5 (docs). y+ about 1 is the usual target (advice). +- With wall functions, SU2 models the near-wall layer, so the first point can be further from the wall. Turn them on per marker: `MARKER_WALL_FUNCTIONS= ( wall, STANDARD_WALL_FUNCTION )`. They work with SA and SST, compressible and incompressible (docs). +- For RANS, only `NO_WALL_FUNCTION` and `STANDARD_WALL_FUNCTION` are tested. `ADAPTIVE_WALL_FUNCTION`, `SCALABLE_WALL_FUNCTION` and `NONEQUILIBRIUM_WALL_MODEL` stop SU2 with an error (code, test case). +- The wall function is active only where y+ is above `WALLMODEL_MINYPLUS` (default `5.0`) (code, docs). The docs give an upper limit of y+ 100 to 500, rising with the Reynolds number (docs). +- Wall functions and `WALL_ROUGHNESS` cannot be used together (code). +- Wall functions assume an attached boundary layer in equilibrium. They are less accurate near separation and strong pressure gradients (advice). +- Check the `Y_PLUS` output field on the wall. It is in the default `PRIMITIVE` output group (code). + +See [Markers and Boundary Conditions](../Markers-and-BC/#wall-functions) and the test cases in `TestCases/wallfunctions/flatplate/`. + +## Check convergence and results + +- **Residuals.** Plot `RMS_DENSITY` and the turbulence residual (`RMS_NU_TILDE` for SA, `RMS_TKE` and `RMS_DISSIPATION` for SST). A drop of several orders of magnitude is a good sign (advice). +- **Coefficients.** `LIFT`, `DRAG` and the moments must be flat at the end of the run. Add the `CAUCHY` group to `HISTORY_OUTPUT` to see the Cauchy values (code). +- **Linear solver and CFL.** `LINSOL_RESIDUAL` should stay below `LINEAR_SOLVER_ERROR` most of the time. With `CFL_ADAPT= YES`, `AVG_CFL` should grow and stay high (advice). +- **Free stream.** Read the free-stream table that SU2 prints at the start: Reynolds number, density, pressure, velocity (tutorial). +- **y+.** Look at `Y_PLUS` on the walls (code). +- **Surface data.** Put `SURFACE_PARAVIEW` or `SURFACE_CSV` in `OUTPUT_FILES`, and plot `PRESSURE_COEFF` and `SKIN_FRICTION-X` along the wall (code, tutorial). +- **Force breakdown.** `WRT_FORCES_BREAKDOWN= YES` writes a file that splits the forces into pressure and viscous parts, per surface (code, tutorial). +- **Mesh.** Run at least two, better three, meshes of different size. Check that the coefficients change less and less (advice). + +See [History and Solution Output](../Custom-Output/) and the [Output Fields Reference](../Output-Fields-Reference/). + +## Common problems + +| Symptom | Likely cause | What to try | +| --- | --- | --- | +| The run diverges in the first iterations. | The CFL is too high for the initial flow. | Start with a low `CFL_NUMBER` and use `CFL_ADAPT= YES`. Check the free-stream table (tutorial). | +| SU2 stops: "A non-standard version of SA-neg was requested". | `NEGATIVE` without the ft2 term. | Use `SA_OPTIONS= NEGATIVE, WITHFT2` (code). | +| The residuals stop dropping and the coefficients oscillate a little. | The limiter keeps switching, or the flow is not steady (buffet, separation). | Raise `VENKAT_LIMITER_COEFF` or freeze the limiter with `LIMITER_ITER` (advice, to be reviewed). If the flow is really unsteady, see [Setup Guide: Unsteady Flows and DES](../Setup-Guide-Unsteady-DES/). | +| `LINSOL_RESIDUAL` stays near 1. | The linear system is too hard at this CFL. | Lower the CFL, use `ILU`, raise `LINEAR_SOLVER_ITER` (docs). | +| The drag is too high with `JST` on a coarse mesh. | Too much numerical dissipation. | Try `JST_MAT`, or an upwind scheme with MUSCL (docs). Refine the mesh. | +| The skin friction or drag is far from the expected value. | Wrong Reynolds number: the mesh is not in meters, or `REYNOLDS_LENGTH` is wrong. | Check the mesh units and the free-stream table (tutorial). | +| SST results depend on the far-field distance. | The free-stream k decays before it reaches the body. | Use `SST_OPTIONS= SUSTAINING` or `TURB_FIXED_VALUES= YES` (docs, code). | +| The run stops at iteration 1000. | `ITER` has a default of `1000`. | Set `ITER` (code). | +| A fixed-CL run ends before CL reaches the target. | The angle is updated too rarely, or `CONV_CAUCHY_EPS` is too large. | Lower `UPDATE_AOA_ITER_LIMIT` and check `CONV_CAUCHY_EPS` (code). | + +## Related tutorials and test cases + +Tutorials: + +- [Turbulent ONERA M6](/tutorials/Turbulent_ONERAM6/): 3D transonic wing, SA, JST, Cauchy criterion on drag. +- [Turbulent Flat Plate](/tutorials/Turbulent_Flat_Plate/): zero pressure gradient flat plate with SA. +- [Constrained shape design of a transonic turbulent airfoil](/tutorials/Turbulent_2D_Constrained_RAE2822/): RAE2822 with SA in fixed-CL mode, used for shape design. +- [UQ NACA0012](/tutorials/UQ_NACA0012/): SST with the `UQ` option. + +Test cases (develop branch): + +- [rans/oneram6/turb_ONERAM6.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/rans/oneram6/turb_ONERAM6.cfg): ONERA M6 with `ROE`, MUSCL and `VENKATAKRISHNAN`. +- [rans/rae2822/turb_SA_RAE2822.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/rans/rae2822/turb_SA_RAE2822.cfg) and [turb_SST_RAE2822.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/rans/rae2822/turb_SST_RAE2822.cfg): transonic airfoil with `JST` and multigrid. +- [rans/naca0012/turb_NACA0012_sst.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/rans/naca0012/turb_NACA0012_sst.cfg): subsonic airfoil, SST, `ROE` without limiter. +- [rans/naca0012/turb_NACA0012_sst_fixedvalues.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/rans/naca0012/turb_NACA0012_sst_fixedvalues.cfg): `TURB_FIXED_VALUES`. +- [turbulence_models/sa/rae2822/](https://github.com/su2code/SU2/tree/develop/TestCases/turbulence_models/sa/rae2822): SA variants (`NEGATIVE`, `EDWARDS`, `QCR2000`, `COMPRESSIBILITY`). +- [vandv/rans/30p30n/config.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/vandv/rans/30p30n/config.cfg): high-lift airfoil, `ROE` with `VAN_ALBADA_EDGE`, adaptive CFL, Newton-Krylov. +- [vandv/rans/swbli/config_sst.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/vandv/rans/swbli/config_sst.cfg): Mach 5 shock-boundary layer interaction with SST. +- [fixed_cl/naca0012/inv_NACA0012.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/fixed_cl/naca0012/inv_NACA0012.cfg): fixed-CL mode (inviscid). +- [wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/wallfunctions/flatplate/compressible_SA/turb_SA_flatplate.cfg): wall functions with SA. + +User guide pages: + +- [Physical Definition](../Physical-Definition/), [Convective Schemes](../Convective-Schemes/), [Slope Limiters and Shock Resolution](../Slope-Limiters-and-Shock-Resolution/), [Linear Solvers and Preconditioners](../Linear-Solvers-and-Preconditioners/), [Markers and Boundary Conditions](../Markers-and-BC/), [Solver Setup](../Solver-Setup/), [Governing Equations](../Theory/), [History and Solution Output](../Custom-Output/). +- All options: [Option Reference](../Option-Reference/). All output fields: [Output Fields Reference](../Output-Fields-Reference/). + +Last checked against SU2 develop `11c177b904`. diff --git a/_docs_v7/Setup-Guide-Shape-Optimization.md b/_docs_v7/Setup-Guide-Shape-Optimization.md new file mode 100644 index 00000000..49dd0fe5 --- /dev/null +++ b/_docs_v7/Setup-Guide-Shape-Optimization.md @@ -0,0 +1,328 @@ +--- +title: "Setup Guide: Shape Optimization with the Discrete Adjoint" +permalink: /docs_v7/Setup-Guide-Shape-Optimization/ +--- + +> **Draft.** The settings below come from the SU2 code, the tutorials and the test cases. The advice parts need a review by experienced users. + +**Source tags.** A tag at the end of a statement says where it comes from. A tag on the line that introduces a list or a table covers the whole list or table. + +- **(code)**: read in the SU2 source. Option defaults come from `Common/src/CConfig.cpp`. +- **(test case)**: used in a test case config. +- **(tutorial)**: used in a tutorial. +- **(docs)**: stated in another page of this website. +- **(advice)**: general CFD practice. +- **(to be reviewed)**: added after any of the above when the statement needs a check by an experienced user. + +--- + +- [When to use this guide](#when-to-use-this-guide) +- [Start from](#start-from) +- [Settings that matter](#settings-that-matter) +- [Check convergence and results](#check-convergence-and-results) +- [Common problems](#common-problems) +- [Related tutorials and test cases](#related-tutorials-and-test-cases) + +--- + +## When to use this guide + +Use this guide to change the shape of a body or a duct so that an output of the flow improves: for example less drag at a fixed lift, or a lower pressure drop. + +SU2 computes the gradient of the output with respect to many shape parameters, at the cost of about one extra flow solution. It does this with the **adjoint method**: one extra solve gives the sensitivity of one output to all shape parameters. + +SU2 has two adjoint solvers: + +- The **discrete adjoint** differentiates the SU2 code itself with algorithmic differentiation (AD). Its gradient matches the discretized flow equations, including turbulence models and most boundary conditions. This guide focuses on it. +- The **continuous adjoint** solves separate adjoint equations derived by hand. It runs with the normal build, but supports fewer cases. + +In this guide, the (code) tag also covers the Python scripts of SU2. + +## Start from + +The block below comes from the test case [multiple_ffd/naca0012](https://github.com/su2code/SU2/blob/develop/TestCases/multiple_ffd/naca0012/inv_NACA0012_ffd.cfg). It is an inviscid NACA 0012 airfoil with two FFD boxes, one on each side. The regression tests run it with `discrete_adjoint.py`. + +- We removed the comments, the continuous adjoint options, the options that have no effect in this setup, and most file names. +- We added `GEO_MARKER` and `GEO_DESCRIPTION` from [optimization_euler/steady_naca0012](https://github.com/su2code/SU2/blob/develop/TestCases/optimization_euler/steady_naca0012/inv_NACA0012_adv.cfg), because the thickness constraint needs SU2_GEO. +- The mesh `mesh_NACA0012_multiFFD.su2` already contains the FFD boxes. It is in the [TestCases repository](https://github.com/su2code/TestCases). + +``` +SOLVER= EULER +MATH_PROBLEM= DIRECT +RESTART_SOL= NO +READ_BINARY_RESTART= NO +% +MACH_NUMBER= 0.8 +AOA= 1.25 +FREESTREAM_PRESSURE= 101325.0 +FREESTREAM_TEMPERATURE= 288.15 +REF_ORIGIN_MOMENT_X= 0.25 +REF_ORIGIN_MOMENT_Y= 0.00 +REF_ORIGIN_MOMENT_Z= 0.00 +REF_LENGTH= 1.0 +REF_AREA= 1.0 +REF_DIMENSIONALIZATION= FREESTREAM_PRESS_EQ_ONE +% +MARKER_EULER= ( airfoil_upper, airfoil_lower ) +MARKER_FAR= ( farfield ) +MARKER_PLOTTING= ( airfoil_upper, airfoil_lower ) +MARKER_MONITORING= ( airfoil_upper, airfoil_lower ) +% +NUM_METHOD_GRAD= GREEN_GAUSS +CFL_NUMBER= 5.0 +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= ILU +LINEAR_SOLVER_ERROR= 1E-1 +LINEAR_SOLVER_ITER= 3 +MGLEVEL= 3 +MGCYCLE= V_CYCLE +MG_PRE_SMOOTH= ( 2, 2, 2, 2 ) +MG_POST_SMOOTH= ( 2, 2, 2, 2 ) +MG_CORRECTION_SMOOTH= ( 1, 1, 1, 1 ) +MG_DAMP_RESTRICTION= 0.5 +MG_DAMP_PROLONGATION= 0.5 +CONV_NUM_METHOD_FLOW= JST +JST_SENSOR_COEFF= ( 0.5, 0.02 ) +TIME_DISCRE_FLOW= EULER_IMPLICIT +% +OBJECTIVE_FUNCTION= DRAG +% +% The test stops after 10 iterations. A useful gradient needs a converged +% flow and adjoint solution: raise ITER. +ITER= 10 +CONV_RESIDUAL_MINVAL= -9 +CONV_STARTITER= 10 +% +DV_KIND= FFD_SETTING +DV_MARKER= ( airfoil_upper, airfoil_lower ) +DV_PARAM= ( UPPER, 1, 0, 0, 0.0, 1.0, 0.0 ) +DV_VALUE= 0.001 +DEFORM_LINEAR_SOLVER_ITER= 500 +DEFORM_NONLINEAR_ITER= 1 +DEFORM_CONSOLE_OUTPUT= YES +DEFORM_LINEAR_SOLVER_ERROR= 1E-14 +DEFORM_STIFFNESS_TYPE= INVERSE_VOLUME +% +FFD_TOLERANCE= 1E-10 +FFD_ITERATIONS= 500 +FFD_DEFINITION= ( LOWER, 0.075, -0.075, 0.0, 0.625, -0.075, 0.0, 0.625, -0.02, 0.0, 0.075, -0.02, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ); ( UPPER, 0.075, 0.02, 0.0, 0.625, 0.02, 0.0, 0.625, 0.075, 0.0, 0.075, 0.075, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) +FFD_DEGREE= ( 4, 1, 0 ); ( 4, 1, 0 ) +FFD_CONTINUITY= USER_INPUT +FFD_FIX_I= (0,4) +FFD_FIX_J= (15) +FFD_FIX_K= (15) +% +GEO_MARKER= ( airfoil_upper, airfoil_lower ) +GEO_DESCRIPTION= AIRFOIL +% +MESH_FILENAME= mesh_NACA0012_multiFFD.su2 +MESH_FORMAT= SU2 +HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF) +OUTPUT_FILES= (RESTART_ASCII) +% +OPT_OBJECTIVE= DRAG * 0.001 +OPT_CONSTRAINT= ( LIFT > 0.327 ) * 0.001; ( MOMENT_Z > 0.0 ) * 0.001; ( AIRFOIL_THICKNESS > 0.12 ) * 0.001 +OPT_ITERATIONS= 1 +OPT_ACCURACY= 1E-6 +OPT_BOUND_UPPER= 0.1 +OPT_BOUND_LOWER= -0.1 +% This test uses the 3D kind 11 (FFD_CONTROL_POINT) on a 2D mesh. +% The 2D tutorials use kind 19 (FFD_CONTROL_POINT_2D). +DEFINITION_DV= ( 11, 1.0 | airfoil_upper | UPPER, 1, 0, 0, 0.0, 1.0, 0.0 ); ( 11, 1.0 | airfoil_lower | LOWER, 1, 0, 0, 0.0, 1.0, 0.0 ) +``` + +Run the gradient only: + +``` +discrete_adjoint.py -f inv_NACA0012_ffd.cfg +``` + +Run an optimization (raise `OPT_ITERATIONS` first): + +``` +shape_optimization.py -g DISCRETE_ADJOINT -f inv_NACA0012_ffd.cfg +``` + +For a RANS case, start from the [RAE 2822 tutorial](/tutorials/Turbulent_2D_Constrained_RAE2822/) or the test case [optimization_rans/steady_rae2822](https://github.com/su2code/SU2/blob/develop/TestCases/optimization_rans/steady_rae2822/turb_SA_RAE2822.cfg). For a 3D wing, start from the [ONERA M6 tutorial](/tutorials/Inviscid_3D_Constrained_ONERAM6/). + +## Settings that matter + +### Build SU2 with AD + +- Configure with `./meson.py setup build -Denable-autodiff=true` (code). See [Build SU2 on Linux/MacOS](../Build-SU2-Linux-MacOS/). +- This build gives the AD programs `SU2_CFD_AD` and `SU2_DOT_AD`, next to the normal `SU2_CFD`, `SU2_DEF`, `SU2_DOT` and `SU2_GEO` (tutorial). The optimization loop needs all of them. +- `SU2_CFD` stops with "MATH_PROBLEM= DISCRETE_ADJOINT requires AD support" if you give it a discrete adjoint config (code). Use `SU2_CFD_AD` for the adjoint run. +- The Python scripts need NumPy and SciPy (tutorial). +- The CoolProp fluid models cannot be used with the AD build (code). +- To check gradients with forward-mode AD, also build with `-Denable-directdiff=true` (code). + +### Discrete or continuous adjoint + +- `MATH_PROBLEM` takes `DIRECT`, `CONTINUOUS_ADJOINT` or `DISCRETE_ADJOINT` (code). +- With the Python scripts, keep `MATH_PROBLEM= DIRECT` in your file. The scripts set the adjoint value themselves, from the gradient method you choose on the command line (code). +- To run by hand: run `SU2_CFD` for the flow, and copy the restart file to the name in `SOLUTION_FILENAME`. Then run `SU2_CFD_AD` with `MATH_PROBLEM= DISCRETE_ADJOINT`. Then run `SU2_DOT_AD`, which turns the surface sensitivities into the gradient for the design variables (tutorial, to be reviewed: check the file names against the scripts). +- The discrete adjoint uses the numerical settings of the flow solver. It ignores the continuous adjoint options, such as `CONV_NUM_METHOD_ADJFLOW`, `ADJ_JST_SENSOR_COEFF`, `CFL_REDUCTION_ADJFLOW` and `LIMIT_ADJFLOW` (tutorial). The tutorial text calls the switch that changes this `INCONSISTENT_AD`; the option in the code is `INCONSISTENT_DISC` (default `NO`) (code). +- `FROZEN_VISC_DISC` (default `NO`) freezes the turbulence model in the adjoint. `FROZEN_LIMITER_DISC` (default `NO`) freezes the slope limiter (code). Both make the adjoint cheaper or more robust, but the gradient then no longer matches finite differences exactly (advice, to be reviewed). +- `QUASI_NEWTON_NUM_SAMPLES` above 1 adds a quasi-Newton correction to the adjoint iterations. The default is 0 (off) (code). It can speed up the adjoint convergence (to be reviewed). + +### Objective function + +- `OBJECTIVE_FUNCTION` sets the output to differentiate. `MARKER_MONITORING` sets the surfaces where SU2 evaluates it (code). Examples of values: `DRAG`, `LIFT`, `MOMENT_Z`, `EFFICIENCY`, `TOTAL_HEATFLUX`, `SURFACE_TOTAL_PRESSURE`, `SURFACE_PRESSURE_DROP`, `SURFACE_UNIFORMITY`, `TOTAL_PRESSURE_LOSS`, `ENTROPY_GENERATION`, `CUSTOM_OBJFUNC` (code). The full list is on the [option reference](../Option-Reference/) page. +- The `SURFACE_*` objectives use the markers in `MARKER_ANALYZE`. List the same marker in `MARKER_MONITORING` too (tutorial). +- **Weighted sum.** Give several objectives separated by commas, with `OBJECTIVE_WEIGHT` and `MARKER_MONITORING` in the same order (code). See the [multi-objective tutorial](/tutorials/Multi_Objective_Shape_Design/). +- **Custom expression.** With `OBJECTIVE_FUNCTION= CUSTOM_OBJFUNC`, `CUSTOM_OBJFUNC` holds a formula of history outputs, for example `'DRAG + 10 * pow(fmax(0.4-LIFT, 0), 2)'` (code). +- **In the Python scripts**, `OPT_OBJECTIVE` sets the objective and its scale, for example `DRAG * 0.001` (tutorial). Separate several objectives with semicolons. With `OPT_COMBINE_OBJECTIVE= YES`, SU2 solves one adjoint for the weighted sum, instead of one per objective (tutorial). +- **Fixed lift.** To minimize drag at a given lift, use `FIXED_CL_MODE= YES` with `TARGET_CL`: the flow solver then changes the angle of attack. The adjoint gives the drag gradient at fixed lift, so you need no lift constraint and no extra adjoint for it (tutorial). + +### Constraints + +- `OPT_CONSTRAINT` lists constraints separated by semicolons, in the form `( NAME > value ) * scale`, with `>`, `<` or `=` (tutorial). +- Each flow constraint (for example `LIFT`) needs its own adjoint solution (tutorial). +- Geometric constraints come from SU2_GEO: `AIRFOIL_THICKNESS` for airfoils, `STATION1_THICKNESS`, `STATION2_THICKNESS`, ... for wings (tutorial). Set `GEO_MARKER`, `GEO_DESCRIPTION` (`AIRFOIL`, `WING`, `FUSELAGE` or `NACELLE`) and, for wings, `GEO_LOCATION_STATIONS` and `GEO_BOUNDS` (code, tutorial). Run `SU2_GEO` once on the baseline to check the values (tutorial). +- **Penalty.** You can also write a constraint inside `OPT_OBJECTIVE`, for example `(DRAG = 0.05)*1E6`. SU2 then adds a quadratic penalty when the constraint is violated (tutorial). +- The scale of each constraint sets how strongly the optimizer reacts when the constraint is violated. The tutorials use 0.001 (tutorial). + +### Design variables + +`DEFINITION_DV` lists the design variables for the Python scripts. Each one has the form `( kind, scale | markers | parameters )`. Separate them with semicolons, with no semicolon after the last one (tutorial). The kind is a number (code): + +| Number | Kind | Parameters | +|---|---|---| +| 1 | `TRANSLATION` | x, y, z | +| 11 | `FFD_CONTROL_POINT` | box tag, i, j, k, x, y, z direction | +| 14 | `FFD_CAMBER` | box tag, i, j | +| 15 | `FFD_TWIST` | box tag, j, axis end points | +| 16 | `FFD_THICKNESS` | box tag, i, j | +| 19 | `FFD_CONTROL_POINT_2D` | box tag, i, j, x, y direction | +| 20 | `FFD_CAMBER_2D` | box tag, i | +| 21 | `FFD_THICKNESS_2D` | box tag, i | +| 30 | `HICKS_HENNE` | lower (0) or upper (1) side, x position on a unit chord | +| 34 | `CST` | see the test case [deformation/cst](https://github.com/su2code/SU2/tree/develop/TestCases/deformation/cst) | +| 35 | `SURFACE_BUMP` | x start, x end, x location of the bump | +| 101 | `ANGLE_OF_ATTACK` | 1.0 | + +These points come from the tutorials (tutorial): + +- Hicks-Henne bumps (kind 30) are simple for 2D airfoils. FFD control points (kinds 11 and 19) work for any shape, in 2D and 3D. +- `set_ffd_design_var.py` writes the `DEFINITION_DV` list for all control points of a box, for example `set_ffd_design_var.py -i 10 -j 8 -k 1 -b WING -m 'UPPER_SIDE, LOWER_SIDE, TIP'`. Add `--dimension 2` in 2D. Remove the points that should not move. +- `DV_KIND`, `DV_MARKER`, `DV_PARAM` and `DV_VALUE` define one deformation for `SU2_DEF` alone, for example to test a mesh deformation by hand. + +### FFD boxes + +FFD (free-form deformation) puts a box of control points around the surface. Moving a control point bends the surface inside the box smoothly (tutorial). + +- `FFD_DEFINITION` = (tag, then the 8 corner points x, y, z) in 3D. In 2D, give 4 corners with z = 0, and fill the other 12 values with zeros (tutorial). Start at the corner with the lowest x, y, z. Go along x, then along y, then to the remaining corner of that face. In 3D, repeat for the top face (tutorial). +- `FFD_DEGREE` = (i, j, k) degrees. The box has degree + 1 control points in each direction. In 2D, use (i, j, 0) (tutorial). +- Several boxes: separate them with semicolons in `FFD_DEFINITION` and `FFD_DEGREE` (test case). +- `FFD_CONTINUITY` keeps the surface smooth where it leaves the box: `2ND_DERIVATIVE` (default), `1ST_DERIVATIVE`, `NO_DERIVATIVE`, or `USER_INPUT` (code). With `USER_INPUT`, you choose the fixed planes of control points with `FFD_FIX_I`, `FFD_FIX_J` and `FFD_FIX_K`. A plane index larger than the degree fixes nothing (tutorial, test case). +- Other options: `FFD_BLENDING` (`BEZIER` default, or `BSPLINE_UNIFORM` with `FFD_BSPLINE_ORDER`), `FFD_COORD_SYSTEM` (`CARTESIAN` default, `CYLINDRICAL`, `SPHERICAL`, `POLAR`, with `FFD_AXIS`), `FFD_SYMMETRY_PLANE` (default `NO`) (code). +- `FFD_TOLERANCE` (default 1E-10) and `FFD_ITERATIONS` (default 500) control how SU2 finds the position of each surface point inside the box (code). +- `FFD_INTPREV= YES` (default `NO`) checks the box for self-intersection after a deformation. If SU2 finds one, it reduces the deformation step by step (`FFD_INTPREV_ITER`, default 10; `FFD_INTPREV_DEPTH`, default 3) (code). + +To add the boxes to your mesh (tutorial): + +1. Set `DV_KIND= FFD_SETTING`, `DV_PARAM= ( 1.0 )` and `DV_MARKER` to the surfaces to deform. +2. Run `SU2_DEF config.cfg`. +3. SU2_DEF writes the mesh with the boxes to the file in `MESH_OUT_FILENAME` (default `mesh_out`). Use that file as `MESH_FILENAME` from now on. + +The box moves only the surface points that lie inside it (tutorial). Make the box enclose the whole region that should change (advice). + +### Mesh deformation + +After the surface moves, `SU2_DEF` moves the volume mesh by treating it as an elastic solid (tutorial). + +- `DEFORM_STIFFNESS_TYPE`: `WALL_DISTANCE` (default), `INVERSE_VOLUME` or `CONSTANT_STIFFNESS` (code). The first two make small cells near walls stiffer, so that the boundary layer cells keep their shape (advice, to be reviewed). +- `DEFORM_LINEAR_SOLVER` (default `FGMRES`), `DEFORM_LINEAR_SOLVER_PREC` (default `ILU`), `DEFORM_LINEAR_SOLVER_ITER` (default 1000), `DEFORM_LINEAR_SOLVER_ERROR` (default 1E-14) (code). +- `DEFORM_NONLINEAR_ITER` (default 1) splits the deformation into this many smaller steps (code). More steps help with large deformations (advice, to be reviewed). +- `DEFORM_LIMIT` (default 1E6) deforms only the cells closer to the wall than this distance (code). +- `DEFORM_COEFF` is used as the Poisson ratio of the elastic mesh. Its option text gives a range from -1.0 to 0.5, but the default is 1E6 (code). The [species transport tutorial](/tutorials/Species_Transport/) sets 0.0. Set it in your file (to be reviewed). +- `DEFORM_KIND= RBF` uses radial basis functions instead of the elastic solid (default `ELASTIC`) (code). See the test case [deformation/naca0012](https://github.com/su2code/SU2/blob/develop/TestCases/deformation/naca0012/def_NACA0012_rbf.cfg) (test case). +- Boundaries that are not in `DV_MARKER` stay fixed. Points on `MARKER_SYM` boundaries can slide in their plane. Declaring a flat outlet as `MARKER_SYM` avoids torn cells there (tutorial). +- `HOLD_GRID_FIXED= YES` with `HOLD_GRID_FIXED_COORD` keeps the mesh outside a box fixed (code). +- Set `DEFORM_CONSOLE_OUTPUT= YES` to see the minimum cell volume after each step (code). + +The options `DEFORM_MESH` and `MARKER_DEFORM_MESH` belong to the mesh solver inside SU2_CFD, for moving boundaries during a flow simulation. Shape optimization with the Python scripts uses SU2_DEF. + +### Python scripts + +All scripts are in `SU2_PY`. They take the config file with `-f` and the number of MPI ranks with `-n` (code). See also [Execution](../Execution/). + +- `shape_optimization.py`: the full loop of flow, adjoint, gradient, deformation and optimizer (tutorial). Its arguments (code): + - `-g`: the gradient method, `DISCRETE_ADJOINT` (default), `CONTINUOUS_ADJOINT`, `FINDIFF` or `NONE`. + - `-o`: the optimizer from SciPy, `SLSQP` (default), `CG`, `BFGS` or `POWELL`. + - `-q`: quiet mode, default `True`. + - Each design is written to `DESIGNS/DSN_001`, `DSN_002`, ... The history of the optimization is in the `history_project` file (tutorial). +- `discrete_adjoint.py`: one flow solution, one adjoint solution and the gradient. `-m adj` reuses an existing flow solution; `-m grad` reuses both solutions (code). +- `continuous_adjoint.py`: the same with the continuous adjoint (code). +- `finite_differences.py`: the gradient by finite differences, with one flow solution per design variable (code). +- `set_ffd_design_var.py`: writes `DEFINITION_DV` lists for FFD boxes (tutorial). + +Optimizer settings (tutorial): + +- `OPT_ITERATIONS`, `OPT_ACCURACY`: the maximum number of iterations and the requested accuracy. +- `OPT_BOUND_UPPER`, `OPT_BOUND_LOWER`: the bounds of each design variable. The script divides them by `OPT_RELAX_FACTOR` before it passes them to the optimizer (code). +- `OPT_GRADIENT_FACTOR`: scales objective and gradient. The tutorials aim at a gradient norm (column GNORM) near 1E-6 for SLSQP. +- `OPT_RELAX_FACTOR`: scales the first step. Check the size of the first deformation in `DESIGNS/DSN_002/DEFORM/log_Deform.out` (the `Max Diff` line in the ONERA M6 tutorial). +- `OPT_LINE_SEARCH_BOUND` (default 1E6) bounds the line search in SU2_DEF (code). + +**FADO.** The tutorials [Species Transport](/tutorials/Species_Transport/) and [Turbulent 3D pipe bend](/tutorials/Inc_Turbulent_Bend_Opt/) use [FADO](https://github.com/su2code/FADO), a separate Python framework, instead of `shape_optimization.py` (tutorial). FADO gives more control over the steps and over the optimizer. The Species Transport tutorial shows a full workflow: restart check, FFD setup, mesh deformation test, gradient check, optimization (tutorial). + +## Check convergence and results + +**Converge the flow first.** The adjoint linearizes the flow around the current solution. A poorly converged flow gives a wrong gradient (advice). Set `CONV_RESIDUAL_MINVAL` low, and check that the objective no longer changes. + +**Converge the adjoint.** With the compressible solver, the adjoint run stops on `RMS_ADJ_DENSITY` by default (code). Watch it, and the sensitivity outputs (`SENS_GEO`, `SENS_AOA`, `SENS_MACH`) in the adjoint history (code). The sensitivities should settle to steady values (advice). + +**Check the restart.** Before a gradient check, verify that a flow restart and an adjoint restart reproduce the residuals of a continuous run. The [Species Transport tutorial](/tutorials/Species_Transport/) shows a script for this (tutorial). + +**Check the gradient against finite differences** before you optimize (tutorial): + +1. Run `discrete_adjoint.py -f config.cfg`. The gradient is in a file named after `GRAD_OBJFUNC_FILENAME` (default `of_grad`) plus a short name of the objective, for example `of_grad_cd.csv` for `DRAG`. The extension follows `TABULAR_FORMAT` (code). +2. Run `finite_differences.py -f config.cfg`. The gradient is in `of_grad_findiff`, with the same extension. The step comes from `FIN_DIFF_STEP`; the script uses 0.001 when the option is missing. The template suggests 0.001 times `REF_LENGTH` (code). +3. Compare the two files, design variable by design variable. Signs and orders of magnitude must agree. Try two or three step sizes: a step that is too large adds truncation error, and a step that is too small adds noise from the incomplete convergence (advice). + +With a direct-diff build, `discrete_adjoint.py -v True` compares the adjoint gradient with forward-mode AD, instead of finite differences (code, to be reviewed). + +**Check each new design.** Look at the deformed meshes in `DESIGNS/DSN_*/DEFORM`, the flow solutions in `DESIGNS/DSN_*/DIRECT`, and the history in `history_project` (tutorial). + +## Common problems + +| Symptom | Likely cause | What to try | +|---|---|---| +| SU2 stops: "MATH_PROBLEM= DISCRETE_ADJOINT requires AD support". | The adjoint config was given to `SU2_CFD` (code). | Use `SU2_CFD_AD`, or let the Python scripts call it. Build with `-Denable-autodiff=true`. | +| The gradient differs from finite differences. | The flow or the adjoint is not converged; the finite difference step is too large or too small; the turbulence or the limiter is frozen (advice). | Converge both deeper. Try several `FIN_DIFF_STEP` values. Set `FROZEN_VISC_DISC= NO` and `FROZEN_LIMITER_DISC= NO`. | +| The adjoint diverges or stalls. | The flow solution oscillates (limiter, shock, separation), so the adjoint of the last iteration has no fixed point (advice, to be reviewed). | Converge the flow deeper. Freeze the limiter in the flow with `LIMITER_ITER`. Try `FROZEN_LIMITER_DISC= YES` or `QUASI_NEWTON_NUM_SAMPLES` (to be reviewed). | +| The flow does not converge on a new design. | The step was too large, or the shape became unphysical (advice). | Lower `OPT_RELAX_FACTOR` or the bounds. Restart the optimization from its project file with `-r` (to be reviewed). | +| SU2_DEF reports: "There are N elements with negative volume". | The deformation is too large for the mesh (code). | Lower the step (`OPT_RELAX_FACTOR`, bounds). Raise `DEFORM_NONLINEAR_ITER`. Try another `DEFORM_STIFFNESS_TYPE` or `DEFORM_KIND= RBF`. Set `FFD_INTPREV= YES` (to be reviewed). | +| The mesh is torn at an outlet or a side boundary. | That boundary is fixed while its neighbour moves (tutorial). | Declare flat boundaries next to the moving surface as `MARKER_SYM`. | +| Kinks at the edge of the FFD box. | Control points on the box faces move (tutorial). | Use `FFD_CONTINUITY= 2ND_DERIVATIVE`, or fix the outer planes with `FFD_FIX_I`, `FFD_FIX_J`, `FFD_FIX_K`. | +| Part of the surface does not move. | It lies outside the FFD box (tutorial). | Enlarge the box and run the `FFD_SETTING` step again. | +| The FFD point inversion does not converge. | The box is badly shaped, or points sit near its faces (advice, to be reviewed). | Raise `FFD_ITERATIONS`. Make the box larger and closer to a regular hexahedron. | +| The optimizer stops after one step. | The gradient norm is far from the scale that the optimizer expects (tutorial). | Change `OPT_GRADIENT_FACTOR` so that GNORM is near 1E-6. | +| The thickness constraint has no value. | `GEO_MARKER` or `GEO_DESCRIPTION` is missing (test case). | Set them, and run `SU2_GEO` on the baseline. | + +## Related tutorials and test cases + +Tutorials: + +- [Unconstrained shape design of a transonic inviscid airfoil](/tutorials/Inviscid_2D_Unconstrained_NACA0012/): Hicks-Henne bumps, `shape_optimization.py`. +- [Constrained shape design of a transonic inviscid wing](/tutorials/Inviscid_3D_Constrained_ONERAM6/): FFD boxes, SU2_GEO thickness constraints, fixed lift. +- [Constrained shape design of a transonic turbulent airfoil](/tutorials/Turbulent_2D_Constrained_RAE2822/): RANS discrete adjoint, moment and thickness constraints. +- [Shape design with multiple objectives and penalty functions](/tutorials/Multi_Objective_Shape_Design/): weighted objectives, `OPT_COMBINE_OBJECTIVE`, penalties. +- [Unconstrained shape design of a two way mixing channel](/tutorials/Species_Transport/): FADO, FFD setup, gradient check. +- [Adjoint design optimization of a turbulent 3D pipe bend](/tutorials/Inc_Turbulent_Bend_Opt/): FADO, incompressible RANS. +- [Unsteady shape optimization NACA0012](/tutorials/Unsteady_Shape_Opt_NACA0012/): unsteady discrete adjoint. + +Test cases (SU2 repository): + +- [multiple_ffd/naca0012](https://github.com/su2code/SU2/blob/develop/TestCases/multiple_ffd/naca0012/inv_NACA0012_ffd.cfg): two FFD boxes, `discrete_adjoint.py`. +- [optimization_euler/steady_naca0012](https://github.com/su2code/SU2/blob/develop/TestCases/optimization_euler/steady_naca0012/inv_NACA0012_adv.cfg): `shape_optimization.py` with the continuous adjoint. +- [optimization_rans/steady_rae2822](https://github.com/su2code/SU2/blob/develop/TestCases/optimization_rans/steady_rae2822/turb_SA_RAE2822.cfg): RANS airfoil with constraints. +- [optimization_rans/naca0012](https://github.com/su2code/SU2/blob/develop/TestCases/optimization_rans/naca0012/naca0012.cfg): unsteady RANS, `shape_optimization.py` restarted from a solution. +- [disc_adj_euler](https://github.com/su2code/SU2/tree/develop/TestCases/disc_adj_euler) and [disc_adj_rans](https://github.com/su2code/SU2/tree/develop/TestCases/disc_adj_rans): discrete adjoint runs. +- [disc_adj_turbomachinery](https://github.com/su2code/SU2/tree/develop/TestCases/disc_adj_turbomachinery): adjoint of turbomachinery objectives. +- [deformation](https://github.com/su2code/SU2/tree/develop/TestCases/deformation): SU2_DEF with many kinds of design variables. + +User guide pages: [Build SU2 on Linux/MacOS](../Build-SU2-Linux-MacOS/), [Execution](../Execution/), [Advanced AD Techniques](../Advanced-AD-Techniques/), [Solver Setup](../Solver-Setup/), [Setup Guide: Turbomachinery](../Setup-Guide-Turbomachinery/). + +Last checked against SU2 develop `11c177b904`. diff --git a/_docs_v7/Setup-Guide-Species-Combustion.md b/_docs_v7/Setup-Guide-Species-Combustion.md new file mode 100644 index 00000000..0a4dcbee --- /dev/null +++ b/_docs_v7/Setup-Guide-Species-Combustion.md @@ -0,0 +1,416 @@ +--- +title: "Setup Guide: Species Transport and Combustion" +permalink: /docs_v7/Setup-Guide-Species-Combustion/ +--- + +> **Draft.** The settings below come from the SU2 code, the tutorials and the test cases. The advice parts need a review by experienced users. + +**Source tags.** A tag at the end of a statement says where it comes from. A tag on the line that introduces a list or a table covers the whole list or table. + +- **(code)**: read in the SU2 source. Option defaults come from `Common/src/CConfig.cpp`. +- **(test case)**: used in a test case config. +- **(tutorial)**: used in a tutorial. +- **(docs)**: stated in another page of this website. +- **(advice)**: general CFD practice. +- **(to be reviewed)**: added after any of the above when the statement needs a check by an experienced user. + +--- + +- [When to use this guide](#when-to-use-this-guide) +- [Start from](#start-from) +- [Settings that matter](#settings-that-matter) +- [Check convergence and results](#check-convergence-and-results) +- [Common problems](#common-problems) +- [Related tutorials and test cases](#related-tutorials-and-test-cases) + +--- + +## When to use this guide + +Use this guide when the flow carries more than one chemical species, or a flame: + +- **Species transport**: mixing of gases, or a pollutant in air, without reactions. SU2 transports the mass fraction of each species: the mass of that species divided by the total mass. +- **Flamelet model** (FGM, flamelet-generated manifold): laminar premixed, partially premixed and diffusion flames. SU2 transports a few controlling variables. It reads the gas properties and the reaction rates from a table computed beforehand. + +`KIND_SCALAR_MODEL` sets both. Both run on top of the flow solver, so read [Setup Guide: Incompressible Flows](../Setup-Guide-Incompressible/) first. +For flames next to solid walls that conduct heat, also read [Setup Guide: Heat Transfer and Conjugate Heat Transfer](../Setup-Guide-Heat-Transfer-CHT/). + +Every option is listed in the [option reference](../Option-Reference/). +Every output field is listed in the [output fields reference](../Output-Fields-Reference/). + +## Start from + +### Species transport: two gas streams mixing + +This config mixes two gas streams in a 2D venturi, with the SST turbulence model. +The mixture density depends on the composition (`FLUID_MIXTURE`). +It is the test case [`species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel.cfg) with fewer options. +Change to the test case: `CONV_FIELD` uses `RMS_SPECIES_0`. The test case writes `RMS_SPECIES`, which is not an output field, so SU2 ignores it. +The mesh `primitiveVenturi.su2` is in the same folder of the [TestCases repository](https://github.com/su2code/TestCases). + +``` +% ------------- Problem -------------% +SOLVER= INC_RANS +KIND_TURB_MODEL= SST +% +% ------------- Flow and mixture -------------% +INC_DENSITY_MODEL= VARIABLE +INC_ENERGY_EQUATION= YES +INC_DENSITY_INIT= 1.1766 +INC_VELOCITY_INIT= ( 1.00, 0.0, 0.0 ) +INC_TEMPERATURE_INIT= 300.0 +INC_NONDIM= DIMENSIONAL +FLUID_MODEL= FLUID_MIXTURE +THERMODYNAMIC_PRESSURE= 101325.0 +MOLECULAR_WEIGHT= 28.96, 16.043 +SPECIFIC_HEAT_CP= 1009.39, 1009.39 +CONDUCTIVITY_MODEL= CONSTANT_CONDUCTIVITY +THERMAL_CONDUCTIVITY_CONSTANT= 0.0357, 0.0357 +PRANDTL_LAM= 0.72, 0.72 +TURBULENT_CONDUCTIVITY_MODEL= NONE +PRANDTL_TURB= 0.90, 0.90 +VISCOSITY_MODEL= CONSTANT_VISCOSITY +MU_CONSTANT= 1.716E-5, 1.716E-5 +% +% ------------- Species -------------% +KIND_SCALAR_MODEL= SPECIES_TRANSPORT +DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY +DIFFUSIVITY_CONSTANT= 0.001 +SPECIES_INIT= 1.0 +SPECIES_CLIPPING= YES +SPECIES_CLIPPING_MIN= 0.0 +SPECIES_CLIPPING_MAX= 1.0 +% +% ------------- Boundary conditions -------------% +MARKER_HEATFLUX= ( wall, 0.0 ) +MARKER_SYM= ( axis ) +INC_INLET_TYPE= VELOCITY_INLET, VELOCITY_INLET +MARKER_INLET= ( gas_inlet, 300, 1.0, 1.0, 0.0, 0.0, air_axial_inlet, 300, 1.0, 0.0, -1.0, 0.0 ) +MARKER_INLET_SPECIES= ( gas_inlet, 1.0, air_axial_inlet, 0.6 ) +INC_OUTLET_TYPE= PRESSURE_OUTLET +MARKER_OUTLET= ( outlet, 0.0 ) +MARKER_ANALYZE= ( outlet, gas_inlet, air_axial_inlet ) +% +% ------------- Numerics -------------% +NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES +CFL_NUMBER= 60 +CONV_NUM_METHOD_FLOW= FDS +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= NONE +TIME_DISCRE_FLOW= EULER_IMPLICIT +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +MUSCL_TURB= NO +CFL_REDUCTION_TURB= 1.0 +CONV_NUM_METHOD_SPECIES= SCALAR_UPWIND +MUSCL_SPECIES= NO +SLOPE_LIMITER_SPECIES= NONE +TIME_DISCRE_SPECIES= EULER_IMPLICIT +CFL_REDUCTION_SPECIES= 1.0 +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= ILU +LINEAR_SOLVER_ERROR= 1E-8 +LINEAR_SOLVER_ITER= 5 +% +% ------------- Convergence and output -------------% +ITER= 1000 +CONV_FIELD= RMS_PRESSURE, RMS_VELOCITY-X, RMS_VELOCITY-Y, RMS_TKE, RMS_SPECIES_0 +CONV_RESIDUAL_MINVAL= -18 +CONV_STARTITER= 10 +MESH_FILENAME= primitiveVenturi.su2 +SCREEN_OUTPUT= INNER_ITER, RMS_PRESSURE, RMS_VELOCITY-X, RMS_TKE, RMS_SPECIES_0, SURFACE_SPECIES_VARIANCE +HISTORY_OUTPUT= RMS_RES, FLOW_COEFF, LINSOL, SPECIES_COEFF, SPECIES_COEFF_SURF +VOLUME_OUTPUT= RESIDUAL, PRIMITIVE +``` + +With two species, SU2 solves one species equation. Species 0 has the first value of each property list. The last species fills the rest of the mass (code). + +### Flamelet: laminar premixed methane flame + +This config is a laminar premixed methane flame on a burner, with a wall at 450 K. +It is the test case [`flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg) with fewer options. +The mesh `mesh_structured.cgns` and the table `fgm_ch4.drg` are in the same folder of the [TestCases repository](https://github.com/su2code/TestCases). + +Changes to the test case: the test restarts from a converged solution, with `RESTART_SOL= YES` and `FLAME_INIT_METHOD= NONE`. +Here the run starts from scratch, so `RESTART_SOL= NO` and `FLAME_INIT_METHOD= FLAME_FRONT`, with the `FLAME_INIT` values of the test case. The regression tests do not run this combination (to be reviewed). + +``` +% ------------- Problem -------------% +SOLVER= INC_NAVIER_STOKES +KIND_TURB_MODEL= NONE +RESTART_SOL= NO +% +% ------------- Flow and flamelet fluid model -------------% +INC_DENSITY_MODEL= FLAMELET +INC_DENSITY_INIT= 1.00 +INC_VELOCITY_INIT= ( 0.5, 0.0, 0.0 ) +INC_TEMPERATURE_INIT= 300.0 +INC_NONDIM= DIMENSIONAL +FLUID_MODEL= FLUID_FLAMELET +KIND_SCALAR_MODEL= FLAMELET +DIFFUSIVITY_MODEL= FLAMELET +VISCOSITY_MODEL= FLAMELET +CONDUCTIVITY_MODEL= FLAMELET +% +% ------------- Manifold -------------% +FILENAMES_INTERPOLATOR= (fgm_ch4.drg) +CONTROLLING_VARIABLE_NAMES= (ProgressVariable, EnthalpyTot) +CONTROLLING_VARIABLE_SOURCE_NAMES= (ProdRateTot_PV, NULL) +USER_SCALAR_NAMES= (CO, NOx) +USER_SOURCE_NAMES= (ProdRatePos_Y-CO, ProdRateNegScaled_Y-CO, ProdRateTot_Y-NOx, NULL) +LOOKUP_NAMES= (MolarWeightMix, Conductivity, Cp, HeatRelease, Diffusivity) +% +% ------------- Initial state and ignition -------------% +SPECIES_INIT= (0.0, -210000, 0.0, 0.0) +FLAME_INIT_METHOD= FLAME_FRONT +FLAME_INIT= (0.0032, 0.00, 0.00, 1.0, 0.1, 0.0, 1.0e-3, 0.1) +% +% ------------- Boundary conditions -------------% +INC_INLET_TYPE= VELOCITY_INLET +MARKER_INLET= (inlet, 300.0, 0.20, 1.0, 0.0, 0.0) +MARKER_INLET_SPECIES= (inlet, 0, -193600.0, 0.0, 0.0) +INC_OUTLET_TYPE= PRESSURE_OUTLET +MARKER_OUTLET= (outlet, 0.0) +MARKER_ISOTHERMAL= (wall, 450) +MARKER_SYM= (symmetry, symmetry_2-part-fluid) +MARKER_SPECIES_STRONG_BC= (inlet, outlet, wall) +MARKER_ANALYZE= (inlet, outlet) +% +% ------------- Numerics -------------% +NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES +CONV_NUM_METHOD_FLOW= FDS +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= NONE +TIME_DISCRE_FLOW= EULER_IMPLICIT +CONV_NUM_METHOD_SPECIES= BOUNDED_SCALAR +MUSCL_SPECIES= YES +SLOPE_LIMITER_SPECIES= NONE +TIME_DISCRE_SPECIES= EULER_IMPLICIT +CFL_NUMBER= 100 +CFL_ADAPT= YES +CFL_ADAPT_PARAM= ( 0.95, 1.01, 10.0, 1000, 0.01, 0 ) +MGLEVEL= 0 +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= ILU +LINEAR_SOLVER_ERROR= 1E-03 +LINEAR_SOLVER_ITER= 10 +% +% ------------- Convergence and output -------------% +ITER= 10000 +CONV_FIELD= RMS_PRESSURE +CONV_RESIDUAL_MINVAL= -15 +MESH_FILENAME= mesh_structured.cgns +MESH_FORMAT= CGNS +SCREEN_OUTPUT= INNER_ITER, RMS_VELOCITY-X, RMS_PRESSURE, RMS_ProgressVariable, RMS_EnthalpyTot, RMS_CO, RMS_NOx +VOLUME_OUTPUT= SOLUTION, PRIMITIVE, SOURCE, LOOKUP +``` + +With the default `FLAME_ENTHALPY_BC= FLOW_MARKERS`, SU2 does not use the enthalpy value −193600 in `MARKER_INLET_SPECIES`. It computes the inlet enthalpy from the 300 K of `MARKER_INLET` instead. In the same way, it replaces the initial enthalpy of `SPECIES_INIT` with the value at `INC_TEMPERATURE_INIT` (code). + +## Settings that matter + +### Choose the scalar model + +`KIND_SCALAR_MODEL` takes these values (code): + +- `NONE` (default): no species. +- `SPECIES_TRANSPORT`: transport of N species mass fractions. It works with `INC_NAVIER_STOKES`, `INC_RANS`, `NAVIER_STOKES` and `RANS`. +- `FLAMELET`: the flamelet model. All tutorials and test cases use it with `INC_NAVIER_STOKES`. + +### Number of species and list lengths + +For N species, SU2 solves N−1 transport equations. The last mass fraction is 1 minus the sum of the others ([Theory](../Theory/#species-transport)). + +SU2 counts the equations from `SPECIES_INIT`. These lists need exactly one value per equation (code): + +- `SPECIES_INIT`, +- `SPECIES_CLIPPING_MIN` and `SPECIES_CLIPPING_MAX` (when clipping is on), +- the values after each marker in `MARKER_INLET_SPECIES` and `MARKER_WALL_SPECIES`. + +With `FLUID_MODEL= FLUID_MIXTURE`, these lists need one value per species, that is N values, including the last species (code): + +- `MOLECULAR_WEIGHT` and `SPECIFIC_HEAT_CP`, +- `MU_CONSTANT` (or `MU_REF`, `MU_T_REF`, `SUTHERLAND_CONSTANT` for Sutherland's law), +- `THERMAL_CONDUCTIVITY_CONSTANT` or `PRANDTL_LAM`, depending on `CONDUCTIVITY_MODEL`, +- `PRANDTL_TURB` with `TURBULENT_CONDUCTIVITY_MODEL= CONSTANT_PRANDTL_TURB`, +- `CONSTANT_LEWIS_NUMBER` with `DIFFUSIVITY_MODEL= CONSTANT_LEWIS`. + +SU2 checks that each mass fraction in `SPECIES_INIT` and `MARKER_INLET_SPECIES`, and their sum, lies between 0 and 1. If not, it prints a message but does not stop (code). Read the start-up output. + +### Passive scalar or active mixture + +- **Passive scalar** (the species does not change the flow, for example a dilute pollutant): use `INC_DENSITY_MODEL= CONSTANT`. The flow properties are those of a single fluid. Example: [`passive_transport.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/species_transport/passive_transport_validation/passive_transport.cfg) (test case). +- **Active mixture** (density and properties depend on the composition): use `FLUID_MODEL= FLUID_MIXTURE`. It requires `INC_DENSITY_MODEL= VARIABLE` and `KIND_SCALAR_MODEL= SPECIES_TRANSPORT`. The density follows from the ideal gas law, with the mixture molecular weight at `THERMODYNAMIC_PRESSURE` (default 101325 Pa). For this model, `INIT_OPTION_INC` defaults to `OPERATING_PRESSURE`, so `INC_DENSITY_INIT` does not change the operating pressure (code). + +For a mixture ([composition-dependent tutorial](/tutorials/Inc_Species_Transport_Composition_Dependent_Model/)): + +- The mean molecular weight is a mole-fraction average. The specific heat is a mass-fraction average (tutorial). +- `MIXING_VISCOSITY_MODEL` sets the mixing rule for viscosity: `DAVIDSON` (default) or `WILKE` (code). +- With a species model and variable density, SU2 does not switch the energy equation on for you (code). If all streams have the same temperature and the walls are adiabatic, `INC_ENERGY_EQUATION= NO` is possible, as in the tutorial. Otherwise set `INC_ENERGY_EQUATION= YES`. + +### Mass diffusivity + +`DIFFUSIVITY_MODEL` sets the laminar diffusion coefficient D, in m²/s (code): + +| Value | D | Options | +|---|---|---| +| `CONSTANT_DIFFUSIVITY` (default) | constant | `DIFFUSIVITY_CONSTANT`. You must set it; SU2 stops otherwise. | +| `CONSTANT_SCHMIDT` | μ / (ρ Sc) | `SCHMIDT_NUMBER_LAMINAR` (default 1.0) | +| `UNITY_LEWIS` | k / (ρ c_p) | none | +| `CONSTANT_LEWIS` | k / (Le ρ c_p) | `CONSTANT_LEWIS_NUMBER`, one value per species | +| `FLAMELET` | read from the flamelet table | only with `FLUID_FLAMELET` | + +Here μ is the viscosity, k the thermal conductivity, c_p the specific heat, Sc the Schmidt number and Le the Lewis number. +For RANS, turbulence adds μ_t / Sc_t to ρD, with `SCHMIDT_NUMBER_TURBULENT` (default 0.7) as Sc_t ([Theory](../Theory/#species-transport)). + +For gases that diffuse fast, such as hydrogen, the [composition-dependent tutorial](/tutorials/Inc_Species_Transport_Composition_Dependent_Model/) suggests `CONSTANT_LEWIS` (tutorial). +`UNITY_LEWIS` and `CONSTANT_LEWIS` keep heat and mass diffusion consistent in a gas mixture. Hydrogen has a Lewis number well below 1 (advice, to be reviewed). + +### Species boundary conditions + +Species boundary conditions sit on top of the flow boundary conditions (code): + +- **Inlet**: every `MARKER_INLET` marker needs an entry in `MARKER_INLET_SPECIES= ( marker, Y_1, ..., Y_N-1, ... )`. The values are mass fractions. Inlet profiles from a file are possible, see [`species3_primitiveVenturi_inletFile.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/species_transport/venturi_primitive_3species/species3_primitiveVenturi_inletFile.cfg). +- **Outlet**: zero gradient. Nothing to set. +- **Far field**: the values of `SPECIES_INIT`. +- **Walls**: zero flux by default. `MARKER_WALL_SPECIES= ( marker, FLUX, value, VALUE, value, ... )` sets, per species, a flux (`FLUX`) or a fixed mass fraction (`VALUE`). The pairs follow the species order, for example `MARKER_WALL_SPECIES= ( wall, VALUE, 1.0, FLUX, 0.01 )` (test case). The flux is per unit area (to be reviewed: units). + +`MARKER_SPECIES_STRONG_BC` lists markers where SU2 imposes the species values directly in the solution: a strong, or Dirichlet, condition. By default, SU2 imposes them through the boundary flux: a weak condition (code). + +- At an inlet, the strong condition fixes the inlet mass fractions. +- At an outlet, it copies the value of the neighbor point inside. +- For the flamelet model, at an isothermal wall it fixes the enthalpy that matches the wall temperature. + +The sources give different advice: + +- The [composition-dependent tutorial](/tutorials/Inc_Species_Transport_Composition_Dependent_Model/) advises strong conditions with `SCALAR_UPWIND`, and no strong conditions with `BOUNDED_SCALAR` (tutorial). +- The flamelet test cases use strong conditions at inlets, outlets and walls together with `BOUNDED_SCALAR` (test case). + +Start from the test case closest to your problem (to be reviewed). + +### Numerics for the species equations + +- `CONV_NUM_METHOD_SPECIES`: `SCALAR_UPWIND` (default) or `BOUNDED_SCALAR`. Centered schemes are not available for scalars (code). `BOUNDED_SCALAR` subtracts the effect of a non-zero velocity divergence during convergence, which keeps scalars inside their bounds ([Convective Schemes](../Convective-Schemes/#turbulence-and-scalarspecies-equations)). The [combustion tutorial](/tutorials/Inc_Combustion/) highly recommends it for flamelet runs. +- `MUSCL_SPECIES` (default `NO`) makes the scheme second order. `SLOPE_LIMITER_SPECIES` (default `NONE`) adds a limiter (code). +- `TIME_DISCRE_SPECIES`: `EULER_IMPLICIT` (default) or `EULER_EXPLICIT`. No other value is allowed (code). +- `CFL_REDUCTION_SPECIES` (default 1.0) multiplies the CFL number for the species equations (code). +- `SPECIES_CLIPPING= YES` keeps the mass fractions between `SPECIES_CLIPPING_MIN` and `SPECIES_CLIPPING_MAX`. SU2 stops if you switch it on without both limits (code). The composition-dependent tutorial uses clipping with `SCALAR_UPWIND` only; `BOUNDED_SCALAR` works without it (tutorial). +- Unsteady runs with dual time stepping and a density that depends on the species cannot use multigrid (`MGLEVEL` above 0) (code). + +### Flamelet model: required options + +`KIND_SCALAR_MODEL= FLAMELET` requires all of these (code): + +- `FLUID_MODEL= FLUID_FLAMELET`, +- `DIFFUSIVITY_MODEL= FLAMELET`, `VISCOSITY_MODEL= FLAMELET`, `CONDUCTIVITY_MODEL= FLAMELET`, +- `INC_DENSITY_MODEL= FLAMELET` (density read from the table, column `Density`) or `VARIABLE` (density from the ideal gas law with the table column `MolarWeightMix`), +- no `WEAKLY_COUPLED_HEAT_EQUATION`. + +SU2 switches the energy equation of the flow solver off. The flamelet solver transports the total enthalpy and reads the temperature from the table. So `INC_ENERGY_EQUATION` has no effect (code). + +### Flamelet model: the manifold + +The manifold is the table of flame data. The [combustion tutorial](/tutorials/Inc_Combustion/) explains how to build it. + +- `INTERPOLATION_METHOD`: `LUT` (default, a look-up table in a `.drg` file) or `MLP` (one or more neural networks in `.mlp` files) (code). +- `FILENAMES_INTERPOLATOR`: the file name(s). +- The table must contain `Temperature`, `Cp`, `ViscosityDyn`, `Conductivity` and `DiffusionCoefficient`, plus `Density` or `MolarWeightMix` (see the density model above) (code). +- SU2 divides `MolarWeightMix` by 1000, so it expects g/mol (code). + +A look-up table is faster to query, but a 3D table can need a lot of memory per core. Neural networks need less memory and give smoother data, but they are harder to train ([combustion tutorial](/tutorials/Inc_Combustion/)). + +### Flamelet model: controlling variables and extra scalars + +- `CONTROLLING_VARIABLE_NAMES`: the transported variables, with the names used in the table. The order is progress variable, total enthalpy, then optionally mixture fraction (code, tutorial). The progress variable measures how far combustion has advanced. The mixture fraction measures how much of the mixture came from the fuel stream. +- `CONTROLLING_VARIABLE_SOURCE_NAMES`: one table column per controlling variable, for its reaction source term. Write `NULL` when there is none, for example for enthalpy (tutorial). +- `USER_SCALAR_NAMES`: extra species to transport, such as CO or NO. +- `USER_SOURCE_NAMES`: two names per extra species, a production term and a consumption term. The source is production + consumption × Y. Use `NULL` or `zero` for a missing term (code). +- `LOOKUP_NAMES`: table columns to write in the volume output, with `LOOKUP` in `VOLUME_OUTPUT` (tutorial). +- `PREFERENTIAL_DIFFUSION= YES` adds the preferential diffusion model for hydrogen flames. The table must then contain `Beta_ProgVar`, `Beta_Enth_Thermal`, `Beta_Enth` and `Beta_MixFrac`. This is stated in the config template and used in the tutorial (code, tutorial). +- `THICKENED_FLAME_CORRECTION` (default `YES`) lowers the source terms and raises the diffusion in cells that are larger than the flame thickness. This keeps the run stable on coarse meshes (code). + +`SPECIES_INIT` and `MARKER_INLET_SPECIES` need one value per controlling variable, plus one per extra species (code). In the start config, these are: progress variable, enthalpy, CO, NOx. + +### Flamelet model: ignition + +The solver must start ("ignite") the flame. `FLAME_INIT_METHOD` takes these values (code, tutorial): + +- `NONE` (default): no ignition. Use it for cold flow and for restarts. +- `FLAME_FRONT`: a flat flame front at the start. `FLAME_INIT= ( x, y, z, nx, ny, nz, thickness, burnt length )`: a point on the front, the normal that points to the burnt side, the thickness of the transition, and the length of the burnt zone. This works well when the flow is simple at the start (tutorial). +- `SPARK`: a sphere where SU2 adds source terms for a few iterations. `SPARK_INIT= ( x, y, z, radius, start iteration, number of iterations )`. This works well when the flow needs many iterations to develop, such as in partially premixed flames (tutorial). + +Rules (code): + +- `SPARK` needs both `SPARK_INIT` and `SPARK_REACTION_RATES`, with at least one rate per transported scalar (controlling variables and extra species). +- `FLAME_INIT_IGNITION` (default 5000 K) is the burnt temperature for `FLAME_FRONT`, and the upper temperature inside the spark. It must be higher than `INC_TEMPERATURE_INIT`. +- The ignition also runs when you restart, unless `FLAME_INIT_METHOD= NONE`. + +### Flamelet model: thermal boundary conditions + +`FLAME_ENTHALPY_BC` decides where the enthalpy boundary values come from (code): + +- `FLOW_MARKERS` (default): from temperatures and heat fluxes. The inlet enthalpy follows from the temperature in `MARKER_INLET`. Walls use `MARKER_ISOTHERMAL` or `MARKER_HEATFLUX`. SU2 finds the enthalpy that gives the wall temperature with a Newton iteration on the table. +- `SPECIES_MARKERS`: the enthalpy and all other scalars come directly from `MARKER_INLET_SPECIES` and `MARKER_WALL_SPECIES`. You must give values that match the temperature you want. + +Some pages write `FLAMELET_ENTHALPY_BC`; the option name is `FLAME_ENTHALPY_BC`. +For wall values set per point from Python, see [`SU2_CFD/flamelet_python_bc.md`](https://github.com/su2code/SU2/blob/develop/SU2_CFD/flamelet_python_bc.md) in the code. + +Use `FLOW_MARKERS` when you know the temperatures, which is the usual case. It avoids an enthalpy that does not match the table ([diffusion flame tutorial](/tutorials/Inc_Laminar_Diffusion_Flame/)). + +## Check convergence and results + +- **Residual names.** Species transport: `RMS_SPECIES_0`, `RMS_SPECIES_1`, ... Flamelet: `RMS_` plus the name of the controlling variable or extra species, for example `RMS_ProgressVariable` or `RMS_CO` (code). In multizone runs, `BGS_` fields are available too. +- **Field names.** SU2 ignores unknown names in `CONV_FIELD` and prints `Ignoring Convergence Field(s)` at the start. `RMS_SPECIES` without a number is not a field (code). +- **Linear solver.** `LINSOL_ITER_SPECIES` and `LINSOL_RESIDUAL_SPECIES` (or `LINSOL_ITER_FLAMELET` and `LINSOL_RESIDUAL_FLAMELET`) show whether SU2 solves the species linear systems well (code). +- **Mixing quality.** With `MARKER_ANALYZE`, `SURFACE_SPECIES_0` gives the average mass fraction on those markers, and `SURFACE_SPECIES_VARIANCE` measures how uneven the mixture is there. Add the groups `SPECIES_COEFF` and `SPECIES_COEFF_SURF` to `HISTORY_OUTPUT` (code, tutorial). +- **Mass balance of a species.** At convergence, the species mass flow in through the inlets should equal the flow out through the outlet (advice, to be reviewed: there is no direct output field; a `CUSTOM_OUTPUTS` expression such as the one in [`passive_transport.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/species_transport/passive_transport_validation/passive_transport.cfg) can compute a mass-flow-averaged value). +- **Table misses (flamelet).** Add `LOOKUP` to `VOLUME_OUTPUT` and check the field `TABLE_MISSES`. Points with misses have controlling variables outside the table (code). +- **Flame position (flamelet).** Look at the progress variable and the temperature in ParaView. The flame should not move between the last outputs of a steady run (advice, to be reviewed). + +## Common problems + +| Symptom | Likely cause | What to try | +|---|---|---| +| SU2 stops: "Make sure all species inputs have the same size". | A species list has a different length from `SPECIES_INIT` (code). | Give N−1 values in `SPECIES_INIT`, in the clipping limits, and per marker in `MARKER_INLET_SPECIES` and `MARKER_WALL_SPECIES`. | +| SU2 stops: "The use of FLUID_MIXTURE requires the number of entries for MOLECULAR_WEIGHT and SPECIFIC_HEAT_CP". | A mixture property list does not have N values (code). | Give one value per species, the last species included. | +| SU2 stops: "The use of FLUID_MIXTURE requires the INC_DENSITY_MODEL option to be VARIABLE". | `FLUID_MIXTURE` with constant density (code). | Set `INC_DENSITY_MODEL= VARIABLE`. For a passive scalar, use constant density without `FLUID_MIXTURE`. | +| SU2 stops: "A DIFFUSIVITY_CONSTANT= has to be set". | `CONSTANT_DIFFUSIVITY` without a value (code). | Set `DIFFUSIVITY_CONSTANT` in m²/s. | +| SU2 stops: "SPECIES_CLIPPING= YES requires the options SPECIES_CLIPPING_MIN/MAX". | Clipping is on without limits (code). | Add both lists. | +| The run never stops at the residual target. | A `CONV_FIELD` name is unknown, for example `RMS_SPECIES` (code). | Use `RMS_SPECIES_0` and the other numbered names. | +| Mass fractions go below 0 or above 1. | Unbounded convection during convergence (advice). | Use `BOUNDED_SCALAR`, or `SPECIES_CLIPPING= YES` with limits 0 and 1 (to be reviewed). | +| Message "... is out of bounds [0,1]" at start-up. | A mass fraction, or a sum of mass fractions, in `SPECIES_INIT` or `MARKER_INLET_SPECIES` is outside 0 to 1. SU2 continues anyway (code). | Fix the values. | +| SU2 stops: "Number of initial species incompatible with number of controlling variables and user scalars". | `SPECIES_INIT` does not have one value per controlling variable and extra species (code). | Count `CONTROLLING_VARIABLE_NAMES` plus `USER_SCALAR_NAMES`. | +| SU2 stops: "Flame ignition temperature must be higher than the initial temperature". | `FLAME_INIT_IGNITION` is not above `INC_TEMPERATURE_INIT` (code). | Raise `FLAME_INIT_IGNITION`. | +| SU2 stops with an error about `FLAME_INIT_METHOD= SPARK`. | `SPARK_INIT` or `SPARK_REACTION_RATES` is missing, or there are too few rates (code). | Give both, with one rate per transported scalar. | +| No flame appears. | `FLAME_INIT_METHOD= NONE` (the default) on a fresh start (code). | Use `FLAME_FRONT` or `SPARK`. | +| The converged flame is reset after a restart. | Ignition runs again on restart, unless `FLAME_INIT_METHOD= NONE` (code). | Set `FLAME_INIT_METHOD= NONE` when you restart. | +| The inlet enthalpy in `MARKER_INLET_SPECIES` has no effect. | `FLAME_ENTHALPY_BC= FLOW_MARKERS` (default) uses the inlet temperature instead (code). | Set the temperature in `MARKER_INLET`, or use `FLAME_ENTHALPY_BC= SPECIES_MARKERS`. | +| SU2 stops with an unknown option `FLAMELET_ENTHALPY_BC`. | Wrong option name, from an older page (code). | Use `FLAME_ENTHALPY_BC`. | +| Many table misses; the temperature jumps. | Controlling variables outside the table, often an enthalpy below the table range at cold walls (advice). | Check the wall and inlet temperatures. Extend the table to lower enthalpy ([diffusion flame tutorial](/tutorials/Inc_Laminar_Diffusion_Flame/)). | +| SU2 stops: "Dual-time stepping with species-dependent variable density does not support MGLEVEL > 0". | Multigrid in an unsteady mixture run (code). | Set `MGLEVEL= 0`. | + +## Related tutorials and test cases + +Tutorials: + +- [Species Transport](/tutorials/Inc_Species_Transport/): mixing in a venturi, species options and output. +- [Composition-Dependent model for Species Transport](/tutorials/Inc_Species_Transport_Composition_Dependent_Model/): `FLUID_MIXTURE`, Lewis number models, `BOUNDED_SCALAR`. +- [Wind velocity and pollutant dispersion in a city](/tutorials/Inc_Urban_City/): smoke as a species, with a source term set from the Python wrapper. +- [Incompressible, Laminar Combustion Simulation](/tutorials/Inc_Combustion/): premixed hydrogen flame with neural networks, preferential diffusion and spark ignition. +- [Incompressible, Laminar counterflow diffusion flame](/tutorials/Inc_Laminar_Diffusion_Flame/): mixture fraction and enthalpy, `FLAME_ENTHALPY_BC`. + +Test cases: + +- [`species_transport/venturi_primitive_3species`](https://github.com/su2code/SU2/blob/develop/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel.cfg): mixing, with variants for `BOUNDED_SCALAR`, Wilke viscosity mixing, wall species fluxes and inlet files. +- [`species_transport/passive_transport_validation/passive_transport.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/species_transport/passive_transport_validation/passive_transport.cfg): passive scalar with strong boundary conditions. +- [`species_transport/multizone/configMaster.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/species_transport/multizone/configMaster.cfg): species across two fluid zones. +- [`flamelet/01_laminar_premixed_ch4_flame_cfd`](https://github.com/su2code/SU2/blob/develop/TestCases/flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg): the flamelet start config. +- [`flamelet/03_laminar_premixed_ch4_flame_cht_cfd`](https://github.com/su2code/SU2/blob/develop/TestCases/flamelet/03_laminar_premixed_ch4_flame_cht_cfd/lam_prem_ch4_cht_cfd_master.cfg): flame with conjugate heat transfer. +- [`flamelet/05_laminar_premixed_ch4_flame_cfd_axi`](https://github.com/su2code/SU2/blob/develop/TestCases/flamelet/05_laminar_premixed_ch4_flame_cfd_axi/lam_prem_ch4_cfd_axi.cfg): axisymmetric flame. +- [`flamelet/06_laminar_partial_premixed_ch4_flame_cfd`](https://github.com/su2code/SU2/blob/develop/TestCases/flamelet/06_laminar_partial_premixed_ch4_flame_cfd/lam_partial_prem_ch4_cfd.cfg): partially premixed flame with a 3D table and mixture fraction. +- [`flamelet/07_laminar_premixed_h2_flame_cfd`](https://github.com/su2code/SU2/blob/develop/TestCases/flamelet/07_laminar_premixed_h2_flame_cfd/laminar_premixed_h2_flame_cfd.cfg): hydrogen flame with neural networks. +- [`flamelet/08_flame_init_method/flamelet_initialization.py`](https://github.com/su2code/SU2/blob/develop/TestCases/flamelet/08_flame_init_method/flamelet_initialization.py): flame front and spark ignition. +- [`flamelet/09_laminar_premixed_ch4_flame_unsteady`](https://github.com/su2code/SU2/blob/develop/TestCases/flamelet/09_laminar_premixed_ch4_flame_unsteady/lam_prem_ch4_unsteady.cfg): unsteady flame. + +User guide pages: [Theory: Species Transport and Combustion](../Theory/#species-transport), [Convective Schemes](../Convective-Schemes/), [Markers and BC](../Markers-and-BC/), [Custom Output](../Custom-Output/). + +Last checked against SU2 develop `11c177b904`. diff --git a/_docs_v7/Setup-Guide-Transition.md b/_docs_v7/Setup-Guide-Transition.md new file mode 100644 index 00000000..828ab711 --- /dev/null +++ b/_docs_v7/Setup-Guide-Transition.md @@ -0,0 +1,293 @@ +--- +title: "Setup Guide: Laminar-Turbulent Transition" +permalink: /docs_v7/Setup-Guide-Transition/ +--- + +> **Draft.** The settings below come from the SU2 code, the tutorials and the test cases. The advice parts need a review by experienced users. + +**Source tags.** A tag at the end of a statement says where it comes from. A tag on the line that introduces a list or a table covers the whole list or table. + +- **(code)**: read in the SU2 source. Option defaults come from `Common/src/CConfig.cpp`. +- **(test case)**: used in a test case config. +- **(tutorial)**: used in a tutorial. +- **(docs)**: stated in another page of this website. +- **(advice)**: general CFD practice. +- **(to be reviewed)**: added after any of the above when the statement needs a check by an experienced user. + +--- + +- [When to use this guide](#when-to-use-this-guide) +- [Start from](#start-from) +- [Settings that matter](#settings-that-matter) +- [Check convergence and results](#check-convergence-and-results) +- [Common problems](#common-problems) +- [Related tutorials and test cases](#related-tutorials-and-test-cases) + +--- + +## When to use this guide + +A standard RANS run treats the boundary layer as turbulent from the leading edge. A transition model lets the boundary layer start laminar and become turbulent further downstream. The model damps the production of turbulence until a transition criterion is met (tutorial). + +Use a transition model when laminar flow covers a large part of the surface, for example (advice): + +- airfoils and blades at Reynolds numbers from about 10^5 to a few 10^6, +- wind turbine blades, gliders, natural laminar flow wings, +- cases with laminar separation bubbles. + +In these cases, a fully turbulent run over-predicts the skin friction drag and misses laminar separation (advice). + +Limits of the Langtry-Menter (LM) model in SU2 (tutorial): + +- It is built from subsonic experiments: transition caused by Tollmien-Schlichting waves, by free-stream turbulence ("bypass" transition) and by laminar separation. +- It does not predict crossflow transition (except through the `LM2015` option, see below), nor supersonic and hypersonic transition mechanisms. + +For the RANS settings that are not specific to transition, see [Setup Guide: Steady RANS for External Aerodynamics](../Setup-Guide-RANS-External-Aero/). + +## Start from + +This config comes from the E387 airfoil tutorial with SA and LM: `compressible_flow/Transitional_Airfoil/Langtry_and_Menter/E387/transitional_SA_LM_model_ConfigFile.cfg` in the [Tutorials repository](https://github.com/su2code/Tutorials/tree/develop/compressible_flow/Transitional_Airfoil/Langtry_and_Menter/E387). The SU2 tutorial regression tests run it. +We removed the output file name options and `JST_SENSOR_COEFF` (it has no effect with `ROE`). All other values are unchanged. + +``` +% ------------- Problem ------------------------------------------------% +SOLVER= RANS +KIND_TURB_MODEL= SA +KIND_TRANS_MODEL= LM +FREESTREAM_TURBULENCEINTENSITY= 0.001 +MATH_PROBLEM= DIRECT +RESTART_SOL= NO +% +% ------------- Free stream --------------------------------------------% +MACH_NUMBER= 0.06 +AOA= 2 +FREESTREAM_TEMPERATURE= 288.15 +REYNOLDS_NUMBER= 200000.0 +REYNOLDS_LENGTH= 1.0 +REF_ORIGIN_MOMENT_X= 0.25 +REF_ORIGIN_MOMENT_Y= 0.00 +REF_ORIGIN_MOMENT_Z= 0.00 +REF_LENGTH= 1.0 +REF_AREA= 0 +REF_DIMENSIONALIZATION= FREESTREAM_VEL_EQ_MACH +% +% ------------- Boundary conditions ------------------------------------% +MARKER_HEATFLUX= ( Airfoil, 0.0 ) +MARKER_FAR= ( Farfield ) +MARKER_PLOTTING= ( Airfoil ) +MARKER_MONITORING= ( Airfoil ) +% +% ------------- Numerics -----------------------------------------------% +NUM_METHOD_GRAD= GREEN_GAUSS +CFL_NUMBER= 1 +CFL_ADAPT= YES +CFL_ADAPT_PARAM= ( 0.1, 2.0, 40.0, 1e10, 0.001 ) +ITER= 100000 +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= LU_SGS +LINEAR_SOLVER_ERROR= 1E-6 +LINEAR_SOLVER_ITER= 5 +CONV_NUM_METHOD_FLOW= ROE +USE_VECTORIZATION= NO +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= VENKATAKRISHNAN +VENKAT_LIMITER_COEFF= 0.05 +LIMITER_ITER= 99999 +TIME_DISCRE_FLOW= EULER_IMPLICIT +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +MUSCL_TURB= NO +SLOPE_LIMITER_TURB= NONE +TIME_DISCRE_TURB= EULER_IMPLICIT +CFL_REDUCTION_TURB= 1.0 +% +% ------------- Convergence --------------------------------------------% +CONV_FIELD= ( RMS_DENSITY ) +CONV_RESIDUAL_MINVAL= -13 +CONV_STARTITER= 500 +% +% ------------- Input and output ---------------------------------------% +MESH_FILENAME= ogrid_e387.su2 +MESH_FORMAT= SU2 +OUTPUT_FILES= (RESTART, PARAVIEW, SURFACE_PARAVIEW) +WRT_FORCES_BREAKDOWN= YES +VOLUME_OUTPUT= (COORDINATES, SOLUTION, PRIMITIVE, RESIDUAL) +HISTORY_OUTPUT= (ITER, LINSOL, RMS_RES, MAX_RES, AERO_COEFF, CFL_NUMBER) +OUTPUT_WRT_FREQ= 500 +SCREEN_WRT_FREQ_INNER= 10 +SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_DENSITY, RMS_INTERMITTENCY, RMS_RE_THETA_T, LIFT, DRAG, LINSOL_ITER_TRANS, LINSOL_RESIDUAL_TRANS) +WRT_PERFORMANCE= YES +``` + +The same tutorial folder has an SST version, `transitional_SST_LM_model_ConfigFile.cfg`. It differs in three lines (tutorial): + +``` +KIND_TURB_MODEL= SST +SST_OPTIONS= V1994m +MUSCL_TURB= YES +``` + +## Settings that matter + +### Turn on the LM model + +- `KIND_TRANS_MODEL= LM` turns on the Langtry-Menter model. `NONE` (the default) and `LM` are the only values (code). +- LM needs a turbulence model. With `KIND_TURB_MODEL= NONE`, SU2 stops with an error (code). +- LM adds two transport equations (code): + - the intermittency, gamma: 0 where the boundary layer is laminar, 1 where it is turbulent; + - the transition onset Reynolds number, Re_theta_t: a Reynolds number based on the momentum thickness, at which transition starts. +- The model uses gamma to damp the production term of the turbulence model (tutorial). + +### Base turbulence model: SST or SA + +Develop supports LM with both SST and SA (code, docs). The two couplings differ in how they get the turbulence intensity Tu. Tu drives the transition correlations, the empirical formulas that predict where transition starts: + +| | `KIND_TURB_MODEL= SST` | `KIND_TURB_MODEL= SA` | +| --- | --- | --- | +| Turbulence intensity used by LM | Local value from k: Tu = 100·sqrt(2k/3)/U, not below 0.027 % (code) | `FREESTREAM_TURBULENCEINTENSITY` everywhere (code) | +| Default correlation | `MENTER_LANGTRY` (code) | `MALAN` (code) | +| Tutorials | T3A and T3A- flat plates, E387 airfoil (tutorial) | E387 airfoil (tutorial) | + +What this means (advice, to be reviewed): + +- With SST, the intensity at the body depends on how much k decays on its way from the far field. You control it with `FREESTREAM_TURBULENCEINTENSITY` and `FREESTREAM_TURB2LAMVISCRATIO`. +- With SA, there is no decay in the correlation. Set `FREESTREAM_TURBULENCEINTENSITY` to the intensity you expect at the leading edge. + +The original LM model was published with SST (advice). + +More transition variants are in open pull requests. + +### LM_OPTIONS + +`LM_OPTIONS` takes a list. With an empty list, SU2 runs the 2009 version of the model with the default correlation of the base turbulence model (code). + +**Version.** + +- `LM2015` adds a correction for stationary crossflow instabilities (docs). It works in 3D only; in 2D SU2 stops with an error (code). +- `LM2015` uses the surface roughness `HROUGHNESS` (RMS roughness height, default `1e-6`) (code, docs). The code divides it by a momentum thickness, so give it in the same length unit as the mesh (code, to be reviewed). + +**Correlation.** The correlation computes the transition onset Reynolds number. Choose at most one; two or more stop SU2 with an error (code). + +| Value | Notes | +| --- | --- | +| `MENTER_LANGTRY` | Default with SST (code). | +| `MALAN` | Default with SA (code, docs). | +| `SULUKSNA` | Use with SST only (docs). | +| `KRAUSE`, `KRAUSE_HYPER` | Meant for hypersonic flows. The docs say their implementation is unclear because of inconsistencies in the literature (docs). | +| `MEDIDA_BAEDER` | Designed for SA. Has problems with separation-induced transition (docs). | +| `DEFAULT` | Same as leaving the correlation out (code). | + +Some pages also list `MEDIDA`. The develop code does not accept it as a keyword (code). + +Keep the default correlation unless you have a reason to change it, for example a validation for your type of flow (advice). + +Example: `LM_OPTIONS= LM2015, MENTER_LANGTRY` (docs). + +### Free-stream turbulence intensity and viscosity ratio + +The free-stream turbulence intensity is the main input of the transition correlations (tutorial). + +- `FREESTREAM_TURBULENCEINTENSITY` is a fraction, not a percentage: `0.001` means 0.1 %. SU2 multiplies it by 100 inside the correlations (code). +- The default is `0.05` (5 %) (code). This is high for most external flows (docs). +- SU2 computes the far-field value of Re_theta_t from this intensity with the Langtry-Menter correlation (code). +- `FREESTREAM_INTERMITTENCY` has no effect on LM: SU2 prints it, but the far-field intermittency is fixed at 1 (code). + +**With SST.** + +- SU2 builds the far-field k from the intensity, and omega from `FREESTREAM_TURB2LAMVISCRATIO` (eddy viscosity over laminar viscosity, default `10.0`) (code). +- k decays between the far field and the body. A larger viscosity ratio gives a slower decay (advice, to be reviewed). +- The T3A tutorial sets `FREESTREAM_TURBULENCEINTENSITY= 0.05855` and `FREESTREAM_TURB2LAMVISCRATIO= 11.9` at the inflow (tutorial). +- Check the intensity just upstream of the body. Compute it from the `TKE` output field: Tu = sqrt(2k/3)/U (advice). +- `SST_OPTIONS= SUSTAINING` and `TURB_FIXED_VALUES= YES` stop the decay of k (docs, code). No transition test case uses them with LM (to be reviewed). + +**With SA.** + +- `FREESTREAM_TURB2LAMVISCRATIO` is not used. The free-stream SA variable comes from `FREESTREAM_NU_FACTOR` (default `3.0`) (code, docs). +- The E387 tutorial uses `FREESTREAM_TURBULENCEINTENSITY= 0.001` (0.1 %) (tutorial). + +### Mesh + +General points for the mesh of an LM run (advice, to be reviewed): + +- First-cell y+ about 1 or below, all along the walls. Do not use wall functions. +- A smooth wall-normal growth in the boundary layer, with a growth ratio near 1.1. +- Enough points along the wall where transition or a laminar separation bubble is expected. The transition location moves on meshes that are too coarse in this direction. +- Check the transition location on at least two meshes. Transition models are more sensitive to the mesh than fully turbulent RANS. + +### Numerics + +- The transition equations use the settings of the turbulence equations: `CONV_NUM_METHOD_TURB`, `MUSCL_TURB`, `SLOPE_LIMITER_TURB` and `TIME_DISCRE_TURB` (code). +- The tutorials use `ROE` with MUSCL and `VENKATAKRISHNAN` (E387), and `L2ROE` with MUSCL (T3A) for the flow (tutorial). `L2ROE` is a Roe scheme with low dissipation at low Mach number (docs). +- Both E387 configs start at `CFL_NUMBER= 1` with `CFL_ADAPT= YES` and use `LU_SGS` (tutorial). +- Transition cases often run at low Mach numbers (0.06 for E387, 0.2 for T3A) (tutorial). The compressible solver converges more slowly at very low Mach numbers (advice, to be reviewed). +- Add `RMS_INTERMITTENCY`, `RMS_RE_THETA_T`, `LINSOL_ITER_TRANS` and `LINSOL_RESIDUAL_TRANS` to `SCREEN_OUTPUT` to follow the transition equations (tutorial, code). + +### The algebraic BC model: a lighter option with SA + +Develop also has an algebraic transition model for SA, the Bas-Cakmakcioglu (BC) model: `KIND_TURB_MODEL= SA` with `SA_OPTIONS= BCM` (tutorial, code). + +- It adds no transport equation. It damps the SA production term until a local criterion is met (tutorial). +- It also uses `FREESTREAM_TURBULENCEINTENSITY` as a fraction (code). The tutorial uses `0.0018` for 0.18 % (tutorial). +- Do not combine `BCM` with other SA options. SU2 stops with an error unless you add `EXPERIMENTAL` (code). +- The old option `KIND_TRANS_MODEL= BC` is removed. SU2 stops with a message that points to `SA_OPTIONS= BCM` (code). +- Add the `INTERMITTENCY` group to `VOLUME_OUTPUT` to write its intermittency (code). +- See the tutorial [Transitional Flat Plate](/tutorials/Transitional_Flat_Plate/). + +## Check convergence and results + +**Convergence.** + +- Residuals: `RMS_DENSITY`, the turbulence residuals, `RMS_INTERMITTENCY` and `RMS_RE_THETA_T` (code). +- Lift and drag must be flat at the end (advice). +- The transition location must stop moving. Compare the skin friction plots of the last saved solutions (advice). + +**Where transition happens.** The default output groups `SOLUTION` and `PRIMITIVE` contain the fields below (code). + +| Field | Group | What to look for | +| --- | --- | --- | +| `SKIN_FRICTION-X` (surface) | `PRIMITIVE` | Low in the laminar part, then a sharp rise at transition. Negative values mark a laminar separation bubble (advice). | +| `INTERMITTENCY` | `SOLUTION` | Transported intermittency: 0 laminar, 1 turbulent (code). | +| `INTERMITTENCY_EFF` | `PRIMITIVE` | Effective intermittency that multiplies the production term. It can exceed 1 in separated regions (advice, to be reviewed). | +| `INTERMITTENCY_SEP` | `PRIMITIVE` | Extra intermittency for separation-induced transition (advice, to be reviewed). | +| `RE_THETA_T` | `SOLUTION` | Transported transition onset Reynolds number (code). | +| `EDDY_VISCOSITY` | `PRIMITIVE` | Rises where the boundary layer becomes turbulent (advice). | +| `TURB_INDEX` | `PRIMITIVE` | Turbulence index on wall nodes: near 0 laminar, near 1 turbulent. Use it only as a rough indicator (code, to be reviewed). | + +Plot `SKIN_FRICTION-X` from the surface output (`SURFACE_PARAVIEW` or `SURFACE_CSV` in `OUTPUT_FILES`) along the wall, and compare it with experiments. The T3A tutorial compares it with ERCOFTAC data as a function of the local Reynolds number (tutorial). + +See the [Output Fields Reference](../Output-Fields-Reference/). + +## Common problems + +| Symptom | Likely cause | What to try | +| --- | --- | --- | +| The boundary layer is turbulent from the leading edge. | Turbulence intensity too high; or given in percent (for example `3.0` instead of `0.03`). | Give `FREESTREAM_TURBULENCEINTENSITY` as a fraction (code). Check the intensity near the body (advice). | +| Transition happens too late, or not at all. | With SST, k has decayed to a very low value before the body. Or the mesh is too coarse at the wall. | Check Tu near the leading edge from `TKE`; adjust `FREESTREAM_TURB2LAMVISCRATIO` (advice, to be reviewed). Check y+ (advice). | +| The transition location moves when you refine the mesh. | Too few points along the wall in the transition region. | Refine along the wall (advice). | +| The residuals stall or oscillate. | A laminar separation bubble that is unsteady, or a CFL that is too high. | Start at a low CFL with `CFL_ADAPT= YES` (tutorial). If the bubble is unsteady, run time-accurate, see [Setup Guide: Unsteady Flows and DES](../Setup-Guide-Unsteady-DES/) (advice, to be reviewed). | +| SU2 stops: "LM2015 is available only for 3D problems". | `LM2015` in a 2D case. | Remove `LM2015` (code). | +| SU2 stops: "Two correlations selected for LM_OPTIONS". | More than one correlation in `LM_OPTIONS`. | Keep one (code). | +| SU2 stops: "KIND_TURB_MODEL cannot be NONE to use a transition model". | No base turbulence model. | Set `KIND_TURB_MODEL= SST` or `SA` (code). | +| SU2 stops: "Option KIND_TRANS_MODEL=BC is deprecated". | Old config. | Use `KIND_TURB_MODEL= SA` with `SA_OPTIONS= BCM` (code). | +| Changing `FREESTREAM_INTERMITTENCY` does nothing. | The option is not used by the solver. | Leave it out (code). | +| An old config stops with "invalid option name" for `EXT_ITER`. | `EXT_ITER` was replaced. | Use `ITER` for steady runs (code). | + +## Related tutorials and test cases + +Tutorials: + +- [Transitional Flat Plate for T3A and T3A-](/tutorials/Transitional_Flat_Plate_T3A/): SST with LM, comparison with ERCOFTAC skin friction data. +- [Transitional Flat Plate](/tutorials/Transitional_Flat_Plate/): SA with the BC model (`SA_OPTIONS= BCM`), Schubauer and Klebanoff flat plate. +- E387 airfoil with LM, SA and SST versions: [Tutorials repository folder](https://github.com/su2code/Tutorials/tree/develop/compressible_flow/Transitional_Airfoil/Langtry_and_Menter/E387) (no tutorial page yet). + +Test cases (develop branch): + +- [transition/Schubauer_Klebanoff/transitional_BC_model_ConfigFile.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/transition/Schubauer_Klebanoff/transitional_BC_model_ConfigFile.cfg): BC model, incompressible, regression test. +- [rans/s809/trans_s809.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/rans/s809/trans_s809.cfg): S809 airfoil with SA and LM. This config is older and is not in the regression tests. It uses options that develop no longer accepts: `EXT_ITER` (replace it with `ITER`), `SOLUTION_LIN_FILENAME`, `RESTART_LIN_FILENAME` and `SURFACE_LIN_FILENAME` (delete them) (code). Its `FREESTREAM_INTERMITTENCY` line has no effect (code). + +User guide pages: + +- [Physical Definition: Transition Models](../Physical-Definition/#transition-models) and [Turbulence Models](../Physical-Definition/#turbulence-models). +- [Governing Equations](../Theory/), [Convective Schemes](../Convective-Schemes/), [History and Solution Output](../Custom-Output/). +- All options: [Option Reference](../Option-Reference/). All output fields: [Output Fields Reference](../Output-Fields-Reference/). + +Last checked against SU2 develop `11c177b904`. diff --git a/_docs_v7/Setup-Guide-Turbomachinery.md b/_docs_v7/Setup-Guide-Turbomachinery.md new file mode 100644 index 00000000..19b55743 --- /dev/null +++ b/_docs_v7/Setup-Guide-Turbomachinery.md @@ -0,0 +1,316 @@ +--- +title: "Setup Guide: Turbomachinery" +permalink: /docs_v7/Setup-Guide-Turbomachinery/ +--- + +> **Draft.** The settings below come from the SU2 code, the tutorials and the test cases. The advice parts need a review by experienced users. + +**Source tags.** A tag at the end of a statement says where it comes from. A tag on the line that introduces a list or a table covers the whole list or table. + +- **(code)**: read in the SU2 source. Option defaults come from `Common/src/CConfig.cpp`. +- **(test case)**: used in a test case config. +- **(tutorial)**: used in a tutorial. +- **(docs)**: stated in another page of this website. +- **(advice)**: general CFD practice. +- **(to be reviewed)**: added after any of the above when the statement needs a check by an experienced user. + +--- + +- [When to use this guide](#when-to-use-this-guide) +- [Start from](#start-from) +- [Settings that matter](#settings-that-matter) +- [Check convergence and results](#check-convergence-and-results) +- [Common problems](#common-problems) +- [Related tutorials and test cases](#related-tutorials-and-test-cases) + +--- + +## When to use this guide + +Use this guide to set up a steady simulation of a blade row, or of a machine with several blade rows: compressors, turbines, stages of axial or radial machines, and linear cascades. The guide covers the turbomachinery features of the compressible solvers (`SOLVER= EULER`, `NAVIER_STOKES` or `RANS`). + +Terms used below: + +- **Blade row** (or zone): the mesh of one blade passage of one row, for example a stator or a rotor. +- **Mixing plane**: an interface between two rows that passes averaged flow values from one row to the next. It makes a steady stage simulation possible. +- **Span-wise section**: a band at constant height between hub and shroud. SU2 averages the flow on each band of an inlet, outlet or mixing plane. +- **Non-reflecting boundary**: a boundary that lets pressure waves leave the domain instead of bouncing back. + +## Start from + +The block below comes from the regression test [turbomachinery/axial_stage_2D](https://github.com/su2code/SU2/blob/develop/TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg). It is a 2D axial stage (a stator and a moving row) with a mixing plane, Giles boundaries and the SST model. We removed the comments, the options that the test sets to their default value, and most output settings. We also removed the options that have no effect in this setup, for example limiter settings of schemes that do not use a limiter. The mesh file `mesh_axial_stage_2d_turb.su2` is in the [TestCases repository](https://github.com/su2code/TestCases). + +Main file, `Axial_stage2D.cfg`: + +``` +MULTIZONE= YES +CONFIG_LIST= (zone_1.cfg, zone_2.cfg) +% +SOLVER= RANS +KIND_TURB_MODEL= SST +MATH_PROBLEM= DIRECT +RESTART_SOL= NO +% +MACH_NUMBER= 0.05 +FREESTREAM_PRESSURE= 140000.0 +FREESTREAM_TEMPERATURE= 300.0 +FREESTREAM_OPTION= TEMPERATURE_FS +FREESTREAM_TURBULENCEINTENSITY= 0.03 +FREESTREAM_TURB2LAMVISCRATIO= 100.0 +INIT_OPTION= TD_CONDITIONS +REF_DIMENSIONALIZATION= DIMENSIONAL +% +FLUID_MODEL= IDEAL_GAS +GAMMA_VALUE= 1.4 +GAS_CONSTANT= 287.058 +VISCOSITY_MODEL= SUTHERLAND +MU_REF= 1.716E-5 +MU_T_REF= 273.15 +SUTHERLAND_CONSTANT= 110.4 +CONDUCTIVITY_MODEL= CONSTANT_PRANDTL +% +MARKER_HEATFLUX= (wall1, 0.0, wall2, 0.0) +MARKER_PERIODIC= (periodic1, periodic2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.04463756775, 0.0, periodic3, periodic4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.04463756775, 0.0) +% +MARKER_TURBOMACHINERY= (inflow, outmix, inmix, outflow) +MARKER_ANALYZE= (outflow) +MARKER_ZONE_INTERFACE= (outmix, inmix) +MARKER_MIXINGPLANE_INTERFACE= (outmix, inmix) +MARKER_GILES= (inflow, TOTAL_CONDITIONS_PT, 169623.33, 305.76, 1.0, 0.0, 0.0, 1.0, 1.0, outmix, MIXING_OUT, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, inmix, MIXING_IN, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, outflow, STATIC_PRESSURE, 99741.00, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0) +SPATIAL_FOURIER= NO +TURBOMACHINERY_KIND= AXIAL AXIAL +TURBO_PERF_KIND= TURBINE TURBINE +TURBULENT_MIXINGPLANE= YES +AVERAGE_PROCESS_KIND= MIXEDOUT +PERFORMANCE_AVERAGE_PROCESS_KIND= MIXEDOUT +MIXEDOUT_COEFF= (1.0, 1.0E-05, 15) +AVERAGE_MACH_LIMIT= 0.05 +% +NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES +CFL_NUMBER= 10.0 +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= LU_SGS +LINEAR_SOLVER_ERROR= 1E-4 +LINEAR_SOLVER_ITER= 10 +CONV_NUM_METHOD_FLOW= ROE +MUSCL_FLOW= YES +RAMP_MUSCL= YES +RAMP_MUSCL_COEFF= (0.0, 1.0, 20.0) +SLOPE_LIMITER_FLOW= VAN_ALBADA_EDGE +ENTROPY_FIX_COEFF= 0.01 +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +MUSCL_TURB= NO +% +% The test stops after 21 outer iterations. Raise OUTER_ITER for a converged result. +OUTER_ITER= 21 +CONV_RESIDUAL_MINVAL= -16 +CONV_STARTITER= 10 +SCREEN_OUTPUT= OUTER_ITER, AVG_BGS_RES[0], AVG_BGS_RES[1], RMS_DENSITY[0], RMS_ENERGY[0], RMS_DENSITY[1], RMS_ENERGY[1], SURFACE_TOTAL_PRESSURE[1], MassFlowOut_2[1], TotalStaticEfficiency[1] +MESH_FILENAME= mesh_axial_stage_2d_turb.su2 +MESH_FORMAT= SU2 +OUTPUT_WRT_FREQ= 1000 +``` + +Zone file of the fixed row, `zone_1.cfg`: + +``` +GRID_MOVEMENT= NONE +``` + +Zone file of the moving row, `zone_2.cfg`. In 2D the rotor is a row that translates along y: + +``` +GRID_MOVEMENT= STEADY_TRANSLATION +MACH_MOTION= 0.35 +TRANSLATION_RATE= 0.0 -150.0 0.0 +``` + +For a 3D machine, start from the [Aachen turbine tutorial](/tutorials/Aachen_Turbine/) or from the test case [turbomachinery/Aachen_turbine](https://github.com/su2code/SU2/blob/develop/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg). That case restarts from a solution file (`RESTART_SOL= YES`). Set `RESTART_SOL= NO` to start from scratch. + +## Settings that matter + +### Mesh and machine axis + +- The machine axis must be the z-axis, and the flow should go in the positive z direction (tutorial). The code computes the radius as the distance from the z-axis when it builds the span-wise sections. The rotation ramp changes only the z component of `ROTATION_RATE` (code). +- Mesh one blade passage per row, and connect its sides with `MARKER_PERIODIC` (tutorial). For a rotational periodicity, give the rotation centre and the rotation angle about each axis, in degrees. The Aachen case has 41 blades per row and uses an angle of 360/41 = 8.7804878 about z (test case). +- In 3D, list the periodic pairs in `MARKER_PERIODIC` in zone order: the first pair for zone 1, the second pair for zone 2, and so on. The code that finds the span-wise sections of zone *n* looks at the *n*-th periodic pair (code, to be reviewed). All 3D test cases follow this order (test case). + +### Single row or several rows + +- **One row.** Use a single config file. Even with one row, you need `MARKER_TURBOMACHINERY= (inlet, outlet)` to use Giles boundaries or turbomachinery outputs (code). Example: [transonic_stator_2D](https://github.com/su2code/SU2/blob/develop/TestCases/turbomachinery/transonic_stator_2D/transonic_stator_restart.cfg) (test case). +- **Several rows.** Put each row in its own zone. Set `MULTIZONE= YES` and list one sub-config file per zone in `CONFIG_LIST`, in stream-wise order (tutorial). A sub-config file holds only the options that differ from the main file, usually the grid motion. See [Basics of Multi-Zone Computations](../Multizone/). +- In multizone runs, `OUTER_ITER` sets the number of iterations. `INNER_ITER` (default 1) is the number of iterations of each zone per outer iteration (code). + +### Rotating frame or moving mesh + +Choose the motion of each zone with `GRID_MOVEMENT` in its sub-config file (code): + +- `ROTATING_FRAME`: the mesh does not move. SU2 solves the flow in a frame that turns with the rotor. Use it for steady simulations of rotors (tutorial). Set `ROTATION_RATE` (rad/s, vector), `MOTION_ORIGIN` and `MACH_MOTION`. +- `STEADY_TRANSLATION`: the 2D version of the above, for a row that moves along a straight line. Set `TRANSLATION_RATE` (m/s) (test case). +- `RIGID_MOTION`: the mesh really moves. This needs a time-accurate simulation (`TIME_DOMAIN= YES`) and sliding interfaces between zones (`MARKER_FLUID_INTERFACE`). See the [sliding_interface](https://github.com/su2code/SU2/tree/develop/TestCases/sliding_interface) test cases (test case). This guide does not cover unsteady rotor-stator runs. +- `NONE`: no motion, for stators. + +`MACH_MOTION` is a Mach number based on the speed of the moving mesh. The [multizone page](../Multizone/) says that SU2 uses it to initialize a viscous flow from the Reynolds number, and to compute force coefficients on moving meshes (docs). The test cases use 0.35 (test case). + +The Aachen and APU turbocharger test cases set `GRID_MOVEMENT= ROTATING_FRAME` without a rotation rate in the stator zones. The 2D axial stage uses `NONE`. Both run (test case). + +Use `MARKER_SHROUD` to list the shroud walls. In a rotating zone, SU2 sets the grid velocity to zero on these markers, so that the shroud does not turn with the rotor (code, tutorial). + +### Interfaces between rows + +Every interface between two zones needs two lists. Give the markers in pairs (upstream marker, downstream marker), in stream-wise order (tutorial): + +- `MARKER_ZONE_INTERFACE` tells SU2 that the two markers are connected. +- One of these two options sets the kind of interface (code): + - `MARKER_MIXINGPLANE_INTERFACE`: mixing plane. SU2 passes averaged values for each span-wise section from one row to the next. + - `MARKER_FLUID_INTERFACE`: frozen rotor. SU2 interpolates the local values, with no averaging (to be reviewed). The test case [multi_interface](https://github.com/su2code/SU2/blob/develop/TestCases/turbomachinery/multi_interface/multi_interface_rst.cfg) uses one interface of each kind (test case). + +Mixing-plane options: + +- `MIXINGPLANE_INTERFACE_KIND` sets how SU2 maps the span-wise sections of one side onto the other: `NEAREST_SPAN` (default), `LINEAR_INTERPOLATION` or `MATCHING` (code). The test cases use `LINEAR_INTERPOLATION` (test case). `MATCHING` probably needs the same span-wise sections on both sides (to be reviewed). +- `TURBULENT_MIXINGPLANE= YES` also passes the turbulence variables across the mixing plane. The default is `NO` (code). All turbulent test cases set `YES` (test case). +- On the mixing-plane markers, also set a Giles condition: `MIXING_OUT` on the upstream side and `MIXING_IN` on the downstream side (tutorial). + +### Turbomachinery markers + +- `MARKER_TURBOMACHINERY`: the inlet and the outlet marker of every zone, zone by zone, in stream-wise order: (inlet zone 1, outlet zone 1, inlet zone 2, outlet zone 2, ...) (tutorial). +- `TURBOMACHINERY_KIND`: the shape of each row, one entry per zone: `AXIAL`, `CENTRIFUGAL`, `CENTRIPETAL`, `CENTRIPETAL_AXIAL` or `AXIAL_CENTRIFUGAL`. SU2 uses it to decide which coordinate measures the span (code). Example: the radial turbine of the APU turbocharger test uses `CENTRIPETAL CENTRIPETAL_AXIAL` (test case). +- `TURBO_PERF_KIND`: the kind of machine for the performance outputs, one entry per zone: `TURBINE`, `COMPRESSOR` or `PROPELLOR`. SU2 stops with "Insufficient TURBO_PERF_KIND options" if there are fewer entries than zones (code). +- `MARKER_ANALYZE`: markers where SU2 writes surface-averaged values such as `SURFACE_TOTAL_PRESSURE` (tutorial). `MARKER_ANALYZE_AVERAGE` chooses `AREA` or `MASSFLUX` (default) averaging for these outputs (code). + +### Inlet and outlet boundaries: Giles or Riemann + +Both conditions are based on characteristics, that is, on the waves that enter and leave the domain. They work with any fluid model. The plain `MARKER_INLET` and `MARKER_OUTLET` work only with ideal gases (code). + +**`MARKER_GILES`** is the non-reflecting condition for turbomachinery (tutorial). + +- It works only together with `MARKER_TURBOMACHINERY`. Without it, SU2 stops with "Giles Boundary conditions can only be used with turbomachinery markers" (code). +- Format, 9 values per marker: (marker, kind, value 1, value 2, direction 1, direction 2, direction 3, average relaxation, Fourier relaxation) (tutorial). +- The last two values under-relax the update of the averaged state and of the Fourier modes: SU2 applies only this fraction of each update. The test cases use 1.0 in 2D. On most boundaries of the 3D Aachen case they use 0.3 (average) and 0.0 (Fourier) (test case). +- `SPATIAL_FOURIER= YES` makes the condition non-reflecting for the circumferential waves too. With `NO` (default), it acts as a 1D characteristic condition (code). The Aachen tutorial keeps it off (tutorial). +- `GILES_EXTRA_RELAXFACTOR` = (relaxation factor, span fraction) adds extra under-relaxation near hub and shroud in 3D. The default is (0.1, 0.1). SU2 limits the span fraction to 0.5 (code). The Aachen case uses (0.05, 0.05) (test case). + +Kinds of Giles boundary (code): + +| Kind | Use | Values | +|---|---|---| +| `TOTAL_CONDITIONS_PT` | inlet | total pressure, total temperature, flow direction (normal, tangential, span-wise components) | +| `TOTAL_CONDITIONS_PT_1D` | inlet | same, imposed on the average of the whole boundary | +| `STATIC_PRESSURE` | outlet | static pressure, imposed on each span-wise section | +| `STATIC_PRESSURE_1D` | outlet | static pressure, imposed on the average of the whole boundary | +| `RADIAL_EQUILIBRIUM` | outlet (3D) | static pressure at mid-span; SU2 builds the span-wise pressure profile from the radial equilibrium of the averaged flow | +| `MASS_FLOW_OUTLET` | outlet | target mass flow (value 1) and a relaxation factor (value 2) | +| `MIXING_IN`, `MIXING_OUT` | mixing plane | none (write zeros), averages for each span-wise section | +| `MIXING_IN_1D`, `MIXING_OUT_1D` | mixing plane | none, average of the whole boundary | + +The `_1D` kinds impose only the average over the whole boundary, so the span-wise profile is free to develop. The tutorial uses `STATIC_PRESSURE_1D` on an outlet "where the flow is in radial equilibrium" (tutorial). + +**`MARKER_RIEMANN`** is a characteristic condition with 7 values per marker: (marker, kind, value 1, value 2, direction 1, direction 2, direction 3). It accepts these kinds (code): + +- Without turbomachinery markers: `TOTAL_CONDITIONS_PT`, `STATIC_PRESSURE`, `DENSITY_VELOCITY`, `STATIC_SUPERSONIC_INFLOW_PT` and `STATIC_SUPERSONIC_INFLOW_PD`. +- With turbomachinery markers, SU2 uses an averaged version on the finest mesh. It accepts `TOTAL_CONDITIONS_PT`, `STATIC_PRESSURE`, `RADIAL_EQUILIBRIUM`, `MIXING_IN` and `MIXING_OUT`. +- Any other kind stops the run with "Invalid Riemann input!". + +Which one to choose: the turbomachinery test cases and the Aachen tutorial use `MARKER_GILES` (test case, tutorial). Giles boundaries can sit closer to the blades than reflecting ones (advice, to be reviewed). + +### Averaging + +- `AVERAGE_PROCESS_KIND` sets how SU2 averages the flow on Giles boundaries and mixing planes: `ALGEBRAIC`, `AREA` (default), `MASSFLUX` or `MIXEDOUT` (code). The tutorial says that only `MIXEDOUT` makes the mixing plane conservative (tutorial). All test cases use `MIXEDOUT` (test case). +- `PERFORMANCE_AVERAGE_PROCESS_KIND` sets the same for the performance outputs. The default is `AREA` (code). +- `MIXEDOUT_COEFF` = (relaxation factor, tolerance, maximum iterations) of the Newton method for the mixed-out average. The default is (1.0, 1.0E-05, 15) (code). +- `AVERAGE_MACH_LIMIT` (default 0.03): when the Mach number normal to the boundary is below this value, the `MASSFLUX` and `MIXEDOUT` averages fall back to the `AREA` average. This matters at the start of a run, when the flow is still slow. Below this limit SU2 also skips the Fourier part of the Giles condition (code). + +### Span-wise sections (3D) + +SU2 builds the span-wise sections as follows (code): + +- `SPANWISE_KIND= AUTOMATIC` (default): SU2 counts the mesh points along the span where the inlet or outlet meets the periodic boundary, and makes one section per point. This suits meshes with the same span-wise point distribution on both sides of an interface (to be reviewed). +- `SPANWISE_KIND= EQUISPACED`: SU2 makes `NUM_SPANWISE_SECTIONS` sections of equal height between hub and shroud. +- In 2D, SU2 always uses one section. + +### Ramps + +Ramps help when the machine has a high pressure ratio or a high rotation speed (tutorial). A ramp changes a value linearly, from a start value to the final value set in the config file. + +The ramp options (code): + +- `RAMP_MOTION_FRAME= YES` ramps the rotation speed (z component of `ROTATION_RATE`) or, with `STEADY_TRANSLATION`, the y component of `TRANSLATION_RATE`. +- `RAMP_OUTLET= YES` ramps the outlet value of Giles `STATIC_PRESSURE`, `STATIC_PRESSURE_1D`, `RADIAL_EQUILIBRIUM` and `MASS_FLOW_OUTLET` boundaries. The Aachen tutorial text calls this option `RAMP_OUTLET_PRESSURE`, but the option in the code is `RAMP_OUTLET`. +- `RAMP_MOTION_FRAME_COEFF` and `RAMP_OUTLET_COEFF` = (start value, update every N iterations, length of the ramp in iterations). The defaults are (100.0, 1.0, 1000.0) and (100000.0, 1.0, 1000.0). Always set them. + +The test values are `RAMP_MOTION_FRAME_COEFF= (0.0, 39.0, 500)` and `RAMP_OUTLET_COEFF= (140000.0, 150.0, 2000)` (test case). + +Limits of the ramps (code): + +- In multizone runs, the ramp follows the outer iteration. +- The rotation ramp acts only when `MARKER_TURBOMACHINERY` is set. +- The outlet ramp does not work on `MARKER_RIEMANN` outlets. SU2 stops with "Outlet pressure ramp only implemented for NRBC". +- SU2 does not set up these two ramps in discrete adjoint runs. + +`RAMP_MUSCL` is a different ramp: it blends from first-order to second-order space discretization. The 2D stage uses `RAMP_MUSCL_COEFF= (0.0, 1.0, 20.0)` = (start iteration, update every N iterations, ramp length) (test case). + +### Initialization and numerics + +- Use `INIT_OPTION= TD_CONDITIONS` with `FREESTREAM_PRESSURE` and `FREESTREAM_TEMPERATURE` near the inlet state, and a small `MACH_NUMBER` (0.05 in the test cases) (test case). The default `INIT_OPTION= REYNOLDS` recomputes the pressure from the Reynolds number (code), which does not suit internal flows (advice). Check the initial state that SU2 prints before the first iteration (tutorial). +- The test cases use `ROE` with `MUSCL_FLOW= YES` (2D stage, transonic stator) or `JST` (Aachen). Their CFL numbers range from 2 (Aachen) to 50 (transonic stator) (test case). +- SU2 applies the Giles and the averaged Riemann conditions only on the finest mesh (code). Most turbomachinery test cases run without multigrid; the Aachen restart test uses `MGLEVEL= 1` (test case). If a run with multigrid is unstable, try `MGLEVEL= 0` (to be reviewed). +- Wall functions (`MARKER_WALL_FUNCTIONS`) let the Aachen tutorial run on a coarse mesh with high y+ (tutorial). + +### Performance outputs + +- Add `TURBO_PERF` to `HISTORY_OUTPUT` to write the performance values to the history file (test case). +- Values per row carry the row number, starting at 1: `MassFlowIn_1`, `MassFlowOut_1`, `TotalPressureIn_1`, `AbsFlowAngleOut_1`, `KineticEnergyLoss_1`, `TotPressureLoss_1`, ... (code). +- Values for the whole machine: `TotalStaticEfficiency`, `TotalTotalEfficiency`, `PressureRatioTS`, `PressureRatioTT`, `EulerianWork`, `EntropyGeneration`, `KineticEnergyLoss_Stage`, `TotPressureLoss_Stage` (code). +- In multizone runs, these fields belong to the last zone. Write them with the index of the last zone, for example `TotalStaticEfficiency[1]` for two zones (test case). +- Every 100 iterations, SU2 prints a table of the performance of each row and of the machine (code). +- SU2 writes span-wise profiles (`inflow_spanwise_thermodynamic_values*.dat`, `outflow_spanwise_kinematic_values*.dat`, ...) and mixing-plane interpolation details into a folder named `TURBOMACHINERY` (code). SU2 does not create this folder. Create it in the run directory before you start, otherwise these files are not written (to be reviewed). +- `WRT_ZONE_HIST= YES` writes one history file per zone (tutorial). + +The full list of fields is on the [output fields](../Output-Fields-Reference/) page. The options are on the [option reference](../Option-Reference/) page. + +## Check convergence and results + +- **Stop criterion.** Use residuals, for example `CONV_FIELD= RMS_ENERGY[0]` with `CONV_RESIDUAL_MINVAL` (test case). SU2 checks convergence only on residual fields and coefficient fields. The turbomachinery performance fields are neither, so do not put them in `CONV_FIELD`. The `MARKER_ANALYZE` fields, such as `SURFACE_MASSFLOW`, are coefficients and work with the Cauchy criterion (`CONV_CAUCHY_ELEMS`, `CONV_CAUCHY_EPS`) (code). +- **Residuals.** Watch the residuals of every zone (`RMS_DENSITY[0]`, `RMS_DENSITY[1]`, ...) and the coupling residuals (`AVG_BGS_RES[0]`, ...) (test case). +- **Mass flow.** `MassFlowIn_n` and `MassFlowOut_n` of each row should agree, and the outlet of one row should match the inlet of the next (advice). +- **Performance.** Efficiency and pressure ratio should no longer change over the last few hundred iterations (advice). +- **Span-wise profiles.** Compare the profiles in the `TURBOMACHINERY` folder with the values you imposed, for example the outlet pressure (advice). +- **Ramps.** If you used ramps, run well past the end of the ramp before you read the results (advice). + +See [Solver Setup](../Solver-Setup/) for the convergence options. + +## Common problems + +| Symptom | Likely cause | What to try | +|---|---|---| +| SU2 stops: "Giles Boundary conditions can only be used with turbomachinery markers". | `MARKER_TURBOMACHINERY` is missing (code). | Add the inlet and outlet markers of every zone. | +| SU2 stops: "Insufficient TURBO_PERF_KIND options specified with turbomachinery markers". | There are fewer `TURBO_PERF_KIND` entries than zones (code). | Give one entry per zone. Do the same for `TURBOMACHINERY_KIND`. | +| SU2 stops: "Outlet pressure ramp only implemented for NRBC". | `RAMP_OUTLET= YES` with a `MARKER_RIEMANN` static-pressure outlet (code). | Use a Giles outlet, or switch the ramp off. | +| SU2 stops: "Invalid Riemann input!" | A Riemann kind that this boundary does not support (code). | Check the lists in [Inlet and outlet boundaries](#inlet-and-outlet-boundaries-giles-or-riemann). | +| The run diverges in the first iterations. | A large pressure ratio or a high rotation speed at start-up (tutorial). | Use `RAMP_OUTLET` and `RAMP_MOTION_FRAME`, lower `CFL_NUMBER`, start first order and use `RAMP_MUSCL` (advice, to be reviewed). | +| The flow near hub or shroud is unstable in 3D with Giles. | Strong span-wise gradients at the endwalls (advice, to be reviewed). | Lower `GILES_EXTRA_RELAXFACTOR` and the average relaxation factor of the Giles markers, as in the Aachen case (0.05 and 0.3) (test case). | +| Efficiency or mass flow look wrong in the first iterations. | The flow is slow, so the averages use the area average (code). | Wait until the flow develops. Check `AVERAGE_MACH_LIMIT`. | +| The ramp has no effect. | A discrete adjoint run, or no `MARKER_TURBOMACHINERY` for the rotation ramp, or the machine axis is not z (code). | Run the direct solver, with turbomachinery markers and the z-axis as machine axis. | +| Wrong or missing span-wise sections, or a crash while SU2 sets up the turbomachinery boundaries. | The periodic pairs are not in zone order, or the mesh has no matching span-wise points for `AUTOMATIC` (code, to be reviewed). | Order `MARKER_PERIODIC` by zone. Try `SPANWISE_KIND= EQUISPACED`. | +| No span-wise `.dat` files. | The `TURBOMACHINERY` folder does not exist (code). | Create it in the run directory. | +| Reverse flow at the outlet. | The outlet is too close to the blade, or the outlet pressure is too high (advice, to be reviewed). | Move the outlet downstream. Check the outlet pressure value. | + +## Related tutorials and test cases + +Tutorials: + +- [Aachen turbine stage with mixing plane](/tutorials/Aachen_Turbine/): 3D, three rows, Giles boundaries, ramps, wall functions, performance outputs. +- [Non-ideal compressible flows with physics-informed neural networks](/tutorials/NICFD_nozzle_datadriven/): uses Giles boundaries and an outlet ramp on a nozzle. + +Test cases (SU2 repository): + +- [turbomachinery/axial_stage_2D](https://github.com/su2code/SU2/blob/develop/TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg): 2D stage, mixing plane, translating row. +- [turbomachinery/Aachen_turbine](https://github.com/su2code/SU2/blob/develop/TestCases/turbomachinery/Aachen_turbine/aachen_3D_MP_restart.cfg): 3D, three rows, rotating frame, wall functions. +- [turbomachinery/APU_turbocharger](https://github.com/su2code/SU2/blob/develop/TestCases/turbomachinery/APU_turbocharger/Jones_restart.cfg): radial turbine, rotation ramp. +- [turbomachinery/multi_interface](https://github.com/su2code/SU2/blob/develop/TestCases/turbomachinery/multi_interface/multi_interface_rst.cfg): one frozen-rotor and one mixing-plane interface. +- [turbomachinery/transonic_stator_2D](https://github.com/su2code/SU2/blob/develop/TestCases/turbomachinery/transonic_stator_2D/transonic_stator_restart.cfg): single row, Peng-Robinson gas, Giles boundaries with `SPATIAL_FOURIER= YES`. +- [disc_adj_turbomachinery](https://github.com/su2code/SU2/tree/develop/TestCases/disc_adj_turbomachinery): discrete adjoint of a stator and of a stage, with the objectives `TOTAL_PRESSURE_LOSS` and `ENTROPY_GENERATION`. + +User guide pages: [Basics of Multi-Zone Computations](../Multizone/), [Markers and Boundary Conditions](../Markers-and-BC/), [Solver Setup](../Solver-Setup/), [History and Solution Output](../Custom-Output/), [Setup Guide: Non-Ideal Compressible Flows](../Setup-Guide-NICFD/). + +Last checked against SU2 develop `11c177b904`. diff --git a/_docs_v7/Setup-Guide-Unsteady-DES.md b/_docs_v7/Setup-Guide-Unsteady-DES.md new file mode 100644 index 00000000..09de48cf --- /dev/null +++ b/_docs_v7/Setup-Guide-Unsteady-DES.md @@ -0,0 +1,389 @@ +--- +title: "Setup Guide: Unsteady Flows and DES" +permalink: /docs_v7/Setup-Guide-Unsteady-DES/ +--- + +> **Draft.** The settings below come from the SU2 code, the tutorials and the test cases. The advice parts need a review by experienced users. + +**Source tags.** A tag at the end of a statement says where it comes from. A tag on the line that introduces a list or a table covers the whole list or table. + +- **(code)**: read in the SU2 source. Option defaults come from `Common/src/CConfig.cpp`. +- **(test case)**: used in a test case config. +- **(tutorial)**: used in a tutorial. +- **(docs)**: stated in another page of this website. +- **(advice)**: general CFD practice. +- **(to be reviewed)**: added after any of the above when the statement needs a check by an experienced user. + +--- + +- [When to use this guide](#when-to-use-this-guide) +- [Start from](#start-from) +- [Settings that matter](#settings-that-matter) +- [Check convergence and results](#check-convergence-and-results) +- [Common problems](#common-problems) +- [Related tutorials and test cases](#related-tutorials-and-test-cases) + +--- + +## When to use this guide + +Use this guide when the flow changes in time and you want to follow that change. Typical cases are: + +- vortex shedding behind a bluff body or a stalled airfoil, +- buffet, large separated regions, wakes, +- bodies that move, such as a pitching airfoil. + +The guide covers two approaches: + +- **URANS** (unsteady RANS): the RANS equations solved in time. The turbulence model still models all turbulent eddies. URANS captures large, regular unsteadiness such as vortex shedding (advice). +- **DES** (detached eddy simulation), a hybrid RANS/LES method: RANS near the walls, large-eddy simulation (LES) in separated regions. In LES, the mesh and the time step resolve the large turbulent eddies and the model handles only the small ones (advice). + +A steady RANS run that does not converge can be a sign that the flow is unsteady (advice). For steady settings, see [Setup Guide: Steady RANS for External Aerodynamics](../Setup-Guide-RANS-External-Aero/). + +## Start from + +### URANS + +This config comes from the unsteady NACA0012 tutorial: `compressible_flow/Unsteady_NACA0012/unsteady_naca0012.cfg` in the [Tutorials repository](https://github.com/su2code/Tutorials/blob/develop/compressible_flow/Unsteady_NACA0012/unsteady_naca0012.cfg). +We changed `RESTART_SOL` to `NO` and removed `RESTART_ITER`, so the run starts from the free stream. The tutorial restarts at time step 499 to skip the start-up phase. We also removed the adjoint and file name options. All other values are unchanged. + +``` +% ------------- Problem ------------------------------------------------% +SOLVER= RANS +KIND_TURB_MODEL= SA +REF_DIMENSIONALIZATION= DIMENSIONAL +MATH_PROBLEM= DIRECT +RESTART_SOL= NO +% +% ------------- Free stream --------------------------------------------% +MACH_NUMBER= 0.3 +AOA= 17.0 +FREESTREAM_TEMPERATURE= 293.0 +FREESTREAM_PRESSURE= 101325.0 +REYNOLDS_NUMBER= 1000.0 +REYNOLDS_LENGTH= 1.0 +REF_ORIGIN_MOMENT_X= 0.25 +REF_ORIGIN_MOMENT_Y= 0.00 +REF_ORIGIN_MOMENT_Z= 0.00 +REF_LENGTH= 1.0 +REF_AREA= 1.0 +% +% ------------- Boundary conditions ------------------------------------% +MARKER_HEATFLUX= ( airfoil, 0.0 ) +MARKER_FAR= ( farfield ) +MARKER_PLOTTING= ( airfoil ) +MARKER_MONITORING= ( airfoil ) +% +% ------------- Time integration (dual time stepping) ------------------% +TIME_DOMAIN= YES +TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER +TIME_STEP= 5e-4 +TIME_ITER= 2000 +INNER_ITER= 10 +% +% ------------- Numerics -----------------------------------------------% +NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES +CONV_NUM_METHOD_FLOW= JST +JST_SENSOR_COEFF= ( 0.5, 0.005 ) +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +MUSCL_TURB= NO +TIME_DISCRE_FLOW= EULER_IMPLICIT +TIME_DISCRE_TURB= EULER_IMPLICIT +CFL_NUMBER= 1e12 +CFL_ADAPT= NO +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_ERROR= 0.1 +LINEAR_SOLVER_ITER= 10 +% +% ------------- Convergence inside each time step ----------------------% +CONV_FIELD= REL_RMS_DENSITY +CONV_RESIDUAL_MINVAL= -3 +CONV_STARTITER= 0 +% +% ------------- Time averages and convergence in time ------------------% +WINDOW_CAUCHY_CRIT= YES +WINDOW_START_ITER= 500 +WINDOW_FUNCTION= HANN_SQUARE +CONV_WINDOW_FIELD= ( TAVG_DRAG, TAVG_LIFT ) +CONV_WINDOW_STARTITER= 0 +CONV_WINDOW_CAUCHY_EPS= 1E-4 +CONV_WINDOW_CAUCHY_ELEMS= 10 +% +% ------------- Input and output ---------------------------------------% +MESH_FILENAME= unsteady_naca0012_mesh.su2 +MESH_FORMAT= SU2 +HISTORY_WRT_FREQ_INNER= 0 +SCREEN_WRT_FREQ_INNER= 100 +SCREEN_OUTPUT= ( TIME_ITER, INNER_ITER, RMS_DENSITY, REL_RMS_DENSITY, DRAG, LIFT, CAUCHY_TAVG_DRAG, CAUCHY_TAVG_LIFT ) +HISTORY_OUTPUT= ( TIME_ITER, INNER_ITER, REL_RMS_RES, RMS_RES, AERO_COEFF, TAVG_AERO_COEFF, CAUCHY ) +OUTPUT_FILES= ( RESTART, PARAVIEW ) +OUTPUT_WRT_FREQ= ( 1, 1 ) +``` + +The tutorial page [Unsteady NACA0012](/tutorials/Unsteady_NACA0012/) explains dual time stepping and the windowed averages. + +### DES + +This config comes from the DDES regression test [`TestCases/ddes/flatplate/ddes_flatplate.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/ddes/flatplate/ddes_flatplate.cfg). We removed the adjoint and file name options, and options that have no effect with these settings. All other values are unchanged. +This is a 2D flat plate. It checks that the DES options run. It is not a realistic DES: real DES runs are 3D (see [Mesh for DES](#mesh-for-des)). + +``` +% ------------- Problem ------------------------------------------------% +SOLVER= RANS +KIND_TURB_MODEL= SA +HYBRID_RANSLES= SA_EDDES +MATH_PROBLEM= DIRECT +RESTART_SOL= NO +% +% ------------- Free stream --------------------------------------------% +MACH_NUMBER= 0.2 +AOA= 0.0 +SIDESLIP_ANGLE= 0.0 +FREESTREAM_TEMPERATURE= 300.0 +REYNOLDS_NUMBER= 5000000.0 +REYNOLDS_LENGTH= 1.0 +REF_ORIGIN_MOMENT_X= 0.25 +REF_ORIGIN_MOMENT_Y= 0.00 +REF_ORIGIN_MOMENT_Z= 0.00 +REF_LENGTH= 1.0 +REF_AREA= 2.0 +% +% ------------- Time integration ---------------------------------------% +TIME_DOMAIN= YES +TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER +TIME_STEP= 0.000288 +MAX_TIME= 10 +UNST_CFL_NUMBER= 0.0 +INNER_ITER= 20 +TIME_ITER= 500 +% +% ------------- Boundary conditions ------------------------------------% +MARKER_HEATFLUX= ( wall, 0.0 ) +MARKER_INLET= ( inlet, 302.4, 118309.784, 1.0, 0.0, 0.0 ) +MARKER_OUTLET= ( outlet, 115056.0, farfield, 115056.0 ) +MARKER_SYM= ( symmetry ) +MARKER_PLOTTING= ( wall ) +MARKER_MONITORING= ( wall ) +% +% ------------- Numerics -----------------------------------------------% +NUM_METHOD_GRAD= GREEN_GAUSS +CFL_NUMBER= 10.0 +CFL_ADAPT= NO +CONV_NUM_METHOD_FLOW= SLAU2 +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= NONE +TIME_DISCRE_FLOW= EULER_IMPLICIT +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +MUSCL_TURB= NO +TIME_DISCRE_TURB= EULER_IMPLICIT +CONV_RESIDUAL_MINVAL= -15 +CONV_STARTITER= 0 +% +% ------------- Input and output ---------------------------------------% +MESH_FILENAME= mesh_flatplate_turb_137x97.su2 +MESH_FORMAT= SU2 +OUTPUT_WRT_FREQ= 1000 +SCREEN_OUTPUT= (TIME_ITER, INNER_ITER, RMS_DENSITY, RMS_NU_TILDE, LIFT, DRAG, TOTAL_HEATFLUX) +``` + +For a real DES run, also write the DES and time-average fields (code): + +``` +VOLUME_OUTPUT= ( COORDINATES, SOLUTION, PRIMITIVE, DDES, VORTEX_IDENTIFICATION, TIME_AVERAGE ) +``` + +The mesh files of the test cases are in the [TestCases repository](https://github.com/su2code/TestCases). + +## Settings that matter + +### Dual time stepping + +Dual time stepping splits the run into physical time steps. Inside each time step, SU2 solves for the new solution with "inner iterations", the same way it solves a steady problem in pseudo-time (tutorial, docs). + +- `TIME_DOMAIN= YES` turns on the time-accurate solver (docs). `TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER` is used by all URANS and DES test cases (test case). `DUAL_TIME_STEPPING-1ST_ORDER` and `TIME_STEPPING` (one update per time step, no inner iterations) also exist (code). +- `TIME_STEP` is the physical time step. It is always in seconds, also when the equations are non-dimensional: SU2 divides it by the reference time (code). +- `TIME_ITER` is the number of time steps. The default is `1` (code). +- `MAX_TIME` is the final physical time in seconds. The default is `1.0`. SU2 stops at `MAX_TIME` or at `TIME_ITER`, whichever comes first (code, docs). Set `MAX_TIME` larger than `TIME_STEP` × `TIME_ITER` if you want `TIME_ITER` steps. +- `INNER_ITER` is the maximum number of inner iterations per time step. The default is `1` (code). Always set it. +- Do not use `ITER` in an unsteady run. SU2 stops with an error and asks for `TIME_ITER` and `INNER_ITER` (code). +- With `UNST_CFL_NUMBER` other than `0.0`, SU2 computes the time step from this CFL number and ignores `TIME_STEP`, as the comments in `config_template.cfg` say. The default is `0.0` (code). + +See [Solver Setup](../Solver-Setup/#time-dependent-simulation). + +### Time step size + +- The time step must resolve the fastest change you care about (advice). For vortex shedding, estimate the period from the Strouhal number St = f D / U. St is about 0.2 for many bluff bodies (advice, to be reviewed). +- Use at least 50 to 100 time steps per shedding period for URANS (advice, to be reviewed). +- Check the result by halving the time step: the period and the averaged forces should not change much (advice). +- Examples: the NACA0012 tutorial uses `TIME_STEP= 5e-4`. The square cylinder test uses `TIME_STEP= 0.0015` with `MAX_TIME= 3.75`. The von Karman cylinder tutorial uses `TIME_STEP= 0.005` with 20 inner iterations (tutorial, test case). + +### Convergence inside each time step + +Each time step needs converged inner iterations. If not, the time history is wrong even if the run looks stable (tutorial). + +- The inner loop uses the same criteria as a steady run: `CONV_FIELD`, `CONV_RESIDUAL_MINVAL`, `CONV_STARTITER` (docs). It stops at the criterion or at `INNER_ITER`. +- `REL_RMS_DENSITY` is the residual relative to its value at the first inner iteration of the time step (code). `CONV_FIELD= REL_RMS_DENSITY` with `CONV_RESIDUAL_MINVAL= -3` asks for a drop of three orders of magnitude in each time step (tutorial). +- Set `CONV_STARTITER= 0` so the check starts at the first inner iteration (tutorial). The default is `5` (code). +- The inner iterations march in pseudo-time with the local `CFL_NUMBER`. The NACA0012 tutorial uses `CFL_NUMBER= 1e12` with `JST` (tutorial). The DES test uses `10` with `SLAU2`, the square cylinder test `2.0` with `ROE` (test case). +- Watch `INNER_ITER` on the screen. If most time steps end at the maximum without reaching the criterion, raise `INNER_ITER` or the CFL, or lower the time step (advice). +- In a time-domain run, SU2 writes the history file once per time step by default. Set `HISTORY_WRT_FREQ_INNER` to also write inner iterations (code). + +### Restarting an unsteady run + +SU2 writes one restart file per saved time step, with the step number in the name, for example `restart_flow_00499.dat` (tutorial, docs). + +- `OUTPUT_WRT_FREQ` sets how often (in time steps) SU2 writes files (docs). With second-order time stepping, SU2 also writes the step before, because a restart needs two old solutions (code). +- To restart, set `RESTART_SOL= YES` and `RESTART_ITER` to the first new time step. With second order, SU2 reads the files of steps `RESTART_ITER`−2 and `RESTART_ITER`−1. With first order, it reads step `RESTART_ITER`−1 (code, docs). +- SU2 reads the files named after `SOLUTION_FILENAME`, so rename or copy the restart files first (docs). +- `TIME_ITER` counts from the start of the whole simulation, not from the restart. SU2 runs `TIME_ITER` − `RESTART_ITER` more steps (code). `TIME_ITER` must be larger than `RESTART_ITER` (code). +- To start URANS from a converged steady solution, copy the steady restart file to the two file names that SU2 reads for `RESTART_ITER= 2` (for example `solution_flow_00000.dat` and `solution_flow_00001.dat`) (advice, to be reviewed). The square cylinder test restarts with `RESTART_ITER= 2` (test case). + +See [Restart File](../Restart-File/). + +### Time averages and convergence in time + +**History averages.** In a time-domain run, SU2 adds a time-averaged version of every coefficient, with the prefix `TAVG_`, for example `TAVG_DRAG` (code, tutorial). + +- The average starts at time step `WINDOW_START_ITER`. If you do not set it, it starts at `RESTART_ITER`. It must not be smaller than `RESTART_ITER`, or SU2 stops with an error (code). +- Start the average after the start-up phase, when the signal is periodic or statistically steady (tutorial). +- `WINDOW_FUNCTION` sets the weight of each sample: `SQUARE` (equal weights, the default), `HANN`, `HANN_SQUARE` or `BUMP` (code). For a periodic signal, the windowed averages converge faster than `SQUARE` (tutorial). + +**Stop when the average stops changing.** `WINDOW_CAUCHY_CRIT= YES` turns on a Cauchy criterion on the averages (docs). This criterion looks at how much the average changes from step to step. + +- `CONV_WINDOW_FIELD` lists the averaged fields, for example `( TAVG_DRAG, TAVG_LIFT )` (tutorial). +- `CONV_WINDOW_CAUCHY_EPS` (default `1E-3`), `CONV_WINDOW_CAUCHY_ELEMS` (default `100`) and `CONV_WINDOW_STARTITER` (default `15`, counted from `WINDOW_START_ITER`) play the same role as in the steady criterion (code, docs). +- The tutorial uses `CONV_WINDOW_CAUCHY_EPS= 1E-4` with `CONV_WINDOW_CAUCHY_ELEMS= 10` (tutorial). + +**Volume averages.** Add `TIME_AVERAGE` to `VOLUME_OUTPUT` (code). SU2 then writes: + +- mean values: `MEAN_DENSITY`, `MEAN_VELOCITY-X`, `MEAN_VELOCITY-Y`, `MEAN_VELOCITY-Z`, `MEAN_PRESSURE`, `MEAN_SKIN_FRICTION-X`, `MEAN_SKIN_FRICTION-Y`, `MEAN_SKIN_FRICTION-Z`; +- mean squares and products: `RMS_U`, `RMS_V`, `RMS_W`, `RMS_UV`, `RMS_UW`, `RMS_VW`, `RMS_P`; +- Reynolds stresses and pressure fluctuations: `UUPRIME`, `VVPRIME`, `WWPRIME`, `UVPRIME`, `UWPRIME`, `VWPRIME`, `PPRIME` (code). + +How these averages work (code): + +- They start at `WINDOW_START_ITER` and use equal weights. `WINDOW_FUNCTION` does not apply to them. +- SU2 only computes them if `TIME_AVERAGE` is in `VOLUME_OUTPUT`. +- SU2 keeps them in memory. They are not read back from the restart files, so after a restart they start again from `RESTART_ITER`. + +Plan long runs with this in mind: average over one continuous run segment (advice). + +### Hybrid RANS/LES: which DES variant + +All DES variants in SU2 develop build on the SA model. Set `KIND_TURB_MODEL= SA` and pick a variant with `HYBRID_RANSLES` (code). + +In DES, the model uses a length scale that is the smaller of two values: the wall distance, and `DES_CONST` times a cell size (code). Near the wall, the wall distance is smaller and the model acts as RANS. Far from the wall, the cell size is smaller and the model acts as an LES subgrid model. + +| `HYBRID_RANSLES` | What it is (code) | +| --- | --- | +| `NONE` | No DES (default). | +| `SA_DES` | Original DES (Spalart 1997). Switches to LES wherever the cell size times `DES_CONST` is below the wall distance. | +| `SA_DDES` | Delayed DES (Spalart et al. 2006). A shielding function keeps attached boundary layers in RANS mode. | +| `SA_ZDES` | DDES with a cell size based on the vorticity direction (Deck 2012). | +| `SA_EDDES` | DDES with a cell size adapted to shear layers (Shur et al. 2015). Meant to switch faster from RANS to LES in separated shear layers. | + +Advice: + +- `SA_DES` can switch to LES inside an attached boundary layer if the mesh is fine along the wall. The mesh, not the flow, can then cause separation. `SA_DDES` or `SA_EDDES` avoid this (advice). +- `SA_ZDES` in SU2 is DDES with the ZDES cell size. It is not the full zonal method of the reference, where the user picks RANS and LES zones (code, to be reviewed). +- SU2 does not stop with an error if you set `HYBRID_RANSLES` with `KIND_TURB_MODEL= SST`. Only the SA solver uses the DES length scale, so such a run is plain URANS (code). + +Related options (code): + +- `DES_CONST`: the DES constant. The default is `0.65`. +- `LES_FILTER_WIDTH`: a fixed LES filter width. The default `-1.0` means SU2 uses the local cell size (the largest distance from a point to its neighbours). +- `ENFORCE_LES= YES`: LES mode everywhere. It needs `HYBRID_RANSLES` other than `NONE`. +- `STOCHASTIC_BACKSCATTER= YES` and the `SBS_` options: a stochastic backscatter model, which feeds energy from the modelled to the resolved scales. It works only in 3D and only with `HYBRID_RANSLES` set. The test case `backscatter/backward_step/backwardStep.cfg` shows all its options (code, test case). + +### Mesh for DES + +General points for the DES mesh (advice, to be reviewed): + +- DES resolves turbulent eddies, which are three-dimensional. Run DES in 3D. 2D DES runs do not give physical turbulence. +- Near the walls, the mesh must be fine enough for RANS: first-cell y+ about 1. +- In the regions you want in LES mode (wakes, separated zones), use cells of similar size in all directions. SU2 uses the largest cell dimension as the cell size (code), so stretched cells give a large cell size and more modelled, less resolved, turbulence. +- Keep the cell size changes smooth between the RANS and LES regions. +- For a body with a spanwise direction, the spanwise extent must hold the largest eddies of interest. + +### Time step for DES + +- The time step must resolve the eddies the mesh can hold. A common target is a convective CFL number of about 1 in the LES region, that is, a time step of about cell size / local velocity (advice, to be reviewed). +- Use `DUAL_TIME_STEPPING-2ND_ORDER` (test case). +- The DES and backscatter tests use `INNER_ITER= 20` (test case). Check the inner convergence as for URANS. + +### Numerical dissipation + +Reduce numerical dissipation where you can. Upwind schemes and limiters add it, and in the LES region it damps the resolved eddies (advice). + +**Compressible solver.** `ROE_LOW_DISSIPATION` lowers the upwind part of the flux where the flow is resolved (code, docs). Details from the code (code): + +- It works with `ROE`, `SLAU` and `SLAU2`. +- `FD`: uses the DDES shielding function, computed from the wall distance. +- `NTS`: the blending of Travin and Shur. It uses `DES_CONST` and the cell size. +- `FD_DUCROS` and `NTS_DUCROS`: as above, plus the Ducros sensor, which keeps the full dissipation at shocks. The docs say the same (docs). +- SU2 keeps at least 5 % of the upwind dissipation for stability. +- Write the `ROE_DISSIPATION` output group to see where the dissipation is reduced. + +No test case in develop uses `ROE_LOW_DISSIPATION` (test case). + +**Incompressible solver.** The `LD2` central scheme (low dissipation, low dispersion) is available for constant density flows only. With the energy equation on, SU2 uses JST for the energy equation (code). The backscatter test uses `CONV_NUM_METHOD_FLOW= LD2` with `JST_SENSOR_COEFF= ( 0.0, 0.002 )` and `MUSCL_FLOW= NO` (test case). + +**Limiters.** The DES flat plate test uses MUSCL without a limiter (`SLOPE_LIMITER_FLOW= NONE`) (test case). A limiter adds dissipation where it is active (advice). + +### Averaging a DES run + +- Wait until the start-up phase has left the domain before you start averaging. A common rule is a few flow-through times (advice, to be reviewed). +- Then average over many characteristic times, so that the mean and the fluctuations settle (advice). +- Use `WINDOW_START_ITER` and the `TIME_AVERAGE` volume group described above (code). +- To record time signals at points, the history output can include probes defined with `CUSTOM_OUTPUTS`. The von Karman cylinder tutorial shows how (tutorial). + +## Check convergence and results + +- **Inner convergence.** `REL_RMS_DENSITY` (or your `CONV_FIELD`) reaches the criterion in each time step before `INNER_ITER` (tutorial). +- **Start-up phase over.** Plot `LIFT` and `DRAG` against time. The signal should be periodic or statistically steady before `WINDOW_START_ITER` (tutorial). +- **Averages settled.** `TAVG_LIFT` and `TAVG_DRAG` are flat. With `WINDOW_CAUCHY_CRIT= YES`, the `CAUCHY_TAVG_` values are below `CONV_WINDOW_CAUCHY_EPS` (tutorial). +- **Time step and mesh.** Halve the time step and refine the mesh. The frequency and the averages should change little (advice). +- **DES regions.** Write the `DDES` group: `DES_LENGTHSCALE`, `WALL_DISTANCE` and `LES_SENSOR`. `LES_SENSOR` is 0 where the model acts as RANS. In LES mode it is 1 for `SA_DES` and the value of the shielding function for the DDES variants (code). Attached boundary layers should stay at 0 (advice). +- **Resolved eddies.** Write the `VORTEX_IDENTIFICATION` group: `VORTICITY` (2D) or `VORTICITY_X`, `VORTICITY_Y`, `VORTICITY_Z` (3D), and `Q_CRITERION` (code). Iso-surfaces of `Q_CRITERION` show the resolved eddies (advice). + +See [History and Solution Output](../Custom-Output/) and the [Output Fields Reference](../Output-Fields-Reference/). + +## Common problems + +| Symptom | Likely cause | What to try | +| --- | --- | --- | +| The run stops at 1 s of physical time. | `MAX_TIME` has a default of `1.0`. | Set `MAX_TIME` (code). | +| Only one inner iteration per time step. | `INNER_ITER` has a default of `1`. | Set `INNER_ITER` (code). | +| SU2 stops: "ITER must not be used when running multizone and/or unsteady problems". | `ITER` in an unsteady config. | Use `TIME_ITER` and `INNER_ITER` (code). | +| SU2 stops: "TIME_DOMAIN must be set to YES ..." | `TIME_MARCHING` set without `TIME_DOMAIN= YES`. | Add `TIME_DOMAIN= YES` (code). | +| SU2 stops: "Invalid value for TIME_STEP". | `TIME_STEP` is zero and `UNST_CFL_NUMBER` is `0.0`. | Set `TIME_STEP` (code). | +| The restart fails to find a file. | Wrong file names or missing step. | For `RESTART_ITER= N` with second order, provide steps N−2 and N−1, named after `SOLUTION_FILENAME` (code, docs). | +| SU2 stops: "WINDOW_START_ITER must be larger than or equal to: RESTART_ITER!" | The average would start before the restart. | Set `WINDOW_START_ITER` at or after `RESTART_ITER` (code). | +| `MEAN_` fields are missing or zero. | `TIME_AVERAGE` not in `VOLUME_OUTPUT`, or the run has not reached `WINDOW_START_ITER`. | Add `TIME_AVERAGE` and check `WINDOW_START_ITER` (code). | +| The flow stays steady and symmetric, no shedding. | Symmetric start, too much numerical dissipation, too large time step, or a coarse wake mesh. | Lower the dissipation, reduce the time step, refine the wake (advice, to be reviewed). | +| The inner iterations never reach the criterion. | Time step too large, or CFL too low for the inner loop. | Reduce `TIME_STEP`, raise `CFL_NUMBER` or `INNER_ITER` (advice). | +| DES: the boundary layer separates too early. | LES mode inside the attached boundary layer (check `LES_SENSOR`). | Use `SA_DDES` or `SA_EDDES` instead of `SA_DES`; check the cell size along the wall (advice). | +| DES: the wake looks smooth, with no resolved eddies. | Too much dissipation, or the mesh is too coarse or too stretched in the wake. | Use `ROE_LOW_DISSIPATION` or `LD2`, remove the limiter, refine the wake with near-cubic cells (advice, to be reviewed). | +| DES has no effect at all. | `HYBRID_RANSLES` set with `KIND_TURB_MODEL= SST`. | Use `KIND_TURB_MODEL= SA` (code). | + +## Related tutorials and test cases + +Tutorials: + +- [Unsteady NACA0012](/tutorials/Unsteady_NACA0012/): URANS, dual time stepping, windowed averages, restart after the start-up phase. +- [Unsteady von Karman vortex shedding](/tutorials/Inc_Von_Karman/): laminar incompressible cylinder; time step, inner iterations, probes. +- [Unsteady shape optimization NACA0012](/tutorials/Unsteady_Shape_Opt_NACA0012/): unsteady adjoint with windowed objective functions. + +Test cases (develop branch): + +- [unsteady/square_cylinder/turb_square.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/unsteady/square_cylinder/turb_square.cfg): URANS with SST and `ROE`, restart from step 2. +- [unsteady/pitching_naca64a010_rans/turb_NACA64A010.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/unsteady/pitching_naca64a010_rans/turb_NACA64A010.cfg): URANS of a pitching airfoil with SA and rigid mesh motion. +- [ddes/flatplate/ddes_flatplate.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/ddes/flatplate/ddes_flatplate.cfg): `SA_EDDES` with `SLAU2`. +- [backscatter/backward_step/backwardStep.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/backscatter/backward_step/backwardStep.cfg): incompressible `SA_DDES` with stochastic backscatter, `LD2` scheme and time-average output. + +User guide pages: + +- [Solver Setup](../Solver-Setup/), [Restart File](../Restart-File/), [History and Solution Output](../Custom-Output/), [Convective Schemes](../Convective-Schemes/), [Physical Definition](../Physical-Definition/). +- All options: [Option Reference](../Option-Reference/). All output fields: [Output Fields Reference](../Output-Fields-Reference/). + +Last checked against SU2 develop `11c177b904`. From 4276a6177926ca30d824db2133d8dc6fc7cd011c Mon Sep 17 00:00:00 2001 From: rois1995 Date: Wed, 21 Oct 2026 15:30:31 +0200 Subject: [PATCH 04/25] Point the CHT guide to the real sections of the Multizone page Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NSfEWrhpF27TnrkJH74sv8 --- _docs_v7/Setup-Guide-Heat-Transfer-CHT.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/_docs_v7/Setup-Guide-Heat-Transfer-CHT.md b/_docs_v7/Setup-Guide-Heat-Transfer-CHT.md index fd5e8e9e..690d9084 100644 --- a/_docs_v7/Setup-Guide-Heat-Transfer-CHT.md +++ b/_docs_v7/Setup-Guide-Heat-Transfer-CHT.md @@ -124,7 +124,7 @@ LINEAR_SOLVER_ERROR= 1E-15 LINEAR_SOLVER_ITER= 5 ``` -The zone files do not list the interface markers as boundary conditions. `MARKER_CHT_INTERFACE` in the main file sets them, and the zone files inherit every option of the main file ([Multizone](../Multizone/#multiphysics)). +The zone files do not list the interface markers as boundary conditions. `MARKER_CHT_INTERFACE` in the main file sets them, and the zone files inherit every option of the main file ([Multizone](../Multizone/#how-to-set-up-a-multi-physics-problem)). ## Settings that matter @@ -163,18 +163,18 @@ A solid alone runs as a normal single-zone case, for example [`solid_heat_conduc ### Zones and config files -A CHT case is a multiphysics case ([Multizone](../Multizone/#multiphysics)): +A CHT case is a multiphysics case ([Multizone](../Multizone/#how-to-set-up-a-multi-physics-problem)): 1. Write one config file per zone. Each one sets `SOLVER`, and the boundary conditions and numerics of the zone. 2. Write a main config file with `SOLVER= MULTIPHYSICS` and `CONFIG_LIST`, the list of zone files. The order in `CONFIG_LIST` gives the zone number, starting at 0. -3. Options that are the same in all zones can go in the main file. The zone files inherit them ([Multizone](../Multizone/#multiphysics)). +3. Options that are the same in all zones can go in the main file. The zone files inherit them ([Multizone](../Multizone/#how-to-set-up-a-multi-physics-problem)). The mesh: -- One file for all zones: `MULTIZONE_MESH= YES` (default). This works with the SU2 mesh format, with `NZONE=` and `IZONE=` in the mesh file ([Multizone](../Multizone/#multizone-mesh)). +- One file for all zones: `MULTIZONE_MESH= YES` (default). This works with the SU2 mesh format, with `NZONE=` and `IZONE=` in the mesh file ([Multizone](../Multizone/#providing-mesh-information-for-a-multi-zone-problem)). - One file per zone: `MULTIZONE_MESH= NO`, and `MESH_FILENAME` in each zone file. The [contact resistance tutorial](/tutorials/SS_CR_CHT/) uses three mesh files. -Run each zone alone first, with a fixed temperature or heat flux at the interface, to find numerical settings that work (advice). [Multizone](../Multizone/#multiphysics) gives the same advice. +Run each zone alone first, with a fixed temperature or heat flux at the interface, to find numerical settings that work (advice). [Multizone](../Multizone/#how-to-set-up-a-multi-physics-problem) gives the same advice. ### Interface markers From 8a6b2c636f42a3a21c2df396d009dd7752357493 Mon Sep 17 00:00:00 2001 From: rois1995 Date: Wed, 21 Oct 2026 16:12:15 +0200 Subject: [PATCH 05/25] Add a search page and turn on the feed, SEO and sitemap plugins The plugins were listed but not whitelisted, so GitHub Pages skipped them: feed.xml and sitemap.xml were missing. The old v6 docs stay online for old links but are left out of the sitemap. The search page uses an index of the docs, tutorials and V&V pages made at build time. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NSfEWrhpF27TnrkJH74sv8 --- _config.yml | 5 ++++ _includes/topnav.html | 1 + search.html | 67 +++++++++++++++++++++++++++++++++++++++++++ search.json | 8 ++++++ 4 files changed, 81 insertions(+) create mode 100644 search.html create mode 100644 search.json diff --git a/_config.yml b/_config.yml index e63bd734..7e93e986 100644 --- a/_config.yml +++ b/_config.yml @@ -23,7 +23,10 @@ plugins: - jekyll-sitemap whitelist: + - jekyll-feed - jekyll-redirect-from + - jekyll-seo-tag + - jekyll-sitemap exclude: @@ -56,6 +59,8 @@ defaults: values: layout: docs sectionid: docs + # Old v6 documentation: kept for old links, not listed for search engines. + sitemap: false seo: type: "WebPage" diff --git a/_includes/topnav.html b/_includes/topnav.html index 60e22f64..61af4db5 100644 --- a/_includes/topnav.html +++ b/_includes/topnav.html @@ -26,6 +26,7 @@ From 10522d1e34a1db515050d82ac3a498db749e68d8 Mon Sep 17 00:00:00 2001 From: rois1995 Date: Thu, 22 Oct 2026 16:55:24 +0200 Subject: [PATCH 18/25] Remove documentation status card from Develop --- develop.html | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/develop.html b/develop.html index 3246f3b3..458079f2 100644 --- a/develop.html +++ b/develop.html @@ -39,19 +39,6 @@

Git-ting Started

- -
-
-

Documentation Improvements

-
-
-

Follow the documentation overhaul: implemented changes, review status, remaining gaps and next priorities. The status page links to the source changes and build evidence and explains how to keep the record current.

-
- -
- From fa67a1656ee6975f2708c179dc39260b3cfb1036 Mon Sep 17 00:00:00 2001 From: rois1995 Date: Thu, 22 Oct 2026 20:30:30 +0200 Subject: [PATCH 19/25] docs: repair historical links and review setup and model guidance --- _data/tutorials.yml | 2 +- _docs_v7/Hybrid-RANS-LES.md | 11 +- _docs_v7/Setup-Guide-Heat-Transfer-CHT.md | 12 +- _docs_v7/Setup-Guide-Incompressible.md | 16 +-- _docs_v7/Setup-Guide-NICFD.md | 20 +-- _docs_v7/Setup-Guide-RANS-External-Aero.md | 18 +-- _docs_v7/Setup-Guide-Shape-Optimization.md | 20 +-- _docs_v7/Setup-Guide-Species-Combustion.md | 16 +-- _docs_v7/Setup-Guide-Transition.md | 12 +- _docs_v7/Setup-Guide-Turbomachinery.md | 6 +- _docs_v7/Setup-Guide-Unsteady-DES.md | 10 +- _docs_v7/Transition-Models.md | 6 +- _docs_v7/Turbulence-Models.md | 6 +- _docs_v7/Wall-Treatment.md | 6 +- .../Aachen_Turbine/Aachen_Turbine.md | 20 +-- .../ActuatorDisk_VariableLoad.md | 30 ++--- .../NICFD_nozzle/NICFD_nozzle_datadriven.md | 5 +- .../Transitional_Flat_Plate_T3A.md | 6 +- .../Inc_Turbulent_Bend_Opt.md | 8 +- _tutorials/event_content/event_content.md | 118 +++++++++--------- .../Inc_Combustion/Inc_Combustion.md | 27 ++-- .../Inc_Laminar_Cavity/Inc_Laminar_Cavity.md | 2 +- .../Inc_Turbulent_Flat_Plate.md | 2 +- .../Inc_Urban_City/Inc_Urban_City.md | 16 +-- .../Inc_Von_Karman/Inc_Von_Karman.md | 16 +-- .../multiphysics/TFC_python/TFC_python.md | 14 +-- .../contact_resistance_cht/SS_CR_CHT.md | 18 +-- .../Adjoint_FSI_Python.md | 2 +- .../unfinished_tutorials/Basic_RHT.md | 10 +- .../Coupled_RHT_Adjoint.md | 12 +- .../unfinished_tutorials/Static_FSI_Python.md | 6 +- .../unfinished_tutorials/Turbulent_RHT_CHT.md | 12 +- .../Inc_Heated_Cylinders_Unsteady.md | 10 +- .../Linear_Elasticity/Linear_Elasticity.md | 12 +- .../unfinished_tutorials/Dynamics.md | 6 +- 35 files changed, 259 insertions(+), 254 deletions(-) diff --git a/_data/tutorials.yml b/_data/tutorials.yml index 873857e1..0c62d7d0 100644 --- a/_data/tutorials.yml +++ b/_data/tutorials.yml @@ -19,7 +19,7 @@ - NICFD_nozzle - NICFD_nozzle_datadriven - Aachen_Turbine - - Actuator_Disk + - ActuatorDisk_VariableLoad - title: Incompressible Flow tutorials: diff --git a/_docs_v7/Hybrid-RANS-LES.md b/_docs_v7/Hybrid-RANS-LES.md index 4f9edd35..6e8eac33 100644 --- a/_docs_v7/Hybrid-RANS-LES.md +++ b/_docs_v7/Hybrid-RANS-LES.md @@ -32,12 +32,13 @@ For a step-by-step case setup, see [Setup Guide: Unsteady Flows and DES](../Setu In SU2, all DES variants modify the Spalart-Allmaras (SA) model. The SA model uses the wall distance in its destruction term. DES replaces this distance with a *DES length scale*: -- Near the wall, the length scale is the wall distance. The model acts as RANS. -- Far from the wall, the length scale is `DES_CONST` times a local cell size. The model then acts as a subgrid model for LES. +- In original DES, the length scale is min(d, C_DES Δ), using wall distance d and the local grid measure Δ. +- In the delayed variants it is d − f_d·max(0, d − C_DES Δ). Shielding f_d near zero retains the RANS wall distance; f_d near one recovers the DES limit. +- With a suitable mesh and time step, the shortened scale lets the model act as an LES subgrid model. Distance from the wall alone does not select the mode. The variants differ in two points: how they protect attached boundary layers from switching to LES, and how they measure the cell size. -The DES length scale is computed only in the SA solver (`CTurbSASolver::SetDES_LengthScale`). The SST solver never reads `HYBRID_RANSLES`. So in SU2 develop, DES needs `KIND_TURB_MODEL= SA`. SST-based DES variants are in open pull requests. +The DES length scale is computed only in the SA solver (`CTurbSASolver::SetDES_LengthScale`). The SST solver never reads `HYBRID_RANSLES`. So in SU2 develop, DES needs `KIND_TURB_MODEL= SA`. The options on this page describe the checked source revision; do not infer SST-DES support from an option being accepted by the parser. DES works with the compressible (`RANS`) and the incompressible (`INC_RANS`) solvers. Both pass the DES length scale and the LES sensor to the output. @@ -185,7 +186,7 @@ All advice in this section is general practice, not checked in SU2 (to be review - **Time step.** Choose a time step so that the convective CFL number, based on the local cell size and velocity, is about 1 or less in the LES region (to be reviewed). - **Time marching.** Use `TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER`, as in the test cases. Converge the inner iterations by 2 to 3 orders per time step (to be reviewed). - **Convective scheme.** Use a second-order scheme (`MUSCL_FLOW= YES`) without a slope limiter where there are no shocks. With `ROE`, `SLAU` or `SLAU2`, try `ROE_LOW_DISSIPATION= FD` or `NTS`. Add a `_DUCROS` variant if there are shocks (to be reviewed). -- **Statistics.** Run the start-up transient first. Then set `WINDOW_START_ITER` and average over many flow-through times. Check that the averages no longer change (to be reviewed). +- **Statistics.** Exclude the start-up transient with `WINDOW_START_ITER`, then sample over many characteristic times. Compare separate sampling blocks and extend the interval; a flat cumulative average or passing Cauchy criterion alone does not establish statistical convergence (advice, to be reviewed). - **Check the switch.** Plot `LES_SENSOR` and `DES_LENGTHSCALE`. Attached boundary layers should stay at sensor 0 (RANS). Separated regions should show sensor near 1 (LES). ## Output fields @@ -232,4 +233,4 @@ Background: [An Overview of DDES in SU2: Implementation and Recent Results](/doc --- -Last checked against SU2 develop `11c177b904`. +Source review: 22 October 2026, against [SU2 `docs_site` at `41ea6a219a`](https://github.com/rois1995/SU2/tree/41ea6a219ac038574f3d4a5b130c0c1d8af66457). See the [review scope and outstanding validation](../Documentation-Status/#guide-and-model-review). Setup recommendations remain draft where indicated. diff --git a/_docs_v7/Setup-Guide-Heat-Transfer-CHT.md b/_docs_v7/Setup-Guide-Heat-Transfer-CHT.md index fd1c9b3e..09d85d14 100644 --- a/_docs_v7/Setup-Guide-Heat-Transfer-CHT.md +++ b/_docs_v7/Setup-Guide-Heat-Transfer-CHT.md @@ -124,7 +124,7 @@ The zone files do not list the interface markers as boundary conditions. `MARKER These conditions need the energy equation in the fluid: `INC_ENERGY_EQUATION= YES` for the incompressible solver. - `MARKER_ISOTHERMAL= ( marker, T [K] )`: fixed wall temperature. Use it when you know the wall temperature. -- `MARKER_HEATFLUX= ( marker, q [W/m²] )`: fixed heat flux. Zero gives an adiabatic wall. With `INTEGRATED_HEATFLUX= YES`, the value is a total heat rate in W, spread over the marker area ([Markers and BC](../Markers-and-BC/#constant-heatflux-no-slip-wall)). In SU2 a positive value adds heat to the domain (to be reviewed). +- `MARKER_HEATFLUX= ( marker, q [W/m²] )`: fixed heat flux. Zero gives an adiabatic wall. With `INTEGRATED_HEATFLUX= YES`, the value is a total heat rate in W, spread over the marker area ([Markers and BC](../Markers-and-BC/#constant-heatflux-no-slip-wall)). In these finite-volume thermal boundary conditions, a positive value adds heat to the domain (code). For a planar 2D case, integrated heat rates represent a unit out-of-plane depth. - `MARKER_HEATTRANSFER= ( marker, h [W/(m² K)], T_inf [K] )`: the wall heat flux is h·(T_inf − T_wall). Use it to model a wall that you do not mesh, such as a thin wall to an outside fluid. h = 0 gives an adiabatic wall; a very large h gives a wall at T_inf ([Markers and BC](../Markers-and-BC/#heat-transfer-or-convection-no-slip-wall)). Only the flow solvers implement `MARKER_HEATTRANSFER`. The heat equation solver for solids does not (code). @@ -133,7 +133,7 @@ Only the flow solvers implement `MARKER_HEATTRANSFER`. The heat equation solver If the temperature does not change the flow (constant density and constant properties), you have two options: -- `INC_DENSITY_MODEL= CONSTANT` with `INC_ENERGY_EQUATION= YES`: the flow solver also solves for temperature ([laminar flat plate tutorial](/tutorials/Inc_Laminar_Flat_Plate/)). +- `INC_DENSITY_MODEL= CONSTANT` with `INC_ENERGY_EQUATION= YES`: the flow solver solves for enthalpy and recovers temperature from the fluid model ([laminar flat plate tutorial](/tutorials/Inc_Laminar_Flat_Plate/)). - `WEAKLY_COUPLED_HEAT_EQUATION= YES` with `INC_ENERGY_EQUATION= NO`: SU2 solves the temperature with the separate heat solver, using the flow velocity (code). Its numerics use `CONV_NUM_METHOD_HEAT`, `MUSCL_HEAT`, `TIME_DISCRE_HEAT` and `TIMESTEP_HEAT`. Example: [`disc_adj_heat/primal.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/disc_adj_heat/primal.cfg). For incompressible CHT, SU2 stops unless the fluid zone has `INC_ENERGY_EQUATION= YES` (code). So in CHT, use the energy equation, not the weakly coupled heat equation. @@ -148,7 +148,7 @@ Set `SOLVER= HEAT_EQUATION` in the solid zone. This solver solves for temperatur - Boundary conditions: `MARKER_ISOTHERMAL`, `MARKER_HEATFLUX`, `MARKER_PERIODIC`, and the CHT interface. - All solid test cases use `INC_NONDIM= DIMENSIONAL` (test case). -In a steady run, only the conductivity changes the final temperature. Density and specific heat matter in unsteady runs (advice, to be reviewed). +For steady conduction with prescribed thermal boundary data, density and specific heat drop out of the physical heat equation; they still affect the numerical convergence. Conductivity sets the heat flux and, with flux or Robin data, the temperature gradients. A uniform conductivity cancels from a source-free, purely prescribed-temperature problem. Density and specific heat set the thermal response time in an unsteady run. A solid alone runs as a normal single-zone case, for example [`solid_heat_conduction/periodic_pins/configSolid.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/solid_heat_conduction/periodic_pins/configSolid.cfg). @@ -223,7 +223,7 @@ SU2 solves the zones one after the other and exchanges interface data between th - `RELAXATION_FACTOR_CHT` (default 1.0, no relaxation): the new interface value is factor × new + (1 − factor) × old (code). - `ITER` is not allowed in multizone cases: SU2 stops. Use `OUTER_ITER` and `INNER_ITER` (code). -The solid often converges more slowly than the fluid, because heat conduction has no convection to carry information. A large `CFL_NUMBER` in the solid zone helps; the solid-only test case `solid_heat_conduction/periodic_pins` uses 1e8 (advice, to be reviewed). +The solid often converges more slowly than the fluid, because heat conduction has no convection to carry information. A larger `CFL_NUMBER` can accelerate the solid solve if the linear system remains adequately solved; the solid-only test case `solid_heat_conduction/periodic_pins` uses 1e8 (advice, to be reviewed). ### Unsteady CHT @@ -249,7 +249,7 @@ These values are from the test case [`coupled_cht/incomp_2d_unsteady`](https://g - **Coupling residuals.** In a multizone case, SU2 prints for each zone how much the solution changed since the last outer iteration. These are the block Gauss-Seidel (BGS) residuals. Fields such as `BGS_PRESSURE[0]` and `BGS_TEMPERATURE[1]` are per zone; the number in brackets is the zone. Add the group `BGS_RES[i]` to `HISTORY_OUTPUT` for zone i. - **Default stop rule.** Without `CONV_FIELD`, a multizone case monitors `AVG_BGS_RES[0]`, the averaged BGS residual of zone 0 (code). Set `CONV_FIELD` and `CONV_RESIDUAL_MINVAL` in the main file to monitor what you need, for example the solid temperature. The pin array test case sets `CONV_RESIDUAL_MINVAL` in its main file (test case). - **Field names.** SU2 ignores unknown names in `CONV_FIELD` and prints `Ignoring Convergence Field(s)` at the start (code). -- **Heat balance.** Monitor `TOTAL_HEATFLUX` and `AVG_TEMPERATURE` (group `HEAT`) on the interface markers, through `MARKER_MONITORING` in each zone. At convergence, the heat that leaves the solid through the interface should equal the heat that enters the fluid (advice, to be reviewed: check the sign convention of each zone). +- **Heat balance.** Monitor `TOTAL_HEATFLUX` and `AVG_TEMPERATURE` (group `HEAT`) on the interface markers, through `MARKER_MONITORING` in each zone. At steady convergence, integrate conductive heat flux on both sides with a consistent normal convention: heat leaving the solid equals heat entering the fluid. With outward normals for both domains, their signed interface rates sum to zero. Non-matching interpolation also needs a conservation check (advice). - **Per-zone history.** `WRT_ZONE_HIST= YES` writes a history file per zone. `WRT_ZONE_CONV= YES` prints the convergence of each zone (code). - **Visual check.** `OUTPUT_FILES= (RESTART, PARAVIEW_MULTIBLOCK)` writes one ParaView file with all zones. The temperature should be continuous across solid-fluid interfaces ([contact resistance tutorial](/tutorials/SS_CR_CHT/)). @@ -293,4 +293,4 @@ Test cases: User guide pages: [Basics of Multi-Zone Computations](../Multizone/), [Markers and BC](../Markers-and-BC/), [Theory: Heat Conduction](../Theory/#heat-conduction), [Solver Setup](../Solver-Setup/), [Custom Output](../Custom-Output/). -Last checked against SU2 develop `11c177b904`. +Source review: 22 October 2026, against [SU2 `docs_site` at `41ea6a219a`](https://github.com/rois1995/SU2/tree/41ea6a219ac038574f3d4a5b130c0c1d8af66457). See the [review scope and outstanding validation](../Documentation-Status/#guide-and-model-review). Setup recommendations remain draft where indicated. diff --git a/_docs_v7/Setup-Guide-Incompressible.md b/_docs_v7/Setup-Guide-Incompressible.md index bdc31952..3b7d9833 100644 --- a/_docs_v7/Setup-Guide-Incompressible.md +++ b/_docs_v7/Setup-Guide-Incompressible.md @@ -19,7 +19,7 @@ permalink: /docs_v7/Setup-Guide-Incompressible/ ## When to use this guide Use this guide for a flow where the density does not depend on the pressure. -This covers liquids and low-speed gas flows, also with heat transfer, where the density changes only with temperature. +This covers liquids and low-speed gas flows, also with heat transfer, where density may depend on temperature and composition while remaining independent of the hydrodynamic pressure. As a rule of thumb, the Mach number is below about 0.3 (advice). This guide covers the solvers `INC_EULER`, `INC_NAVIER_STOKES` and `INC_RANS`. @@ -103,7 +103,7 @@ Inlets use these settings unless overridden with `MARKER_INLET_TURBULENT`: two v `KIND_INCOMP_SYSTEM` selects how SU2 couples pressure and velocity (code): -- `DENSITY_BASED` (default): SU2 adds a pseudo-time derivative of the pressure to the continuity equation. This is called artificial compressibility, a form of preconditioning. SU2 then solves pressure, velocity and temperature together, in one coupled system. All tutorials on this page use it. +- `DENSITY_BASED` (default): SU2 adds a pseudo-time derivative of the pressure to the continuity equation. This is called artificial compressibility, a form of preconditioning. SU2 solves pressure and velocity together, with enthalpy in the coupled system when the energy equation is enabled; temperature is recovered from the fluid model. All tutorials on this page use it. - `PRESSURE_BASED`: a segregated method of the SIMPLE type, which solves the equations one after the other. Choose `SIMPLE` (default) or `SIMPLEC` with `KIND_PB_ITER`. It uses `CONV_NUM_METHOD_FLOW= UDS` (upwind) or `CDS` (centered). With `PRESSURE_BASED`, SU2 stops if you use multigrid (`MGLEVEL` above 0), an adjoint, `MARKER_PERIODIC`, streamwise periodic flow, or `TIME_MARCHING= TIME_STEPPING` (code). @@ -123,7 +123,7 @@ The rest of this page is about the density-based solver. How to choose: -- **No heat transfer, or temperature as a passive quantity.** Use `CONSTANT`. With `INC_ENERGY_EQUATION= YES`, SU2 solves for temperature, but the temperature does not change the flow. This one-way coupling is used in the [laminar flat plate tutorial](/tutorials/Inc_Laminar_Flat_Plate/) (tutorial). Set `SPECIFIC_HEAT_CP` (default 1004.703 J/(kg K)). +- **No heat transfer, or temperature as a passive quantity.** Use `CONSTANT`. With `INC_ENERGY_EQUATION= YES`, SU2 solves the energy equation for enthalpy and recovers temperature. Temperature is passive only when properties affecting momentum, notably viscosity, are independent of temperature and no thermal buoyancy is present. Constant density alone does not ensure one-way coupling: `POLYNOMIAL_VISCOSITY` can still make viscosity temperature-dependent (code). Constant-property one-way coupling is used in the [laminar flat plate tutorial](/tutorials/Inc_Laminar_Flat_Plate/) (tutorial). Set `SPECIFIC_HEAT_CP` (default 1004.703 J/(kg K)). - **Small temperature differences with buoyancy.** Use `BOUSSINESQ`. The buoyancy force uses `THERMAL_EXPANSION_COEFF` (default 0.00347 1/K) and the difference to `INC_TEMPERATURE_INIT`. Gravity is fixed at 9.81 m/s², along the negative y axis in 2D and the negative z axis in 3D. You cannot add `BODY_FORCE= YES`: SU2 stops (code). - **Large temperature differences in a gas.** Use `VARIABLE` with `FLUID_MODEL= INC_IDEAL_GAS` (constant specific heat) or `INC_IDEAL_GAS_POLY` (specific heat as a polynomial of temperature, set with `CP_POLYCOEFFS`, five coefficients). Set `MOLECULAR_WEIGHT` in g/mol (default 28.96) and `SPECIFIC_HEAT_CP`. - **Mixtures of gases.** Use `VARIABLE` with `FLUID_MODEL= FLUID_MIXTURE`. See the [species guide](../Setup-Guide-Species-Combustion/). @@ -168,7 +168,7 @@ They also set the free-stream state used at `MARKER_FAR` markers, the Reynolds n The reference pressure is the reference density times the reference velocity squared. The inputs in the config file are always in SI units ([NACA 0012 tutorial](/tutorials/Inc_Turbulent_NACA0012/)). -The volume and restart files contain the solver variables. So pressure, velocity and temperature in these files are divided by the reference values, unless you use `DIMENSIONAL` (code). +The flow energy solution field is `ENTHALPY` in `SOLUTION`; `TEMPERATURE` is a recovered field in `PRIMITIVE`. The separate weakly coupled heat solver instead uses `TEMPERATURE` as its solution variable (`CFlowIncOutput`, code). Output and restart fields depend on the requested groups; do not read an enthalpy column as temperature. Pressure, velocity and recovered temperature are divided by their respective reference values unless you use `DIMENSIONAL` (code). SU2 prints the reference values and the non-dimensional values at the start of the run. Use them to convert results back to SI units. Advice: @@ -181,7 +181,7 @@ Advice: `MARKER_INLET` sets the inlet markers. `INC_INLET_TYPE` gives one type per inlet marker, in the same order (code): -- `VELOCITY_INLET`: `MARKER_INLET= ( marker, temperature [K], velocity magnitude [m/s], nx, ny, nz )`. The direction vector does not need unit length. The temperature is needed even without the energy equation, but then SU2 does not use it ([Markers and BC](../Markers-and-BC/)). +- `VELOCITY_INLET`: `MARKER_INLET= ( marker, temperature [K], velocity magnitude [m/s], nx, ny, nz )`. SU2 normalizes the nonzero direction vector, so it does not need unit length (code). The temperature is needed even without the energy equation, but then SU2 does not use it ([Markers and BC](../Markers-and-BC/)). - `PRESSURE_INLET`: `MARKER_INLET= ( marker, temperature [K], total gauge pressure [Pa], nx, ny, nz )`. SU2 adjusts the inlet velocity to reach the total pressure. `INC_INLET_DAMPING` (default 0.1) damps these updates. The incompressible solver has no mass flow inlet (code). @@ -194,7 +194,7 @@ For a measured or computed inlet profile, set `SPECIFIED_INLET_PROFILE= YES` and `MARKER_OUTLET` sets the outlet markers. `INC_OUTLET_TYPE` gives one type per outlet marker (code): - `PRESSURE_OUTLET`: `MARKER_OUTLET= ( marker, gauge pressure [Pa] )`. This is the usual choice. Zero is a good value, because the pressure level is arbitrary in incompressible flow (advice). -- `MASS_FLOW_OUTLET`: `MARKER_OUTLET= ( marker, mass flow [kg/s] )`. SU2 adjusts the outlet pressure to reach the target. `INC_OUTLET_DAMPING` (default 0.1) damps these updates. +- `MASS_FLOW_OUTLET`: `MARKER_OUTLET= ( marker, mass flow [kg/s] )`. In a planar 2D case, this is the rate for a unit out-of-plane depth. SU2 adjusts the outlet pressure to reach the target. `INC_OUTLET_DAMPING` (default 0.1) damps these updates. Put the outlet far enough downstream that no recirculation crosses it (advice, to be reviewed). @@ -216,7 +216,7 @@ For the density-based solver, `CONV_NUM_METHOD_FLOW` accepts these schemes (code - `FDS` (flux difference splitting, an upwind scheme). Almost all incompressible test cases use it. It has no tuning parameters ([Convective Schemes](../Convective-Schemes/#incompressible-flow)). - `JST` and `LAX-FRIEDRICH` (centered schemes with artificial dissipation). -`MUSCL_FLOW= YES` (default) makes the scheme second order. The default limiter is `VENKATAKRISHNAN`, but most incompressible test cases use `SLOPE_LIMITER_FLOW= NONE` (code, test case). +`MUSCL_FLOW= YES` (default) enables second-order reconstruction for the upwind `FDS` scheme; it does not change the centered schemes. The default limiter is `VENKATAKRISHNAN`, but most incompressible test cases use `SLOPE_LIMITER_FLOW= NONE` (code, test case). Add a limiter only if the solution shows wiggles, or if the run diverges near sharp gradients (advice, to be reviewed). For `INC_RANS`, the test cases use `CONV_NUM_METHOD_TURB= SCALAR_UPWIND`. `BOUNDED_SCALAR` is also available for incompressible flow. It corrects for a non-zero velocity divergence during convergence ([Convective Schemes](../Convective-Schemes/#turbulence-and-scalarspecies-equations)). @@ -297,4 +297,4 @@ Test cases (density-based unless noted): User guide pages: [Physical Definition](../Physical-Definition/#flow-condition-incompressible), [Markers and BC](../Markers-and-BC/), [Theory](../Theory/#incompressible-navier-stokes), [Convective Schemes](../Convective-Schemes/), [Solver Setup](../Solver-Setup/), [Custom Output](../Custom-Output/). -Last checked against SU2 develop `11c177b904`. +Source review: 22 October 2026, against [SU2 `docs_site` at `41ea6a219a`](https://github.com/rois1995/SU2/tree/41ea6a219ac038574f3d4a5b130c0c1d8af66457). See the [review scope and outstanding validation](../Documentation-Status/#guide-and-model-review). Setup recommendations remain draft where indicated. diff --git a/_docs_v7/Setup-Guide-NICFD.md b/_docs_v7/Setup-Guide-NICFD.md index 430a7cc4..f4b17724 100644 --- a/_docs_v7/Setup-Guide-NICFD.md +++ b/_docs_v7/Setup-Guide-NICFD.md @@ -25,9 +25,9 @@ The guide covers the compressible solvers (`SOLVER= EULER`, `NAVIER_STOKES` or ` Terms used below: - **Equation of state (EOS)**: the relation between pressure, density, temperature and energy of the fluid. -- **Critical point**: the pressure and temperature above which liquid and vapour can no longer be told apart. Near it, the fluid properties change fast. -- **Acentric factor**: a number that describes the shape of the molecule. Cubic equations of state such as Peng-Robinson use it. -- **Two-phase region**: the states where liquid and vapour coexist. Inside it, a cubic EOS gives non-physical values, for example a negative square of the speed of sound. +- **Critical point**: the endpoint of the liquid-vapour coexistence curve, where the two phases become identical. A supercritical state has both temperature and pressure above their critical values. Properties can vary rapidly nearby. +- **Acentric factor**: a dimensionless parameter defined from the reduced saturation pressure at a reduced temperature of 0.7. Peng-Robinson uses it to represent departures from simple-fluid behaviour. +- **Two-phase region**: states where liquid and vapour coexist in equilibrium. A cubic EOS may return a metastable or unstable single-phase continuation there. Positive pressure and sound-speed squared do not establish phase stability; check the saturation boundary separately. In this guide, (advice) also covers general thermodynamics practice. @@ -35,7 +35,7 @@ In this guide, (advice) also covers general thermodynamics practice. The block below is built from the regression test [nicf/coolprop/fluidModel.cfg](https://github.com/su2code/SU2/blob/develop/TestCases/nicf/coolprop/fluidModel.cfg). That test runs the supersonic nozzle of the [NICFD nozzle tutorial](/tutorials/NICFD_nozzle/) with CoolProp. -- We replaced the CoolProp fluid with the Peng-Robinson fluid block of the tutorial (siloxane MDM), so that the config runs with a normal SU2 build. +- We replaced the CoolProp fluid with the Peng-Robinson fluid block of the tutorial (siloxane MDM), so that the fluid model needs no CoolProp build. This modified combination has not been run as a new validation case. - We set `RESTART_SOL= NO`, and removed the comments and the file names. - We replaced `LIFT` and `DRAG` in the screen output with `NONPHYSICAL_POINTS`. - The mesh `coolprop_nozzle.su2` is in the [TestCases repository](https://github.com/su2code/TestCases). @@ -127,8 +127,10 @@ How to choose (advice, to be reviewed): - `VW_GAS` is the simplest non-ideal model. It is mainly useful for qualitative studies and code tests. - `PR_GAS` is a common choice for organic fluids. It gives fair accuracy away from the critical point. The NICFD nozzle tutorial uses it (tutorial). -- `COOLPROP` is the most accurate near the critical point, but each property evaluation is slower. -- `DATADRIVEN_FLUID` gives accuracy close to the reference EOS at a lower cost. First you must build a table, or train a network, for your fluid and your range of states. +- `COOLPROP` provides fluid-specific multiparameter equations of state. Check the underlying EOS reference, validity range and uncertainty for the fluid and states of interest; neither accuracy nor evaluation cost has a universal ranking. +- `DATADRIVEN_FLUID` approximates a reference EOS with a table or network. Establish property and derivative errors over the intended state range and measure cost; closeness to the reference and a speedup are not guaranteed. + +For background on the EOS families and their limits, see the primary [CoolProp fluid-property documentation](https://coolprop.org/fluid_properties/PurePseudoPure.html) and [cubic-EOS documentation](https://coolprop.org/coolprop/Cubics.html). These describe the library, not a guarantee about SU2 coupling. Parameters and their defaults (code): @@ -248,9 +250,9 @@ What SU2 does with non-physical states (code): | SU2 stops: "SU2 was not compiled with MLPCpp enabled (-Denable-mlpcpp=true)." | A build without MLPCpp (code). | Rebuild with `-Denable-mlpcpp=true`. | | SU2 stops: "Viscosity model not available for this fluid in CoolProp library." (or the same for conductivity). | `FLUID_NAME` is not in the list of the transport model, or is spelled with other capitals (code). | Use the exact name, for example `Nitrogen`, or use a constant model. | | SU2 stops: "POLYNOMIAL_VISCOSITY and POLYNOMIAL_CONDUCTIVITY are for incompressible only currently." | A polynomial transport model with a compressible solver (code). | Use a constant model or `COOLPROP`. | -| `NONPHYSICAL_POINTS` stays above zero, or the speed of sound is negative. | States inside the two-phase region, where a cubic EOS has no physical solution; or too large a step at start-up (advice). | Check the boundary values against the saturation curve. Lower the CFL, start first order, and refine near the critical point (to be reviewed). | +| `NONPHYSICAL_POINTS` stays above zero, or sound-speed squared is negative. | An invalid single-phase state, a metastable/unstable EOS branch, or too large a step at start-up (advice). | Check the boundary values against the saturation curve. Lower the CFL, start first order, and refine near the critical point (to be reviewed). | | Strange results close to saturation with `COOLPROP`. | In a two-phase state, the code raises the temperature by 0.1 K and evaluates the speed of sound of the gas phase (code). | Keep the flow out of the two-phase region: the results there are not reliable. | -| The results look like air. | `CRITICAL_*`, `ACENTRIC_FACTOR`, `GAMMA_VALUE`, `GAS_CONSTANT`, `MU_CONSTANT` or `THERMAL_CONDUCTIVITY_CONSTANT` left at their defaults, which are air values (code). | Set all fluid and transport parameters for your fluid. | +| The results look like air. | `CRITICAL_*`, `ACENTRIC_FACTOR`, `GAMMA_VALUE`, `GAS_CONSTANT`, `MU_CONSTANT` or `THERMAL_CONDUCTIVITY_CONSTANT` left at their defaults, which do not collectively describe the intended fluid (code). | Set all fluid and transport parameters for your fluid. | | The CoolProp conductivity has no effect. | `TURBULENT_CONDUCTIVITY_MODEL` is left at `CONSTANT_PRANDTL_TURB` (code). | Set `TURBULENT_CONDUCTIVITY_MODEL= NONE` (to be reviewed). | | `EXTRAPOLATION` is 1 in parts of the domain. | The data-driven model is used outside its training range (code). | Generate data and retrain over a wider range of density and energy. | | The inlet flow angle is wrong on a 2D inlet that is not normal to x. | In 2D, SU2 reads the direction of the Riemann `TOTAL_CONDITIONS_PT` inlet relative to the boundary normal. In 3D, it reads it as x, y, z components (code, to be reviewed). | In 2D, give the direction as (normal, tangential) components. | @@ -275,4 +277,4 @@ Test cases (SU2 repository): User guide pages: [Physical Definition](../Physical-Definition/), [Markers and Boundary Conditions](../Markers-and-BC/), [Convective Schemes](../Convective-Schemes/), [Slope Limiters and Shock Resolution](../Slope-Limiters-and-Shock-Resolution/), [Theory](../Theory/), [Option reference](../Option-Reference/), [Output fields](../Output-Fields-Reference/). -Last checked against SU2 develop `11c177b904`. +Source review: 22 October 2026, against [SU2 `docs_site` at `41ea6a219a`](https://github.com/rois1995/SU2/tree/41ea6a219ac038574f3d4a5b130c0c1d8af66457). See the [review scope and outstanding validation](../Documentation-Status/#guide-and-model-review). Setup recommendations remain draft where indicated. diff --git a/_docs_v7/Setup-Guide-RANS-External-Aero.md b/_docs_v7/Setup-Guide-RANS-External-Aero.md index b93bf119..07b06851 100644 --- a/_docs_v7/Setup-Guide-RANS-External-Aero.md +++ b/_docs_v7/Setup-Guide-RANS-External-Aero.md @@ -123,15 +123,15 @@ Set `SOLVER= RANS` and pick the model with `KIND_TURB_MODEL`. With `SOLVER= RANS - With an empty `SST_OPTIONS`, SU2 runs the 2003 version, "SST-2003m", as set in `ParseSSTOptions` in `option_structure.hpp` (code). Some older pages give `V1994m` as the default; this is out of date. - The other `SST_OPTIONS` values are `V1994m`, `V2003m`, `SUSTAINING`, `VORTICITY`, `KATO-LAUNDER`, `UQ`, `COMPRESSIBILITY-WILCOX`, `COMPRESSIBILITY-SARKAR` and `DIMENSIONLESS_LIMIT`. Write `KATO-LAUNDER` with a dash (code). -- SST needs free-stream values for k and omega. They come from `FREESTREAM_TURBULENCEINTENSITY` (a fraction: `0.001` means 0.1 %) and `FREESTREAM_TURB2LAMVISCRATIO` (eddy viscosity over laminar viscosity). The defaults are `0.05` and `10.0` (code). These defaults suit internal flows and may be too high for external aerodynamics (docs). +- SST needs free-stream values for k and omega. They come from `FREESTREAM_TURBULENCEINTENSITY` (a fraction: `0.001` means 0.1 %) and `FREESTREAM_TURB2LAMVISCRATIO` (eddy viscosity over laminar viscosity). The defaults are `0.05` and `10.0` (code). These are parser defaults, not calibrated inlet conditions. Choose values for the actual flow and check their decay to the body; see the [TMR SST boundary conditions](https://tmbwg.github.io/turbmodels/sst.html) (reference, advice). - External aerodynamics tests use, for example, `FREESTREAM_TURBULENCEINTENSITY= 0.001` with `FREESTREAM_TURB2LAMVISCRATIO= 100.0` (RAE2822 SST), or `0.001` with `0.1` (NACA0012 SST with `SUSTAINING`) (test case). -- In SST, k decays between the far field and the body. Two options stop this decay. `SST_OPTIONS= SUSTAINING` adds source terms that keep the free-stream values (docs). `TURB_FIXED_VALUES= YES` holds k and omega at the far-field values in an upstream region set by `TURB_FIXED_VALUES_DOMAIN` (code). The test `rans/naca0012/turb_NACA0012_sst_fixedvalues.cfg` uses the second one (test case). +- In SST, k decays between the far field and the body. Two options control this decay. `SST_OPTIONS= SUSTAINING` supplies a floor to production using the ambient values; SU2 uses a maximum rather than the additive sustaining terms of the TMR definition (code). See [the implementation difference](../Turbulence-Models/#sst). `TURB_FIXED_VALUES= YES` holds k and omega at the far-field values in an upstream region set by `TURB_FIXED_VALUES_DOMAIN` (code). The test `rans/naca0012/turb_NACA0012_sst_fixedvalues.cfg` uses the second one (test case). **Which one to pick.** - SA is robust and widely used for attached flows over wings and airfoils (advice). - SST is often preferred when adverse pressure gradients and separation matter (advice, to be reviewed). -- If the two models give different lift or drag, treat the difference as model uncertainty. Look at the flow where they differ (advice). +- Differences between SA and SST are evidence of model sensitivity, not a quantified uncertainty bound. First check iterative and mesh convergence, then examine the regions where the models differ (advice). See [Turbulence Models](../Turbulence-Models/) for the full option list. @@ -172,7 +172,7 @@ See [Slope Limiters and Shock Resolution](../Slope-Limiters-and-Shock-Resolution ### CFL number and adaptive CFL -SU2 marches a steady case in pseudo-time. The CFL number sets the local pseudo-time step. A higher CFL converges in fewer iterations, but each iteration needs a harder linear solve. +SU2 marches a steady case in pseudo-time. The CFL number sets the local pseudo-time step. A higher CFL can reduce the iteration count, but can also make the linear solve harder or destabilize the nonlinear iteration. - The default `CFL_NUMBER` is `1.25` (code). Implicit RANS runs use much higher values: `100` in the ONERA M6 tutorial, `1000` in the RAE2822 SA and NACA0012 SST tests (tutorial, test case). - `CFL_ADAPT= YES` lets SU2 change the CFL during the run. `CFL_NUMBER` is then the starting value (code). @@ -256,7 +256,7 @@ With `INIT_OPTION= REYNOLDS` (the default), SU2 builds the free stream from the Things to check: -- The mesh must be in meters. `REYNOLDS_LENGTH` is the length (in mesh units) that the Reynolds number refers to, for example the chord (tutorial). +- With `SYSTEM_MEASUREMENTS= SI` (the default), give mesh lengths in metres. `REYNOLDS_LENGTH` is the length (in mesh units) that the Reynolds number refers to, for example the chord (tutorial). - With `INIT_OPTION= TD_CONDITIONS`, SU2 uses `FREESTREAM_PRESSURE` and `FREESTREAM_TEMPERATURE` instead, and ignores the Reynolds number (tutorial). - SU2 prints a table of free-stream values before the first iteration. Check it (tutorial). - `REF_DIMENSIONALIZATION` sets the scaling of the equations. The default is `DIMENSIONAL` (code). The tests also use `FREESTREAM_VEL_EQ_ONE`, `FREESTREAM_VEL_EQ_MACH` and `FREESTREAM_PRESS_EQ_ONE` (tutorial, test case). @@ -282,7 +282,7 @@ y+ is the distance of the first point from the wall, in wall units. It tells you - Without wall functions, the first point must be in the viscous sublayer: y+ below 5 (docs). y+ about 1 is the usual target (advice). - With wall functions, SU2 models the near-wall layer, so the first point can be further from the wall. Turn them on per marker: `MARKER_WALL_FUNCTIONS= ( wall, STANDARD_WALL_FUNCTION )`. They work with SA and SST, compressible and incompressible (docs). - For RANS, only `NO_WALL_FUNCTION` and `STANDARD_WALL_FUNCTION` are tested. `ADAPTIVE_WALL_FUNCTION`, `SCALABLE_WALL_FUNCTION` and `NONEQUILIBRIUM_WALL_MODEL` stop SU2 with an error (code, test case). -- The wall function is active only where y+ is above `WALLMODEL_MINYPLUS` (default `5.0`) (code, docs). The docs give an upper limit of y+ 100 to 500, rising with the Reynolds number (docs). +- The wall function is active only where y+ is above `WALLMODEL_MINYPLUS` (default `5.0`) (code, docs). The activation threshold is not a mesh-accuracy target. See [Wall Treatment](../Wall-Treatment/#recommended-use) for log-layer placement and the current restrictions on mixed wall treatments. - Wall functions and `WALL_ROUGHNESS` cannot be used together (code). - Wall functions assume an attached boundary layer in equilibrium. They are less accurate near separation and strong pressure gradients (advice). - Check the `Y_PLUS` output field on the wall. It is in the default `PRIMITIVE` output group (code). @@ -293,7 +293,7 @@ See [Markers and Boundary Conditions](../Markers-and-BC/#wall-functions) and the - **Residuals.** Plot `RMS_DENSITY` and the turbulence residual (`RMS_NU_TILDE` for SA, `RMS_TKE` and `RMS_DISSIPATION` for SST). A drop of several orders of magnitude is a good sign (advice). - **Coefficients.** `LIFT`, `DRAG` and the moments must be flat at the end of the run. Add the `CAUCHY` group to `HISTORY_OUTPUT` to see the Cauchy values (code). -- **Linear solver and CFL.** `LINSOL_RESIDUAL` should stay below `LINEAR_SOLVER_ERROR` most of the time. With `CFL_ADAPT= YES`, `AVG_CFL` should grow and stay high (advice). +- **Linear solver and CFL.** `LINSOL_RESIDUAL` is log10 of the final linear residual: compare it with log10(`LINEAR_SOLVER_ERROR`), for example −6 for a tolerance of 1e-6 (code). With `CFL_ADAPT= YES`, `AVG_CFL` should grow and stay high (advice). - **Free stream.** Read the free-stream table that SU2 prints at the start: Reynolds number, density, pressure, velocity (tutorial). - **y+.** Look at `Y_PLUS` on the walls (code). - **Surface data.** Put `SURFACE_PARAVIEW` or `SURFACE_CSV` in `OUTPUT_FILES`, and plot `PRESSURE_COEFF` and `SKIN_FRICTION-X` along the wall (code, tutorial). @@ -312,7 +312,7 @@ See [History and Solution Output](../Custom-Output/) and the [Output Fields Refe | `LINSOL_RESIDUAL` stays near 1. | The linear system is too hard at this CFL. | Lower the CFL, use `ILU`, raise `LINEAR_SOLVER_ITER` (docs). | | The drag is too high with `JST` on a coarse mesh. | Too much numerical dissipation. | Try `JST_MAT`, or an upwind scheme with MUSCL (docs). Refine the mesh. | | The skin friction or drag is far from the expected value. | Wrong Reynolds number: the mesh is not in meters, or `REYNOLDS_LENGTH` is wrong. | Check the mesh units and the free-stream table (tutorial). | -| SST results depend on the far-field distance. | The free-stream k decays before it reaches the body. | Use `SST_OPTIONS= SUSTAINING` or `TURB_FIXED_VALUES= YES` (docs, code). | +| SST results depend on the far-field distance. | The free-stream k decays before it reaches the body. | Check the incoming turbulence and domain-size sensitivity. If decay is the cause, consider `SST_OPTIONS= SUSTAINING` or `TURB_FIXED_VALUES= YES` with its upstream plane set; these do not fix pressure-field interference from a close far field (advice). | | The run stops at iteration 1000. | `ITER` has a default of `1000`. | Set `ITER` (code). | | A fixed-CL run ends before CL reaches the target. | The angle is updated too rarely, or `CONV_CAUCHY_EPS` is too large. | Lower `UPDATE_AOA_ITER_LIMIT` and check `CONV_CAUCHY_EPS` (code). | @@ -342,4 +342,4 @@ User guide pages: - [Physical Definition](../Physical-Definition/), [Convective Schemes](../Convective-Schemes/), [Slope Limiters and Shock Resolution](../Slope-Limiters-and-Shock-Resolution/), [Linear Solvers and Preconditioners](../Linear-Solvers-and-Preconditioners/), [Markers and Boundary Conditions](../Markers-and-BC/), [Solver Setup](../Solver-Setup/), [Governing Equations](../Theory/), [History and Solution Output](../Custom-Output/). - All options: [Option Reference](../Option-Reference/). All output fields: [Output Fields Reference](../Output-Fields-Reference/). -Last checked against SU2 develop `11c177b904`. +Source review: 22 October 2026, against [SU2 `docs_site` at `41ea6a219a`](https://github.com/rois1995/SU2/tree/41ea6a219ac038574f3d4a5b130c0c1d8af66457). See the [review scope and outstanding validation](../Documentation-Status/#guide-and-model-review). Setup recommendations remain draft where indicated. diff --git a/_docs_v7/Setup-Guide-Shape-Optimization.md b/_docs_v7/Setup-Guide-Shape-Optimization.md index d68f66c3..0d19432c 100644 --- a/_docs_v7/Setup-Guide-Shape-Optimization.md +++ b/_docs_v7/Setup-Guide-Shape-Optimization.md @@ -20,7 +20,7 @@ permalink: /docs_v7/Setup-Guide-Shape-Optimization/ Use this guide to change the shape of a body or a duct so that an output of the flow improves: for example less drag at a fixed lift, or a lower pressure drop. -SU2 computes the gradient of the output with respect to the shape parameters with the **adjoint method**: one extra solve, at about the cost of one flow solution, gives the sensitivity of one output to all shape parameters. +SU2 computes the gradient of the output with respect to the shape parameters with the **adjoint method**: one adjoint solve gives the sensitivity of one scalar output to all shape parameters. Its cost does not grow by one flow solve per parameter, but runtime and memory depend on the solver, convergence and recording strategy. SU2 has two adjoint solvers: @@ -153,7 +153,7 @@ For a RANS case, start from the [RAE 2822 tutorial](/tutorials/Turbulent_2D_Cons - With the Python scripts, keep `MATH_PROBLEM= DIRECT` in your file. The scripts set the adjoint value themselves, from the gradient method you choose on the command line (code). - To run by hand: run `SU2_CFD` for the flow, and copy the restart file to the name in `SOLUTION_FILENAME`. Then run `SU2_CFD_AD` with `MATH_PROBLEM= DISCRETE_ADJOINT`. Then run `SU2_DOT_AD`, which turns the surface sensitivities into the gradient for the design variables (tutorial, to be reviewed: check the file names against the scripts). - The discrete adjoint uses the numerical settings of the flow solver. It ignores the continuous adjoint options, such as `CONV_NUM_METHOD_ADJFLOW`, `ADJ_JST_SENSOR_COEFF`, `CFL_REDUCTION_ADJFLOW` and `LIMIT_ADJFLOW` (tutorial). `INCONSISTENT_DISC= YES` (default `NO`) makes the discrete adjoint use the adjoint scheme options `CONV_NUM_METHOD_ADJFLOW` and `ADJ_JST_SENSOR_COEFF` instead (code). The tutorial text calls this switch `INCONSISTENT_AD`. -- `FROZEN_VISC_DISC` (default `NO`) freezes the turbulence model in the adjoint. `FROZEN_LIMITER_DISC` (default `NO`) freezes the slope limiter (code). Both make the adjoint cheaper or more robust, but the gradient then no longer matches finite differences exactly (advice, to be reviewed). +- `FROZEN_VISC_DISC` (default `NO`) freezes the turbulence model in the adjoint. `FROZEN_LIMITER_DISC` (default `NO`) freezes the slope limiter (code). These differentiate a frozen model or limiter rather than the fully coupled, recomputed residual. For a gradient comparison, make the derivative definition and frozen settings agree on both sides; otherwise disagreement is expected (advice). - `QUASI_NEWTON_NUM_SAMPLES` above 1 adds a quasi-Newton correction to the adjoint iterations. The default is 0 (off) (code). It can speed up the adjoint convergence (to be reviewed). ### Objective function @@ -222,17 +222,17 @@ The box moves only the surface points that lie inside it (tutorial). Make the bo After the surface moves, `SU2_DEF` moves the volume mesh by treating it as an elastic solid (tutorial). -- `DEFORM_STIFFNESS_TYPE`: `WALL_DISTANCE` (default), `INVERSE_VOLUME` or `CONSTANT_STIFFNESS` (code). The first two make small cells near walls stiffer, so that the boundary layer cells keep their shape (advice, to be reviewed). +- `DEFORM_STIFFNESS_TYPE`: `WALL_DISTANCE` (default), `INVERSE_VOLUME` or `CONSTANT_STIFFNESS` (code). `WALL_DISTANCE` stiffens elements near a wall; `INVERSE_VOLUME` stiffens small elements wherever they occur. These can help preserve boundary-layer cells, but do not guarantee positive volumes (code, advice). - `DEFORM_LINEAR_SOLVER` (default `FGMRES`), `DEFORM_LINEAR_SOLVER_PREC` (default `ILU`), `DEFORM_LINEAR_SOLVER_ITER` (default 1000), `DEFORM_LINEAR_SOLVER_ERROR` (default 1E-14) (code). - `DEFORM_NONLINEAR_ITER` (default 1) splits the deformation into this many smaller steps (code). More steps help with large deformations (advice, to be reviewed). - `DEFORM_LIMIT` (default 1E6) deforms only the cells closer to the wall than this distance (code). -- `DEFORM_COEFF` is used as the Poisson ratio of the elastic mesh. Its option text gives a range from -1.0 to 0.5, but the default is 1E6 (code). The [species transport tutorial](/tutorials/Species_Transport/) sets 0.0. Set it in your file (to be reviewed). +- With the default legacy `SU2_DEF` path (`DEFORM_MESH= NO`), `CLinearElasticity` uses `DEFORM_COEFF` as its Poisson ratio. The parser default is 1E6, outside the physical isotropic-elastic interval −1 < ν < 0.5; do not interpret that default as a material recommendation. The [species transport tutorial](/tutorials/Species_Transport/) sets 0.0. With `DEFORM_MESH= YES`, `SU2_DEF` instead uses `CMeshSolver`, whose Poisson ratio is `DEFORM_POISSONS_RATIO` (default 0.3). These options belong to different deformation paths (code). - `DEFORM_KIND= RBF` uses radial basis functions instead of the elastic solid (default `ELASTIC`) (code). See the test case [deformation/naca0012](https://github.com/su2code/SU2/blob/develop/TestCases/deformation/naca0012/def_NACA0012_rbf.cfg) (test case). -- Boundaries that are not in `DV_MARKER` stay fixed. Points on `MARKER_SYM` boundaries can slide in their plane. Declaring a flat outlet as `MARKER_SYM` avoids torn cells there (tutorial). +- Boundaries that are not in `DV_MARKER` stay fixed. Points on `MARKER_SYM` boundaries can slide in their plane. If a separate deformation configuration uses `MARKER_SYM` to allow a planar end boundary to slide, retain the actual inlet/outlet conditions in the flow configuration. Changing a flow outlet into a symmetry boundary changes the physical problem (advice). - `HOLD_GRID_FIXED= YES` with `HOLD_GRID_FIXED_COORD` keeps the mesh outside a box fixed (code). - Set `DEFORM_CONSOLE_OUTPUT= YES` to see the minimum cell volume after each step (code). -The options `DEFORM_MESH` and `MARKER_DEFORM_MESH` belong to the mesh solver inside SU2_CFD, for moving boundaries during a flow simulation. Shape optimization with the Python scripts uses SU2_DEF. +`DEFORM_MESH` also selects the newer mesh-solver path in `SU2_DEF`; it is not exclusive to `SU2_CFD`. In a flow run, use `DEFORM_MESH` and `MARKER_DEFORM_MESH` for deforming moving boundaries. The Python shape-optimization workflow calls `SU2_DEF` (code). ### Python scripts @@ -272,7 +272,7 @@ Optimizer settings (tutorial): 2. Run `finite_differences.py -f config.cfg`. The gradient is in `of_grad_findiff`, with the same extension. The step comes from `FIN_DIFF_STEP`; the script uses 0.001 when the option is missing. The template suggests 0.001 times `REF_LENGTH` (code). 3. Compare the two files, design variable by design variable. Signs and orders of magnitude must agree. Try two or three step sizes: a step that is too large adds truncation error, and a step that is too small adds noise from the incomplete convergence (advice). -With a direct-diff build, `discrete_adjoint.py -v True` compares the adjoint gradient with forward-mode AD, instead of finite differences (code, to be reviewed). +`discrete_adjoint.py` accepts `-v True`, but the forward-mode AD calculation and comparison report in `discrete_design` are commented out in this version. That flag does not validate the gradient. Use the finite-difference workflow above; a forward-mode comparison needs a separately verified driver (code). **Check each new design.** Look at the deformed meshes in `DESIGNS/DSN_*/DEFORM`, the flow solutions in `DESIGNS/DSN_*/DIRECT`, and the history in `history_project` (tutorial). @@ -284,8 +284,8 @@ With a direct-diff build, `discrete_adjoint.py -v True` compares the adjoint gra | The gradient differs from finite differences. | The flow or the adjoint is not converged; the finite difference step is too large or too small; the turbulence or the limiter is frozen (advice). | Converge both deeper. Try several `FIN_DIFF_STEP` values. Set `FROZEN_VISC_DISC= NO` and `FROZEN_LIMITER_DISC= NO`. | | The adjoint diverges or stalls. | The flow solution oscillates (limiter, shock, separation), so the adjoint iterations have no steady solution to converge to (advice, to be reviewed). | Converge the flow deeper. Freeze the limiter in the flow with `LIMITER_ITER`. Try `FROZEN_LIMITER_DISC= YES` or `QUASI_NEWTON_NUM_SAMPLES` (to be reviewed). | | The flow does not converge on a new design. | The step was too large, or the shape became unphysical (advice). | Lower `OPT_RELAX_FACTOR` or the bounds. Restart the optimization from its project file with `-r` (to be reviewed). | -| SU2_DEF reports: "There are N elements with negative volume". | The deformation is too large for the mesh (code). | Lower the step (`OPT_RELAX_FACTOR`, bounds). Raise `DEFORM_NONLINEAR_ITER`. Try another `DEFORM_STIFFNESS_TYPE` or `DEFORM_KIND= RBF`. Set `FFD_INTPREV= YES` (to be reviewed). | -| The mesh is torn at an outlet or a side boundary. | That boundary is fixed while its neighbour moves (tutorial). | Declare flat boundaries next to the moving surface as `MARKER_SYM`. | +| SU2_DEF reports: "There are N elements with negative volume". | The deformation is too large for the mesh (code). | Lower the step (`OPT_RELAX_FACTOR`, bounds). Raise `DEFORM_NONLINEAR_ITER`. Try another `DEFORM_STIFFNESS_TYPE` or `DEFORM_KIND= RBF`. `FFD_INTPREV= YES` checks FFD-box intersections; it does not guarantee a valid volume mesh (code, advice). | +| The mesh is torn at an outlet or a side boundary. | That boundary is fixed while its neighbour moves (tutorial). | Allow planar sliding in a separate deformation configuration where appropriate; preserve the physical inlet/outlet types in the flow configuration. | | Kinks at the edge of the FFD box. | Control points on the box faces move (tutorial). | Use `FFD_CONTINUITY= 2ND_DERIVATIVE`, or fix the outer planes with `FFD_FIX_I`, `FFD_FIX_J`, `FFD_FIX_K`. | | Part of the surface does not move. | It lies outside the FFD box (tutorial). | Enlarge the box and run the `FFD_SETTING` step again. | | The FFD point inversion does not converge. | The box is badly shaped, or points sit near its faces (advice, to be reviewed). | Raise `FFD_ITERATIONS`. Make the box larger and closer to a regular hexahedron. | @@ -316,4 +316,4 @@ Test cases (SU2 repository): User guide pages: [Build SU2 on Linux/MacOS](../Build-SU2-Linux-MacOS/), [Execution](../Execution/), [Advanced AD Techniques](../Advanced-AD-Techniques/), [Solver Setup](../Solver-Setup/), [Setup Guide: Turbomachinery](../Setup-Guide-Turbomachinery/). -Last checked against SU2 develop `11c177b904`. +Source review: 22 October 2026, against [SU2 `docs_site` at `41ea6a219a`](https://github.com/rois1995/SU2/tree/41ea6a219ac038574f3d4a5b130c0c1d8af66457). See the [review scope and outstanding validation](../Documentation-Status/#guide-and-model-review). Setup recommendations remain draft where indicated. diff --git a/_docs_v7/Setup-Guide-Species-Combustion.md b/_docs_v7/Setup-Guide-Species-Combustion.md index 2bcf618e..9585bc52 100644 --- a/_docs_v7/Setup-Guide-Species-Combustion.md +++ b/_docs_v7/Setup-Guide-Species-Combustion.md @@ -234,7 +234,7 @@ SU2 checks that each mass fraction in `SPECIES_INIT` and `MARKER_INLET_SPECIES`, For a mixture ([composition-dependent tutorial](/tutorials/Inc_Species_Transport_Composition_Dependent_Model/)): -- The mean molecular weight is a mole-fraction average. The specific heat is a mass-fraction average (tutorial). +- The mean molecular weight is a mole-fraction average, equivalently 1/M_mix = Σ(Y_i/M_i) for mass fractions Y_i. Specific heat is a mass-fraction average (tutorial, code). - `MIXING_VISCOSITY_MODEL` sets the mixing rule for viscosity: `DAVIDSON` (default) or `WILKE` (code). - With a species model and variable density, SU2 does not switch the energy equation on for you (code). If all streams have the same temperature and the walls are adiabatic, `INC_ENERGY_EQUATION= NO` is possible, as in the tutorial. Otherwise set `INC_ENERGY_EQUATION= YES`. @@ -254,7 +254,7 @@ Here μ is the viscosity, k the thermal conductivity, c_p the specific heat, Sc For RANS, turbulence adds μ_t / Sc_t to ρD, with `SCHMIDT_NUMBER_TURBULENT` (default 0.7) as Sc_t ([Theory](../Theory/#species-transport)). For gases that diffuse fast, such as hydrogen, the [composition-dependent tutorial](/tutorials/Inc_Species_Transport_Composition_Dependent_Model/) suggests `CONSTANT_LEWIS` (tutorial). -`UNITY_LEWIS` and `CONSTANT_LEWIS` keep heat and mass diffusion consistent in a gas mixture. Hydrogen has a Lewis number well below 1 (advice, to be reviewed). +`UNITY_LEWIS` and `CONSTANT_LEWIS` prescribe the ratio of thermal to mass diffusivity; they do not reproduce general multicomponent diffusion or thermal diffusion. Hydrogen-rich mixtures can require differential-diffusion treatment, but choose coefficients for the actual composition and state (advice, to be reviewed). ### Species boundary conditions @@ -263,7 +263,7 @@ Species boundary conditions sit on top of the flow boundary conditions (code): - **Inlet**: every `MARKER_INLET` marker needs an entry in `MARKER_INLET_SPECIES= ( marker, Y_1, ..., Y_N-1, ... )`. The values are mass fractions. Inlet profiles from a file are possible, see [`species3_primitiveVenturi_inletFile.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/species_transport/venturi_primitive_3species/species3_primitiveVenturi_inletFile.cfg). - **Outlet**: zero gradient. Nothing to set. - **Far field**: the values of `SPECIES_INIT`. -- **Walls**: zero flux by default. `MARKER_WALL_SPECIES= ( marker, FLUX, value, VALUE, value, ... )` sets, per species, a flux (`FLUX`) or a fixed mass fraction (`VALUE`). The pairs follow the species order, for example `MARKER_WALL_SPECIES= ( wall, VALUE, 1.0, FLUX, 0.01 )` (test case). The flux is per unit area (to be reviewed: units). +- **Walls**: zero flux by default. `MARKER_WALL_SPECIES= ( marker, FLUX, value, VALUE, value, ... )` sets, per species, a flux (`FLUX`) or a fixed mass fraction (`VALUE`). The pairs follow the species order, for example `MARKER_WALL_SPECIES= ( wall, VALUE, 1.0, FLUX, 0.01 )` (test case). The `FLUX` value enters `CSpeciesSolver::BC_Wall_Generic` directly as a scalar mass flux per area, with positive values adding the species to the domain. With `INC_NONDIM= DIMENSIONAL` its units are kg/(m² s). Otherwise normalize by the reference density times reference velocity; this boundary routine performs no automatic dimensional conversion (code). `MARKER_SPECIES_STRONG_BC` lists markers where SU2 imposes the species values directly in the solution: a strong, or Dirichlet, condition. By default, SU2 imposes them through the boundary flux: a weak condition (code). @@ -280,11 +280,11 @@ Start from the test case closest to your problem (to be reviewed). ### Numerics for the species equations -- `CONV_NUM_METHOD_SPECIES`: `SCALAR_UPWIND` (default) or `BOUNDED_SCALAR`. Centered schemes are not available for scalars (code). `BOUNDED_SCALAR` subtracts the effect of a non-zero velocity divergence during convergence, which keeps scalars inside their bounds ([Convective Schemes](../Convective-Schemes/#turbulence-and-scalarspecies-equations)). The [combustion tutorial](/tutorials/Inc_Combustion/) highly recommends it for flamelet runs. +- `CONV_NUM_METHOD_SPECIES`: `SCALAR_UPWIND` (default) or `BOUNDED_SCALAR`. Centered schemes are not available for scalars (code). `BOUNDED_SCALAR` subtracts the effect of a non-zero velocity divergence during convergence, which helps avoid scalar overshoots from an unconverged continuity equation; it is not a general bound-preservation guarantee ([Convective Schemes](../Convective-Schemes/#turbulence-and-scalarspecies-equations)). The [combustion tutorial](/tutorials/Inc_Combustion/) highly recommends it for flamelet runs. - `MUSCL_SPECIES` (default `NO`) makes the scheme second order. `SLOPE_LIMITER_SPECIES` (default `NONE`) adds a limiter (code). - `TIME_DISCRE_SPECIES`: `EULER_IMPLICIT` (default) or `EULER_EXPLICIT`. No other value is allowed (code). - `CFL_REDUCTION_SPECIES` (default 1.0) multiplies the CFL number for the species equations (code). -- `SPECIES_CLIPPING= YES` keeps the mass fractions between `SPECIES_CLIPPING_MIN` and `SPECIES_CLIPPING_MAX`. SU2 stops if you switch it on without both limits (code). The composition-dependent tutorial uses clipping with `SCALAR_UPWIND` only; `BOUNDED_SCALAR` works without it (tutorial). +- `SPECIES_CLIPPING= YES` clips each transported mass fraction to `SPECIES_CLIPPING_MIN` and `SPECIES_CLIPPING_MAX`. For more than two species, clipping individual fractions to [0,1] does not guarantee their sum is at most one or that the reconstructed last species stays nonnegative. Clipping can also disturb species conservation; inspect all fractions and balances. SU2 stops if you switch it on without both limits (code). The composition-dependent tutorial uses clipping with `SCALAR_UPWIND` only; that example uses `BOUNDED_SCALAR` without clipping (tutorial). - Unsteady runs with dual time stepping and a density that depends on the species cannot use multigrid (`MGLEVEL` above 0) (code). ### Flamelet model: required options @@ -317,7 +317,7 @@ A look-up table is faster to query, but a 3D table can need a lot of memory per - `USER_SOURCE_NAMES`: two names per extra species, a production term and a consumption term. The source is production + consumption × Y. Use `NULL` or `zero` for a missing term (code). - `LOOKUP_NAMES`: table columns to write in the volume output, with `LOOKUP` in `VOLUME_OUTPUT` (tutorial). - `PREFERENTIAL_DIFFUSION= YES` adds the preferential diffusion model for hydrogen flames. The table must then contain `Beta_ProgVar`, `Beta_Enth_Thermal`, `Beta_Enth` and `Beta_MixFrac`. This is stated in the config template and used in the tutorial (code, tutorial). -- `THICKENED_FLAME_CORRECTION` (default `YES`) lowers the source terms and raises the diffusion in cells that are larger than the flame thickness. This keeps the run stable on coarse meshes (code). +- `THICKENED_FLAME_CORRECTION` (default `YES`) lowers the source terms and raises the diffusion in cells that are larger than the flame thickness. This is intended to improve resolution of an under-resolved flame, but does not guarantee stability or mesh-independent flame properties (code, advice). `SPECIES_INIT` and `MARKER_INLET_SPECIES` need one value per controlling variable, plus one per extra species (code). In the start config, these are: progress variable, enthalpy, CO, NOx. @@ -353,7 +353,7 @@ Use `FLOW_MARKERS` when you know the temperatures, which is the usual case. It a - **Field names.** SU2 ignores unknown names in `CONV_FIELD` and prints `Ignoring Convergence Field(s)` at the start. `RMS_SPECIES` without a number is not a field (code). - **Linear solver.** `LINSOL_ITER_SPECIES` and `LINSOL_RESIDUAL_SPECIES` (or `LINSOL_ITER_FLAMELET` and `LINSOL_RESIDUAL_FLAMELET`) show whether SU2 solves the species linear systems well (code). - **Mixing quality.** With `MARKER_ANALYZE`, `SURFACE_SPECIES_0` gives the average mass fraction on those markers, and `SURFACE_SPECIES_VARIANCE` measures how uneven the mixture is there. Add the groups `SPECIES_COEFF` and `SPECIES_COEFF_SURF` to `HISTORY_OUTPUT` (code, tutorial). -- **Mass balance of a species.** At convergence, the species mass flow in through the inlets should equal the flow out through the outlet (advice, to be reviewed). No output field gives this species mass flow directly. A `CUSTOM_OUTPUTS` expression, such as the one in [`passive_transport.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/species_transport/passive_transport_validation/passive_transport.cfg), can compute a mass-flow-averaged value (to be reviewed). +- **Mass balance of a species.** For a steady non-reacting case with no volume source and impermeable walls, the advective plus diffusive species influx must balance the outflux. Include prescribed wall fluxes and reaction/volume sources when present; an inlet/outlet-only balance is then insufficient (advice). No output field gives this species mass flow directly. A `CUSTOM_OUTPUTS` expression, such as the one in [`passive_transport.cfg`](https://github.com/su2code/SU2/blob/develop/TestCases/species_transport/passive_transport_validation/passive_transport.cfg), can compute a mass-flow-averaged value (to be reviewed). - **Table misses (flamelet).** Add `LOOKUP` to `VOLUME_OUTPUT` and check the field `TABLE_MISSES`. Points with misses have controlling variables outside the table (code). - **Flame position (flamelet).** Look at the progress variable and the temperature in ParaView. The flame should not move between the last outputs of a steady run (advice, to be reviewed). @@ -404,4 +404,4 @@ Test cases: User guide pages: [Theory: Species Transport and Combustion](../Theory/#species-transport), [Convective Schemes](../Convective-Schemes/), [Markers and BC](../Markers-and-BC/), [Custom Output](../Custom-Output/). -Last checked against SU2 develop `11c177b904`. +Source review: 22 October 2026, against [SU2 `docs_site` at `41ea6a219a`](https://github.com/rois1995/SU2/tree/41ea6a219ac038574f3d4a5b130c0c1d8af66457). See the [review scope and outstanding validation](../Documentation-Status/#guide-and-model-review). Setup recommendations remain draft where indicated. diff --git a/_docs_v7/Setup-Guide-Transition.md b/_docs_v7/Setup-Guide-Transition.md index 98d2b7dd..ba4c1fed 100644 --- a/_docs_v7/Setup-Guide-Transition.md +++ b/_docs_v7/Setup-Guide-Transition.md @@ -26,7 +26,7 @@ Use a transition model when laminar flow covers a large part of the surface, for - wind turbine blades, gliders, natural laminar flow wings, - cases with laminar separation bubbles. -In these cases, a fully turbulent run over-predicts the skin friction drag and misses laminar separation (advice). +A fully turbulent model cannot represent the laminar region and its transition mechanisms. It can overpredict local skin friction there, but the change in total drag also depends on separation and pressure drag (advice). Limits of the Langtry-Menter (LM) model in SU2 (tutorial): @@ -146,9 +146,9 @@ What this means (advice, to be reviewed): - With SST, the intensity at the body depends on how much k decays on its way from the far field. You control it with `FREESTREAM_TURBULENCEINTENSITY` and `FREESTREAM_TURB2LAMVISCRATIO`. - With SA, LM uses the same intensity everywhere, so nothing decays. Set `FREESTREAM_TURBULENCEINTENSITY` to the intensity you expect at the leading edge. -The original LM model was published with SST (advice). +The original LM model was published with SST; see the [TMR model definition](https://tmbwg.github.io/turbmodels/langtrymenter_4eqn.html) (reference). -More transition variants are in open pull requests. +The supported variants here are those registered in this source revision; check the generated reference before using options from another branch. ### LM_OPTIONS @@ -191,7 +191,7 @@ The free-stream turbulence intensity is the main input of the transition correla - k decays between the far field and the body. A larger viscosity ratio gives a slower decay (advice, to be reviewed). - The T3A tutorial sets `FREESTREAM_TURBULENCEINTENSITY= 0.05855` and `FREESTREAM_TURB2LAMVISCRATIO= 11.9` at the inflow (tutorial). - Check the intensity just upstream of the body. Compute it from the `TKE` output field: Tu = sqrt(2k/3)/U (advice). -- `SST_OPTIONS= SUSTAINING` and `TURB_FIXED_VALUES= YES` stop the decay of k (docs, code). No transition test case uses them with LM (to be reviewed). +- `SST_OPTIONS= SUSTAINING` adds ambient sustaining terms through a production floor in SU2. `TURB_FIXED_VALUES= YES` with `TURB_FIXED_VALUES_DOMAIN` fixes the turbulence variables in a specified upstream region (code). These change the turbulence environment; match the measured intensity and decay rather than removing decay automatically (advice). No transition test case uses them with LM (to be reviewed). **With SA.** @@ -238,7 +238,7 @@ The develop branch also has an algebraic transition model for SA, the Bas-Cakmak | Field | Group | What to look for | | --- | --- | --- | -| `SKIN_FRICTION-X` (surface) | `PRIMITIVE` | Low in the laminar part, then a sharp rise at transition. Negative values mark a laminar separation bubble (advice). | +| `SKIN_FRICTION-X` (surface) | `PRIMITIVE` | Low in the laminar part, then a sharp rise at transition. For flow aligned with +x, negative values indicate reversed wall shear, which can occur in either laminar or turbulent separation. Use the local streamwise shear component on a curved or inclined surface (advice). | | `INTERMITTENCY` | `SOLUTION` | Transported intermittency: 0 laminar, 1 turbulent (code). | | `INTERMITTENCY_EFF` | `PRIMITIVE` | Effective intermittency that multiplies the production term. It can exceed 1 in separated regions (advice, to be reviewed). | | `INTERMITTENCY_SEP` | `PRIMITIVE` | Extra intermittency for separation-induced transition (advice, to be reviewed). | @@ -284,4 +284,4 @@ User guide pages: - [Governing Equations](../Theory/), [Convective Schemes](../Convective-Schemes/), [History and Solution Output](../Custom-Output/). - All options: [Option Reference](../Option-Reference/). All output fields: [Output Fields Reference](../Output-Fields-Reference/). -Last checked against SU2 develop `11c177b904`. +Source review: 22 October 2026, against [SU2 `docs_site` at `41ea6a219a`](https://github.com/rois1995/SU2/tree/41ea6a219ac038574f3d4a5b130c0c1d8af66457). See the [review scope and outstanding validation](../Documentation-Status/#guide-and-model-review). Setup recommendations remain draft where indicated. diff --git a/_docs_v7/Setup-Guide-Turbomachinery.md b/_docs_v7/Setup-Guide-Turbomachinery.md index 0f566bf6..1d247f2e 100644 --- a/_docs_v7/Setup-Guide-Turbomachinery.md +++ b/_docs_v7/Setup-Guide-Turbomachinery.md @@ -122,7 +122,7 @@ For a 3D machine, start from the [Aachen turbine tutorial](/tutorials/Aachen_Tur ### Mesh and machine axis -- The machine axis must be the z-axis, and the flow should go in the positive z direction (tutorial). The code computes the radius as the distance from the z-axis when it builds the span-wise sections. The rotation ramp changes only the z component of `ROTATION_RATE` (code). +- For 3D turbomachinery, align the machine axis with z. The Aachen axial-flow example uses flow along positive z; radial machines also have a radial flow component, and the 2D translating-row example uses the x–y plane (tutorial, code). The code computes the radius as the distance from the z-axis when it builds the span-wise sections. The rotation ramp changes only the z component of `ROTATION_RATE` (code). - Mesh one blade passage per row, and connect its sides with `MARKER_PERIODIC` (tutorial). For a rotational periodicity, give the rotation centre and the rotation angle about each axis, in degrees. The Aachen case has 41 blades per row and uses an angle of 360/41 = 8.7804878 about z (test case). - In 3D, list the periodic pairs in `MARKER_PERIODIC` in zone order: the first pair for zone 1, the second pair for zone 2, and so on. The code that finds the span-wise sections of zone *n* looks at the *n*-th periodic pair (code, to be reviewed). All 3D test cases follow this order (test case). @@ -221,7 +221,7 @@ SU2 builds the span-wise sections as follows (code): ### Ramps -Ramps help when the machine has a high pressure ratio or a high rotation speed (tutorial). A ramp changes a value linearly, from a start value to the final value set in the config file. +Ramps help when the machine has a high pressure ratio or a high rotation speed (tutorial). A ramp approaches the final value from a prescribed start value, using the configured update interval and ramp length. The ramp options (code): @@ -304,4 +304,4 @@ Test cases (SU2 repository): User guide pages: [Basics of Multi-Zone Computations](../Multizone/), [Markers and Boundary Conditions](../Markers-and-BC/), [Solver Setup](../Solver-Setup/), [History and Solution Output](../Custom-Output/), [Setup Guide: Non-Ideal Compressible Flows](../Setup-Guide-NICFD/). -Last checked against SU2 develop `11c177b904`. +Source review: 22 October 2026, against [SU2 `docs_site` at `41ea6a219a`](https://github.com/rois1995/SU2/tree/41ea6a219ac038574f3d4a5b130c0c1d8af66457). See the [review scope and outstanding validation](../Documentation-Status/#guide-and-model-review). Setup recommendations remain draft where indicated. diff --git a/_docs_v7/Setup-Guide-Unsteady-DES.md b/_docs_v7/Setup-Guide-Unsteady-DES.md index 2c2a02d2..8ae91cff 100644 --- a/_docs_v7/Setup-Guide-Unsteady-DES.md +++ b/_docs_v7/Setup-Guide-Unsteady-DES.md @@ -263,7 +263,7 @@ So average over one continuous run, without restarts (advice). All DES variants in SU2 develop build on the SA model. Set `KIND_TURB_MODEL= SA` and pick a variant with `HYBRID_RANSLES` (code). -In DES, the model uses a length scale that is the smaller of two values: the wall distance, and `DES_CONST` times a cell size (code). Near the wall, the wall distance is smaller and the model acts as RANS. Far from the wall, the cell size is smaller and the model acts as an LES subgrid model. +In original `SA_DES`, the length scale is min(d, C_DES Δ), where d is wall distance and Δ the grid measure. The delayed variants use d − f_d·max(0, d − C_DES Δ): f_d near zero protects attached boundary layers, and f_d near one recovers the DES limit. The grid measure also changes with the variant. Thus distance from the wall alone does not determine the RANS/LES mode (code, reference). See [Hybrid RANS/LES](../Hybrid-RANS-LES/#what-su2-does-differently-from-the-literature). | `HYBRID_RANSLES` | What it is (code) | | --- | --- | @@ -275,7 +275,7 @@ In DES, the model uses a length scale that is the smaller of two values: the wal Advice: -- `SA_DES` can switch to LES inside an attached boundary layer if the mesh is fine along the wall. The mesh, not the flow, can then cause separation. `SA_DDES` or `SA_EDDES` avoid this (advice). +- `SA_DES` can switch to LES inside an attached boundary layer if the mesh is fine along the wall. The mesh, not the flow, can then cause separation. `SA_DDES` and `SA_EDDES` add shielding to reduce this risk; the result still needs mesh and sensor checks (advice). - `SA_ZDES` in SU2 is DDES with the ZDES cell size. It is not the full zonal method of the reference, where the user picks RANS and LES zones (code, to be reviewed). - SU2 does not stop with an error if you set `HYBRID_RANSLES` with `KIND_TURB_MODEL= SST`. Only the SA solver uses the DES length scale, so such a run is plain URANS (code). @@ -292,7 +292,7 @@ General points for the DES mesh (advice, to be reviewed): - DES resolves turbulent eddies, which are three-dimensional. Run DES in 3D. 2D DES runs do not give physical turbulence. - Near the walls, the mesh must be fine enough for RANS: first-cell y+ about 1. -- In the regions you want in LES mode (wakes, separated zones), use cells of similar size in all directions. SU2 uses the largest cell dimension as the cell size (code), so stretched cells give a large cell size: more of the turbulence is modelled and less is resolved. +- In the regions you want in LES mode (wakes, separated zones), use cells of similar size in all directions. Original DES/DDES use the longest edge from a node to its neighbours; ZDES/EDDES use the variant-specific measures described in [Hybrid RANS/LES](../Hybrid-RANS-LES/#what-su2-does-differently-from-the-literature) (code). Stretched cells can limit LES resolution; inspect the chosen grid measure and the RANS/LES sensor rather than assuming that refinement in one direction is sufficient. - Keep the cell size changes smooth between the RANS and LES regions. - For a body with a spanwise direction, the spanwise extent must hold the largest eddies of interest. @@ -332,7 +332,7 @@ No test case in develop uses `ROE_LOW_DISSIPATION` (test case). - **Inner convergence.** `REL_RMS_DENSITY` (or your `CONV_FIELD`) reaches the criterion in each time step before `INNER_ITER` (tutorial). - **Start-up phase over.** Plot `LIFT` and `DRAG` against time. The signal should be periodic or statistically steady before `WINDOW_START_ITER` (tutorial). -- **Averages settled.** `TAVG_LIFT` and `TAVG_DRAG` are flat. With `WINDOW_CAUCHY_CRIT= YES`, the `CAUCHY_TAVG_` values are below `CONV_WINDOW_CAUCHY_EPS` (tutorial). +- **Averages settled.** Compare averages from separate sampling blocks and extend the sampling interval. A slowly changing cumulative average alone does not establish statistical convergence, especially for DES. Monitor `TAVG_LIFT` and `TAVG_DRAG`. With `WINDOW_CAUCHY_CRIT= YES`, the `CAUCHY_TAVG_` values are below `CONV_WINDOW_CAUCHY_EPS` (tutorial). - **Time step and mesh.** Halve the time step and refine the mesh. The frequency and the averages should change little (advice). - **DES regions.** Write the `DDES` group: `DES_LENGTHSCALE`, `WALL_DISTANCE` and `LES_SENSOR`. `LES_SENSOR` is 0 where the model acts as RANS. In LES mode it is 1 for `SA_DES` and the value of the shielding function for the DDES variants (code). Attached boundary layers should stay at 0 (advice). - **Resolved eddies.** Write the `VORTEX_IDENTIFICATION` group: `VORTICITY` (2D) or `VORTICITY_X`, `VORTICITY_Y`, `VORTICITY_Z` (3D), and `Q_CRITERION` (code). Iso-surfaces of `Q_CRITERION` show the resolved eddies (advice). @@ -377,4 +377,4 @@ User guide pages: - [Solver Setup](../Solver-Setup/), [Restart File](../Restart-File/), [History and Solution Output](../Custom-Output/), [Convective Schemes](../Convective-Schemes/), [Physical Definition](../Physical-Definition/). - All options: [Option Reference](../Option-Reference/). All output fields: [Output Fields Reference](../Output-Fields-Reference/). -Last checked against SU2 develop `11c177b904`. +Source review: 22 October 2026, against [SU2 `docs_site` at `41ea6a219a`](https://github.com/rois1995/SU2/tree/41ea6a219ac038574f3d4a5b130c0c1d8af66457). See the [review scope and outstanding validation](../Documentation-Status/#guide-and-model-review). Setup recommendations remain draft where indicated. diff --git a/_docs_v7/Transition-Models.md b/_docs_v7/Transition-Models.md index 01ce7e47..2c9f984b 100644 --- a/_docs_v7/Transition-Models.md +++ b/_docs_v7/Transition-Models.md @@ -35,7 +35,7 @@ Both models need `SOLVER= RANS` or `SOLVER= INC_RANS` and a turbulence model (se -This page describes the SU2 develop branch. More transition model variants are in open pull requests. +This page describes the SU2 develop branch. Availability here is determined by this source revision; options from another branch may differ. ## Langtry-Menter (LM) @@ -126,7 +126,7 @@ The LM model was published for SST. SU2 also couples it to SA, which has no k. T SU2 follows the TMR description: - the critical Reynolds number is Re_theta_c = 803.73 (Tu + 0.6067)^-1.027, with Tu in percent from `FREESTREAM_TURBULENCEINTENSITY` (times 100), constant in the domain; -- the constants are chi_1 = 0.002 and chi_2 = 50 (the TMR writes 0.02 in the denominator, which is the same); +- chi_1 = 0.002; SU2 multiplies mu_t/mu by 50 in the second intermittency term, equivalent to dividing by the TMR value chi_2 = 0.02; - the destruction term is not changed; - the free-stream nu-tilde is 0.005 times the usual SA value. With the default `FREESTREAM_NU_FACTOR= 3`, this gives 0.015 times the kinematic viscosity, the low end of the TMR range (0.015 to 0.025). @@ -183,4 +183,4 @@ If you set both `SA_OPTIONS= BCM` and `KIND_TRANS_MODEL= LM`, SU2 gives no error - For developers: [Adding a Transition Model](../Adding-a-Transition-Model/) - [NASA Turbulence Modeling Resource](https://tmbwg.github.io/turbmodels/). It moved from turbmodels.larc.nasa.gov in 2026; the old links now lead to a NASA landing page. -Last checked against SU2 develop `11c177b904`. +Source review: 22 October 2026, against [SU2 `docs_site` at `41ea6a219a`](https://github.com/rois1995/SU2/tree/41ea6a219ac038574f3d4a5b130c0c1d8af66457). See the [review scope and outstanding validation](../Documentation-Status/#guide-and-model-review). Setup recommendations remain draft where indicated. diff --git a/_docs_v7/Turbulence-Models.md b/_docs_v7/Turbulence-Models.md index c29e7d42..e4bfc1b0 100644 --- a/_docs_v7/Turbulence-Models.md +++ b/_docs_v7/Turbulence-Models.md @@ -118,7 +118,7 @@ The keywords fall into four groups. SU2 has only the "m" forms of SST ([see belo | Keyword | Effect | TMR name | | --- | --- | --- | | `VORTICITY` | Uses the vorticity magnitude. | [SST-Vm](https://tmbwg.github.io/turbmodels/sst.html#sst-v) | -| `KATO-LAUNDER` | Uses the square root of strain rate times vorticity. | [SST-KLm](https://tmbwg.github.io/turbmodels/sst.html#sst-kl) | +| `KATO-LAUNDER` | Replaces S² in production by SΩ, the product of strain-rate and vorticity magnitudes. | [SST-KLm](https://tmbwg.github.io/turbmodels/sst.html#sst-kl) | | `UQ` | Uses a perturbed Reynolds stress tensor, for uncertainty quantification. See the [UQ tutorial](/tutorials/UQ_NACA0012/) and the options `UQ_COMPONENT` (default `1`), `UQ_DELTA_B` (`1.0`), `UQ_URLX` (`0.1`), `UQ_PERMUTE` (`NO`). | none | **Compressibility correction** (at most one, only with `SOLVER= RANS`): @@ -204,7 +204,7 @@ With `BCM`, SU2 multiplies the free-stream, inlet and engine values (not the act SU2 computes k = 1.5 (Tu U)^2 from the free-stream speed U, and then omega = rho k / (mu × ratio). -The defaults (5 % and 10) suit internal flows, but are usually too high for external aerodynamics (to be reviewed). The TMR gives recommended far-field values for each model, and [Setup Guide: Steady RANS for External Aerodynamics](../Setup-Guide-RANS-External-Aero/) discusses the choice. +The defaults (5 % and 10) are not calibrated inlet conditions. Choose the intensity and length/time scale for the actual flow, and check their decay between the boundary and the body. The TMR gives recommended far-field values for each model, and [Setup Guide: Steady RANS for External Aerodynamics](../Setup-Guide-RANS-External-Aero/) discusses the choice. **Inlets.** `MARKER_INLET_TURBULENT` sets values per inlet marker: @@ -258,4 +258,4 @@ Tutorials: - For developers: [Adding a Turbulence Model](../Adding-a-Turbulence-Model/) - [NASA Turbulence Modeling Resource](https://tmbwg.github.io/turbmodels/). It moved from turbmodels.larc.nasa.gov in 2026; the old links now lead to a NASA landing page. -Last checked against SU2 develop `11c177b904`. +Source review: 22 October 2026, against [SU2 `docs_site` at `41ea6a219a`](https://github.com/rois1995/SU2/tree/41ea6a219ac038574f3d4a5b130c0c1d8af66457). See the [review scope and outstanding validation](../Documentation-Status/#guide-and-model-review). Setup recommendations remain draft where indicated. diff --git a/_docs_v7/Wall-Treatment.md b/_docs_v7/Wall-Treatment.md index e7f9a5f6..0d9d1d0a 100644 --- a/_docs_v7/Wall-Treatment.md +++ b/_docs_v7/Wall-Treatment.md @@ -5,7 +5,7 @@ permalink: /docs_v7/Wall-Treatment/ This page explains the model and its SU2 implementation. For numerical setup choices, see the [setup guide](../Setup-Guide-RANS-External-Aero/); use its tutorial and V&V links for worked examples and comparisons. -This page covers two ways to change what a turbulence model does at a viscous wall. *Wall functions* replace the resolved near-wall layer with an analytical law of the wall, so the first mesh point can be further from the wall. *Roughness models* change the wall boundary condition of the turbulence model so that it predicts the higher friction and heat transfer of a rough surface. +This page covers two ways to change what a turbulence model does at a viscous wall. *Wall functions* replace the resolved near-wall layer with an analytical law of the wall, so the first mesh point can be further from the wall. *Roughness models* change the wall boundary condition of the turbulence model to represent roughness effects on turbulence and wall friction. Heat transfer is then affected through the coupled solution and heat-transport closure; these are not universal correlations for rough-wall heat transfer. For the SA and SST models themselves, see [Turbulence Models](../Turbulence-Models/). For the basic wall boundary conditions, see [Markers and Boundary Conditions](../Markers-and-BC/). @@ -175,7 +175,7 @@ All advice in this section is general practice, not checked in SU2 (to be review **Wall functions** -- Aim for the first interior node in the log layer: y+ about 30 to 100. The upper limit grows with the Reynolds number. The [Markers and BC](../Markers-and-BC/#wall-functions) page gives 100 to 500 (to be reviewed). +- Aim for the first interior node in the log layer: y+ about 30 to 100. The upper limit grows with the Reynolds number. The [Markers and BC](../Markers-and-BC/#wall-functions) page gives a broader 100 to 500 range. Neither range is a universal upper accuracy bound: verify log-layer placement for the Reynolds number, pressure gradient and wall treatment in use (advice, to be reviewed). - Avoid a first node in the buffer layer (y+ about 5 to 30) on large parts of the wall (to be reviewed). - Wall functions assume an attached boundary layer in equilibrium. Expect lower accuracy near separation, reattachment and strong pressure gradients (to be reviewed). - List every viscous wall in `MARKER_WALL_FUNCTIONS` (see [Known limits](#known-limits)). @@ -231,4 +231,4 @@ Tutorials with wall functions: --- -Last checked against SU2 develop `11c177b904`. +Source review: 22 October 2026, against [SU2 `docs_site` at `41ea6a219a`](https://github.com/rois1995/SU2/tree/41ea6a219ac038574f3d4a5b130c0c1d8af66457). See the [review scope and outstanding validation](../Documentation-Status/#guide-and-model-review). Setup recommendations remain draft where indicated. diff --git a/_tutorials/compressible_flow/Aachen_Turbine/Aachen_Turbine.md b/_tutorials/compressible_flow/Aachen_Turbine/Aachen_Turbine.md index 5510a868..7c8cd551 100644 --- a/_tutorials/compressible_flow/Aachen_Turbine/Aachen_Turbine.md +++ b/_tutorials/compressible_flow/Aachen_Turbine/Aachen_Turbine.md @@ -12,7 +12,7 @@ complexity: advanced follows: compressible flow tutorials --- -![Mid-span Rel. Mach](../../../tutorials_files/compressible_flow/Aachen_Turbine/images/FullAnnulus_MachContour.png) +![Mid-span Rel. Mach](../../tutorials_files/compressible_flow/Aachen_Turbine/images/FullAnnulus_MachContour.png) ## Goals Upon completing this tutorial, the user will become familiar with 3D steady-state RANS calculations of multi-row axial turbines, elaborating viscous, compressible flows of air, modelled as an ideal gas. @@ -72,8 +72,8 @@ This tutorial will solve the flow through the Aachen turbine for the following b To reduce the computational cost, the geometrical periodicity of the system is exploited reducing the computational domain to one blade passage per row (with the blade at the centre of the mesh). As it will be explained later, this requires the use of periodic boundary conditions. -![Full Annulus Domain](../../../tutorials_files/compressible_flow/Aachen_Turbine/images/FullAnnulus.png) -![Single Passage Domain](../../../tutorials_files/compressible_flow/Aachen_Turbine/images/SinglePassage.png) +![Full Annulus Domain](../../tutorials_files/compressible_flow/Aachen_Turbine/images/FullAnnulus.png) +![Single Passage Domain](../../tutorials_files/compressible_flow/Aachen_Turbine/images/SinglePassage.png) Figure (1): Computational domain reduction. ### Mesh Description @@ -132,7 +132,7 @@ The following box shows the syntax to be used to enforce this boundary condition MARKER_HEATFLUX = (BLADE1, 0.0, BLADE2, 0.0, BLADE3, 0.0, HUB1, 0.0, SHROUD1, 0.0, HUB2, 0.0, SHROUD2, 0.0, HUB3, 0.0, SHROUD3, 0.0) ``` -![Adiabatic, no-slip bc](../../../tutorials_files/compressible_flow/Aachen_Turbine/images/SingleMesh_Adiabatic_NoSlip.png) +![Adiabatic, no-slip bc](../../tutorials_files/compressible_flow/Aachen_Turbine/images/SingleMesh_Adiabatic_NoSlip.png) Figure (2): Hub, shroud and blade surfaces. @@ -148,7 +148,7 @@ The following box shows the syntax to be used to enforce this boundary condition MARKER_PERIODIC = (PER1_STATOR1, PER2_STATOR1, 0.0, 0.0, 0.0, 0.0, 0.0, 8.7804878, 0.0, 0.0, 0.0, PER1_ROTOR, PER2_ROTOR, 0.0, 0.0, 0.0, 0.0, 0.0, 8.7804878, 0.0, 0.0, 0.0, PER1_STATOR2, PER2_STATOR2, 0.0, 0.0, 0.0, 0.0, 0.0, 8.7804878, 0.0, 0.0, 0.0) ``` -![Periodic boundary conditions](../../../tutorials_files/compressible_flow/Aachen_Turbine/images/SingleMesh_Adiabatic_Periodics.png) +![Periodic boundary conditions](../../tutorials_files/compressible_flow/Aachen_Turbine/images/SingleMesh_Adiabatic_Periodics.png) Figure (3): Periodic and donor surfaces. #### Non-reflective boundary conditions @@ -177,7 +177,7 @@ The following box presents the corresponding syntax. 0.0, 0.0, 0.0, 0.0 , 1.0, 0.0) ``` -![Non-reflective inlet and outlet boundary conditions](../../../tutorials_files/compressible_flow/Aachen_Turbine/images/SingleMesh_Adiabatic_Giles.png) +![Non-reflective inlet and outlet boundary conditions](../../tutorials_files/compressible_flow/Aachen_Turbine/images/SingleMesh_Adiabatic_Giles.png) Figure (4): Non-reflective inlet and outlet boundary conditions ###### Mixing-plane surfaces @@ -213,7 +213,7 @@ To make the mixing-plane turbulent, the following option must be used: TURBULENT_MIXINGPLANE= YES ``` -![Non-reflective mixing-plane](../../../tutorials_files/compressible_flow/Aachen_Turbine/images/SingleMesh_Adiabatic_Giles_MixingPlane.png) +![Non-reflective mixing-plane](../../tutorials_files/compressible_flow/Aachen_Turbine/images/SingleMesh_Adiabatic_Giles_MixingPlane.png) Figure (5): Non-reflective mixing-plane To turn on the non-reflective behaviour, the `SPATIAL_FOURIER` should be set to `YES`. However, for the current tutorial it is not activated, as in the following box. @@ -241,7 +241,7 @@ The following box shows the syntax to enforce this functionality. MARKER_SHROUD = (SHROUD1, SHROUD2, SHROUD3) ``` -![Shroud boundary condition](../../../tutorials_files/compressible_flow/Aachen_Turbine/images/SingleMesh_shroud.png) +![Shroud boundary condition](../../tutorials_files/compressible_flow/Aachen_Turbine/images/SingleMesh_shroud.png) Figure (6): Shroud boundary condition #### Wall functions @@ -387,6 +387,6 @@ To compute it the following steps can be take in a post-processing tool, such as 4. Plot the relative Mach number contour of the extracted slice in a 2D space $(R \cdot \theta$ vs $z)$ and reverse the Z-axis, Fig. 7b. -![Midspan Relative Mach number](../../../tutorials_files/compressible_flow/Aachen_Turbine/images/Full_View_MachContour.png) -![2D Relative Mach number blade-to-blade view](../../../tutorials_files/compressible_flow/Aachen_Turbine/images/2D_MidSpan_RelMach.png) +![Midspan Relative Mach number](../../tutorials_files/compressible_flow/Aachen_Turbine/images/Full_View_MachContour.png) +![2D Relative Mach number blade-to-blade view](../../tutorials_files/compressible_flow/Aachen_Turbine/images/2D_MidSpan_RelMach.png) Figure (7): (a) Relative Mach number contour on a cylindrical cut (blade-to-blade view) at midspan of the turbine flow domain; (b) planar (blade-to-blade) view of the cylindrical cut. diff --git a/_tutorials/compressible_flow/ActuatorDisk_VariableLoad/ActuatorDisk_VariableLoad.md b/_tutorials/compressible_flow/ActuatorDisk_VariableLoad/ActuatorDisk_VariableLoad.md index c1f7c967..a9ccb282 100644 --- a/_tutorials/compressible_flow/ActuatorDisk_VariableLoad/ActuatorDisk_VariableLoad.md +++ b/_tutorials/compressible_flow/ActuatorDisk_VariableLoad/ActuatorDisk_VariableLoad.md @@ -12,7 +12,7 @@ complexity: Basic follows: --- -![Actuator Disk](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/SwirlAndCp.png) +![Actuator Disk](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/SwirlAndCp.png) ## Goals @@ -67,16 +67,16 @@ Three boundary conditions are employed: - Navier-Stokes adiabatic wall on the spinner. - Far-field condition on the outer domain surface. -![Domain](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/Domain.png) +![Domain](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/Domain.png) Figure (1): Far-field view of the computational domain. -![Grid XY](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/GridXY.png) +![Grid XY](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/GridXY.png) Figure (2): Mesh of the domain in the *x-y* plane. -![Grid Disk](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/GridDisk.png) +![Grid Disk](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/GridDisk.png) Figure (3): Close-up view of the mesh of the actuator disk in the *y-z* plane at *x=0*. -![Grid Disk](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/GridSpinner.png) +![Grid Disk](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/GridSpinner.png) Figure (4): Close-up view of the mesh of the spinner in the *y-x* plane. ### Configuration File Options @@ -182,10 +182,10 @@ These coefficients are defined using the "Renard" definition: the reference forc The visualization of the tabular input for this case is shown in the following figure: -![dct input](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/dct_input.png) +![dct input](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/dct_input.png) Figure (5): Thrust coefficient distribution along the non-dimensional radius. -![dcp input](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/dcp_input.png) +![dcp input](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/dcp_input.png) Figure (6): Power coefficient distribution along the non-dimensional radius. ### Optimal Propeller Script @@ -233,26 +233,26 @@ The actuator disk with variable load test case is small and will execute relativ Some results for this test case are shown below. -![Mach Number](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/MachNumber.png) +![Mach Number](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/MachNumber.png) Figure (7): Mach number contour in the *x-z* plane. -![Pressure Coefficient](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/ContourCp.png) +![Pressure Coefficient](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/ContourCp.png) Figure (8): Pressure coefficient contour in the *x-z* plane. -![Swirl Vectors](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/Swirl_Vectors.png) +![Swirl Vectors](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/Swirl_Vectors.png) Figure (9): Tangential velocity vectors just downstream the actuator disk. Swirl effect visualization. -![Momentum X](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/MomentumX.png) +![Momentum X](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/MomentumX.png) Figure (10): Momentum in normal direction along *x* for different stations. -![Pressure Coefficient X](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/PressureCoeff.png) +![Pressure Coefficient X](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/PressureCoeff.png) Figure (11): Pressure coefficient along *x* for different stations. -![Tangential Velocity X](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/Vt_x.png) +![Tangential Velocity X](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/Vt_x.png) Figure (12): Tangential velocity component along *x* for different stations. -![Pressure Coefficient Jump](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/DeltaCp.png) +![Pressure Coefficient Jump](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/DeltaCp.png) Figure (13): Pressure coefficient jump along the non-dimensional radius. -![Tangential Velocity Jump](../../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/Vt.png) +![Tangential Velocity Jump](../../tutorials_files/compressible_flow/ActuatorDisk_VariableLoad/images/Vt.png) Figure (14): Tangential velocity component along *z* just upstream (State 1) and downstream (State 2) the actuator disk. diff --git a/_tutorials/compressible_flow/NICFD_nozzle/NICFD_nozzle_datadriven.md b/_tutorials/compressible_flow/NICFD_nozzle/NICFD_nozzle_datadriven.md index 6bac3dcf..33ea927f 100644 --- a/_tutorials/compressible_flow/NICFD_nozzle/NICFD_nozzle_datadriven.md +++ b/_tutorials/compressible_flow/NICFD_nozzle/NICFD_nozzle_datadriven.md @@ -102,9 +102,10 @@ The simulation us run by the following command ``` mpirun -n SU2_CFD config_NICFD_PINN.cfg ``` -where `````` is the number of cores. [Figure 5](#mesh_highlight) shows the residual trends of the flow solution of the course of 10k iterations. +where `````` is the number of cores. [Figure 5](#convergence-history) shows the residual trends of the flow solution over the course of 10k iterations. -![mesh_highlight](../../tutorials_files/compressible_flow/NICFD_nozzle_datadriven/images/convergence_history.png) + +![Convergence history](../../tutorials_files/compressible_flow/NICFD_nozzle_datadriven/images/convergence_history.png) Figure (5): Convergence history of the SU2 simulation. diff --git a/_tutorials/compressible_flow/Transitional_Flat_Plate_T3A/Transitional_Flat_Plate_T3A.md b/_tutorials/compressible_flow/Transitional_Flat_Plate_T3A/Transitional_Flat_Plate_T3A.md index b3ddb163..5f7f085f 100644 --- a/_tutorials/compressible_flow/Transitional_Flat_Plate_T3A/Transitional_Flat_Plate_T3A.md +++ b/_tutorials/compressible_flow/Transitional_Flat_Plate_T3A/Transitional_Flat_Plate_T3A.md @@ -44,7 +44,7 @@ The mesh used for T3A tutorial, which provided by [AIAA Transition modeling work The mesh used for T3A- tutorial, which consists of 122,880 quadrilaterals. Both T3A and T3A- boundary conditions are shown below. -![Flat Plate](../../../tutorials_files/compressible_flow/Transitional_Flat_Plate/images/LM_flat_plate/Boundary_conditions.png) +![Flat Plate](../../tutorials_files/compressible_flow/Transitional_Flat_Plate/images/LM_flat_plate/Boundary_conditions.png) Figure (1): Mesh with boundary conditions (red: far, blue:out, orange:symmetry, green:wall) @@ -99,9 +99,9 @@ To run this test case, follow these steps at a terminal command line: The figure below compares the skin friction results obtained by the LM transition model to the result of another solver(=Fluent 19.0) and experimental data. -![T3A_Cf_Rex](../../../tutorials_files/compressible_flow/Transitional_Flat_Plate/images/LM_flat_plate/Cf_T3A.png) +![T3A_Cf_Rex](../../tutorials_files/compressible_flow/Transitional_Flat_Plate/images/LM_flat_plate/Cf_T3A.png) Figure (2): Comparison of the skin friction coefficients for the T3A case. -![T3A-_Cf_Rex](../../../tutorials_files/compressible_flow/Transitional_Flat_Plate/images/LM_flat_plate/Cf_T3A-.png) +![T3A-_Cf_Rex](../../tutorials_files/compressible_flow/Transitional_Flat_Plate/images/LM_flat_plate/Cf_T3A-.png) Figure (3): Comparison of the skin friction coefficients for the T3A- case. diff --git a/_tutorials/design_features/Inc_Turbulent_Bend_Opt/Inc_Turbulent_Bend_Opt.md b/_tutorials/design_features/Inc_Turbulent_Bend_Opt/Inc_Turbulent_Bend_Opt.md index 02679155..3465cc0c 100644 --- a/_tutorials/design_features/Inc_Turbulent_Bend_Opt/Inc_Turbulent_Bend_Opt.md +++ b/_tutorials/design_features/Inc_Turbulent_Bend_Opt/Inc_Turbulent_Bend_Opt.md @@ -14,7 +14,7 @@ follows: Inc_Turbulent_Bend -![bend](../../../tutorials_files/design_features/Inc_Turbulent_Bend/bend_with_FFD.png "Figure (1): The 90 degree bend with the FFD box.") +![bend](../../tutorials_files/design_features/Inc_Turbulent_Bend/bend_with_FFD.png "Figure (1): The 90 degree bend with the FFD box.") #### Figure (1): The 90 degree bend with the FFD box. @@ -127,7 +127,7 @@ Which means that when the sides of the FFD box cuts through the mesh, then at th Unfortunately, if we use this unconstrained setup, the mesh deformation will be as shown in Figure (2) below: -![bend](../../../tutorials_files/design_features/Inc_Turbulent_Bend/mesh_deformation.png "Figure(2): bad mesh for unconstrained FFD box.") +![bend](../../tutorials_files/design_features/Inc_Turbulent_Bend/mesh_deformation.png "Figure(2): bad mesh for unconstrained FFD box.") #### Figure (2): The unconstrained deformation leads to mesh cells that have collapsed on the symmetry plane. This leads to convergence issues at the next design iteration. As you can see, the row of cells just above the symmetry plane has collapsed onto the symmetry plane, leading to a very bad mesh. In the next design iteration, the simulations do not converge anymore and the optimization procedure stops. So we need some additional constraints on the movement of the nodes of the FFD box. @@ -138,7 +138,7 @@ The problem here is that the mesh nodes on the symmetry plane are not allowed to Since we disallow vertical movement in 2x(6x6)=72 nodes in the planes with $$j=0$$ and $$j=1$$, The total degrees of freedom is then $$648 - 72 = 576$$ d.o.f. -![Pressure bend](../../../tutorials_files/design_features/Inc_Turbulent_Bend/opt_iter0_pressure_ffdbox.png "Pressure distribution") +![Pressure bend](../../tutorials_files/design_features/Inc_Turbulent_Bend/opt_iter0_pressure_ffdbox.png "Pressure distribution") #### Figure (3): The 90 degree bend with the FFD box. @@ -214,5 +214,5 @@ The objective values for the 5 design iterations are given in the table below. We see that the global pressure drop between the inlet and the outlet reduces from 89 Pa to 80 Pa, a reduction of more than 10 %. However, since we are optimizing only the bend, we should subtract the pressure drop of the straight parts and only consider the pressure drop of the bend for a more fair comparison. In paraview, we can integrate the pressure in a 2D slice at the start and end of the bend. The pressure drop of the bend comes to $$\Delta P = 20.7 Pa$$. That means that the reduction of pressure drop in the bend is actually 44 % ! -![Optimized bend](../../../tutorials_files/design_features/Inc_Turbulent_Bend/opt_iter5_pressure_ffdbox.png "Optimized bend") +![Optimized bend](../../tutorials_files/design_features/Inc_Turbulent_Bend/opt_iter5_pressure_ffdbox.png "Optimized bend") #### Figure (4): Optimized bend after 5 design iterations, with the deformed FFD box. diff --git a/_tutorials/event_content/event_content.md b/_tutorials/event_content/event_content.md index 6fce9b12..18c1f9a1 100644 --- a/_tutorials/event_content/event_content.md +++ b/_tutorials/event_content/event_content.md @@ -15,65 +15,65 @@ Below, you will find an archive of materials from the various SU2 workshops, web #### 3rd Annual SU2 Developers Meeting. Sept. 16-17, 2018 -* [Meeting Agenda](../../documents/dev_meeting_2018/SU2_Dev_Meeting_PresentationAgenda_20180916.pdf) +* [Meeting Agenda](https://su2code.github.io/documents/dev_meeting_2018/SU2_Dev_Meeting_PresentationAgenda_20180916.pdf) -* [Introduction to developing in SU2](../../documents/dev_meeting_2018/00_su2_hackathon_economon.pdf) +* [Introduction to developing in SU2](https://su2code.github.io/documents/dev_meeting_2018/00_su2_hackathon_economon.pdf) * [Day 1 Meeting Recording](https://youtu.be/QgYzFLoEAYA) -* [Welcome & Year in Review](../../documents/dev_meeting_2018/01_su2_dev_alonso_economon.pdf) -* [SU2-NEMO - Thermochemistry and high-Mach aerothermodynamics](../../documents/dev_meeting_2018/02_su2_dev_fossati.pdf) -* [Toward optimization for reactive flows in SU2](../../documents/dev_meeting_2018/03_su2_dev_beishuizen.pdf) -* [Conjugate heat transfer problems and computing coupled discrete adjoints using AD](../../documents/dev_meeting_2018/04_su2_dev_burghardt.pdf) -* [Physics-based RANS model-form UQ in SU2](../../documents/dev_meeting_2018/05_su2_dev_mukhopadhaya.pdf) -* [Aeroacoustics prediction and optimization capabilities in SU2](../../documents/dev_meeting_2018/06_su2_dev_zhou.pdf) -* [Higher-order SU2: DG-FEM solver and WENO-FV solver with LES/ILES/WMLES applications](../../documents/dev_meeting_2018/07_su2_dev_vanderweide_singh.pdf) -* [Unsteady optimization with SU2: application to turbomachinery design](../../documents/dev_meeting_2018/08_su2_dev_rubino.pdf) -* [Preliminary results on rotor-fuselage aerodynamics using SU2: status and challenges](../../documents/dev_meeting_2018/09_su2_dev_morelli.pdf) -* [Anisotropic mesh adaptation with the INRIA AMG library](../../documents/dev_meeting_2018/10_su2_dev_loseille.pdf) -* [Simulation and adjoint-based design for variable density incompressible flows with heat transfer](../../documents/dev_meeting_2018/11_su2_dev_economon.pdf) -* [Implementation of pressure-based Navier-Stokes for wind energy applications](../../documents/dev_meeting_2018/12_su2_dev_koodlyravishankara.pdf) -* [SU2-IDS: International Developers Society](../../documents/dev_meeting_2018/13_su2_dev_albring_sanchez.pdf) +* [Welcome & Year in Review](https://su2code.github.io/documents/dev_meeting_2018/01_su2_dev_alonso_economon.pdf) +* [SU2-NEMO - Thermochemistry and high-Mach aerothermodynamics](https://su2code.github.io/documents/dev_meeting_2018/02_su2_dev_fossati.pdf) +* [Toward optimization for reactive flows in SU2](https://su2code.github.io/documents/dev_meeting_2018/03_su2_dev_beishuizen.pdf) +* [Conjugate heat transfer problems and computing coupled discrete adjoints using AD](https://su2code.github.io/documents/dev_meeting_2018/04_su2_dev_burghardt.pdf) +* [Physics-based RANS model-form UQ in SU2](https://su2code.github.io/documents/dev_meeting_2018/05_su2_dev_mukhopadhaya.pdf) +* [Aeroacoustics prediction and optimization capabilities in SU2](https://su2code.github.io/documents/dev_meeting_2018/06_su2_dev_zhou.pdf) +* [Higher-order SU2: DG-FEM solver and WENO-FV solver with LES/ILES/WMLES applications](https://su2code.github.io/documents/dev_meeting_2018/07_su2_dev_vanderweide_singh.pdf) +* [Unsteady optimization with SU2: application to turbomachinery design](https://su2code.github.io/documents/dev_meeting_2018/08_su2_dev_rubino.pdf) +* [Preliminary results on rotor-fuselage aerodynamics using SU2: status and challenges](https://su2code.github.io/documents/dev_meeting_2018/09_su2_dev_morelli.pdf) +* [Anisotropic mesh adaptation with the INRIA AMG library](https://su2code.github.io/documents/dev_meeting_2018/10_su2_dev_loseille.pdf) +* [Simulation and adjoint-based design for variable density incompressible flows with heat transfer](https://su2code.github.io/documents/dev_meeting_2018/11_su2_dev_economon.pdf) +* [Implementation of pressure-based Navier-Stokes for wind energy applications](https://su2code.github.io/documents/dev_meeting_2018/12_su2_dev_koodlyravishankara.pdf) +* [SU2-IDS: International Developers Society](https://su2code.github.io/documents/dev_meeting_2018/13_su2_dev_albring_sanchez.pdf) * [Day 2 Meeting Recording](https://youtu.be/jkZaPsKDvvQ) #### 2nd Annual SU2 Developers Meeting. Dec. 18th, 2017 -* [Meeting Agenda](../../documents/SU2_Dev_Meeting_Agenda_20171218.pdf) -* [Welcome & Year in Review](../../documents/dev_meeting_2017/su2_dev_alonso.pdf) -* [Upgrades for Parallel Performance and Low Speed Flows with Heat Transfer](../../documents/dev_meeting_2017/su2_dev_economon.pdf) -* [Implementation and Assessment of High-Order Methods in the Framework of SU2](../../documents/dev_meeting_2017/su2_dev_drikakis.pdf) -* [A BGK-Kinetic Formulation Including Vibrational and Electronic Energy Modes](../../documents/dev_meeting_2017/su2_dev_fossati.pdf) -* [Current Developments and Applications Related to the Discrete Adjoint Solver in SU2](../../documents/dev_meeting_2017/su2_dev_albring.pdf) -* [An Overview of DDES in SU2: Implementation and Recent Results](../../documents/dev_meeting_2017/su2_dev_molina.pdf) -* [Recent Advances in Flow Analysis Capability and Adjoint-based Design for Turbomachinery with SU2](../../documents/dev_meeting_2017/su2_dev_pini.pdf) -* [Uncertainty Estimation of Turbulence Model Predictions in SU2](../../documents/dev_meeting_2017/su2_dev_mishra.pdf) -* [SU2: A Reliable Computational Framework for Non-Ideal Compressible-Fluid Dynamics Applications](../../documents/dev_meeting_2017/su2_dev_gori.pdf) -* [Coupled Adjoint-based Sensitivities Using the SU2 Native FSI Solver](../../documents/dev_meeting_2017/su2_dev_palacios.pdf) -* [Development of a Nodal DG Solver within the SU2 Framework](../../documents/dev_meeting_2017/su2_dev_vanderweide.pdf) +* [Meeting Agenda](https://su2code.github.io/documents/SU2_Dev_Meeting_Agenda_20171218.pdf) +* [Welcome & Year in Review](https://su2code.github.io/documents/dev_meeting_2017/su2_dev_alonso.pdf) +* [Upgrades for Parallel Performance and Low Speed Flows with Heat Transfer](https://su2code.github.io/documents/dev_meeting_2017/su2_dev_economon.pdf) +* [Implementation and Assessment of High-Order Methods in the Framework of SU2](https://su2code.github.io/documents/dev_meeting_2017/su2_dev_drikakis.pdf) +* [A BGK-Kinetic Formulation Including Vibrational and Electronic Energy Modes](https://su2code.github.io/documents/dev_meeting_2017/su2_dev_fossati.pdf) +* [Current Developments and Applications Related to the Discrete Adjoint Solver in SU2](https://su2code.github.io/documents/dev_meeting_2017/su2_dev_albring.pdf) +* [An Overview of DDES in SU2: Implementation and Recent Results](https://su2code.github.io/documents/dev_meeting_2017/su2_dev_molina.pdf) +* [Recent Advances in Flow Analysis Capability and Adjoint-based Design for Turbomachinery with SU2](https://su2code.github.io/documents/dev_meeting_2017/su2_dev_pini.pdf) +* [Uncertainty Estimation of Turbulence Model Predictions in SU2](https://su2code.github.io/documents/dev_meeting_2017/su2_dev_mishra.pdf) +* [SU2: A Reliable Computational Framework for Non-Ideal Compressible-Fluid Dynamics Applications](https://su2code.github.io/documents/dev_meeting_2017/su2_dev_gori.pdf) +* [Coupled Adjoint-based Sensitivities Using the SU2 Native FSI Solver](https://su2code.github.io/documents/dev_meeting_2017/su2_dev_palacios.pdf) +* [Development of a Nodal DG Solver within the SU2 Framework](https://su2code.github.io/documents/dev_meeting_2017/su2_dev_vanderweide.pdf) * [Meeting Recording](http://adl.stanford.edu/dropbox/2ndAnnualSU2DevelopersMeeting-Day1-Morning.mp4) #### SU2 workshop. Feb. 3rd, 2017 (SU2 ver. 5.0.0) -* [Welcome and Introduction to SU2 ](../../documents/WorkshopFeb2017/welcome_and_intro.pdf) -* [Tutorial 1 Presentation](../../documents/WorkshopFeb2017/Tutorial1Presentation.pdf) -* [Tutorial 1 files](../../documents/WorkshopFeb2017/Tutorial1_OneraM6Files.zip) -* [Tutorial 2 Presentation](../../documents/WorkshopFeb2017/WorkshopTutorial2.pdf) -* [Tutorial 2 NACA0012 files](../../documents/WorkshopFeb2017/WorkshopTutorial2naca.zip) -* [Tutorial 2 ONERAM6 files](../../documents/WorkshopFeb2017/WorkshopTutorial2oneram6.zip) -* [Code Structure and Locally Modifying the Code](../../documents/WorkshopFeb2017/Part2_CodeStructure.pdf) -* [Introduction to GitHub and SU2 Development Practices](../../documents/WorkshopFeb2017/dev_process.pdf) -* [Python Modification Presentation](../../documents/WorkshopFeb2017/PythonMods.pdf) -* [Python example script](../../documents/WorkshopFeb2017/compute_Mpolar.py) +* [Welcome and Introduction to SU2 ](https://su2code.github.io/documents/WorkshopFeb2017/welcome_and_intro.pdf) +* [Tutorial 1 Presentation](https://su2code.github.io/documents/WorkshopFeb2017/Tutorial1Presentation.pdf) +* [Tutorial 1 files](https://su2code.github.io/documents/WorkshopFeb2017/Tutorial1_OneraM6Files.zip) +* [Tutorial 2 Presentation](https://su2code.github.io/documents/WorkshopFeb2017/WorkshopTutorial2.pdf) +* [Tutorial 2 NACA0012 files](https://su2code.github.io/documents/WorkshopFeb2017/WorkshopTutorial2naca.zip) +* [Tutorial 2 ONERAM6 files](https://su2code.github.io/documents/WorkshopFeb2017/WorkshopTutorial2oneram6.zip) +* [Code Structure and Locally Modifying the Code](https://su2code.github.io/documents/WorkshopFeb2017/Part2_CodeStructure.pdf) +* [Introduction to GitHub and SU2 Development Practices](https://su2code.github.io/documents/WorkshopFeb2017/dev_process.pdf) +* [Python Modification Presentation](https://su2code.github.io/documents/WorkshopFeb2017/PythonMods.pdf) +* [Python example script](https://su2code.github.io/documents/WorkshopFeb2017/compute_Mpolar.py) #### 1st Annual SU2 Developers Meeting. Sept. 5th, 2016 -* [SU2: Overview of History, Status, and Future Developments](../../documents/su2_dev_economon.pdf) -* [NICFD (Non Ideal Compressible Fluid Dynamics) in the SU2 Framework](../../documents/su2_dev_guardone.pdf) -* [Automatic Differentiation Discrete Adjoints Using SU2](../../documents/su2_dev_gauger.pdf) -* [Development of a High-Order Discontinuous Galerkin Fluid Solver Within SU2](../../documents/su2_dev_vanderweide.pdf) -* [Fluid-Structure Interaction Problems Using Native and External Structural Solvers Coupled to SU2](../../documents/su2_dev_sanchez.pdf) -* [Turbomachinery Simulations Using SU2](../../documents/su2_dev_pini.pdf) -* [Mesh Adaptation for SU2 with the INRIA AMG Library](../../documents/su2_dev_alonso.pdf) +* [SU2: Overview of History, Status, and Future Developments](https://su2code.github.io/documents/su2_dev_economon.pdf) +* [NICFD (Non Ideal Compressible Fluid Dynamics) in the SU2 Framework](https://su2code.github.io/documents/su2_dev_guardone.pdf) +* [Automatic Differentiation Discrete Adjoints Using SU2](https://su2code.github.io/documents/su2_dev_gauger.pdf) +* [Development of a High-Order Discontinuous Galerkin Fluid Solver Within SU2](https://su2code.github.io/documents/su2_dev_vanderweide.pdf) +* [Fluid-Structure Interaction Problems Using Native and External Structural Solvers Coupled to SU2](https://su2code.github.io/documents/su2_dev_sanchez.pdf) +* [Turbomachinery Simulations Using SU2](https://su2code.github.io/documents/su2_dev_pini.pdf) +* [Mesh Adaptation for SU2 with the INRIA AMG Library](https://su2code.github.io/documents/su2_dev_alonso.pdf) #### SU2-Pointwise joint workshop. September 29-30, 2014 (SU2 ver. 3.2.2) @@ -83,27 +83,27 @@ Below, you will find an archive of materials from the various SU2 workshops, web #### Pointwise and SU2 joint webinar. April 29th, 2014 (SU2 ver. 3.1.0) -* [Webinar Presentation Slides](../../documents/Pointwise-Stanford-Webinar-Slides_20140429.pdf) +* [Webinar Presentation Slides](https://su2code.github.io/documents/Pointwise-Stanford-Webinar-Slides_20140429.pdf) * [Webinar Recording](https://www.youtube.com/watch?v=BQWVPOrHYFc) -* [Uninitialized grid for the Lockheed Martin 1021](../../documents/LM-1021-EulerMesh.pw) +* [Uninitialized grid for the Lockheed Martin 1021](https://su2code.github.io/documents/LM-1021-EulerMesh.pw) * [Script to generate free-form deformation boxes from Pointwise](https://github.com/pointwise/CreateFFD) #### OpenMDAO and SU2 joint workshop. Sept. 30th - Oct. 1st, 2013 (SU2 ver. 2.0.8) -* [OpenMDAO and SU2 joint workshop agenda.](../../documents/OpenMDAO_SU2_Workshop_Agenda.pdf) -* [SU2 Introduction and Installation.](../../documents/SU2_IntroInstallation.pdf) -* [SU2: Advanced analysis topics (presentation).](../../documents/SU2_AdvancedAnalysis.pdf) -* [SU2: Advanced analysis topics (mesh and configuration example files).](../../documents/SU2_Advanced_Topics.zip) -* [Shape optimization using SU2 (presentation).](../../documents/Optimization_Using_SU2.pdf) -* [Shape optimization using SU2 (mesh and configuration example files).](../../documents/ONERAM6.zip) +* [OpenMDAO and SU2 joint workshop agenda.](https://su2code.github.io/documents/OpenMDAO_SU2_Workshop_Agenda.pdf) +* [SU2 Introduction and Installation.](https://su2code.github.io/documents/SU2_IntroInstallation.pdf) +* [SU2: Advanced analysis topics (presentation).](https://su2code.github.io/documents/SU2_AdvancedAnalysis.pdf) +* [SU2: Advanced analysis topics (mesh and configuration example files).](https://su2code.github.io/documents/SU2_Advanced_Topics.zip) +* [Shape optimization using SU2 (presentation).](https://su2code.github.io/documents/Optimization_Using_SU2.pdf) +* [Shape optimization using SU2 (mesh and configuration example files).](https://su2code.github.io/documents/ONERAM6.zip) #### SU2 workshop. Jan. 15th, 2013 (SU2 ver. 2.0) -* [SU2 ver 2.0, workshop agenda.](../../documents/SU2_Workshop_Agenda_v2.0.pdf) -* [Welcome and introduction to SU2.](../../documents/Welcome_and_introduction_to_SU2.pdf) -* [Introduction to the SU2 code structure.](../../documents/Introduction_to_the_SU2_Code_Structure.pdf) -* [Running SU2.](../../documents/Running_SU2.pdf) -* [Problem workshop I: SU2 as a high-fidelity analysis tool.](../../documents/SU2_as_a_High-fidelity_Analysis_Tool.pdf) -* [Problem workshop II: Design and optimization using SU2.](../../documents/Design_and_Optimization_Using_SU2.pdf) -* [Problem workshop III: Task-based design evaluation with SU2.](../../documents/Task-Based_Design_Evaluation_with_SU2.pdf) +* [SU2 ver 2.0, workshop agenda.](https://su2code.github.io/documents/SU2_Workshop_Agenda_v2.0.pdf) +* [Welcome and introduction to SU2.](https://su2code.github.io/documents/Welcome_and_introduction_to_SU2.pdf) +* [Introduction to the SU2 code structure.](https://su2code.github.io/documents/Introduction_to_the_SU2_Code_Structure.pdf) +* [Running SU2.](https://su2code.github.io/documents/Running_SU2.pdf) +* [Problem workshop I: SU2 as a high-fidelity analysis tool.](https://su2code.github.io/documents/SU2_as_a_High-fidelity_Analysis_Tool.pdf) +* [Problem workshop II: Design and optimization using SU2.](https://su2code.github.io/documents/Design_and_Optimization_Using_SU2.pdf) +* [Problem workshop III: Task-based design evaluation with SU2.](https://su2code.github.io/documents/Task-Based_Design_Evaluation_with_SU2.pdf) diff --git a/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md b/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md index 03796705..5a33d116 100644 --- a/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md +++ b/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md @@ -26,7 +26,7 @@ The resources for this tutorial can be found in the [incompressible_flow/Inc_Com The mesh is created using [gmsh](https://gmsh.info/) and a respective `.geo` script is available to recreate/modify the mesh [H2_Burner.geo](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Combustion/1__premixed_hydrogen/H2_burner.geo). The mesh is unstructured (i.e. only contains triangular elements) with 70495 elements and 35926 points. This mesh is quite large, but a high resolution is required in order to resolve the flame front. -![Mesh with boundary conditions](../../../tutorials_files/incompressible_flow/Inc_Combustion/mesh.png) +![Mesh with boundary conditions](../../tutorials_files/incompressible_flow/Inc_Combustion/mesh.png) Figure (1): Computational mesh with color indication of the used boundary conditions. The MLP files describe five architectures. These are used to predict the thermo-chemical state, preferential diffusion scalars, and reaction source terms. @@ -34,13 +34,14 @@ The MLP files describe five architectures. These are used to predict the thermo- ## Prerequisites -The following tutorial assumes you already compiled `SU2_CFD` in serial or parallel, please see the [Download](/docs_v8/Download/) and [Installation](/docs_v8/Installation/) if that is not done yet. Additionally it is advised to perform an entry level incompressible tutorial first, as this tutorial only goes over species transport with combustion. +The following tutorial assumes you already compiled `SU2_CFD` in serial or parallel, please see the [Download](/docs_v7/Download/) and [Installation](/docs_v7/Installation/) if that is not done yet. Additionally it is advised to perform an entry level incompressible tutorial first, as this tutorial only goes over species transport with combustion. ## Background -The SU2 FGM solver solves two sets of transport equations: FGM controlling variables and optionally passive species. The solver supports up to three controlling variables, those representing the progress variable $$(\mathcal{Y})$$, total enthalpy ($$h$$), and optionally mixture fraction $$(Z)$$. The controlling variables are used as inputs to the flamelet data manifold to extract the thermo-chemical state variables and reaction source terms. The passive species $$(Y_j)$$ represent species of interest such as emissions. The solutions of the passive species distribution do not affect the behavior of the controlling variables, but can be used to define custom outputs and objective functions. The solution process is visualized in the [solution process](#solutionprocess). +The SU2 FGM solver solves two sets of transport equations: FGM controlling variables and optionally passive species. The solver supports up to three controlling variables, those representing the progress variable $$(\mathcal{Y})$$, total enthalpy ($$h$$), and optionally mixture fraction $$(Z)$$. The controlling variables are used as inputs to the flamelet data manifold to extract the thermo-chemical state variables and reaction source terms. The passive species $$(Y_j)$$ represent species of interest such as emissions. The solutions of the passive species distribution do not affect the behavior of the controlling variables, but can be used to define custom outputs and objective functions. The solution process is visualized in the [solution process](#solution-process). -![solution process](../../../tutorials_files/incompressible_flow/Inc_Combustion/SolverProcess.png) + +![solution process](../../tutorials_files/incompressible_flow/Inc_Combustion/SolverProcess.png) The `CSpeciesSolver` object in SU2 solves the controlling variables and passive species transport equations. These come in three variations, depending on the problem set-up and reactants: @@ -321,7 +322,7 @@ SPARK_REACTION_RATES=(1000, 0, 0, 0) ``` The spark will be initialized at iteration 100 and will remain active for another 5 iterations. This should be sufficient to artificially ignite the mixture and have the flame front propagate naturally. -![ignitionlocation](../../../tutorials_files/incompressible_flow/Inc_Combustion/ignition_location.png) +![ignitionlocation](../../tutorials_files/incompressible_flow/Inc_Combustion/ignition_location.png) ### Boundary conditions @@ -382,21 +383,21 @@ The current section describes the hydrogen burner tutorial in more detail. In the current tutorial, a set of MLP's is used for the manifold. These MLP's are visualized below. - Thermodynamic properties: -![MLP_TD1](../../../tutorials_files/incompressible_flow/Inc_Combustion/MLP_TD1.png) +![MLP_TD1](../../tutorials_files/incompressible_flow/Inc_Combustion/MLP_TD1.png) -![MLP_TD2](../../../tutorials_files/incompressible_flow/Inc_Combustion/MLP_TD2.png) +![MLP_TD2](../../tutorials_files/incompressible_flow/Inc_Combustion/MLP_TD2.png) - Preferential diffusion scalars: -![MLP_PD](../../../tutorials_files/incompressible_flow/Inc_Combustion/MLP_PD.png) +![MLP_PD](../../tutorials_files/incompressible_flow/Inc_Combustion/MLP_PD.png) - Progress variable source term and heat release rate: -![MLP_SPV](../../../tutorials_files/incompressible_flow/Inc_Combustion/MLP_SPV.png) +![MLP_SPV](../../tutorials_files/incompressible_flow/Inc_Combustion/MLP_SPV.png) - NO source term: -![MLP_PNO](../../../tutorials_files/incompressible_flow/Inc_Combustion/MLP_PNO.png) +![MLP_PNO](../../tutorials_files/incompressible_flow/Inc_Combustion/MLP_PNO.png) All networks use the Gaussian Error Linear Unit (GELU) activation function for all hidden layers and were trained on flamelet data consisting of adiabatic free-flame data, burner-stabilized data, and chemical equilibrium data obtained over a range of equivalence ratio's and reactant temperature of 0.3-6.0 and 280K-900K respectively. @@ -443,11 +444,11 @@ After 3000 iterations, the simulation converges to the following solution. This The following image shows the solution for the progress variable and total enthalpy side-by-side. The progress variable solution indicates the progress of the reaction, with a local maximum next to the flame front, as is the case for lean, pre-mixed flames with preferential diffusion and no stretch. The total enthalpy solution correctly shows decreases near the cooled surfaces. -![Result_PV_enth](../../../tutorials_files/incompressible_flow/Inc_Combustion/pv_enth.png) +![Result_PV_enth](../../tutorials_files/incompressible_flow/Inc_Combustion/pv_enth.png) The solution for the mixture fraction and NO species is shown in the next figure. Due to the effects of preferential diffusion, the mixture fraction solution shows a local minimum in regions of positive flame curvature. The NO solution contains a local maximum in the region of maximum temperature and remaining nearly constant afterwards due to the reduction in temperature from the heat exchanger emulator. -![Result_mixfrac_NO](../../../tutorials_files/incompressible_flow/Inc_Combustion/mixfrac_NO.png) +![Result_mixfrac_NO](../../tutorials_files/incompressible_flow/Inc_Combustion/mixfrac_NO.png) Finally, the results for the temperature and heat release rate are shown below. These quantities are not retrieved through solving transport equations, but by retrieving them from the flamelet manifold. -![Result_T_qdot](../../../tutorials_files/incompressible_flow/Inc_Combustion/T_Qdot.png) +![Result_T_qdot](../../tutorials_files/incompressible_flow/Inc_Combustion/T_Qdot.png) diff --git a/_tutorials/incompressible_flow/Inc_Laminar_Cavity/Inc_Laminar_Cavity.md b/_tutorials/incompressible_flow/Inc_Laminar_Cavity/Inc_Laminar_Cavity.md index c87a7fb2..a593abbe 100644 --- a/_tutorials/incompressible_flow/Inc_Laminar_Cavity/Inc_Laminar_Cavity.md +++ b/_tutorials/incompressible_flow/Inc_Laminar_Cavity/Inc_Laminar_Cavity.md @@ -28,7 +28,7 @@ The intent of this tutorial is to demonstrate the variable density capability of ## Resources -The resources for this tutorial can be found in the [Inc_Laminar_Cavity](incompressible_flow/https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Laminar_Cavity) directory in the [tutorial repository](https://github.com/su2code/Tutorials). You will need the configuration file ([lam_buoyancy_cavity.cfg](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Laminar_Cavity/lam_buoyancy_cavity.cfg)) and the mesh file ([mesh_cavity_257x257.su2](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Laminar_Cavity/mesh_cavity_257x257.su2)). +The resources for this tutorial can be found in the [Inc_Laminar_Cavity](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Laminar_Cavity) directory in the [tutorial repository](https://github.com/su2code/Tutorials). You will need the configuration file ([lam_buoyancy_cavity.cfg](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Laminar_Cavity/lam_buoyancy_cavity.cfg)) and the mesh file ([mesh_cavity_257x257.su2](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Laminar_Cavity/mesh_cavity_257x257.su2)). ## Tutorial diff --git a/_tutorials/incompressible_flow/Inc_Turbulent_Flat_Plate/Inc_Turbulent_Flat_Plate.md b/_tutorials/incompressible_flow/Inc_Turbulent_Flat_Plate/Inc_Turbulent_Flat_Plate.md index 21a26a6e..ceff4534 100644 --- a/_tutorials/incompressible_flow/Inc_Turbulent_Flat_Plate/Inc_Turbulent_Flat_Plate.md +++ b/_tutorials/incompressible_flow/Inc_Turbulent_Flat_Plate/Inc_Turbulent_Flat_Plate.md @@ -76,7 +76,7 @@ Instructions for running this test case are given here for both serial and paral #### In Serial To run this test case, follow these steps at a terminal command line: - 1. Copy the config file ([turb_flatplate.cfg](../../tutorials_files/incompressible_flow/Inc_Turbulent_Flat_Plate/turb_flatplate.cfg)) and/or the mesh file ([mesh_flatplate_turb_545x385.su2](../../tutorials_files/incompressible_flow/Inc_Turbulent_Flat_Plate/mesh_flatplate_turb_545x385.su2)) so that they are in the same directory. Move to the directory containing the config file and the mesh file. Make sure that the SU2 tools were compiled, installed, and that their install location was added to your path. + 1. Copy the config file ([turb_flatplate.cfg](https://github.com/su2code/Tutorials/blob/master/incompressible_flow/Inc_Turbulent_Flat_Plate/turb_flatplate.cfg)) and/or the mesh file ([mesh_flatplate_turb_545x385.su2](https://github.com/su2code/Tutorials/blob/master/incompressible_flow/Inc_Turbulent_Flat_Plate/mesh_flatplate_turb_545x385.su2)) so that they are in the same directory. Move to the directory containing the config file and the mesh file. Make sure that the SU2 tools were compiled, installed, and that their install location was added to your path. 2. Run the executable by entering ``` diff --git a/_tutorials/incompressible_flow/Inc_Urban_City/Inc_Urban_City.md b/_tutorials/incompressible_flow/Inc_Urban_City/Inc_Urban_City.md index 78a43d65..2b336263 100644 --- a/_tutorials/incompressible_flow/Inc_Urban_City/Inc_Urban_City.md +++ b/_tutorials/incompressible_flow/Inc_Urban_City/Inc_Urban_City.md @@ -11,7 +11,7 @@ requires: SU2_CFD complexity: intermediate --- -![urban_city](../../../tutorials_files/incompressible_flow/Inc_Urban_City/images/wind_velocity.png) +![urban_city](../../tutorials_files/incompressible_flow/Inc_Urban_City/images/wind_velocity.png) Figure (1): Flow through the streets of the city center of amsterdam. @@ -81,7 +81,7 @@ overpass_url = "https://overpass-api.de/api/interpreter" ``` This information can then be saved as polygon data to a file. The information that we retrieved is visualized in Figure 2: -![Building information](../../../tutorials_files/incompressible_flow/Inc_Urban_City/images/amsterdam_buildings.png) +![Building information](../../tutorials_files/incompressible_flow/Inc_Urban_City/images/amsterdam_buildings.png) Figure 2: Visualization of the building information that was retrieved. The polygon data was saved as a pickle file for further processing. @@ -96,11 +96,11 @@ We can further smooth the shapes by using dilation-erosion, and also by using th The final step in creating this setup is to give all polygons to gmsh and create the mesh. We use a triangulated mesh with a quadrilateral inflation layer around the buildings. The final mesh is 786k cells. Figure 3: Gmsh mesh and zoom of the mesh around the royal palace showing the inflation layers. @@ -135,7 +135,7 @@ If possible, always use a parallel setup to reduce computational time (wall cloc ### Results -![urban_city](../../../tutorials_files/incompressible_flow/Inc_Urban_City/images/wind_velocity_zoom.png) +![urban_city](../../tutorials_files/incompressible_flow/Inc_Urban_City/images/wind_velocity_zoom.png) Figure (4): Zoom of the flow through the streets of the city center of amsterdam. @@ -172,7 +172,7 @@ PYTHON_CUSTOM_SOURCE= YES ``` to activate the custom source term. -![urban_city](../../../tutorials_files/incompressible_flow/Inc_Urban_City/images/fire_zoom.png) +![urban_city](../../tutorials_files/incompressible_flow/Inc_Urban_City/images/fire_zoom.png) Figure (5): Zoom of the 'Dam' square in front of the royal palace. diff --git a/_tutorials/incompressible_flow/Inc_Von_Karman/Inc_Von_Karman.md b/_tutorials/incompressible_flow/Inc_Von_Karman/Inc_Von_Karman.md index 83a221f8..b109e358 100644 --- a/_tutorials/incompressible_flow/Inc_Von_Karman/Inc_Von_Karman.md +++ b/_tutorials/incompressible_flow/Inc_Von_Karman/Inc_Von_Karman.md @@ -11,9 +11,9 @@ requires: SU2_CFD complexity: intermediate --- -![von_karman_street](../../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/unsteady_cylinder.gif) +![von_karman_street](../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/unsteady_cylinder.gif) -Figure (1): impression of the von Karman vortex shedding. A high quality mp4 video can be found [here](../../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/unsteady_cylinder.mp4) +Figure (1): impression of the von Karman vortex shedding. A high quality mp4 video can be found [here](../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/unsteady_cylinder.mp4) ## Goals @@ -39,7 +39,7 @@ When the Reynolds number $$Re=\rho \cdot V \cdot D / \mu$$ is low (Re < 40), the The configuration is a circular cylinder of diameter $$D=0.01 m$$ surrounded by a far field at $$L = 30 D$$ and a rectangular wake region of $$X = 150 D$$. The far-field velocity is $$U_{\infty} = 0.12 m/s$$. With a viscosity of $$\mu=1.0 \cdot 10^{-5}$$ and a density of $$\rho = 1 kg/m3$$, the Reynolds number is $$Re = 120$$. -![von_karman_mesh](../../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/mesh.png) +![von_karman_mesh](../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/mesh.png) Figure 2: Computational domain for the von Karman vortex shedding. The solution is initialized with uniform flow conditions. After an initial phase of around 4 seconds, the flow becomes periodic with a specific frequency depending on the Reynolds number. @@ -102,19 +102,19 @@ If possible, always use a parallel setup to reduce computational time (wall cloc ### Results -![particles_streamlines](../../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/particles.png) +![particles_streamlines](../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/particles.png) Figure (3): Developed von Karman street with injected particles. The figure above shows the von Karman vortices. A movie of the von Karman Vortex shedding as shown in this tutorial can be made using the paraview statefile here: [statefile_with_particles.pvsm](https://github.com/su2code/Tutorials/tree/master/incompressible_flow/Inc_Von_Karman_Cylinder/statefile_with_particles.pvsm). The colored vorticity gradients are created in the wake immediately behind the cylinder, and transported downstream. In paraview, we inject particles and let them be transported downstream over streamlines. We can clearly see that the particles are not mixed homogeneously but are being transported in batches of red and green particles moving with their corresponding vortices. -![von_karman_street_arrow](../../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/unsteady_cylinder_arrow.gif) +![von_karman_street_arrow](../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/unsteady_cylinder_arrow.gif) A link to a high quality video can be found [here](https://github.com/su2code/su2code.github.io/tree/master/tutorials_files/incompressible_flow/Inc_Von_Karman/images/unsteady_cylinder_arrow.mp4). The forces on the cylinder can also be visualized, see the above movie. We see the unsteady velocity magnitude, and on the cylinder surface we visualize the local force as the local pressure normal to the surface. For this we need to extract the surface data only and then compute the surface normal using a programmable filter. We can then visualize the glyph distribution. The total lift force is the integrated vertical component, whose size can be visualize as a colored arrow of a size proportional to the lift force using another programmable filter. Below the image we visualize the lift force in time using the PlotSelectionOverTime feature. -![validation](../../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/strouhal_cylinder_karman.png) +![validation](../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/strouhal_cylinder_karman.png) Figure (4): Strouhal number, comparison with experimental data from Williamson (2006). @@ -182,7 +182,7 @@ When we compare the Strouhal number with the experimental data from Williamson, ### Numerical variations -![validation](../../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/strouhal_cylinder_karman_variation.png) +![validation](../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/strouhal_cylinder_karman_variation.png) Figure (5): Comparison of different numerical settings. @@ -193,7 +193,7 @@ It is also known that the size of the computational domain influences the result As a final test, the testcase can be executed for varying Reynolds numbers, ranging from Re=60 to Re=180, giving the result in Figure (6). -![validation](../../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/strouhal_cylinder_karman_Re.png) +![validation](../../tutorials_files/incompressible_flow/Inc_Von_Karman/images/strouhal_cylinder_karman_Re.png) Figure (6): Comparison of numerical Strouhal numbers with experiments for varying Reynolds numbers. diff --git a/_tutorials/multiphysics/TFC_python/TFC_python.md b/_tutorials/multiphysics/TFC_python/TFC_python.md index c68c858b..d3e3b5f5 100644 --- a/_tutorials/multiphysics/TFC_python/TFC_python.md +++ b/_tutorials/multiphysics/TFC_python/TFC_python.md @@ -11,7 +11,7 @@ requires: SU2_CFD, python complexity: advanced --- -![TFC_temp](../../../tutorials_files/multiphysics/TFC_python/images/TFC_temp.png) +![TFC_temp](../../tutorials_files/multiphysics/TFC_python/images/TFC_temp.png) Figure (1): high-pressure turbulent premixed flame of the Paul-Scherrer Institute (PSI), Switzerland ## Goals @@ -109,7 +109,7 @@ def SetInitialSpecies(SU2Driver): ``` -![TFC_temp_init](../../../tutorials_files/multiphysics/TFC_python/images/TFC_temp_init.png) +![TFC_temp_init](../../tutorials_files/multiphysics/TFC_python/images/TFC_temp_init.png) Figure(2): initial temperature field created using the python wrapper Note that when setting the species solution, we use the index=0, because we have only 1 species transport equation. When setting a flow solution, the index to the required field should be used. The indices can be retrieved using: @@ -231,7 +231,7 @@ $ mpirun -n 4 python run.py ### Results -![TFC_source](../../../tutorials_files/multiphysics/TFC_python/images/TFC_source.png) +![TFC_source](../../tutorials_files/multiphysics/TFC_python/images/TFC_source.png) Figure (3): visualization of the TFC source term for the turbulent combustion model, together with the streamlines. @@ -258,7 +258,7 @@ $$q_w = k_f \left( The near wall mesh needs to be fine enough to accurately represent the flux. -![TFC_source](../../../tutorials_files/multiphysics/TFC_python/images/TFC_temp_heatloss.png) +![TFC_source](../../tutorials_files/multiphysics/TFC_python/images/TFC_temp_heatloss.png) Figure (4): visualization of the temperature with a line plot showing the wall temperature. Figure 4 shows the temperature in the domain, clearly showing the thermal boundary layer at the wall. In the upper left corner the temperature redistribution due to the recirculation zone is also clearly present. @@ -278,15 +278,15 @@ $$h_{\textrm{chem}} = c \cdot h_{chem}^{\textrm{max}}$$. Since total enthalpy is conserverved during combustion, the temperature difference between the actual temperature and the temperature computed from the sensible enthalpy gives us the heat loss. With this enthalpy deficiency we can compute the local laminar flame speed and the corrected source term. -![TFC_source](../../../tutorials_files/multiphysics/TFC_python/images/TFC_source_correction.png) +![TFC_source](../../tutorials_files/multiphysics/TFC_python/images/TFC_source_correction.png) Figure (4): visualization of the source term showing the results using constant laminar flamespeed (top) and the variable laminar flamespeed (bottom). -![TFC_source](../../../tutorials_files/multiphysics/TFC_python/images/TFC_temp_correction.png) +![TFC_source](../../tutorials_files/multiphysics/TFC_python/images/TFC_temp_correction.png) Figure (5): visualization of the temperature showing the result using constant laminar flamespeed (top) and the variable laminar flamespeed (bottom). Figures 4 and 5 show a comparison between the simulation results using a constant laminar flamespeed and a variable laminar flamespeed that takes into account local heat losses. In Figure 4, the source term is smaller close to the wall where the flame attaches. The temperature field in Figure 5 shows that the flame zone is more diffusive. -![TFC_source](../../../tutorials_files/multiphysics/TFC_python/images/TFC_c_correction.png) +![TFC_source](../../tutorials_files/multiphysics/TFC_python/images/TFC_c_correction.png) Figure (6): Line plot of the progress variable on the centerline showing the result using constant laminar flamespeed and variable laminar flamespeed. Figure 6 confirms that the flame is more diffuse with variable S_L. diff --git a/_tutorials/multiphysics/contact_resistance_cht/SS_CR_CHT.md b/_tutorials/multiphysics/contact_resistance_cht/SS_CR_CHT.md index 502fd7cf..2a499dbc 100644 --- a/_tutorials/multiphysics/contact_resistance_cht/SS_CR_CHT.md +++ b/_tutorials/multiphysics/contact_resistance_cht/SS_CR_CHT.md @@ -24,7 +24,7 @@ The resources for this tutorial can be found in the [multiphysics/contact_resist ## Tutorial -The following tutorial will walk you through the steps required when solving for a coupled CHT solution incorporating multiple physical zones and contact resistance. It is assumed you have already obtained and compiled the SU2_CFD code for a serial computation. If you have yet to complete these requirements, please see the [Download](/docs_v8/Download/) and [Installation](/docs_v8/Installation/) pages. +The following tutorial will walk you through the steps required when solving for a coupled CHT solution incorporating multiple physical zones and contact resistance. It is assumed you have already obtained and compiled the SU2_CFD code for a serial computation. If you have yet to complete these requirements, please see the [Download](/docs_v7/Download/) and [Installation](/docs_v7/Installation/) pages. ### Background @@ -44,13 +44,13 @@ $$ Here, $R_c$ is the contact resistance with the units $m^2 K W^{-1}$, or the inverse of the heat transfer coefficient. For ideal contact, $R_c$ is equal to zero. This results in the temperature on both sides of the interface to be equal. Applying a non-zero value for $R_c$ restricts the heat transfer between the two solid domains, resulting in a temperature discontinuity. To illustrate this, consider the following set-up with two solid domains. -![Solid domain set-up](../../../tutorials_files/multiphysics/contact_resistance_cht/solid_domains.png) +![Solid domain set-up](../../tutorials_files/multiphysics/contact_resistance_cht/solid_domains.png) Figure 1: Two solid domains subject to iso-thermal boundary conditions connected by a zone interface. Here, the two colored blocks have different thermal properties and are subject to two isothermal walls. The temperature profile along the centerline for various values of $R_c$ is shown below. The discontinuity between the temperatures on either side of the interface is proportional to the value of $R_c$. -![Effect of $R_c$](../../../tutorials_files/multiphysics/contact_resistance_cht/contact_resistance_effect.png) +![Effect of $R_c$](../../tutorials_files/multiphysics/contact_resistance_cht/contact_resistance_effect.png) Figure 2: The effect of altering the contact resistance at the interface between the solid domains. What follows is a tutorial with heat transfer between solid and fluid domains that illustrates the use of the contact resistance model. @@ -59,7 +59,7 @@ What follows is a tutorial with heat transfer between solid and fluid domains th This problem will solve for the incompressible flow along side two solid, metal blocks with different thermal properties, subject to heat transfer with contact resistance at the interface between the blocks. The simulation setup is shown below. The two solid blocks are squares with a side length of 1.0e-02m, while the fluid domain has a width of 5.0e-03m. -![Problem Setup](../../../tutorials_files/multiphysics/contact_resistance_cht/problem_setup.png) +![Problem Setup](../../tutorials_files/multiphysics/contact_resistance_cht/problem_setup.png) Figure 3: Computational setup for the tutorial problem for conjugate heat transfer between solid and fluid domains. The following flow conditions that are set for the fluid domain with a Reynolds number of 260: @@ -86,7 +86,7 @@ The two solid blocks each are subject to an iso-thermal wall boundary condition, The computational domain for this tutorial is made up of three separate meshes; [Solid 1](https://github.com/su2code/Tutorials/tree/master/multiphysics/contact_resistance_cht/solid_mesh_1.su2), [Solid 2](https://github.com/su2code/Tutorials/tree/master/multiphysics/contact_resistance_cht/solid_mesh_2.su2), and [Fluid](https://github.com/su2code/Tutorials/tree/master/multiphysics/contact_resistance_cht/fluid_mesh.su2). The meshes for the solid domains are simple, square meshes with 40 nodes along each side, while the fluid domain mesh is refined near the interface with the solid domains. These meshes can alternatively be generated through Gmesh. The .geo files for [Solid 1](https://github.com/su2code/Tutorials/tree/master/multiphysics/contact_resistance_cht/solid_1.geo), [Solid 2](https://github.com/su2code/Tutorials/tree/master/multiphysics/contact_resistance_cht/solid_2.geo), and [Fluid](https://github.com/su2code/Tutorials/tree/master/multiphysics/contact_resistance_cht/fluid_3.geo) allow for the generation of the respective SU2 mesh files. -![Problem Setup Mesh](../../../tutorials_files/multiphysics/contact_resistance_cht/problem_mesh.png) +![Problem Setup Mesh](../../tutorials_files/multiphysics/contact_resistance_cht/problem_mesh.png) Figure 4: The computational mesh with all three physical zones. ### Configuration File Options @@ -132,12 +132,12 @@ In order to run this test case, follow these steps at a terminal command line: The temperature solution of the completed simulation is shown below. The hot, stainless steel block heats up the flow in the fluid domain, which transfers the heat partially to the copper block downstream through convection. -![Temperature solution](../../../tutorials_files/multiphysics/contact_resistance_cht/solution_temperature.png) +![Temperature solution](../../tutorials_files/multiphysics/contact_resistance_cht/solution_temperature.png) Figure 5: Temperature solution for the current setup. The effect of the application of contact resistance becomes clear when visualizing the temperature trend across interfaces. Three temperature trends according to each interface are shown below and are color coded corresponding to the lines shown in Figure 6. -![Temperature solution lines](../../../tutorials_files/multiphysics/contact_resistance_cht/solution_temperature_lines.png) +![Temperature solution lines](../../tutorials_files/multiphysics/contact_resistance_cht/solution_temperature_lines.png) Figure 6: Temperature trends across the heat transfer interfaces. The temperature trends across the solid-fluid interfaces (green, red) are continuous, the temperature trend across the solid-solid interface (purple) shows a discontinuity at the interface as a result of the application of contact resistance. This effect can be exaggerated when increasing the value for the contact resistance. For example, when applying a contact resistance value of 10 m^2-K/W, @@ -146,9 +146,9 @@ CHT_INTERFACE_CONTACT_RESISTANCE = (10.0,0,0) ``` the two solid domains are currently essentially insulated from one another. This results in the following temperature solution. -![Temperature solution](../../../tutorials_files/multiphysics/contact_resistance_cht/solution_temperature_n.png) +![Temperature solution](../../tutorials_files/multiphysics/contact_resistance_cht/solution_temperature_n.png) Figure 7: Temperature solution for a contact resistance value of 10.0 m^2-K/W. -![Temperature solution lines](../../../tutorials_files/multiphysics/contact_resistance_cht/solution_temperature_lines_n.png) +![Temperature solution lines](../../tutorials_files/multiphysics/contact_resistance_cht/solution_temperature_lines_n.png) Figure 8: Temperature trends across the interfaces for a contact resistance value of 10.0 m^2-K/W. diff --git a/_tutorials/multiphysics/unfinished_tutorials/Adjoint_FSI_Python.md b/_tutorials/multiphysics/unfinished_tutorials/Adjoint_FSI_Python.md index e28c2ed4..b08a6d6e 100644 --- a/_tutorials/multiphysics/unfinished_tutorials/Adjoint_FSI_Python.md +++ b/_tutorials/multiphysics/unfinished_tutorials/Adjoint_FSI_Python.md @@ -344,7 +344,7 @@ After 15 iterations, both the flow and structural adjoint fields are successfull with a gradient of the drag with respect to the Young's modulus, E, of 1.1606E-05. The convergence of the Young's modulus sensitivity is as follows: -![FSI Results2](../multiphysics/images/fsipyadj1.png) +![FSI Results2](../../tutorials_files/multiphysics/unfinished_tutorials/images/fsipyadj1.png) #### Sensitivity verification diff --git a/_tutorials/multiphysics/unfinished_tutorials/Basic_RHT.md b/_tutorials/multiphysics/unfinished_tutorials/Basic_RHT.md index c6efe251..354c32a1 100644 --- a/_tutorials/multiphysics/unfinished_tutorials/Basic_RHT.md +++ b/_tutorials/multiphysics/unfinished_tutorials/Basic_RHT.md @@ -21,7 +21,7 @@ This tutorial couples SU2's incompressible fluid solver with a one-equation Radi In this tutorial, we use a very similar problem definition as for the [Laminar Buoyancy-driven Cavity](../Inc_Laminar_Cavity) tutorial, a 1x1 m cavity in 2D with opposing hot and cold vertical walls and insulated horizontal walls. In this case, the media is participating, which means it absorbs part of the energy emitted by the hot and cold walls in form of radiation, and this absorption will have an impact on the overall behaviour of the flow. The properties of the test case are shown next: -![ProblemSetup1](../multiphysics/images/rht1.png) +![ProblemSetup1](../../tutorials_files/multiphysics/unfinished_tutorials/images/rht1.png) ### Resources @@ -47,7 +47,7 @@ $$\kappa$$ and $$\sigma_s$$ are, respectively, the absorption and scattering coe The cavity is discretized with an structured mesh using 50 nodes in the horizontal and vertical boundaries, for a total of 2500 rectangular elements. The nodes are concentrated towards the boundary regions to adequately capture the boundary layer. The boundary conditions are as follows: -![ProblemSetup2](../multiphysics/images/rht2.png) +![ProblemSetup2](../../tutorials_files/multiphysics/unfinished_tutorials/images/rht2.png) #### Configuration File Options @@ -201,7 +201,7 @@ All convergence criteria satisfied. From the convergence, it can be observed that the convective part of the problem converges quickly, however the energy equation is more stiff due to the quartic dependence of the radiative energy on the flow temperature. The resultant radiative energy field is shown next -![FSI Results](../multiphysics/images/rht3.png) +![FSI Results](../../tutorials_files/multiphysics/unfinished_tutorials/images/rht3.png) #### Assessing the radiation effects @@ -247,11 +247,11 @@ Running the case now, the convergence to the required level is faster We can compare the temperature field in the case with radiation (left) versus the case without radiation (right). The latter corresponds to the [Laminar Buoyancy-driven Cavity](../Inc_Laminar_Cavity) for ```Ra = 1.0E06```. It can be observed how the radiated case has an average temperature which is notably higher that in the non-absorbing case. -![RHT Results2](../multiphysics/images/rht4.png) +![RHT Results2](../../tutorials_files/multiphysics/unfinished_tutorials/images/rht4.png) The temperature field has also an impact in the velocity fields, which are compared next for the cases with (left) and without radiation (right). -![RHT Results3](../multiphysics/images/rht5.png) +![RHT Results3](../../tutorials_files/multiphysics/unfinished_tutorials/images/rht5.png) ### References $$^1$$ Frank, M., _et al._ (2006), Partial moment entropy approximation to radiative heat transfer. _Journal of Computational Physics 218(1), 1–18._ DOI: [10.1016/j.jcp.2006.01.038](https://doi.org/10.1016/j.jcp.2006.01.038) diff --git a/_tutorials/multiphysics/unfinished_tutorials/Coupled_RHT_Adjoint.md b/_tutorials/multiphysics/unfinished_tutorials/Coupled_RHT_Adjoint.md index 3960af80..9b1b2791 100644 --- a/_tutorials/multiphysics/unfinished_tutorials/Coupled_RHT_Adjoint.md +++ b/_tutorials/multiphysics/unfinished_tutorials/Coupled_RHT_Adjoint.md @@ -23,7 +23,7 @@ This tutorial follows up the coupled SU2's [incompressible CFD-RHT tutorial](../ In this tutorial, we define a problem similar to the [Laminar_Cylinder](../Laminar_Cylinder), however using in this case the incompressible solver. A cylinder with ```D = 1.0 m``` is immersed in a laminar, external flow with a Reynolds number ```Re = 40```. -![ProblemSetup1](../multiphysics/images/rhtadj1.png) +![ProblemSetup1](../../tutorials_files/multiphysics/unfinished_tutorials/images/rhtadj1.png) ### Resources @@ -244,11 +244,11 @@ All convergence criteria satisfied. And we observe that the higher temperature has a significant impact in the drag coefficient. The problem presents a very uniform and fast convergence, as it is shown next -![Primal Convergence](../multiphysics/images/rhtadj2.png) +![Primal Convergence](../../tutorials_files/multiphysics/unfinished_tutorials/images/rhtadj2.png) The resulting velocity and temperature fields are -![Primal Results](../multiphysics/images/rhtadj3.png) +![Primal Results](../../tutorials_files/multiphysics/unfinished_tutorials/images/rhtadj3.png) #### Computing the drag adjoint @@ -336,13 +336,13 @@ An iterative process is then started by running in reverse mode through the adjo Some convergence properties of the primal problem are inherited in the adjoint run, as further explained by Albring _et al_$$^3$$. This can be observed in the convergence of the adjoint variables -![Adjoint Convergence](../multiphysics/images/rhtadj4.png) +![Adjoint Convergence](../../tutorials_files/multiphysics/unfinished_tutorials/images/rhtadj4.png) #### FFD Box Now, we want to convert the solution of our adjoint problem into usable magnitudes for a shape optimization problem. In order to do so, we will define a Free-Form Deformation (FFD) box around the body such as -![Adjoint Convergence](../multiphysics/images/rhtadj5.png) +![Adjoint Convergence](../../tutorials_files/multiphysics/unfinished_tutorials/images/rhtadj5.png) where the design parameters $$x_1$$ to $$x_{50}$$ correspond to the vertical deformation of the FFD box for 50 nodes. @@ -521,7 +521,7 @@ DRAG gradient : 0.00131275 To finalize this tutorial, the sensitivities for the FFD points are written to the file ```of_grad.dat``` and are plotted next -![Adjoint Convergence](../multiphysics/images/rhtadj6.png) +![Adjoint Convergence](../../tutorials_files/multiphysics/unfinished_tutorials/images/rhtadj6.png) ### References diff --git a/_tutorials/multiphysics/unfinished_tutorials/Static_FSI_Python.md b/_tutorials/multiphysics/unfinished_tutorials/Static_FSI_Python.md index d1a2c7d1..e9e5d8f0 100644 --- a/_tutorials/multiphysics/unfinished_tutorials/Static_FSI_Python.md +++ b/_tutorials/multiphysics/unfinished_tutorials/Static_FSI_Python.md @@ -332,13 +332,13 @@ which yields for its last iteration The displacement field on the structural domain and the velocity field on the flow domain obtained in ```fsi_steady_1.vtu```_and ```fsi_steady_0.vtu``` respectively are shown below: -![FSI Results1](../multiphysics/images/fsipy1.png) +![FSI Results1](../../tutorials_files/multiphysics/unfinished_tutorials/images/fsipy1.png) -![FSI Results2](../multiphysics/images/fsipy2.png) +![FSI Results2](../../tutorials_files/multiphysics/unfinished_tutorials/images/fsipy2.png) which is, as expected, identical to the result of the [Static FSI](../Static_FSI/) tutorial. The convergence of the drag coefficient is as follows: -![FSI Results2](../multiphysics/images/fsipy3.png) +![FSI Results2](../../tutorials_files/multiphysics/unfinished_tutorials/images/fsipy3.png) The drag coefficient will be used as the objective function for the adjoint computation in the [next tutorial](../Adjoint_FSI_Python/). diff --git a/_tutorials/multiphysics/unfinished_tutorials/Turbulent_RHT_CHT.md b/_tutorials/multiphysics/unfinished_tutorials/Turbulent_RHT_CHT.md index ae86d429..f882974e 100644 --- a/_tutorials/multiphysics/unfinished_tutorials/Turbulent_RHT_CHT.md +++ b/_tutorials/multiphysics/unfinished_tutorials/Turbulent_RHT_CHT.md @@ -15,7 +15,7 @@ follows2: Coupled_RHT_Adjoint ### Goals -This tutorial builds up on SU2's [Conjugate Heat Transfer](../Inc_Heated_Cylinders) and [Radiative Heat Transfer](../Coupled_RHT_Adjoint) capabilities, to solve a multizone, multiphysics problem involving incompressible turbulent flows, radiation, and conjugate heat transfer between a solid domain and a buoyancy-driven cavity. Upon the completion of this example, the user will be capable of +This tutorial builds up on SU2's [Conjugate Heat Transfer](../Static_CHT/) and [Radiative Heat Transfer](../Coupled_RHT_Adjoint) capabilities, to solve a multizone, multiphysics problem involving incompressible turbulent flows, radiation, and conjugate heat transfer between a solid domain and a buoyancy-driven cavity. Upon the completion of this example, the user will be capable of - Setting up a multiphysics simulation with Conjugate Heat Transfer interfaces between zones - Solving a turbulent buoyancy-driven cavity with participating media and radiation - Computing coupled adjoint solutions of problems involving incompressible flow and radiation @@ -24,7 +24,7 @@ This tutorial builds up on SU2's [Conjugate Heat Transfer](../Inc_Heated_Cylinde In this tutorial, we define a problem similar to the [Laminar Buoyancy-Driven Cavity](../Basic_RHT), however using in this case the right wall is a solid wall rather than an isothermal boundary condition. -![ProblemSetup1](../multiphysics/images/chtrht1.png) +![ProblemSetup1](../../tutorials_files/multiphysics/unfinished_tutorials/images/chtrht1.png) Where the inlet velocity is 3 m/s and its temperature is 450 K, while the outlet is a 0 pressure outlet. @@ -44,11 +44,11 @@ The flow domain is discretized using a structured mesh with a total of 4800 elem First, we define the two FFD boxes to parametrize the upper and lower boundaries of the fluid domain, using 14 design variables per boundary. This is shown next -![ProblemSetup2](../multiphysics/images/chtrht2.png) +![ProblemSetup2](../../tutorials_files/multiphysics/unfinished_tutorials/images/chtrht2.png) In order to ensure that the solid domain remains fixed, the FFD boxes are defined so that they do not intersect the CHT boundary. This is shown in detail in the next image, where the red domain corresponds to the solid, and the blue to the FFD box -![ProblemSetup2](../multiphysics/images/chtrht3.png) +![ProblemSetup2](../../tutorials_files/multiphysics/unfinished_tutorials/images/chtrht3.png) We define the FFD boxes using the [FFD config file](https://github.com/su2code/Tutorials/blob/feature_radiation_multizone/multiphysics/turb_rht_cht/config_ffd.cfg). In this case, we define 2 boxes using @@ -411,7 +411,7 @@ We need to converge the problem thoroughly in order to obtain a converged heatfl The temperature and velocity fields for the primal settings are as follows -![Result](../multiphysics/images/chtrht4.png) +![Result](../../tutorials_files/multiphysics/unfinished_tutorials/images/chtrht4.png) ### Running the adjoint simulation @@ -548,7 +548,7 @@ MESH_FILENAME= mesh_flow_ffd_deform.su2 it is possible to run a deformed primal simulation. The temperature and velocity fields for this particular deformed configuration are as follows -![ResultDef](../multiphysics/images/chtrht5.png) +![ResultDef](../../tutorials_files/multiphysics/unfinished_tutorials/images/chtrht5.png) ### Attribution diff --git a/_tutorials/multiphysics/unsteady_cht/Inc_Heated_Cylinders_Unsteady.md b/_tutorials/multiphysics/unsteady_cht/Inc_Heated_Cylinders_Unsteady.md index d10bcb82..9e387d4b 100644 --- a/_tutorials/multiphysics/unsteady_cht/Inc_Heated_Cylinders_Unsteady.md +++ b/_tutorials/multiphysics/unsteady_cht/Inc_Heated_Cylinders_Unsteady.md @@ -18,7 +18,7 @@ userguide: Multizone ## Goals -This tutorial is a follow-up on the [heated cylinders with conjugate heat transfer tutorial](/tutorials/Inc_Heated_Cylinders/) where a steady CHT solution was computed for a problem involving multiple physical zones. +This tutorial is a follow-up on the [heated cylinders with conjugate heat transfer tutorial](/tutorials/Static_CHT/) where a steady CHT solution was computed for a problem involving multiple physical zones. The following capabilities of SU2 will be showcased in this tutorial: - Time domain and time-marching config file options (plus related ones) for unsteady simulations @@ -33,7 +33,7 @@ The resources for this tutorial can be found in the [Inc_Heated_Cylinders_Unstea ## Tutorial -The following tutorial will walk you through the steps required when solving for an unsteady coupled CHT solution. It is assumed you have already obtained and compiled the SU2_CFD code for a serial computation. If you have yet to complete these requirements, please see the [Download](/docs/Download/) and [Installation](/docs/Installation/) pages and that make sure you have completed the [heated cylinders with conjugate heat transfer tutorial](/tutorials/Inc_Heated_Cylinders/). +The following tutorial will walk you through the steps required when solving for an unsteady coupled CHT solution. It is assumed you have already obtained and compiled the SU2_CFD code for a serial computation. If you have yet to complete these requirements, please see the [Download](/docs/Download/) and [Installation](/docs/Installation/) pages and that make sure you have completed the [heated cylinders with conjugate heat transfer tutorial](/tutorials/Static_CHT/). ### Background @@ -41,7 +41,7 @@ For unsteady flows around walls that are transferring heat from an adjacent (sol ### Problem Setup -The problem setup is the same as in the [heated cylinders with conjugate heat transfer tutorial](/tutorials/Inc_Heated_Cylinders/) except for the density. It is increased in all zones by a factor of 100 so that for the flow we obtain a Reynolds number of 4000 which will make it unsteady. Thus we set +The problem setup is the same as in the [heated cylinders with conjugate heat transfer tutorial](/tutorials/Static_CHT/) except for the density. It is increased in all zones by a factor of 100 so that for the flow we obtain a Reynolds number of 4000 which will make it unsteady. Thus we set ``` INC_DENSITY_INIT= 0.0210322 ``` @@ -56,7 +56,7 @@ For simplicity we leave all other parameters unchanged. ### Mesh Description -The [mesh](https://github.com/su2code/Tutorials/tree/master/multiphysics/unsteady_cht/mesh_cht_3cyl.su2) is the same as in the [heated cylinders with conjugate heat transfer tutorial](/tutorials/Inc_Heated_Cylinders/). +The [mesh](https://github.com/su2code/Tutorials/tree/master/multiphysics/unsteady_cht/mesh_cht_3cyl.su2) is the same as in the [heated cylinders with conjugate heat transfer tutorial](/tutorials/Static_CHT/). ### Configuration File Options @@ -85,4 +85,4 @@ The number of inner (zone-internal) iterations is set to 1 by default. We do not ### Running SU2 -One time iteration will run rather quick and it is up to the user for how long the simulation should run or, equivalently, which physical time span should be covered. In the video above, 1000 time steps had been computed to generate a 50s realtime video. See the [heated cylinders with conjugate heat transfer tutorial](/tutorials/Inc_Heated_Cylinders/) how to execute SU2_CFD. \ No newline at end of file +One time iteration will run rather quick and it is up to the user for how long the simulation should run or, equivalently, which physical time span should be covered. In the video above, 1000 time steps had been computed to generate a 50s realtime video. See the [heated cylinders with conjugate heat transfer tutorial](/tutorials/Static_CHT/) how to execute SU2_CFD. \ No newline at end of file diff --git a/_tutorials/structural_mechanics/Linear_Elasticity/Linear_Elasticity.md b/_tutorials/structural_mechanics/Linear_Elasticity/Linear_Elasticity.md index 26449a86..6fe6c56b 100644 --- a/_tutorials/structural_mechanics/Linear_Elasticity/Linear_Elasticity.md +++ b/_tutorials/structural_mechanics/Linear_Elasticity/Linear_Elasticity.md @@ -108,9 +108,9 @@ LINEAR_SOLVER_ERROR = 1E-8 LINEAR_SOLVER_ITER = 1000 ``` -Finally, the output of the solver needs to be set. We set the screen output to print out the residual of the linear solver in the x and y components of the displacement, and the maximum Von Mises Stress (VMS) in the structure. +Finally, the output of the solver needs to be set. We set the screen output to print the structural residuals in the x and y components of the displacement, and the maximum von Mises stress (VMS) in the structure. -In this case, we will write the volume file in [Paraview](https://www.paraview.org/) format, as _linear_elastic.vtk_. The convergence file will be written as _history.csv_, which in this case will only consists of one line as the linear problem is computed in a single iteration. The binary restart file will be saved as *restart_linear_elastic.dat*. +In this case, we will write the volume file in [Paraview](https://www.paraview.org/) format, as _linear_elastic.vtk_. The convergence file will be written as _history.csv_, which in this case will only consist of one line as the linear problem is computed in a single iteration. The binary restart file will be saved as *restart_linear_elastic.dat*. @@ -118,7 +118,7 @@ In this case, we will write the volume file in [Paraview](https://www.paraview.o SCREEN_OUTPUT = (INNER_ITER, RMS_DISP_X, RMS_DISP_Y, VMS) TABULAR_FORMAT = CSV -OUTPUT_FILES = (RESTART, PARAVIEW_BINARY) +OUTPUT_FILES = (RESTART, PARAVIEW_LEGACY) CONV_FILENAME = history VOLUME_FILENAME = linear_elastic @@ -137,7 +137,7 @@ This is a very small example that we will run in serial. To run this test case, at the command line. 3. SU2 will print the residual of the linear solver, and the simulation will finish after one iteration. - 4. Files containing the results will be written upon exiting SU2. The flow solution can be visualized in ParaView (.vtk) or Tecplot (.dat for ASCII). + 4. Files containing the results will be written upon exiting SU2. The structural solution can be visualized in ParaView (.vtk) or Tecplot (.dat for ASCII). For this particular problem, the solver should have run very quickly. The screen output of the code will go over your settings, before initializing the solver. Once done so, you will obtain an output such as @@ -148,12 +148,12 @@ For this particular problem, the solver should have run very quickly. The screen | 0| -9.779193| -9.986436| 1.1541e+06| ``` -where ```rms[DispX]``` and ```rms[DispY]``` correspond to the residual of the linear solver in the x and y components of the displacements, and ```VonMises``` corresponds to the maximum Von Mises Stress in the structural domain. +where ```rms[DispX]``` and ```rms[DispY]``` correspond to the residual of the linear solver in the x and y components of the displacements, and ```VonMises``` corresponds to the maximum von Mises stress in the structural domain. ### Results -The output file contains the displacement field, the nodal tensions $$\sigma_{xx}$$, $$\sigma_{yy}$$ and $$\sigma_{xy}$$ (as Sxx, Syy and Sxy), and the Von Misses stress. In order to visualize the deformation of the cantilever on Paraview, one can use the filter _Warp By Vector_ applied on the displacement field. The solution of the problem is shown next. +The output file contains the displacement field, the nodal tensions $$\sigma_{xx}$$, $$\sigma_{yy}$$ and $$\sigma_{xy}$$ (as Sxx, Syy and Sxy), and the von Mises stress. In order to visualize the deformation of the cantilever on Paraview, one can use the filter _Warp By Vector_ applied on the displacement field. The solution of the problem is shown next. ![Linear Results](../../tutorials_files/structural_mechanics/Linear_Elasticity/images/lin3.png) diff --git a/_tutorials/structural_mechanics/unfinished_tutorials/Dynamics.md b/_tutorials/structural_mechanics/unfinished_tutorials/Dynamics.md index 06468ec4..f55c3624 100644 --- a/_tutorials/structural_mechanics/unfinished_tutorials/Dynamics.md +++ b/_tutorials/structural_mechanics/unfinished_tutorials/Dynamics.md @@ -21,7 +21,7 @@ Upon completion of the tutorial on [Linear Elasticity](../Linear_Elasticity/), t The problem that we will be solving consists of a vertical, slender cantilever, clamped in its base, and subject to a horizontal, time-dependent load $$P$$ on its left boundary. This is shown in Fig. 1. -![ProblemSetup](../structural_mechanics/images/lin1.png) +![ProblemSetup](../../tutorials_files/structural_mechanics/Linear_Dynamics/images/lin1.png) ### Resources @@ -47,7 +47,7 @@ This tutorial will be solved the for the cantilever with the following condition The cantilever is discretized using 1000 4-node quad elements with linear interpolation. The boundaries are defined as follows: -![Mesh](../structural_mechanics/images/lin2.png) +![Mesh](../../tutorials_files/structural_mechanics/Linear_Dynamics/images/lin2.png) #### Configuration File Options @@ -134,7 +134,7 @@ The output files append the time step as _linear_dynamic__*****.vtk_. They conta The solution of the problem is shown next, where the horizontal displacement at the tip is plotted on the right part of the figure, and the deformed configuration on the left. -![Linear Results](../structural_mechanics/images/dynamic_linear.gif) +![Linear Results](../../tutorials_files/structural_mechanics/Linear_Dynamics/images/dynamic_linear.gif) ### References $$^1$$ Newmark, N.M. (1959), A method of computation for structural dynamics, _J Eng Mech Div_, 85(3):67-94 From 2c6f05a6d973223f0f0cf6a87e3bea2125b335f5 Mon Sep 17 00:00:00 2001 From: rois1995 Date: Mon, 26 Oct 2026 10:52:34 +0100 Subject: [PATCH 20/25] docs: check the separate documentation and NACA0021 branches --- .github/workflows/docs-check.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml index 5245621b..dc59a8a4 100644 --- a/.github/workflows/docs-check.yml +++ b/.github/workflows/docs-check.yml @@ -2,14 +2,14 @@ name: Documentation Checks on: push: - branches: ['docs_site'] + branches: ['docs_site', 'docs/user-guides', 'docs/naca0021'] pull_request: - branches: ['docs_site'] + branches: ['docs_site', 'master', 'docs/user-guides'] workflow_dispatch: inputs: su2_ref: description: SU2 commit SHA or branch - default: docs_site + default: docs/developer-guides permissions: contents: read @@ -33,7 +33,7 @@ jobs: uses: actions/checkout@v4 with: repository: rois1995/SU2 - ref: ${{ inputs.su2_ref || 'docs_site' }} + ref: ${{ inputs.su2_ref || 'docs/developer-guides' }} path: su2 fetch-depth: 0 filter: blob:none From f5f6bdd30831333c5ca8963406b42a9d68b776f7 Mon Sep 17 00:00:00 2001 From: rois1995 Date: Mon, 26 Oct 2026 11:02:14 +0100 Subject: [PATCH 21/25] docs: remove whitespace warnings from the prepared changes --- _config.yml | 1 - .../incompressible_flow/Inc_Combustion/Inc_Combustion.md | 2 +- .../multiphysics/unfinished_tutorials/Coupled_RHT_Adjoint.md | 2 +- _vandv/Bump_Channel.md | 4 ++-- _vandv/dsma661.md | 4 ++-- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/_config.yml b/_config.yml index a4174122..63b43482 100644 --- a/_config.yml +++ b/_config.yml @@ -127,4 +127,3 @@ collections: # Google Analytics google_analytics: UA-28187985-1 - diff --git a/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md b/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md index 5a33d116..48fb7dce 100644 --- a/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md +++ b/_tutorials/incompressible_flow/Inc_Combustion/Inc_Combustion.md @@ -310,7 +310,7 @@ The second option is through an artificial spark, enabled through setting `FLAME - `iter_start`: (outer) iteration after which the spark will be applied. - `duration`: number of (outer) iterations for which the artificial spark will be applied. -The source terms applied to the controlling variables are defined under the option `SPARK_REACTION_RATES`. This option expects one value for each transported scalar, that is for each controlling variable in `CONTROLLING_VARIABLE_NAMES` and each passive species in `USER_SCALAR_NAMES`. These are the source terms applied within the spark sphere. +The source terms applied to the controlling variables are defined under the option `SPARK_REACTION_RATES`. This option expects one value for each transported scalar, that is for each controlling variable in `CONTROLLING_VARIABLE_NAMES` and each passive species in `USER_SCALAR_NAMES`. These are the source terms applied within the spark sphere. The final and default option for initializing the solution is to perform a cold flow analysis without a flame front. This option is enabled through setting `FLAME_INIT_METHOD=NONE`. diff --git a/_tutorials/multiphysics/unfinished_tutorials/Coupled_RHT_Adjoint.md b/_tutorials/multiphysics/unfinished_tutorials/Coupled_RHT_Adjoint.md index 9b1b2791..891eea28 100644 --- a/_tutorials/multiphysics/unfinished_tutorials/Coupled_RHT_Adjoint.md +++ b/_tutorials/multiphysics/unfinished_tutorials/Coupled_RHT_Adjoint.md @@ -51,7 +51,7 @@ We start the tutorial by definining the problem as an incompressible, Navier Sto SOLVER = INC_NAVIER_STOKES ``` -and we set the properties for the flow to obtain a ```Re = 40``` based on the cylinder diameter. We use standard settings for the linear solver and a FDS scheme for the convective terms. The problem admits a relatively high ```CFL_NUMBER = 1.0E4```. +and we set the properties for the flow to obtain a ```Re = 40``` based on the cylinder diameter. We use standard settings for the linear solver and a FDS scheme for the convective terms. The problem admits a relatively high ```CFL_NUMBER = 1.0E4```. ``` INC_DENSITY_MODEL = VARIABLE diff --git a/_vandv/Bump_Channel.md b/_vandv/Bump_Channel.md index 068d8209..df929652 100644 --- a/_vandv/Bump_Channel.md +++ b/_vandv/Bump_Channel.md @@ -12,7 +12,7 @@ permalink: /vandv/Bump_Channel/

-The details of the 2D Bump-in-Channel Verification case are taken from the [NASA TMR website](https://tmbwg.github.io/turbmodels/bump.html). +The details of the 2D Bump-in-Channel Verification case are taken from the [NASA TMR website](https://tmbwg.github.io/turbmodels/bump.html). By comparing the SU2 results of the bump-in-channel case against CFL3D and FUN3D on a sequence of refined grids and seeing agreement of key quantities, we can build a high degree of confidence that the SA and SST models are implemented correctly. Therefore, the goal of this case is to verify the implementations of the SA and SST models in SU2. @@ -30,7 +30,7 @@ The length of the section of wall with the bump is 1.5 meters, and it is represe ## Mesh Description -Structured meshes of increasing density are used to perform a grid convergence study. The meshes are identical to the 2D versions found on the [NASA TMR website](https://tmbwg.github.io/turbmodels/bump_grids.html) for this case after converting to 2D, unstructured CGNS format (ADF). These meshes are named according to the number of vertices in the x and y directions, respectively. The mesh sizes are: +Structured meshes of increasing density are used to perform a grid convergence study. The meshes are identical to the 2D versions found on the [NASA TMR website](https://tmbwg.github.io/turbmodels/bump_grids.html) for this case after converting to 2D, unstructured CGNS format (ADF). These meshes are named according to the number of vertices in the x and y directions, respectively. The mesh sizes are: 1. 89x41 - 3520 quadrilaterals 2. 177x81 - 14080 quadrilaterals diff --git a/_vandv/dsma661.md b/_vandv/dsma661.md index ced0fa3c..1a21b965 100644 --- a/_vandv/dsma661.md +++ b/_vandv/dsma661.md @@ -55,13 +55,13 @@ If you would like to run the DSMA661 testcase problem for yourself, the files us ## Results The results for the mesh refinement study are presented and compared to results from FUN3D and CFL3D, including results for both SA and SST turbulence models. -To keep the comparisons consistent with these solvers, the results shown use the standard SA model and V2003m SST turbulence models. For SA model, the turbulent inflow is defined by $\tilde{\nu} = 3 \nu_{\infty}$ and $k/w$=0.009 for SST. The ROE scheme (with kappa=0.33333) is used with MUSCL treatment on the convective terms with a VAN ALBADA EDGE limiter and first order treatment on the turbulent advective terms. All cases were converged until the density residual was reduced to 10-11. More details about the FUN3D and CFL3D set ups can found on the [NASA TMR website](https://tmbwg.github.io/turbmodels/airfoilwakeverif500c_sa.html). +To keep the comparisons consistent with these solvers, the results shown use the standard SA model and V2003m SST turbulence models. For SA model, the turbulent inflow is defined by $\tilde{\nu} = 3 \nu_{\infty}$ and $k/w$=0.009 for SST. The ROE scheme (with kappa=0.33333) is used with MUSCL treatment on the convective terms with a VAN ALBADA EDGE limiter and first order treatment on the turbulent advective terms. All cases were converged until the density residual was reduced to 10-11. More details about the FUN3D and CFL3D set ups can found on the [NASA TMR website](https://tmbwg.github.io/turbmodels/airfoilwakeverif500c_sa.html). We will compare the convergence of lift and drag force values, splitting the drag into its pressure and viscous terms, and the minimum x-velocity in the wake regions at certain points. The coefficients of pressure and skin friction over the airfoil surface, velocity profiles in the wake region and the eddy viscosity contours will also be compared. Both the SA and SST models exhibit excellent agreement in the figures below. With grid refinement, we see that the asymptotic force values and minimum velocity values in the wake region reach very close to those of the FUN3D and CFL3D. The differences between the experimental and numerical results arise from the use of a blunt trailing edge in the experiments and a sharp one in the simulations. Nonetheless the CFD codes demonstrate a high degree of accuracy. -Additional codes have been compared against the FUN3D and CFL3D results, and are available on the [NASA TMR website](https://tmbwg.github.io/turbmodels/airfoilwakeverif500c_sa.html). Overall this builds a high degree of confidence in the implementations of these turbulence models in SU2. +Additional codes have been compared against the FUN3D and CFL3D results, and are available on the [NASA TMR website](https://tmbwg.github.io/turbmodels/airfoilwakeverif500c_sa.html). Overall this builds a high degree of confidence in the implementations of these turbulence models in SU2. ### SA Model From d8838c1ff9671e00594ad6066a2b9d3bc6b3457a Mon Sep 17 00:00:00 2001 From: rois1995 Date: Mon, 26 Oct 2026 11:15:42 +0100 Subject: [PATCH 22/25] docs: check website pull requests against develop --- .github/workflows/docs-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml index dc59a8a4..2f8a1755 100644 --- a/.github/workflows/docs-check.yml +++ b/.github/workflows/docs-check.yml @@ -4,7 +4,7 @@ on: push: branches: ['docs_site', 'docs/user-guides', 'docs/naca0021'] pull_request: - branches: ['docs_site', 'master', 'docs/user-guides'] + branches: ['docs_site', 'develop', 'docs/user-guides'] workflow_dispatch: inputs: su2_ref: From 27c559084179ae14659996a36479c64d5a18bd9b Mon Sep 17 00:00:00 2001 From: rois1995 Date: Mon, 26 Oct 2026 11:17:41 +0100 Subject: [PATCH 23/25] docs: link to the published diffusion flame tutorial --- _docs_v7/Guide-to-v8.md | 2 +- _docs_v7/Setup-Guide-Species-Combustion.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_docs_v7/Guide-to-v8.md b/_docs_v7/Guide-to-v8.md index 5a0deba2..b2e9b254 100644 --- a/_docs_v7/Guide-to-v8.md +++ b/_docs_v7/Guide-to-v8.md @@ -125,7 +125,7 @@ Many bug fixes and small improvements are not listed. See the [GitHub release no ### Solvers and models -- **Combustion.** Flamelet model for premixed flames: `KIND_SCALAR_MODEL= FLAMELET` with `FLUID_MODEL= FLUID_FLAMELET` (v8.0.0). Preferential diffusion (`PREFERENTIAL_DIFFUSION`) and spark ignition (`FLAME_INIT_METHOD= SPARK`) (v8.1.0). See [Species Transport and Combustion](../Setup-Guide-Species-Combustion/) and the tutorials [Laminar Combustion](/tutorials/Inc_Combustion/) and [Counterflow Diffusion Flame](/tutorials/Inc_Laminar_Diffusion_Flame/). +- **Combustion.** Flamelet model for premixed flames: `KIND_SCALAR_MODEL= FLAMELET` with `FLUID_MODEL= FLUID_FLAMELET` (v8.0.0). Preferential diffusion (`PREFERENTIAL_DIFFUSION`) and spark ignition (`FLAME_INIT_METHOD= SPARK`) (v8.1.0). See [Species Transport and Combustion](../Setup-Guide-Species-Combustion/) and the tutorials [Laminar Combustion](/tutorials/Inc_Combustion/) and [Counterflow Diffusion Flame](https://su2code.github.io/tutorials/Inc_Laminar_Diffusion_Flame/). - **Data-driven fluid model.** `FLUID_MODEL= DATADRIVEN_FLUID` with look-up tables or neural networks (`INTERPOLATION_METHOD= LUT` or `MLP`) (v8.0.0). Physics-informed networks with `USE_PINN` (v8.2.0). See [NICFD](../Setup-Guide-NICFD/) and the tutorial [Physics-informed neural networks](/tutorials/NICFD_nozzle_datadriven/). - **Species transport.** Custom wall conditions with `MARKER_WALL_SPECIES` (v8.4.0). Adaptive CFL now also covers species (v8.1.0). - **NEMO.** Ionization for viscous flows (v8.0.0). See [Thermochemical Nonequilibrium](../Thermochemical-Nonequilibrium/). diff --git a/_docs_v7/Setup-Guide-Species-Combustion.md b/_docs_v7/Setup-Guide-Species-Combustion.md index 9585bc52..966928e1 100644 --- a/_docs_v7/Setup-Guide-Species-Combustion.md +++ b/_docs_v7/Setup-Guide-Species-Combustion.md @@ -345,7 +345,7 @@ Rules (code): Some pages write `FLAMELET_ENTHALPY_BC`; the option name is `FLAME_ENTHALPY_BC`. For wall values set per point from Python, see [`SU2_CFD/flamelet_python_bc.md`](https://github.com/su2code/SU2/blob/develop/SU2_CFD/flamelet_python_bc.md) in the code. -Use `FLOW_MARKERS` when you know the temperatures, which is the usual case. It avoids an enthalpy that does not match the table ([diffusion flame tutorial](/tutorials/Inc_Laminar_Diffusion_Flame/)). +Use `FLOW_MARKERS` when you know the temperatures, which is the usual case. It avoids an enthalpy that does not match the table ([diffusion flame tutorial](https://su2code.github.io/tutorials/Inc_Laminar_Diffusion_Flame/)). ## Check convergence and results @@ -376,7 +376,7 @@ Use `FLOW_MARKERS` when you know the temperatures, which is the usual case. It a | The converged flame is reset after a restart. | Ignition runs again on restart, unless `FLAME_INIT_METHOD= NONE` (code). | Set `FLAME_INIT_METHOD= NONE` when you restart. | | The inlet enthalpy in `MARKER_INLET_SPECIES` has no effect. | `FLAME_ENTHALPY_BC= FLOW_MARKERS` (default) uses the inlet temperature instead (code). | Set the temperature in `MARKER_INLET`, or use `FLAME_ENTHALPY_BC= SPECIES_MARKERS`. | | SU2 stops with an unknown option `FLAMELET_ENTHALPY_BC`. | Wrong option name, from an older page (code). | Use `FLAME_ENTHALPY_BC`. | -| Many table misses; the temperature jumps. | Controlling variables outside the table, often an enthalpy below the table range at cold walls (advice). | Check the wall and inlet temperatures. Extend the table to lower enthalpy ([diffusion flame tutorial](/tutorials/Inc_Laminar_Diffusion_Flame/)). | +| Many table misses; the temperature jumps. | Controlling variables outside the table, often an enthalpy below the table range at cold walls (advice). | Check the wall and inlet temperatures. Extend the table to lower enthalpy ([diffusion flame tutorial](https://su2code.github.io/tutorials/Inc_Laminar_Diffusion_Flame/)). | | SU2 stops: "Dual-time stepping with species-dependent variable density does not support MGLEVEL > 0". | Multigrid in an unsteady mixture run (code). | Set `MGLEVEL= 0`. | ## Related tutorials and test cases @@ -387,7 +387,7 @@ Tutorials: - [Composition-Dependent model for Species Transport](/tutorials/Inc_Species_Transport_Composition_Dependent_Model/): `FLUID_MIXTURE`, Lewis number models, `BOUNDED_SCALAR`. - [Wind velocity and pollutant dispersion in a city](/tutorials/Inc_Urban_City/): smoke as a species, with a source term set from the Python wrapper. - [Incompressible, Laminar Combustion Simulation](/tutorials/Inc_Combustion/): premixed hydrogen flame with neural networks, preferential diffusion and spark ignition. -- [Incompressible, Laminar counterflow diffusion flame](/tutorials/Inc_Laminar_Diffusion_Flame/): mixture fraction and enthalpy, `FLAME_ENTHALPY_BC`. +- [Incompressible, Laminar counterflow diffusion flame](https://su2code.github.io/tutorials/Inc_Laminar_Diffusion_Flame/): mixture fraction and enthalpy, `FLAME_ENTHALPY_BC`. Test cases: From 555396a5f35619a9466140269d5692bb9a0ab874 Mon Sep 17 00:00:00 2001 From: rois1995 Date: Mon, 26 Oct 2026 14:45:09 +0100 Subject: [PATCH 24/25] docs: fix composition example, legacy links and search feedback --- .github/workflows/docs-check.yml | 6 +++ README.md | 8 ++-- _config.yml | 1 + _docs_v7/Physical-Definition.md | 13 +++++- search.html | 30 ++++++++++--- tools/test_search.js | 75 ++++++++++++++++++++++++++++++++ 6 files changed, 122 insertions(+), 11 deletions(-) create mode 100644 tools/test_search.js diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml index 2f8a1755..49337a97 100644 --- a/.github/workflows/docs-check.yml +++ b/.github/workflows/docs-check.yml @@ -40,6 +40,12 @@ jobs: persist-credentials: false - name: Get release tags for migration reference run: git -C su2 fetch --quiet --filter=blob:none https://github.com/su2code/SU2.git 'refs/tags/v7.*:refs/tags/v7.*' 'refs/tags/v8.*:refs/tags/v8.*' + - name: Setup Node for search checks + uses: actions/setup-node@v4 + with: + node-version: '22' + - name: Check search behavior + run: node site/tools/test_search.js - name: Setup Ruby and locked gems uses: ruby/setup-ruby@v1 with: diff --git a/README.md b/README.md index a1232b0d..2d2d394b 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,10 @@ Developer pages and generated references are overlaid from the SU2 repository. E Use Ruby **3.3.12** from `.ruby-version` and Bundler **2.4.22** with the tracked `Gemfile.lock`. The combined build entry point is `Docs/website/tools/build_docs.py` in the SU2 checkout. Its README, `Docs/website/README.md`, gives the local commands and output-directory rules. It builds and checks the same staged site locally and in CI, including red preview highlighting when `--mark-changes` is passed. -`.github/workflows/docs-check.yml` checks `docs_site` pushes and pull requests against SU2 `docs_site` and uploads `docs-preview`. A manual run accepts an exact SU2 SHA. It checks internal references, search coverage, documented option names and source descriptions for new options. Historical findings are tracked explicitly in SU2's `check-baseline.json`; new findings fail. +`.github/workflows/docs-check.yml` checks pushes to `docs_site`, `docs/user-guides` and `docs/naca0021`, and pull requests targeting `develop`, `docs_site` or `docs/user-guides`. It uses SU2 branch `docs/developer-guides` by default and uploads `docs-preview`. A manual run accepts an exact SU2 SHA through `su2_ref`. It checks internal references, search coverage, documented option names and source descriptions for new options. Historical findings are tracked explicitly in SU2's `check-baseline.json`; new findings fail. -Website-only changes do not publish directly to SU2's Pages site. After their checks pass, start **Docs Website** in `rois1995/SU2`, with the website commit SHA as `site_ref`. The result records both commit SHAs and tool versions in `build-info.json` and check results in `docs-check.json`. This avoids requiring a token with cross-repository write access for website pull requests. +Search behavior is checked separately with Node.js 22: run `node tools/test_search.js` from this repository. CI runs the same check before building the site. No npm packages are needed. -Push development changes only to `rois1995/su2code.github.io`, branch `docs_site`; official-repository pushes are disabled. +Website-only changes do not publish directly to SU2's Pages site. Publishing is currently restricted to `docs_site` in `rois1995/SU2`. First ensure that branch contains the reviewed SU2 tools, then start **Docs Website** there with the reviewed website commit SHA as `site_ref`. Check both recorded source revisions against the reviewed build before accepting the deployment. The result records both commit SHAs and tool versions in `build-info.json` and check results in `docs-check.json`. This avoids requiring a token with cross-repository write access for website pull requests. + +The current preview uses the `rois1995` forks. Website PR branches are `docs/user-guides` and `docs/naca0021`; `docs_site` is the existing published preview branch. Submit upstream changes through pull requests to `develop`. Do not push development branches directly to the official repositories. diff --git a/_config.yml b/_config.yml index 63b43482..88220e7f 100644 --- a/_config.yml +++ b/_config.yml @@ -37,6 +37,7 @@ exclude: - .idea/ - .gitignore - README.md + - tools/ timezone: Europe/Berlin defaults: - scope: diff --git a/_docs_v7/Physical-Definition.md b/_docs_v7/Physical-Definition.md index 9282228d..d3ad5364 100644 --- a/_docs_v7/Physical-Definition.md +++ b/_docs_v7/Physical-Definition.md @@ -24,6 +24,8 @@ SU2 offers different ways of setting and computing this definition. This documen - [Thermodynamic and Gauge Pressure](#thermodynamic-and-gauge-pressure) - [Initial State and Non-Dimensionalization](#initial-state-and-non-dimensionalization) - [Turbulence Models](#turbulence-models) + - [Spalart-Allmaras (SA)](#spalart-allmaras-sa) + - [Shear Stress Transport (SST)](#shear-stress-transport-sst) - [Transition Models](#transition-models) --- @@ -125,7 +127,7 @@ The NEMO solvers require a specification of thermochemical nonequilibrium librar A chemistry model, consisting of a set of flow species, thermochemical properties, and chemical reactions, is specified using `GAS_MODEL`. The names of these models are specific to the thermochemical library. If using the `SU2_NONEQ` option the choices are `ARGON`, `N2`, `AIR-5`, and `AIR-7`. -Free-stream mass fractions must also be specified in list using the option `GAS_COMPOSITION`. The mass fractions are specified as decimal values in the order of the species in the gas model. For example, an AIR-5 mixture of 77% oxygen and 23% nitrogen would be expressed as (0.77, 0.23, 0.00, 0.00, 0.00). +Free-stream mass fractions must also be specified in list using the option `GAS_COMPOSITION`. The mass fractions are specified as decimal values in the order of the species in the gas model. With `FLUID_MODEL= SU2_NONEQ` and `GAS_MODEL= AIR-5`, the species order is N2, O2, NO, N, O. A mixture of 77% nitrogen and 23% oxygen by mass is therefore `GAS_COMPOSITION= (0.77, 0.23, 0.00, 0.00, 0.00)`. ## Transport Coefficient Model (Thermochemical Nonequilibrium) ## @@ -163,7 +165,14 @@ The reference values $$\rho_{ref}, T_{ref}, v_{ref}$$ equal the initial state va Set `SOLVER= RANS` or `SOLVER= INC_RANS`, and choose the model with `KIND_TURB_MODEL= SA` or `KIND_TURB_MODEL= SST`. Choose the variant with `SA_OPTIONS` or `SST_OPTIONS`. The defaults are SA without the ft2 term and SST-2003m. -[Turbulence Models](../Turbulence-Models/) lists all variants, the free-stream and inlet values, and where SU2 differs from the literature. + +### Spalart-Allmaras (SA) + +See [SA variants and inlet values](../Turbulence-Models/#spalart-allmaras-sa), including the differences between SU2 and the published models. + +### Shear Stress Transport (SST) + +See [SST variants and inlet values](../Turbulence-Models/#shear-stress-transport-sst), including the differences between SU2 and the published models. ## Transition Models ## diff --git a/search.html b/search.html index 376b46a8..8bf1ad82 100644 --- a/search.html +++ b/search.html @@ -7,9 +7,10 @@

Search

-

Search the user guide, the tutorials and the V&V pages. All words must appear on the page.

+

Search the user guide, the tutorials and the V&V pages. All terms of two or more characters must appear on the page; shorter terms are ignored.

+ -

+

    @@ -19,6 +20,7 @@

    Search

    var count = document.getElementById("search-count"); var list = document.getElementById("search-results"); var pages = null; + var loadError = false; var names = { docs_v7: "Docs", tutorials: "Tutorials", vandv: "V&V" }; function escapeHtml(s) { @@ -35,7 +37,14 @@

    Search

    function run() { var words = box.value.toLowerCase().split(/\s+/).filter(function (w) { return w.length > 1; }); list.innerHTML = ""; - if (!pages || words.length === 0) { count.textContent = ""; return; } + if (!pages) { + count.textContent = loadError ? "Search could not load. Reload this page to try again." : "Loading search..."; + return; + } + if (words.length === 0) { + count.textContent = box.value.trim() ? "Enter a search term with at least two characters." : ""; + return; + } var hits = []; pages.forEach(function (p) { var title = p.title.toLowerCase(), text = p.text.toLowerCase(), score = 0; @@ -56,10 +65,19 @@

    Search

    }); } - fetch("{{ '/search.json' | relative_url }}").then(function (r) { return r.json(); }).then(function (data) { + var q = new URLSearchParams(location.search).get("q"); + if (q) box.value = q; + run(); + fetch("{{ '/search.json' | relative_url }}").then(function (r) { + if (!r.ok) throw new Error("Search index request failed"); + return r.json(); + }).then(function (data) { + if (!Array.isArray(data)) throw new Error("Invalid search index"); pages = data; - var q = new URLSearchParams(location.search).get("q"); - if (q) box.value = q; + run(); + }).catch(function () { + pages = null; + loadError = true; run(); }); box.addEventListener("input", run); diff --git a/tools/test_search.js b/tools/test_search.js new file mode 100644 index 00000000..81cdc740 --- /dev/null +++ b/tools/test_search.js @@ -0,0 +1,75 @@ +"use strict"; + +const assert = require("node:assert/strict"); +const fs = require("node:fs"); +const path = require("node:path"); +const vm = require("node:vm"); + +const html = fs.readFileSync(path.join(__dirname, "../search.html"), "utf8"); +const script = html.match(/