Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 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
792044c
Merge remote-tracking branch 'origin/develop' into HEAD
rois1995 Oct 29, 2026
e79ca0f
Restore regression files after develop merge
rois1995 Oct 29, 2026
5312d29
Address hybrid RANS-LES review feedback
rois1995 Oct 30, 2026
929a738
Reduce EDDES adjoint tape during diameter search
rois1995 Oct 30, 2026
3b8a1cf
Use nearest wall normals for IDDES grid spacing
rois1995 Oct 30, 2026
698693e
Share SST hybrid model check
rois1995 Oct 30, 2026
63dddd9
Restore hybrid LES quality and grid-size outputs
rois1995 Oct 30, 2026
472a960
Report the IDDES LES blending weight
rois1995 Oct 30, 2026
5e2d117
Remove SRS grid size diagnostic
rois1995 Oct 30, 2026
26b98d0
Merge remote-tracking branch 'origin/develop' into HEAD
rois1995 Oct 30, 2026
613f253
Merge commit 'f4b67d23deaac22948cc8d2a2c0da3138ae804f6' into HEAD
rois1995 Oct 31, 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}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Points at the feature_SST_IDDES Testcases branch (also lines 287, 337, 382). Revert to develop before merge.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I am keeping the test branch until TestCases #206 merges; I will switch back to develop before merging this PR.

- 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
5 changes: 5 additions & 0 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9836,6 +9836,11 @@ class CConfig {
*/
unsigned short GetKind_HybridRANSLES(void) const { return Kind_HybridRANSLES; }

bool IsHybridSST() const {
return Kind_HybridRANSLES == SST_DDES || Kind_HybridRANSLES == SST_IDDES ||
Kind_HybridRANSLES == SST_SIDDES || Kind_HybridRANSLES == SST_EDDES;
}

/*!
* \brief Get if the LES mode must be enforced.
* \return TRUE if LES is enforced.
Expand Down
18 changes: 18 additions & 0 deletions Common/include/geometry/dual_grid/CPoint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class CPoint {
su2vector<unsigned short> nNeighbor; /*!< \brief Number of neighbors, needed by some numerical methods. */

/*--- Closest element on a viscous wall, and distance to it. ---*/
su2activematrix WallNormal; /*!< \brief Unit normal of the nearest wall element. */
su2activevector Wall_Distance; /*!< \brief Distance to the nearest wall. */
su2vector<int> ClosestWall_Rank; /*!< \brief Rank of process holding the closest wall element. */
su2vector<unsigned short> ClosestWall_Zone; /*!< \brief Zone index of closest wall element. */
Expand Down Expand Up @@ -887,6 +888,23 @@ class CPoint {
}
}

/*! \brief Gather the nearest wall-element normal for each point. */
template <typename NormalsType>
void SetWallNormals(const NormalsType& normals) {
WallNormal.resize(GlobalIndex.size(), nDim) = su2double(0.0);
for (unsigned long iPoint = 0; iPoint < GlobalIndex.size(); ++iPoint) {
const auto rank = ClosestWall_Rank[iPoint];
if (rank < 0) continue;
const auto& normal =
normals[rank][ClosestWall_Zone[iPoint]][ClosestWall_Marker[iPoint]][ClosestWall_Elem[iPoint]];
for (auto iDim = 0u; iDim < nDim; ++iDim) WallNormal(iPoint, iDim) = normal[iDim];
}
}

inline const su2double* GetWallNormal(unsigned long iPoint) const {
return WallNormal.empty() ? nullptr : WallNormal[iPoint];
}

