-
Notifications
You must be signed in to change notification settings - Fork 905
[WIP] Stochastic Backscatter Model for Grey Area Mitigation in Hybrid RANS-LES Simulations #2572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
The Reynolds stress tensor definition is modified to include a random contribution, which is expressed as the curl of a normally-distributed stochastic vector potential.
Add Langevin equations to Spalart-Allmaras solver (uncorrelated random source term) + add stochastic contribution to Reynolds stress tensor (using conservative variables from Langevin equations).
| * \param[in] val_stochvar_j - Value of the stochastic variable at point j. | ||
| */ | ||
| inline void SetStochVar(su2double *val_stochvar_i, su2double *val_stochvar_j) { | ||
| stochVar_i = val_stochvar_i; |
Check warning
Code scanning / CodeQL
Local variable address stored in non-local memory Warning
parameter
| */ | ||
| inline void SetStochVar(su2double *val_stochvar_i, su2double *val_stochvar_j) { | ||
| stochVar_i = val_stochvar_i; | ||
| stochVar_j = val_stochvar_j; |
Check warning
Code scanning / CodeQL
Local variable address stored in non-local memory Warning
parameter
| if (backscatter) { | ||
| su2double currentTime = config->GetPhysicalTime(); | ||
| su2double lastTime = numerics->GetLastTime(); | ||
| if (currentTime != lastTime) { |
Check notice
Code scanning / CodeQL
Equality test on floating-point values Note
| std::normal_distribution<su2double> rnd(0.0,1.0); | ||
| for (unsigned long iPoint = 0; iPoint < npoint; iPoint++) { | ||
| Solution_Old(iPoint, 0) = Solution(iPoint, 0) = val_nu_tilde; | ||
| for (unsigned short iVar = 1; iVar < nvar; iVar++) { |
Check failure
Code scanning / CodeQL
Comparison of narrow type with wide type in loop condition High
iVar
nvar
Fix sanitizer warnings and regression test failures - Address issues reported by clang sanitizers. - Adjust implementation to ensure regression tests pass.
- Enhance readability. - Ensure consistent declaration types.
- Extend implementation to 2D configurations. - Improve robustness.
Enforce boundary conditions in Langevin equations.
- Implement a skew-symmetric scheme for the discretization of the convective terms in the Langevin equations. - Fix the seed for the generation of the random source terms at the beginning of the simulation.
- Add the flag for the simulation of the Decaying Isotropic Homogeneous Turbulence. - Generate the initial velocity field matching the experimental data by Comte-Bellot & Corrsin. - Include a preliminary test case.
- Implement flag to enforce LES in the whole domain. - Add option to set the LES filter width to a user-specified value. - Add velocity divergence to volume outputs. - Remove internal generation of initial velocity field for simulating the Decaying Isotropic Homogeneous Turbulence (DIHT).
- Add consistent evaluation of the turbulent kinetic energy in the random source term appearing in the momentum equations. - Add backscatter intensity coefficient in the configuration file. - Add random initialization of the Langevin variables.
- Add Laplacian smoothing of source terms in Langevin equations. Remark: pseudo-time integration is employed (residuals are printed on screen with fixed frequency, the maximum number of time iterations can be defined by the user).
- Fix redundancy in virtual member definition.
- Add stochastic source term to Spalart-Allmaras turbulence model equation (to ensure exchange of modeled and resolved kinetic energy).
- Replace dual-time integration with Successive Over-Relaxation for Laplacian smoothing. - Initialize stochastic vector potential as equal to the stochastic source terms in Langevin equations. - Add random source term to main balance equations in LES zones exclusively. - Blend RANS and LES turbulence timescales using the LES sensor.
- Scale source terms in Langevin equations using Bessel functions to preserve the variance. - Compute Bessel integral at the beginning of the simulation for optimization. - Add variance monitoring to screen output.
Proposed Changes
Hybrid RANS-LES methods aim to leverage the strengths of both Reynolds-Averaged Navier-Stokes (RANS) approaches and Large Eddy Simulation (LES), applying RANS near solid walls for computational efficiency and LES in outer flow regions for improved fidelity. A persistent challenge in these techniques is the appearance of the so-called grey area—the transitional region between RANS and LES zones—which is characterized by the absence of resolved turbulence. This leads to degraded accuracy in capturing free shear layers. The Stochastic Backscatter Model (Kok, 2017) aims to mitigate this issue. The model introduces stochastic forcing terms into the momentum and total energy equations that emulate the backscatter of energy from unresolved (subgrid) scales to resolved scales. The random forcing is formulated as the curl of a stochastic vector potential, say$\underline\xi$ . The latter must be constructed using a three-step procedure:
References:
Roadmap
Related Work
None.
PR Checklist
pre-commit run --allto format old commits.