Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
388f85a
- Added computation of desired grid size for Scale Resolving Simulati…
rois1995 Sep 15, 2023
41cb27e
- Added a more complex SAS model named SAS_COMPLICATED
rois1995 Sep 15, 2023
a6be2cf
- Fixed getting coordinates of points
rois1995 Sep 15, 2023
d1f4db6
- Added output of laplacian
rois1995 Sep 19, 2023
35958b8
- Fixed missing variable initialization for CTurbSAVariable
rois1995 Sep 19, 2023
09e977f
- Added DES implementations to SST: DDES, Improved DDES (IDDES), Simp…
rois1995 Oct 5, 2023
8c8e89d
- Added SST DDES in config
rois1995 Oct 5, 2023
71ac9c4
- Added Debug quantities
rois1995 Oct 10, 2023
5b5fc30
- Added division by 0 protection
rois1995 Oct 17, 2023
ef50283
- Added computation of LESIQ to Output
rois1995 Oct 21, 2023
91c742e
Merge branch 'develop' into feature_SST_IDDES
rois1995 Oct 22, 2023
6c86a19
Merge 'origin/feature_SAS' into feature_SST_IDDES
rois1995 Oct 23, 2023
48a9f3d
- modified codi
rois1995 Oct 23, 2023
ae33b05
- Modified Velocity Laplacian (vector -> Matrix)
rois1995 Oct 27, 2023
6443070
- Added outputs log for SST-DDES
rois1995 Sep 20, 2024
caf0d41
Merge remote-tracking branch 'origin/develop' into feature_SST_IDDES
rois1995 Sep 20, 2024
a584526
- update externals
rois1995 Sep 20, 2024
0f3a832
Merge remote-tracking branch 'origin/develop' into feature_SST_IDDES
rois1995 Oct 30, 2024
710e1dc
Fix SAS Babu implementation
rois1995 Oct 30, 2024
e4f28d4
- Fixed compilation error
rois1995 Oct 30, 2024
068ac21
- Moved output functions not to brake the restart
rois1995 Feb 6, 2025
cbe79f7
- Added limiting to eddy viscosity (needed?)
rois1995 Feb 7, 2025
d770fa1
Update SU2_CFD/include/numerics/CNumerics.hpp
rois1995 Feb 7, 2025
4dda141
Update SU2_CFD/include/numerics/CNumerics.hpp
rois1995 Feb 7, 2025
84d65bf
- change grid size computation to account for 2D
rois1995 Feb 7, 2025
5337229
- Added output of debug variables to SAS
rois1995 Feb 7, 2025
0806d21
- Fixed bug that always activates SAS Babu
rois1995 Feb 10, 2025
0cab1ef
- Modified the C_S constant in Lvk limiter
rois1995 Feb 12, 2025
ad86192
Changed computation of Laplacian
rois1995 Feb 26, 2025
dcbacc8
- slight changes to functions calls
rois1995 Mar 4, 2025
33c6664
Merge remote-tracking branch 'origin/develop' into feature_SST_IDDES
rois1995 Mar 4, 2025
a5702d8
- align externals and submodules to develop
rois1995 Mar 7, 2025
ab6bedb
-fixed compilation errors
rois1995 Mar 7, 2025
e5080a1
- Solve declaration hids variable
rois1995 Mar 7, 2025
c2fd653
- SRS Grid size output (fix?)
rois1995 Mar 7, 2025
d377903
Merge remote-tracking branch 'origin/develop' into feature_SST_IDDES
rois1995 Mar 10, 2025
d037e59
- Added SLA DDES formulation to SST
rois1995 Mar 18, 2025
d9f329e
Merge remote-tracking branch 'origin/develop' into feature_SST_IDDES
rois1995 Mar 18, 2025
0adcb7e
- compilation erorr
rois1995 Mar 19, 2025
d50b123
- Fix memory leak
rois1995 Mar 19, 2025
34a0271
- fixed formatting error
rois1995 Mar 19, 2025
04dfcd3
Merge remote-tracking branch 'origin/develop' into feature_SST_IDDES
rois1995 Mar 25, 2025
a60fb13
Merge remote-tracking branch 'origin/develop' into feature_SST_IDDES
rois1995 Mar 28, 2025
95ccc73
- update externals
rois1995 Mar 28, 2025
de45d5f
- update externals and subprojects
rois1995 Mar 28, 2025
d172607
- Try changes to SA-EDDES
rois1995 Mar 31, 2025
e5a916c
- Fix bug in SST-EDDES
rois1995 Apr 1, 2025
c723a13
- Set debug quantities
rois1995 Apr 1, 2025
d051f0b
- try fix
rois1995 Apr 1, 2025
c840256
- Fix output
rois1995 Apr 1, 2025
9b997d7
- Fix output
rois1995 Apr 7, 2025
8f3efae
- Added come outputs
rois1995 Jun 10, 2025
f716218
- minor fix
rois1995 Jun 10, 2025
28490fd
Merge remote-tracking branch 'origin/develop' into feature_SST_IDDES
rois1995 Jul 7, 2025
ff56f36
Merge remote-tracking branch 'origin/develop' into feature_SST_IDDES
rois1995 Sep 18, 2025
707afa4
update meson and ninja
rois1995 Sep 18, 2025
b249f2c
Merge remote-tracking branch 'origin/develop' into HEAD
rois1995 Oct 2, 2025
f10c465
Removed SAS implementation (not working)
rois1995 Oct 2, 2025
37a866f
- Removed debug quantities
rois1995 Oct 2, 2025
ac2078c
- Re-introduced the virtual function
rois1995 Oct 2, 2025
0c8d49a
- Fixed some notation
rois1995 Oct 2, 2025
86db90b
- Fix compilation issues
rois1995 Oct 2, 2025
d4564da
- Fixed variable inputs
rois1995 Oct 3, 2025
177276a
- Fixed some thread sanitizer problems
rois1995 Oct 3, 2025
e260cc4
- Removed unused functions
rois1995 Oct 3, 2025
7e57afe
- Fixed some notation
rois1995 Oct 3, 2025
f193796
- Added SST-EDDES formulation for unstructured grids
rois1995 Oct 30, 2025
c5e1dee
Merge remote-tracking branch 'origin/develop' into feature_SST_IDDES
rois1995 Oct 30, 2025
3460d50
- Removed unused variables
rois1995 Nov 13, 2025
e0699cf
Merge remote-tracking branch 'origin/develop' into feature_SST_IDDES
rois1995 Nov 13, 2025
973092f
Merge branch 'develop' into feature_SST_IDDES
rois1995 Sep 23, 2026
613cf63
Fix memory leak and wrong gradient in the vortex tilting measure of S…
rois1995 Sep 23, 2026
19850e5
Fix the SST EDDES length scale without vorticity and a missing break
rois1995 Sep 23, 2026
980f7fb
Require TIME_DOMAIN= YES for hybrid RANS/LES models
rois1995 Sep 23, 2026
22af6a0
Follow Shur et al. (2015) in the shear-layer-adapted length scale of …
rois1995 Sep 23, 2026
3733883
Use the ninja submodule of develop
rois1995 Sep 23, 2026
e48b9e9
Remove whitespace changes in CSolver.cpp
rois1995 Sep 23, 2026
3d39c1e
Add regression tests for the hybrid RANS/LES models on the ONERA M6 wing
rois1995 Sep 23, 2026
4e63952
Run the regression tests with the feature_SST_IDDES branch of TestCases
rois1995 Sep 23, 2026
39da3a4
Use F_KH * Delta_hyb of He et al. (2022) for the unstructured EDDES v…
rois1995 Sep 28, 2026
1d4ccca
Compute Delta_omega on the median-dual cell and remove the _UNSTR EDD…
rois1995 Sep 28, 2026
ce7da87
Use the flow laminar viscosity in the SST hybrid models, check the hy…
rois1995 Sep 28, 2026
50e26fa
Print the hybrid RANS/LES model name for SST_EDDES
rois1995 Oct 2, 2026
ad3a6c6
Merge develop into feature_SST_IDDES
rois1995 Oct 9, 2026
117ed00
Fix CodeFactor assignment spacing in regression scripts
rois1995 Oct 9, 2026
e9e8568
Use the velocity gradient offset and shared vortex-tilting helpers
rois1995 Oct 10, 2026
552a921
Store and output the LES sensor for the SST hybrid models
rois1995 Oct 23, 2026
fb4e836
Register the hybrid length scale as an input of the SST source preacc…
rois1995 Oct 23, 2026
462865c
Use the Jacobian of the hybrid k destruction for the SST hybrid models
rois1995 Oct 23, 2026
1fc4d80
Keep the compressibility factor in the hybrid k destruction of SST
rois1995 Oct 23, 2026
72db989
Stop with an error when stochastic backscatter is used with an SST hy…
rois1995 Oct 23, 2026
0e4a39c
Stop when SA-only hybrid options are given with an SST hybrid model
rois1995 Oct 23, 2026
042022c
Fix the description of the GRAD_VEL_YX volume output
rois1995 Oct 23, 2026
54d4358
Compute the SST hybrid length scale on domain points and communicate it
rois1995 Oct 23, 2026
54068af
Update the SST hybrid regression values for the new k-destruction Jac…
rois1995 Oct 23, 2026
246bbcf
Merge develop into feature_SST_IDDES
rois1995 Oct 23, 2026
8eb863c
Revert "Keep the compressibility factor in the hybrid k destruction o…
rois1995 Oct 23, 2026
1bcd4a7
Stop when the SST compressibility corrections are used with the SST h…
rois1995 Oct 23, 2026
f2c4946
Keep the SST source of develop bit-identical when no hybrid model is …
rois1995 Oct 23, 2026
f7f8582
Merge commit '2dc7b708dcc81fdc86b8e814e8efff0399a8799c' into HEAD
rois1995 Oct 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ jobs:
uses: docker://ghcr.io/su2code/su2/test-su2:261011-1107
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
args: -b ${{github.ref}} -t develop -c feature_SST_IDDES -s ${{matrix.testscript}}
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:261011-1107
with:
Expand Down Expand Up @@ -284,7 +284,7 @@ jobs:
uses: docker://ghcr.io/su2code/su2/test-su2:261011-1107
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tapetests"
args: -b ${{github.ref}} -t develop -c feature_SST_IDDES -s ${{matrix.testscript}} -a "--tapetests"
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:261011-1107
with:
Expand Down Expand Up @@ -334,7 +334,7 @@ jobs:
PMIX_MCA_gds: hash
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan"
args: -b ${{github.ref}} -t develop -c feature_SST_IDDES -s ${{matrix.testscript}} -a "--tsan"
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:261011-1107
with:
Expand Down Expand Up @@ -379,7 +379,7 @@ jobs:
uses: docker://ghcr.io/su2code/su2/test-su2-asan:261011-1107
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--asan"
args: -b ${{github.ref}} -t develop -c feature_SST_IDDES -s ${{matrix.testscript}} -a "--asan"
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-asan:261011-1107
with:
Expand Down
17 changes: 12 additions & 5 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,6 @@ inline SST_ParsedOptions ParseSSTOptions(const SST_OPTIONS *SST_Options, unsigne
const bool sst_compWilcox = IsPresent(SST_OPTIONS::COMP_Wilcox);
const bool sst_compSarkar = IsPresent(SST_OPTIONS::COMP_Sarkar);
const bool sst_dll = IsPresent(SST_OPTIONS::DLL);

if (sst_1994 && sst_2003) {
SU2_MPI::Error("Two versions (1994 and 2003) selected for SST_OPTIONS. Please choose only one.", CURRENT_FUNCTION);
} else if (sst_2003) {
Expand Down Expand Up @@ -1702,17 +1701,25 @@ static const MapType<std::string, WINDOW_FUNCTION> Window_Map = {
*/
enum ENUM_HYBRIDRANSLES {
NO_HYBRIDRANSLES = 0, /*!< \brief No turbulence model. */
SA_DES = 1, /*!< \brief Kind of Hybrid RANS/LES (SA - Detached Eddy Simulation (DES)). */
SA_DDES = 2, /*!< \brief Kind of Hybrid RANS/LES (SA - Delayed DES (DDES) with Delta_max SGS ). */
SA_ZDES = 3, /*!< \brief Kind of Hybrid RANS/LES (SA - Delayed DES (DDES) with Vorticity based SGS like Zonal DES). */
SA_EDDES = 4 /*!< \brief Kind of Hybrid RANS/LES (SA - Delayed DES (DDES) with Shear Layer Adapted SGS: Enhanced DDES). */
SA_DES = 1, /*!< \brief Kind of Hybrid RANS/LES (SA - Detached Eddy Simulation (DES)). */
SA_DDES = 2, /*!< \brief Kind of Hybrid RANS/LES (SA - Delayed DES (DDES) with Delta_max SGS ). */
SA_ZDES = 3, /*!< \brief Kind of Hybrid RANS/LES (SA - Delayed DES (DDES) with Vorticity based SGS like Zonal DES). */
SA_EDDES = 4, /*!< \brief Kind of Hybrid RANS/LES (SA - Delayed DES (DDES) with Shear Layer Adapted SGS: Enhanced DDES). */
SST_DDES = 5, /*!< \brief Kind of Hybrid RANS/LES (SST - Delayed DES (DDES): DDES). */
SST_IDDES = 6, /*!< \brief Kind of Hybrid RANS/LES (SST - Delayed DES (DDES): Improved DDES). */
SST_SIDDES = 7, /*!< \brief Kind of Hybrid RANS/LES (SST - Delayed DES (DDES): Simplified Improved DDES). */
SST_EDDES = 8 /*!< \brief Kind of Hybrid RANS/LES (SST - Delayed DES (DDES): Enhanced (SLA) DDES). */
};
static const MapType<std::string, ENUM_HYBRIDRANSLES> HybridRANSLES_Map = {
MakePair("NONE", NO_HYBRIDRANSLES)
MakePair("SA_DES", SA_DES)
MakePair("SA_DDES", SA_DDES)
MakePair("SA_ZDES", SA_ZDES)
MakePair("SA_EDDES", SA_EDDES)
MakePair("SST_DDES", SST_DDES)
MakePair("SST_IDDES", SST_IDDES)
MakePair("SST_SIDDES", SST_SIDDES)
MakePair("SST_EDDES", SST_EDDES)
};

/*!
Expand Down
69 changes: 62 additions & 7 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3124,7 +3124,7 @@ void CConfig::SetConfig_Options() {
/* DESCRIPTION: Window (weight) function for the cost-functional in the reverse sweep */
addEnumOption("WINDOW_FUNCTION", Kind_WindowFct, Window_Map, WINDOW_FUNCTION::SQUARE);

/* DESCRIPTION: DES Constant */
/* DESCRIPTION: DES Constant of the SA hybrid models. The SST hybrid models blend their own constants with F1. */
addDoubleOption("DES_CONST", Const_DES, 0.65);

/* DESCRIPTION: SBS lengthscale coefficient */
Expand All @@ -3145,7 +3145,7 @@ void CConfig::SetConfig_Options() {
/* DESCRIPTION: Specify if the Stochastic Backscatter Model must be activated */
addBoolOption("STOCHASTIC_BACKSCATTER", SBSParam.StochasticBackscatter, false);

/* DESCRIPTION: Specify if the LES mode must be enforced */
/* DESCRIPTION: Specify if the LES mode must be enforced (SA hybrid models only) */
addBoolOption("ENFORCE_LES", enforceLES, false);

/* DESCRIPTION: Specify if the stochastic source term must be included in the turbulence model equation */
Expand All @@ -3166,7 +3166,7 @@ void CConfig::SetConfig_Options() {
/* DESCRIPTION: Shielding function lower threshold for application of Stochastic Backscatter Model */
addDoubleOption("SBS_FD_LOWER_THRESHOLD", SBSParam.stochFdThreshold, 0.9);

/* DESCRIPTION: Filter width for LES (if negative, it is computed based on the local cell size) */
/* DESCRIPTION: Filter width for LES (if negative, it is computed based on the local cell size, SA hybrid models only) */
addDoubleOption("LES_FILTER_WIDTH", LES_FilterWidth, -1.0);

/* DESCRIPTION: Roe with low dissipation for unsteady flows */
Expand Down Expand Up @@ -4149,6 +4149,52 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
"TIME_STEPPING, DUAL_TIME_STEPPING-1ST_ORDER or DUAL_TIME_STEPPING-2ND_ORDER", CURRENT_FUNCTION);
}

if (Kind_HybridRANSLES != NO_HYBRIDRANSLES && !Time_Domain) {
SU2_MPI::Error("Hybrid RANS/LES models (HYBRID_RANSLES) require an unsteady simulation, set TIME_DOMAIN= YES.",
CURRENT_FUNCTION);
}

/*--- The SA_* hybrid models are built on the SA model and the SST_* ones on the SST model. ---*/
const bool hybridSA = Kind_HybridRANSLES == SA_DES || Kind_HybridRANSLES == SA_DDES ||
Kind_HybridRANSLES == SA_ZDES || Kind_HybridRANSLES == SA_EDDES;
const bool hybridSST = Kind_HybridRANSLES == SST_DDES || Kind_HybridRANSLES == SST_IDDES ||
Kind_HybridRANSLES == SST_SIDDES || Kind_HybridRANSLES == SST_EDDES;
if ((hybridSA && Kind_Turb_Model != TURB_MODEL::SA) || (hybridSST && Kind_Turb_Model != TURB_MODEL::SST)) {
SU2_MPI::Error(string("The hybrid RANS/LES model (HYBRID_RANSLES) must match the turbulence model (KIND_TURB_MODEL): ") +
"SA_* options require SA, SST_* options require SST.", CURRENT_FUNCTION);
}

/*--- The stochastic backscatter model adds the Langevin equations to the SA model (turbulence variables 1 to 3). ---*/
if (SBSParam.StochasticBackscatter && hybridSST) {
SU2_MPI::Error(string("The stochastic backscatter model (STOCHASTIC_BACKSCATTER= YES) is only available with the SA ") +
"hybrid RANS/LES models (HYBRID_RANSLES= SA_DES, SA_DDES, SA_ZDES or SA_EDDES).", CURRENT_FUNCTION);
}

/*--- How the SST compressibility corrections should act in the LES region of the hybrid models is not validated yet
(e.g. Forsythe et al. 2002 keep them only in the RANS length scale). Stop rather than give unvalidated results. ---*/
if (hybridSST && (sstParsedOptions.compWilcox || sstParsedOptions.compSarkar)) {
SU2_MPI::Error(string("The SST compressibility corrections (COMPRESSIBILITY-WILCOX, COMPRESSIBILITY-SARKAR) are not ") +
"supported yet with the SST hybrid RANS/LES models (HYBRID_RANSLES= SST_*).", CURRENT_FUNCTION);
}

/*--- The SST hybrid models compute their length scale from the grid with the constant C_DES = 0.78 F1 + 0.61 (1 - F1)
(Gritskevich et al. 2012), they do not use these options of the SA hybrid models. Stop rather than ignore them. ---*/
if (hybridSST) {
if (enforceLES) {
SU2_MPI::Error("ENFORCE_LES= YES is only available with the SA hybrid RANS/LES models (HYBRID_RANSLES= SA_*).",
CURRENT_FUNCTION);
}
if (LES_FilterWidth > 0.0) {
SU2_MPI::Error(string("A user-specified LES_FILTER_WIDTH is only available with the SA hybrid RANS/LES models ") +
"(HYBRID_RANSLES= SA_*). The SST hybrid models compute the filter width from the grid.", CURRENT_FUNCTION);
}
if (OptionIsSet("DES_CONST")) {
SU2_MPI::Error(string("DES_CONST is not used by the SST hybrid RANS/LES models (HYBRID_RANSLES= SST_*), which blend ") +
"their own constants: C_DES = 0.78 F1 + 0.61 (1 - F1). Remove DES_CONST from the configuration file.",
CURRENT_FUNCTION);
}
}

if (Time_Domain){
Delta_UnstTime = Time_Step;

Expand Down Expand Up @@ -6847,13 +6893,22 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
cout << "Hybrid RANS/LES: ";
switch (Kind_HybridRANSLES) {
case NO_HYBRIDRANSLES: cout << "No Hybrid RANS/LES" << endl; break;
case SA_DES: cout << "Detached Eddy Simulation (DES97) " << endl; break;
case SA_DDES: cout << "Delayed Detached Eddy Simulation (DDES) with Standard SGS" << endl; break;
case SA_ZDES: cout << "Delayed Detached Eddy Simulation (DDES) with Vorticity-based SGS" << endl; break;
case SA_EDDES: cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; break;
case SA_DES: cout << "Detached Eddy Simulation (DES97) " << endl; break;
case SA_DDES: cout << "Delayed Detached Eddy Simulation (DDES) with Standard SGS" << endl; break;
case SA_ZDES: cout << "Delayed Detached Eddy Simulation (DDES) with Vorticity-based SGS" << endl; break;
case SA_EDDES: cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; break;
case SST_DDES: cout << "Delayed Detached Eddy Simulation (DDES)" << endl; break;
case SST_IDDES: cout << "Improved Delayed Detached Eddy Simulation (IDDES)" << endl; break;
case SST_SIDDES: cout << "Simplified Improved Delayed Detached Eddy Simulation (SIDDES)" << endl; break;
case SST_EDDES: cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; break;
}
if (Kind_HybridRANSLES != NO_HYBRIDRANSLES) {
if (LES_FilterWidth > 0.0) cout << "User-specified LES filter width: " << LES_FilterWidth << endl;
if (Kind_HybridRANSLES == SST_DDES || Kind_HybridRANSLES == SST_IDDES ||
Kind_HybridRANSLES == SST_SIDDES || Kind_HybridRANSLES == SST_EDDES)
cout << "DES constant blended with F1: C_DES = 0.78 F1 + 0.61 (1 - F1)." << endl;
else
cout << "DES constant: " << Const_DES << endl;
cout << "Stochastic Backscatter: ";
if (SBSParam.StochasticBackscatter) {
cout << "ON" << endl;
Expand Down
11 changes: 11 additions & 0 deletions SU2_CFD/include/numerics/CNumerics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ class CNumerics {
const su2double
*TurbPsi_i, /*!< \brief Vector of adjoint turbulent variables at point i. */
*TurbPsi_j; /*!< \brief Vector of adjoint turbulent variables at point j. */
su2double lengthScale_i, lengthScale_j; /*!< \brief length scale for SST */
CMatrixView<const su2double>
ConsVar_Grad_i, /*!< \brief Gradient of conservative variables at point i. */
ConsVar_Grad_j, /*!< \brief Gradient of conservative variables at point j. */
Expand Down Expand Up @@ -964,6 +965,16 @@ class CNumerics {
dist_j = val_dist_j;
}

/*!
* \brief Set the value of the length scale for SST.
* \param[in] val_lengthScale_i - Value of of the length scale for SST from point i.
* \param[in] val_lengthScale_j - Value of of the length scale for SST from point j.
*/
void SetLengthScale(su2double val_lengthScale_i, su2double val_lengthScale_j) {
lengthScale_i = val_lengthScale_i;
lengthScale_j = val_lengthScale_j;
}

/*!
* \brief Set the stochastic source term for the Langevin equations (Backscatter Model).
* \param[in] val_stoch_source - Value of stochastic source term.
Expand Down
15 changes: 15 additions & 0 deletions SU2_CFD/include/numerics/turbulent/turb_sources.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,11 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
AD::SetPreaccIn(V_i[idx.Velocity() + 1]);
AD::SetPreaccIn(V_i[idx.SoundSpeed()]);

/*--- The hybrid RANS/LES length scale depends on the flow and turbulence solution, it must be a preaccumulation
input or its sensitivities are lost in the discrete adjoint. ---*/
const bool hybridRANSLES = config->GetKind_HybridRANSLES() != NO_HYBRIDRANSLES;
if (hybridRANSLES) AD::SetPreaccIn(lengthScale_i);

Density_i = V_i[idx.Density()];
Laminar_Viscosity_i = V_i[idx.LaminarViscosity()];
Eddy_Viscosity_i = V_i[idx.EddyViscosity()];
Expand Down Expand Up @@ -996,6 +1001,9 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
/*--- Dissipation ---*/

su2double dk = beta_star * Density_i * ScalarVar_i[1] * ScalarVar_i[0] * (1.0 + zetaFMt);
if (hybridRANSLES)
dk = Density_i * sqrt(pow(ScalarVar_i[0], 3)) / lengthScale_i;

su2double dw = beta_blended * Density_i * ScalarVar_i[1] * ScalarVar_i[1] * (1.0 - 0.09/beta_blended * zetaFMt);

/*--- LM model coupling with production and dissipation term for k transport equation---*/
Expand Down Expand Up @@ -1024,6 +1032,13 @@ class CSourcePieceWise_TurbSST final : public CNumerics {

Jacobian_i[0][0] = -beta_star * ScalarVar_i[1] * Volume * (1.0 + zetaFMt);
Jacobian_i[0][1] = -beta_star * ScalarVar_i[0] * Volume * (1.0 + zetaFMt);
if (hybridRANSLES) {
/*--- Hybrid k destruction dk = rho k^(3/2) / l_hyb, with the length scale l_hyb frozen (it is computed in the
preprocessing and treated as a constant here): d(dk)/d(rho k) = 1.5 dk / (rho k) and it does not depend on omega.
The RANS form above would use the wrong derivative where l_hyb differs from l_RANS = sqrt(k) / (beta* omega). ---*/
Jacobian_i[0][0] = -1.5 * sqrt(ScalarVar_i[0]) / lengthScale_i * Volume;
Jacobian_i[0][1] = 0.0;
}
Jacobian_i[1][0] = 0.0;
Jacobian_i[1][1] = -2.0 * beta_blended * ScalarVar_i[1] * Volume * (1.0 - 0.09/beta_blended * zetaFMt);
}
Expand Down
11 changes: 11 additions & 0 deletions SU2_CFD/include/solvers/CTurbSSTSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ class CTurbSSTSolver final : public CTurbSolver {
void BoundaryFlux(CGeometry* geometry, CSolver** solver_container, CConfig* config, const ScalarFluxOptions& opt,
unsigned short val_marker);


/*!
* \brief A virtual member.
* \param[in] solver - Solver container
* \param[in] geometry - Geometrical definition.
* \param[in] config - Definition of the particular problem.
*/
void SetDES_LengthScale(CSolver** solver,
CGeometry *geometry,
CConfig *config);

public:
/*!
* \brief Constructor.
Expand Down
14 changes: 14 additions & 0 deletions SU2_CFD/include/solvers/CTurbSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@ class CTurbSolver : public CScalarSolver<CTurbVariable> {

vector<su2activematrix> Inlet_TurbVars; /*!< \brief Turbulence variables at inlet profiles */

/*!
* \brief Shear-layer-adapted subgrid length-scale of the EDDES models, Delta_SLA = Delta_omega * F_KH(<VTM>).
* \note Shur et al., An Enhanced Version of DES with Rapid Transition from RANS to LES in Separated Flows,
* Flow Turbulence Combust 95, 2015, Eqs. (1)-(6). Delta_omega is computed on the vertices of the median-dual
* control volume of the point, so it applies to any type of grid.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] iPoint - Point index.
* \param[in] vorticity - Vorticity vector at the point.
* \param[in] shielded - True in the RANS region (f_d < 0.99), where F_KH is set to 1 (Eq. 6).
* \return Delta_SLA, or the maximum edge length where the vorticity vanishes.
*/
su2double ShearLayerAdaptedLengthScale(const CGeometry* geometry, unsigned long iPoint, const su2double* vorticity,
bool shielded) const;

public:
/*!
* \brief Destructor of the class.
Expand Down
41 changes: 0 additions & 41 deletions SU2_CFD/include/variables/CTurbSAVariable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,9 @@
class CTurbSAVariable final : public CTurbVariable {

private:
VectorType DES_LengthScale;
VectorType lesMode;
su2vector<int8_t> sbsInBox;
MatrixType stochSource;
MatrixType stochSourceOld;
VectorType Vortex_Tilting;
VectorType besselIntegral;

public:
Expand All @@ -65,19 +62,6 @@ class CTurbSAVariable final : public CTurbVariable {
*/
~CTurbSAVariable() override = default;

/*!
* \brief Get the DES length scale
* \param[in] iPoint - Point index.
* \return Value of the DES length Scale.
*/
inline su2double GetDES_LengthScale(unsigned long iPoint) const override { return DES_LengthScale(iPoint); }

/*!
* \brief Set the DES Length Scale.
* \param[in] iPoint - Point index.
*/
inline void SetDES_LengthScale(unsigned long iPoint, su2double val_des_lengthscale) override { DES_LengthScale(iPoint) = val_des_lengthscale; }

/*!
* \brief Get the source terms for the stochastic equations.
* \param[in] iPoint - Point index.
Expand Down Expand Up @@ -124,31 +108,6 @@ class CTurbSAVariable final : public CTurbVariable {
*/
inline void SetSbsInBox(unsigned long iPoint, int8_t val_sbsInBox) override { sbsInBox(iPoint) = val_sbsInBox; }

/*!
* \brief Set the LES sensor.
*/
inline void SetLES_Mode(unsigned long iPoint, su2double val_les_mode) override { lesMode(iPoint) = val_les_mode; }

/*!
* \brief Get the LES sensor.
* \return Value of the LES sensor.
*/
inline su2double GetLES_Mode(unsigned long iPoint) const override { return lesMode(iPoint); }

/*!
* \brief Set the vortex tilting measure for computation of the EDDES length scale
* \param[in] iPoint - Point index.
*/
void SetVortex_Tilting(unsigned long iPoint, CMatrixView<const su2double>,
const su2double* Vorticity, su2double LaminarViscosity) override;

/*!
* \brief Get the vortex tilting measure for computation of the EDDES length scale
* \param[in] iPoint - Point index.
* \return Value of the DES length Scale
*/
inline su2double GetVortex_Tilting(unsigned long iPoint) const override { return Vortex_Tilting(iPoint); }

/*!
* \brief Set the integral of the product of three Bessel functions appearing in Laplacian smoothing.
* \param[in] iPoint - Point index.
Expand Down
Loading
Loading