/*!
* \brief Set wall roughnesses according to stored closest wall information.
* \param[in] roughness - Mapping [rank][zone][marker] -> roughness
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
45 changes: 45 additions & 0 deletions Common/include/toolboxes/geometry_toolbox.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,51 @@ inline void PointPointReflect(Int nDim, const T* a, const T* b, T* d) {
for (Int i = 0; i < nDim; i++) d[i] = 2 * b[i] - a[i];
}

/*!
* \brief Compute the mean rate of strain matrix.
* \details The parameter primvargrad can be e.g. PrimVar_Grad_i or Mean_GradPrimVar.
* \param[in] nDim - 2 or 3
* \param[out] rateofstrain - Rate of strain matrix
* \param[in] velgrad - A velocity gradient matrix.
* \tparam Mat1 - any type that supports the [][] interface
* \tparam Mat2 - any type that supports the [][] interface
*/
template <class Mat1, class Mat2>
inline void ComputeMeanRateOfStrainMatrix(size_t nDim, Mat1& rateofstrain, const Mat2& velgrad) {
/* --- Calculate the rate of strain tensor, using mean velocity gradients --- */

if (nDim == 3) {
rateofstrain[0][0] = velgrad[0][0];
rateofstrain[1][1] = velgrad[1][1];
rateofstrain[2][2] = velgrad[2][2];
rateofstrain[0][1] = 0.5 * (velgrad[0][1] + velgrad[1][0]);
rateofstrain[0][2] = 0.5 * (velgrad[0][2] + velgrad[2][0]);
rateofstrain[1][2] = 0.5 * (velgrad[1][2] + velgrad[2][1]);
rateofstrain[1][0] = rateofstrain[0][1];
rateofstrain[2][1] = rateofstrain[1][2];
rateofstrain[2][0] = rateofstrain[0][2];
} else { // nDim==2
rateofstrain[0][0] = velgrad[0][0];
rateofstrain[1][1] = velgrad[1][1];
rateofstrain[2][2] = 0.0;
rateofstrain[0][1] = 0.5 * (velgrad[0][1] + velgrad[1][0]);
rateofstrain[0][2] = 0.0;
rateofstrain[1][2] = 0.0;
rateofstrain[1][0] = rateofstrain[0][1];
rateofstrain[2][1] = rateofstrain[1][2];
rateofstrain[2][0] = rateofstrain[0][2];
}
}

/*! \brief Magnitude of an edge projected onto a unit wall normal. */
template <class T, typename Int>
inline T WallNormalEdgeLength(Int nDim, const T* a, const T* b, const T* normal) {
T projection(0);
for (Int i = 0; i < nDim; ++i) projection += (b[i] - a[i]) * normal[i];
using std::abs;
return abs(projection);
}

/*! \return a.b */
template <class T, typename Int>
inline T DotProduct(Int nDim, const T* a, const T* b) {
Expand Down
68 changes: 61 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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now also applies to the SA hybrids, which is a behaviour change. Please mention it in the PR description. The hybridSA/hybridSST enumeration is repeated in SetOutput. A single helper such as IsHybridSST() would avoid that.

@rois1995 rois1995 Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SA time-domain requirement is now in the PR description. The SST hybrid model check is also shared between the configuration checks and output.

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 = IsHybridSST();
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. ---*/
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")) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making this a hard error is strict: config_template.cfg itself sets DES_CONST= 0.65. A warning would do. The bigger issue is that CNSSolver::SetRoe_Dissipation still passes config->GetConst_DES() (0.65) to SetRoe_Dissipation_NTS. With an SST hybrid and ROE_LOW_DISSIPATION= NTS/NTS_DUCROS, the blending therefore uses the SA constant, which the user can no longer change. It should use the F1-blended C_DES for the SST hybrids.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed DES_CONST to a warning for SST, and the NTS sensor now uses the local F1-blended constant.

if (rank == MASTER_NODE) {
cout << "WARNING: DES_CONST is ignored by SST hybrid RANS/LES models, which use "
"C_DES = 0.78 F1 + 0.61 (1 - F1)." << endl;
}
}
}

