Skip to content

DDES, IDDES and shear-layer-adapted DDES for SST, and fixes to SA EDDES - #2150

Open
rois1995 wants to merge 128 commits into
developfrom
feature_SST_IDDES
Open

rois1995 wants to merge 128 commits into
developfrom
feature_SST_IDDES

Conversation

@rois1995

@rois1995 rois1995 commented Oct 22, 2023 •

Copy link
Copy Markdown
Contributor

Proposed Changes

DDES formulations for the SST model, and fixes to the shear-layer-adapted (EDDES) length scale of SA.

New HYBRID_RANSLES options for SST, from Gritskevich et al., Development of DDES and IDDES Formulations for the k-ω Shear Stress Transport Model, Flow Turbulence Combust 88, 2012 (DOI):

  • SST_DDES: DDES (Appendix 1).
  • SST_IDDES: IDDES (Appendix 2).
  • SST_SIDDES: simplified IDDES, i.e. IDDES without the elevating function f_e (Eq. 12).

In all of them the destruction term of the k equation becomes ρ k^{3/2} / l_DES, with C_DES = 0.78 F1 + 0.61 (1 − F1). Its implicit Jacobian uses the same form, with the length scale frozen.

Shear-layer-adapted (SLA) length scale, from Shur et al., An Enhanced Version of DES with Rapid Transition from RANS to LES in Separated Flows, Flow Turbulence Combust 95, 2015 (DOI): Δ_SLA = Δ̃_ω F_KH(⟨VTM⟩), with F_KH = 1 where f_d < 0.99 (Eq. 6).

  • SST_EDDES: SST-DDES with Δ_SLA (as in Guseva et al., Flow Turbulence Combust 98, 2017, and Xiao et al., Int. J. Heat Fluid Flow 85, 2020).
  • Δ̃_ω (Eq. 1) is the maximum of |n_ω × (r_n − r_m)| / √3 over the vertices r_n of the control volume. In the vertex-based finite volume method this is the median-dual cell of the point, whose vertices are the midpoints of its edges and the centroids of the faces and elements that contain it. This definition holds for any type of grid, so no separate option for unstructured grids is needed. On hexahedral grids aligned with the coordinate axes it reduces to the box of the grid spacings.

The length scale is computed by CTurbSolver::ShearLayerAdaptedLengthScale, shared by SA and SST. Where the vorticity vanishes, its direction is undefined and h_max is used, as in standard DDES.

Fixes to the existing SA_EDDES (they change the reference values of the ddes_flatplate test):

  • Vortex tilting measure: the denominator used only the diagonal of the strain tensor, while 3 tr(S²) sums the squares of all its components.
  • F_KH limiter: where f_d < 0.99, Δ = Δ̃_ω (F_KH = 1) instead of h_max, and the threshold was 0.999.
  • Δ̃_ω: it used |n_ω × |x_j − x_i|| over the edges of the point (with the absolute value of each component) instead of the vertex pairs of the control volume (Eq. 1).

Other changes

  • Hybrid RANS/LES models (SA and SST) now require TIME_DOMAIN= YES in SU2_CFD, and the hybrid model must match the turbulence model (SA_* with SA, SST_* with SST).
  • LES_SENSOR is written for SA and SST hybrid models: 0 indicates the RANS length-scale branch, 1 the LES branch, and intermediate values blending. For IDDES the sensor is the LES coefficient 1 - f̃_d; the RANS term also contains the elevating function. This field describes the model length scale, not how much turbulence is resolved.
  • The DDES output group includes LESIQ, a viscosity-based LES quality index.
  • With an SST hybrid model, SU2 rejects STOCHASTIC_BACKSCATTER, LES_FILTER_WIDTH and ENFORCE_LES, since these work only with the SA models. An explicit DES_CONST is ignored with a warning; SST uses its F1-blended constant, including in the NTS low-dissipation sensor.
  • A transition model (KIND_TRANS_MODEL) with a hybrid model runs with a warning: the combination is not validated.
  • With an SST hybrid model, SU2 also stops if COMPRESSIBILITY-WILCOX or COMPRESSIBILITY-SARKAR is set. How these corrections should act in the LES region needs its own validation: Forsythe et al. (2002) put the correction only into the RANS length scale, Xiao and Fu (2009) keep it everywhere. SA with COMPRESSIBILITY is unchanged.
  • IDDES and SIDDES include a wall-normal grid step: the maximum projection of neighboring edges onto the normal of the nearest wall element. The normal distribution follows PR One-equation (simplified) LM transition model for SST and SA #1901. This grid-spacing definition and the MPI and adjoint paths need further validation, particularly on skewed meshes and in multizone cases. The EDDES dual-cell diameter calculation uses an exact quadratic pair search with duplicate face centroids removed; the candidate search runs passively in AD and the selected distance is recomputed actively.

