Repository navigation
Conversation
…ons based on k and w - Added computation of k and w starting from SA variables - Added first implementation of SAS (Scale Adaptive Simulation) model
- Changed previous SAS model to SAS_SIMPLE
- Fixed DataType for Periodic Comms
…lified IDDES (SIDDES)
| SAS_SIMPLE, /*!< \brief Menter k-w SST model with Scale Adaptive Simulations modifications. */ | ||
| SAS_COMPLICATED, /*!< \brief Menter k-w SST model with Scale Adaptive Simulations modifications. */ |
There was a problem hiding this comment.
Are these the names in the literature?
There was a problem hiding this comment.
No, these are just placeholders. There are no names in literature, that is why I named them according to the complexity of the model
There was a problem hiding this comment.
Maybe something after the authors since the models come from different papers.
| SST_OPTIONS sasModel = SST_OPTIONS::SAS_SIMPLE; /*!< \brief Enum SST base model. */ | ||
| bool sust = false; /*!< \brief Bool for SST model with sustaining terms. */ | ||
| bool uq = false; /*!< \brief Bool for using uncertainty quantification. */ | ||
| bool sas = false; /*!< \brief Bool for using Scale Adaptive Simulations. */ |
There was a problem hiding this comment.
Probably the type is enough and "none" indicates no sas.
| SST_OPTIONS sasModel = SST_OPTIONS::SAS_SIMPLE; /*!< \brief Enum SST base model. */ | |
| bool sust = false; /*!< \brief Bool for SST model with sustaining terms. */ | |
| bool uq = false; /*!< \brief Bool for using uncertainty quantification. */ | |
| bool sas = false; /*!< \brief Bool for using Scale Adaptive Simulations. */ | |
| SST_OPTIONS sasModel = SST_OPTIONS::NONE; /*!< \brief Enum SST base model. */ | |
| bool sust = false; /*!< \brief Bool for SST model with sustaining terms. */ | |
| bool uq = false; /*!< \brief Bool for using uncertainty quantification. */ |
There was a problem hiding this comment.
Sure, I'll modify it.
| case SST_DDES: cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; break; | ||
| case SST_IDDES: cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; break; | ||
| case SST_SIDDES: cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; break; |
There was a problem hiding this comment.
The description is slightly different right?
There was a problem hiding this comment.
Yes, I planned to modify the details on the final implementation. I'll do it now
|
|
||
| su2double lengthScale_i, lengthScale_j; | ||
| su2double FTrans; /*!< \brief SAS function */ | ||
| su2double VelLapl_X, VelLapl_Y, VelLapl_Z; |
There was a problem hiding this comment.
Use a matrix type for the laplacian in CVariable and here you can have a pointer instead.
Put these variables close to other turbulence variables please.
There was a problem hiding this comment.
I think the main problem with my implementation is that the norm of the velocity laplacian stated in the paper is
There was a problem hiding this comment.
That looks like the norm of the Laplacian of the velocity components, the way you are computing it is not very accurate but maybe it is good enough. You could do it the finite volume way by reusing the numerics classes we use for scalar viscous fluxes.
| su2double VelLaplMag = VelLapl_X*VelLapl_X + VelLapl_Y*VelLapl_Y; | ||
| if (nDim == 3) VelLaplMag += VelLapl_Z*VelLapl_Z; | ||
| const su2double L_vK_1 = KolmConst * StrainMag_i / sqrt(VelLaplMag); |
There was a problem hiding this comment.
Is the velocity laplacian only used for the source term? Or will you have changes to the convection or diffusion fluxes?
There was a problem hiding this comment.
It is just for the source term
| /*! | ||
| * \brief Get the value of the turbulence kinetic energy. | ||
| * \return the value of the turbulence kinetic energy. | ||
| */ | ||
| inline su2double GetSSTVariables_k(unsigned long iPoint) const { return k(iPoint); } | ||
|
|
||
| /*! | ||
| * \brief Get the value of the turbulence frequency Omega. | ||
| * \return the value of the turbulence frequency Omega. | ||
| */ | ||
| inline su2double GetSSTVariables_omega(unsigned long iPoint) const { return Omega(iPoint); } | ||
|
|
||
| /*! | ||
| * \brief Set the value of the SST variables computed with SA solution. | ||
| * \param[in] val_k | ||
| * \param[in] val_Omega | ||
| */ | ||
| void SetSSTVariables(unsigned long iPoint, su2double val_k, su2double val_Omega) { | ||
| k(iPoint) = val_k; |
There was a problem hiding this comment.
Are these changes related to the main theme? or were just debugging? If they can be separated to another PR let's do that please.
There was a problem hiding this comment.
These are for computing the grid size for scale resolving simulations from an SA solution. Probably it has to be revised a little bit, since I found out that the formulation for the TKE is different if the QCR mod is used, thus I think I'll remove them for now.
There was a problem hiding this comment.
You need to undo this change to the codi version.
| inline virtual su2double GetVelLapl_X(unsigned long iPoint) const { return 0.0; } | ||
| /*! | ||
| * \brief Get the value of the value of FTrans. | ||
| */ | ||
| inline virtual su2double GetVelLapl_Y(unsigned long iPoint) const { return 0.0; } | ||
| /*! | ||
| * \brief Get the value of the value of FTrans. | ||
| */ | ||
| inline virtual su2double GetVelLapl_Z(unsigned long iPoint) const { return 0.0; } | ||
|
|
||
| /*! | ||
| * \brief Set the value of the value of FTrans. | ||
| */ | ||
| inline virtual void AddVelLapl(unsigned long iPoint, su2double val_VelLapl_X, su2double val_VelLapl_Y) {} | ||
| /*! | ||
| * \brief Set the value of the value of FTrans. | ||
| */ | ||
| inline virtual void AddVelLapl_Z(unsigned long iPoint, su2double val_VelLapl_Z) {} | ||
| /*! | ||
| * \brief Set the value of the value of FTrans. | ||
| */ | ||
| inline virtual void SetVelLapl(unsigned long iPoint, su2double val_VelLapl_X, su2double val_VelLapl_Y) {} |
There was a problem hiding this comment.
Use a pointer for velocity and then you only need one of each function instead of handling xyz separately.
There was a problem hiding this comment.
Yeah, I'll try using the matrix type
- Changed names of SAS models - Added descriptions of functions - Clean up of output functions - Removed SA functions or SST variables
| /*--- If iPoint is boundary it only takes contributions from other boundary points. ---*/ | ||
| if (boundary_i && !boundary_j) continue; | ||
|
|
||
| /*--- Add solution differences, with correction for compressible flows which use the enthalpy. ---*/ |
There was a problem hiding this comment.
Check if comments need updates please
|
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. |
|
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. |
|
|
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. |
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. 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] |
One test for each of SST_DDES, SST_IDDES, SST_SIDDES, SST_EDDES, SST_EDDES_UNSTR, SA_EDDES and SA_EDDES_UNSTR, 5 time steps on the hexahedral grid of rans/oneram6. They restart from a SST or SA RANS solution (su2code/TestCases#206) so that the LES branch of the length scale is active and every model gives different results. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
Temporary, for the restart solutions of su2code/TestCases#206. To be reverted to develop before merging. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
|
Great! Can you add a small tutorial for the website as well? We have a lot of these implementations that are not exposed to the public. |
|
I will re-run the NACA0021 and BFS test cases, then add the NACA0021 test case to the Validation cases. |
…ariants SA_EDDES_UNSTR and SST_EDDES_UNSTR took the edge midpoints as the vertices of the dual cell in Delta_omega. No reference defines Delta_omega that way, and it gives a smaller length scale than the cell vertices of Shur et al. (2015). They now follow He, Zhao, Vahdati (J. Turbomach. 144, 2022, Eq. 3), proposed for node-based solvers with mixed-element grids: Delta_max in the RANS region (f_d < 0.99), F_KH * V^(1/3) in the LES region. SA_EDDES and SST_EDDES keep Delta_omega of Shur et al. The reference values of ddes_oneram6_sa_eddes_unstr and ddes_oneram6_sst_eddes_unstr are updated. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
…ES options Shur et al. (2015, Eq. 1) define Delta_omega on the vertices of the control volume, for any type of cell. It is now computed on the vertices of the median-dual cell of the point (edge midpoints, face and element centroids), for SA_EDDES and SST_EDDES. The box aligned with the coordinate axes used so far is exact only on grids aligned with the axes (the ddes_flatplate values do not change) and overestimates Delta_omega on skewed or rotated cells. With a definition valid on any grid, SA_EDDES_UNSTR and SST_EDDES_UNSTR are not needed. They are removed with their tests; He et al. (2022) F_KH * Delta_hyb, used by the previous commit, is a different model and is not kept. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
…brid model against the turbulence model - SetDES_LengthScale of SST read the laminar viscosity from the turbulence variables, which always return zero: r_d of DDES and r_dl of IDDES were computed without it. It is now read from the flow variables, as in SA. - A SA_* hybrid option with SST (or SST_* with SA) left the length scale at zero, and the destruction term divided by it. The configuration now stops with an error. - The SRS_GRID_SIZE output took k and omega from the flow solution; they are now read from the turbulence solution. The reference values of ddes_oneram6_sst_iddes and ddes_oneram6_sst_eddes are updated. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J7eThA1pdLsoSkosWW1gQ6
|
@bigfooted yes, I will add the website tutorial once the ongoing validation is complete, with the setup and a few figures. I am holding off on adding the validation testcase until then as well. |
|
Pushed e9e8568: vortex tilting now uses |
LES_SENSOR was always 0 with the SST hybrid models because only the SA variable stored the sensor. The storage moves to CTurbVariable and the SST length-scale routine now sets it with the same meaning as for SA: the weight of the LES branch where the LES length is the shorter one, and 0 elsewhere. That is f_d for SST_DDES and SST_EDDES, and 1 - ftilda_d for SST_IDDES and SST_SIDDES, whose length scale is a blend of the two. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013YFdgQwrRqCQ2ihG446aNe
…umulation With an SST hybrid model the k destruction uses the hybrid length scale, which depends on the flow and turbulence solution. It was not declared as a preaccumulation input, so the discrete adjoint lost its sensitivities. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013YFdgQwrRqCQ2ihG446aNe
With an SST hybrid model the k destruction is rho k^(3/2) / l_hyb, but the Jacobian kept the RANS form beta* omega k. With the length scale frozen, the derivative with respect to rho k is 1.5 sqrt(k) / l_hyb and there is no dependence on omega. Only the Jacobian changes, not the residual. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013YFdgQwrRqCQ2ihG446aNe
With SST_OPTIONS= COMPRESSIBILITY-WILCOX or COMPRESSIBILITY-SARKAR the RANS k destruction is multiplied by (1 + zetaFMt), but the hybrid form rho k^(3/2) / l_hyb dropped this factor, so the hybrid models did not reduce to the corrected RANS model where l_hyb = l_RANS. The factor is now applied to the hybrid destruction and to its Jacobian. Without these options zetaFMt is 0 and nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013YFdgQwrRqCQ2ihG446aNe
…brid model The stochastic backscatter model solves its Langevin equations as extra variables of the SA solver, and the flow solver reads them as turbulence variables 1 to 3. With an SST hybrid model these are not there (SST has two variables), so the flow residual read wrong data or out of range. STOCHASTIC_BACKSCATTER= YES now needs an SA hybrid model. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013YFdgQwrRqCQ2ihG446aNe
The SST hybrid models compute their length scale from the grid with the blended constant C_DES = 0.78 F1 + 0.61 (1 - F1). They silently ignored DES_CONST, LES_FILTER_WIDTH and ENFORCE_LES, while the screen output still said "LES enforced in the whole computational domain". CConfig now stops with a clear message when ENFORCE_LES= YES, a positive LES_FILTER_WIDTH or DES_CONST is given with an SST hybrid model, and prints which DES constant is used. The option descriptions and config_template.cfg say which models use these options. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013YFdgQwrRqCQ2ihG446aNe
GRAD_VEL_YX holds dv/dx (velocity gradient entry (1,0)) but was described as the X-gradient of U. The other velocity-gradient descriptions match their entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013YFdgQwrRqCQ2ihG446aNe
The SST length-scale loop ran over all points, halos included, without communication. On halo points the neighbourhood is incomplete, so the SST_EDDES length scale (control-volume vertices and averaged vortex tilting) was computed from partial data there. The halo values are not used today (the source term and the output only read domain points), but as for SA the loop now covers the domain points and the halo values are received from the owning rank. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013YFdgQwrRqCQ2ihG446aNe
…obian Only the Jacobian of the hybrid k destruction changes the convergence of the four SST ONERA M6 cases; the SA cases are unchanged. The values come from local builds (gcc 9.4, release -O2, -march=native): serial and mpirun -n 2 with the MPI build, -t 2 with the OpenMP build. The baseline local values of the branch head matched the stored values exactly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013YFdgQwrRqCQ2ihG446aNe
|
While documenting the SST hybrid models I found and fixed these bugs:
About the compressibility corrections in DES mode: the literature does not agree. Forsythe et al. (2002) put the SST correction only into the RANS length scale, so it switches off in LES mode. Xiao and Fu (2009) keep it everywhere. Since this choice needs its own validation, this PR blocks the combination for SST. SA with |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013YFdgQwrRqCQ2ihG446aNe
…f SST" How the SST compressibility corrections should act in the LES region needs its own validation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013YFdgQwrRqCQ2ihG446aNe
…ybrid models Their treatment in the LES region is not validated yet (Forsythe et al. 2002 keep them only in the RANS length scale, others keep them everywhere). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013YFdgQwrRqCQ2ihG446aNe
…used Restore omega * omega and Mt * Mt instead of pow(x, 2), and set the hybrid k-destruction Jacobian as an override of the RANS one. With fast-math the old forms changed the rounding of plain SST runs (transitional_flatplate_tutorial_T3Am). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013YFdgQwrRqCQ2ihG446aNe

Proposed Changes
DDES formulations for the SST model, and fixes to the shear-layer-adapted (EDDES) length scale of SA.
New
HYBRID_RANSLESoptions 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).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 theddes_flatplatetest):Other changes
TIME_DOMAIN= YES, and the hybrid model must match the turbulence model (SA_*with SA,SST_*with SST).LES_SENSORis also written for the SST models.STOCHASTIC_BACKSCATTER,DES_CONST,LES_FILTER_WIDTHorENFORCE_LESare set, since these work only with the SA models.COMPRESSIBILITY-WILCOXorCOMPRESSIBILITY-SARKARis 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 withCOMPRESSIBILITYis unchanged.LESIQandSRS_GRID_SIZE(groupDDES), velocity gradient (VELOCITY_GRADIENT), SST F1, F2 and cross-diffusion (SST_QUANTITIES).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 exceptSST_DDES, which is still in RANS mode at these iterations..github/workflows/regression.ymluses thefeature_SST_IDDESbranch 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.
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
pre-commit run --allto format old commits.🤖 Generated with Claude Code