if (Time_Domain){
Delta_UnstTime = Time_Step;

Expand Down Expand Up @@ -6847,13 +6893,21 @@ 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 (IsHybridSST())
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
67 changes: 67 additions & 0 deletions Common/src/geometry/CGeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4542,6 +4542,52 @@ su2double NearestNeighborDistance(CGeometry* geometry, const CConfig* config, co
const su2double Vol = geometry->nodes->GetVolume(iPoint) + geometry->nodes->GetPeriodicVolume(iPoint);
return 2 * Vol / GeometryToolbox::Norm(3, Normal);
}
/*! \brief Average the vertex normals of a wall element and normalize the result. */
std::array<su2double, 3> WallElementNormal(const CGeometry* geometry, unsigned short iMarker, unsigned long iElem) {
std::array<su2double, 3> normal = {};
const auto* element = geometry->bound[iMarker][iElem];
for (auto iNode = 0u; iNode < element->GetnNodes(); ++iNode) {
const auto iPoint = element->GetNode(iNode);
const auto iVertex = geometry->nodes->GetVertex(iPoint, iMarker);
for (auto iDim = 0u; iDim < geometry->GetnDim(); ++iDim)
normal[iDim] += geometry->vertex[iMarker][iVertex]->GetNormal(iDim);
}
for (auto& component : normal) component /= element->GetnNodes();
const auto magnitude = GeometryToolbox::Norm(3, normal.data());
if (magnitude > 0.0)
for (auto& component : normal) component /= magnitude;
return normal;
}

/*! \brief Collect unit wall-element normals for each marker of one zone. */
su2vector<su2matrix<su2double>> CollectWallNormals(const CGeometry* geometry, const CConfig* config) {
su2vector<su2matrix<su2double>> normals;
normals.resize(geometry->GetnMarker());
for (auto iMarker = 0u; iMarker < geometry->GetnMarker(); ++iMarker) {
if (!config->GetViscous_Wall(iMarker)) {
normals[iMarker].resize(1, 3) = su2double(0.0);
continue;
}
normals[iMarker].resize(geometry->GetnElem_Bound(iMarker), 3);
for (auto iElem = 0ul; iElem < geometry->GetnElem_Bound(iMarker); ++iElem) {
const auto normal = WallElementNormal(geometry, iMarker, iElem);
for (auto iDim = 0u; iDim < 3; ++iDim) normals[iMarker](iElem, iDim) = normal[iDim];
}
}
return normals;
}

/*! \brief Adapt one marker's normal matrix to the recursive NdFlattener interface. */
auto WallNormalMatrix(const su2matrix<su2double>& normals) {
return make_pair(normals.rows(), [&normals](auto iElem) {
return make_pair(normals.cols(), [&normals, iElem](auto iDim) { return normals(iElem, iDim); });
});
}

/*! \brief Adapt a zone's marker normals without copying the matrices. */
auto WallNormalMarkers(const su2vector<su2matrix<su2double>>& normals) {
return make_pair(normals.size(), [&normals](auto iMarker) { return WallNormalMatrix(normals[iMarker]); });
}
} // namespace

void CGeometry::ComputeWallDistance(const CConfig* const* config_container, CGeometry**** geometry_container,
Expand Down Expand Up @@ -4612,6 +4658,27 @@ void CGeometry::ComputeWallDistance(const CConfig* const* config_container, CGeo
}
}

/*--- IDDES needs the normal of the nearest wall, including walls on other ranks and zones. ---*/
bool needWallNormals = false;
for (int iZone = 0; iZone < nZone; ++iZone) {
const auto hybrid = config_container[iZone]->GetKind_HybridRANSLES();
needWallNormals = needWallNormals || hybrid == SST_IDDES || hybrid == SST_SIDDES;
}
if (needWallNormals) {
su2vector<su2vector<su2matrix<su2double>>> wallNormals;
wallNormals.resize(nZone);
for (int iZone = 0; iZone < nZone; ++iZone)
wallNormals[iZone] = CollectWallNormals(geometry_container[iZone][iInst][MESH_0], config_container[iZone]);
auto normal_i = make_pair(nZone, [&wallNormals](auto iZone) { return WallNormalMarkers(wallNormals[iZone]); });
NdFlattener<4> localNormals(normal_i);
NdFlattener<5> globalNormals(Nd_MPI_Environment(), localNormals);
for (int iZone = 0; iZone < nZone; ++iZone) {
const auto hybrid = config_container[iZone]->GetKind_HybridRANSLES();
if (hybrid == SST_IDDES || hybrid == SST_SIDDES)
geometry_container[iZone][iInst][MESH_0]->nodes->SetWallNormals(globalNormals);
}
}

for (int iZone = 0; iZone < nZone; iZone++) {
/*--- When recording for a specific zone, only compute nearest-neighbor distances (which read vertex
* normals) for that zone. Reading normals from other zones at this tape position would create
Expand Down
Loading
Loading