Tests

  • New regression tests ddes_oneram6_* (serial, parallel and hybrid), one per model: SST_DDES, SST_IDDES, SST_SIDDES, SST_EDDES, SA_EDDES. They run 5 time steps on the existing ONERA M6 hexahedral grid, restarting from a SST or SA RANS solution, so that every model gives different results (about 2 s each on 2 ranks). The LES branch is active in all of them except SST_DDES, which is still in RANS mode at these iterations.
  • The restart solutions are in Restart solutions for the hybrid RANS/LES tests on the ONERA M6 TestCases#206. Temporary: .github/workflows/regression.yml uses the feature_SST_IDDES branch of TestCases until that PR is merged.

Validation

NACA 0021 at 60 degrees (Re 2.7e5, span 1 chord, periodic), compared with the experiment of Swalwell et al. and with published DES at the same span (Garbaruk et al. 2009). All runs are averaged over the same 520 c/U after the start-up transient.

Run Mean C_L Mean C_D Shedding St
SA-DDES 1.08 1.81 0.18
SA-EDDES 1.02 1.72 0.19
SST-DDES 1.12 1.94 0.17
SST-EDDES 0.96 1.62 0.19
Published DES, span 1c 0.97 to 1.01 1.59 to 1.62 about 0.2
Experiment 0.93 1.52 0.20

The EDDES runs (SA and SST) agree with the published DES at the same span. The DDES runs give more lift, drag and suction. This is the expected effect of the shear-layer-adapted length scale: the shear layers switch to LES sooner.

Setup, figures and discussion are in a V&V page for the SU2 website. Preview on my fork: https://rois1995.github.io/SU2/vandv/NACA0021_DDES/
The same site update also rewrites the description of the hybrid models: https://rois1995.github.io/SU2/docs_v7/Hybrid-RANS-LES/

Related Work

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

🤖 Generated with Claude Code

@rois1995 rois1995 changed the title [WIP] Implementation of DDES formulations for SST [WIP] Implementation of DDES and SAS formulations for SST Oct 23, 2023
Comment thread Common/include/option_structure.hpp Resolved
Comment thread Common/include/option_structure.hpp Resolved
Comment thread Common/src/CConfig.cpp Resolved
Comment thread SU2_CFD/include/numerics/CNumerics.hpp Resolved
Comment thread externals/codi Resolved
Comment thread SU2_CFD/src/output/CFlowOutput.cpp Resolved
Comment thread SU2_CFD/src/output/CFlowOutput.cpp Resolved
Comment thread SU2_CFD/include/variables/CVariable.hpp Resolved
- Changed names of SAS models
- Added descriptions of functions
- Clean up of output functions
- Removed SA functions or SST variables
Comment thread SU2_CFD/include/numerics/CNumerics.hpp Resolved
Comment thread SU2_CFD/include/numerics/CNumerics.hpp Resolved
Comment thread SU2_CFD/src/output/CFlowOutput.cpp Resolved
Comment thread SU2_CFD/src/solvers/CTurbSSTSolver.cpp Resolved
@bigfooted

Copy link
Copy Markdown
Contributor

Hi @rois1995 any progress? Would be very interesting to add this to develop, looking forward to using it actually.

@rois1995

rois1995 commented Mar 7, 2024

Copy link
Copy Markdown
Contributor Author

Hi @rois1995 any progress? Would be very interesting to add this to develop, looking forward to using it actually.

Hi @bigfooted, unfortunately I do not have enough time/computational power to perform a proper validation. I only tried something with a NACA0021 at 17 deg and 60 deg and they were promising, at least for the DDES implementation. The SAS ones are not that good. I'll upload some post-processing as soon as I have the time to do so.

@Linnnnnn23

Copy link
Copy Markdown

I find your work really interesting. I've been studying the internal flow field in compressors and have had good results using SU2's SA_EDDES for calculating the cantilevered stator with a tip clearance. If you need help with code verification, I'd be glad to assist.

@rois1995

Copy link
Copy Markdown
Contributor Author

I find your work really interesting. I've been studying the internal flow field in compressors and have had good results using SU2's SA_EDDES for calculating the cantilevered stator with a tip clearance. If you need help with code verification, I'd be glad to assist.

Hi @Linnnnnn23, every help on the validation/verification is gladly accepted! Let me know if you need anything by my side.

@Linnnnnn23

Copy link
Copy Markdown

I find your work really interesting. I've been studying the internal flow field in compressors and have had good results using SU2's SA_EDDES for calculating the cantilevered stator with a tip clearance. If you need help with code verification, I'd be glad to assist.

Hi @Linnnnnn23, every help on the validation/verification is gladly accepted! Let me know if you need anything by my side.
Thank you for your response. Firstly, I would like to know what Verification and Validation (V&V) work has been conducted on the SST-based DDES (Delayed Detached Eddy Simulation) model to date. Secondly, we can provide a compressor cascade validation, with an inlet Mach number of 0.4, a Reynolds number of approximately 500,000, and a spanwise height of about 20% of the chord length, ensuring that the vortices resolved by DDES can develop in three dimensions. Thirdly, as I am a rookie to GitHub, I have not yet found out how to download your pull request code. For further communication, you can contact me via email at linnnnnn2308@gmail.com

@BerkeCan97

Copy link
Copy Markdown
Contributor

Hi @rois1995 , I'd like to help with validation/verification if I can. Let me know if you are interested. You can contact me at berkecancfd@gmail.com.

@BerkeCan97

BerkeCan97 commented Oct 30, 2024 •

Copy link
Copy Markdown
Contributor

Hi @rois1995 any progress? Would be very interesting to add this to develop, looking forward to using it actually.

Hi @bigfooted, unfortunately I do not have enough time/computational power to perform a proper validation. I only tried something with a NACA0021 at 17 deg and 60 deg and they were promising, at least for the DDES implementation. The SAS ones are not that good. I'll upload some post-processing as soon as I have the time to do so.

Hi @rois1995, I believe there is an error or a typo in the Babu's paper in the Q_SAS source term and in turn in your implementation, which may be the reason for the poor performance in SAS results.

image

This term changes units depending on the output of the max function, which doesn't make any sense. I believe the terms in the max function should be divided by omega^2 and k^2 instead of omega and k, respectively. Which is exactly how it is done in https://resolver.tudelft.nl/uuid:5d23e2a6-5675-450d-bf3d-1dd40d736cae

I will try some of the benchmark cases in these papers when I have the time. Let me know what you think.

[edit: fixed the link to the tudelft repository]

@bigfooted

Copy link
Copy Markdown
Contributor

@rois1995 can you resolve all conversations that are done? It looks like this is close to finishing so let's finalize it.

rois1995 added a commit to su2code/TestCases that referenced this pull request Nov 21, 2026
…tests (#206)

SST and SA solutions (400 iterations) of rans/oneram6/mesh_ONERAM6_turb_hexa_43008.su2,
used as restart by the ddes/oneram6 regression tests of su2code/SU2#2150.


Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
rois1995 and others added 4 commits November 21, 2026 20:26
The TestCases files of this PR are merged into TestCases develop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013BK58iC1x1atmaCvSH4WtN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g in its unit test

The vortex-tilting unit test built the SST variable without HYBRID_RANSLES= SST_EDDES,
so the vortex-tilting storage was not allocated and the test crashed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bigfooted

Copy link
Copy Markdown
Contributor

Final review

Two issues I would fix before merge, plus smaller points.

Should fix

  1. Multizone discrete adjoint: wall normals ignore record_zone (Common/src/geometry/CGeometry.cpp, ~L4691).
    The new wall-normal block collects vertex normals for every zone. The loop just below skips other zones when recording for a specific zone, to avoid cross-zone AD dependencies on the tape. With record_zone >= 0 and an SST_IDDES/SST_SIDDES zone, CollectWallNormals reads active vertex->GetNormal values from all zones. Please honour record_zone here (collect only that zone, or make the other zones' normals passive), or state that multizone adjoint is out of scope.

  2. Hybrid k-destruction Jacobian can be inconsistent with dk (SU2_CFD/include/numerics/turbulent/turb_sources.hpp, ~L1032).
    The hybrid term and Jacobian replace the RANS form unconditionally and set Jacobian_i[0][1] = 0 and Jacobian_i[0][0]. If later code (e.g. the LM transition coupling) scales dk, the Jacobian is not scaled the same way. CConfig rejects the compressibility corrections but not KIND_TRANS_MODEL combined with an SST_* hybrid model. For SST + LM + HYBRID_RANSLES= SST_DDES the implicit solve would be inconsistent with the residual. Either reject that combination in CConfig or apply the same scaling to the hybrid Jacobian.

Smaller points

  • SA_EDDES results change (SU2_CFD/src/variables/CTurbVariable.cpp, ~L62). The shared SetVortex_Tilting now includes the off-diagonal terms of tr(S^2) (the old SA code summed only the diagonal). ShearLayerAdaptedLengthScale returns Delta_omega rather than the max edge length in the shielded region, and the f_d threshold moves from 0.999 to 0.99. The ddes_flatplate reference shifts (-5.763 to -5.938). If intended, please say so in the PR description; if not, keep the old SA path unchanged.
  • DES_CONST (Common/src/CConfig.cpp, ~L4217). config_template.cfg says the SST hybrid models "stop if DES_CONST is set", but the code only warns and continues. Change the template text or raise an error.
  • TIME_DOMAIN check (Common/src/CConfig.cpp, ~L4189). The new error requires TIME_DOMAIN= YES for every HYBRID_RANSLES option, including the existing SA_* models. Configs accepted before (steady initialisation runs, or configs shared with SU2_DEF/SU2_GEO/SU2_SOL) now abort in SetPostprocessing. Consider restricting it to SU2_CFD or to the SST models.
  • ShearLayerAdaptedLengthScale (SU2_CFD/src/solvers/CTurbSolver.cpp, ~L1335). It allocates a std::vector, a std::set<std::vector> and a temporary vector per face, for every point on every inner iteration, then does an O(n^2) pair search. Fixed-size arrays or reused per-thread buffers would avoid the heap churn. If all vertices coincide, farthestN == farthestM and sqrt(0) gives an infinite derivative under AD, so a diameter2 > 0 guard is advisable.
  • Whitespace and formatting noise. CTurbVariable.cpp ends without a trailing newline; CTurbSSTSolver.cpp has trailing whitespace (about L954, 957, 1003, 1022, 1034) and a blank line in Source_Residual replaced by spaces; CFlowOutput.cpp gains stray blank lines; parallel_regression.py / serial_regression.py have unrelated alignment changes; option_structure.hpp loses an unrelated blank line. Please strip these to keep the diff reviewable.

This review was read from the diff only; I did not build or run the PR.

🤖 Generated with Claude Code

rois1995 and others added 8 commits November 23, 2026 09:59
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dels

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rois1995

Copy link
Copy Markdown
Contributor Author

@bigfooted a question about CodeFactor. The alignment changes in the regression scripts were not random: I made them to fix CodeFactor, which reports extra spaces before = (E221). Now that I restored the develop text, CodeFactor fails again on about 110 of these lines. The lines are the same as on develop, so they are not changes of this PR.

Which do you prefer?

  • Keep the develop text and ignore CodeFactor here.
  • Remove the extra spaces, so CodeFactor passes, but the PR touches unrelated lines.

@rois1995

Copy link
Copy Markdown
Contributor Author

@bigfooted thanks, all points are addressed:

  • Multizone adjoint: when recording one zone, the wall normals of the other zones are passive, and only that zone is updated.
  • Hybrid + transition: the hybrid k-destruction Jacobian now has the same intermittency factor as the residual. SA and SST hybrids run with a transition model, with a warning that this is not validated.
  • SA_EDDES changes are intended and listed in the description. The template now says that SST hybrids ignore DES_CONST with a warning. TIME_DOMAIN stays required for all hybrid models, on purpose, but only in SU2_CFD.
  • EDDES length scale: no allocation per point and no sqrt(0). The whitespace and alignment noise is removed.

rois1995 and others added 3 commits November 23, 2026 11:39
SIDDES is the simplified IDDES of Gritskevich et al. 2012 (Section 5, Eq. 12).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants