Repository navigation
Conversation
The factor compares the old and new internal energy, computed as rho*E - 0.5*|rho*u|^2 without the division by rho (the code comment already refers to the static energy). For dimensional cases this value can be negative, and those points got a zero update: in the axisymmetric air nozzle 28 % of the points were frozen, and the case could not re-converge from a restart. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
… Roe scheme Only the diagonal was zeroed (index [iVar][iVar] inside the jVar loop), so the off-diagonal entries kept the values of the previous edge. The guard of CUpwRoeBase_Flow already clears all entries. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
- Moving grids: the wave speeds, the pressure work of the moving face in the supersonic branches and the term V_g (p* - p)/(s - S_M) of the star-state energy were missing or inconsistent, so HLLC was not Galilean invariant (NACA0012 M 0.8, fixed grid vs still air and a translating grid: CL -12 %). The flux is now computed in the frame of the face (u' = u - w n, H' = H - w u_n + w^2/2) and transformed back (F = B F', J = B J' T). - Jacobians: sign of the velocity term of the general-gas dp/drho. The star-state Jacobians keep by default the density of the other state in dp*/dU (inexact, #2198), which was more robust with inexact linear solves in our tests; USE_ACCURATE_FLUX_JACOBIANS= YES now gives the exact derivative for fixed wave speeds. - Unit test hllc_jacobian_tests.cpp: finite differences in 2D and 3D, fixed and moving faces, both sides of the contact, all branches, default and exact. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
…ensity terms FDS added the grid-motion term inside a loop over the variables (nVar times). The term is now added once, as the exact derivative with respect to (p, u, h), including d(rho)/dh; the same terms are added to the incompressible JST and Lax-Friedrichs schemes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
SetRangePressure reduced the local minima with MPI_MAX, so with more than one rank MinP was the largest of the local minima (used by the mass-flow outlet). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
The flow solvers build one numerics object per source slot, so two active sources of the same slot overwrote each other (e.g. body force + gravity gave twice the body force). First slot: body force, rotating frame, axisymmetric, gravity, Boussinesq, streamwise periodic. Second slot: radiation, periodic outlet, vorticity confinement. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
It read the Giles kind of the marker (copied from BC_Giles), which reads past the end of the Giles list and crashes when the case has no Giles marker. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
The boundary flux array had 20 entries and no bound check (NEMO with 10 or more species in 3D). Use 32, as the limiters, and stop with an error above it. The error of both checks is raised by the master thread only, since these functions run inside OpenMP parallel regions (MPI_THREAD_FUNNELED). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
The multigrid arrays hold at most 10 coarse levels (MAX_MG_LEVELS); MGLEVEL= 12 with MG_MIN_MESHSIZE= 1 crashed with stack smashing. Clamp with a warning, MG_MIN_MESHSIZE can still reduce the levels. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
…e Jacobian The term 1/2*(Gamma-1) of d(v (rho E + p))/d(rho v) was 0 (implicit Jacobian only). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
… explicit general-gas Roe In 3D the first three columns of the P matrix combine the entropy wave, weighted by n_j, with the shear waves. Their strengths are n_j (Delta rho - Delta p / c^2) + (Delta u x n)_j; the entropy jump was used unweighted in the first one only, so a contact or shear layer on a face not aligned with x got a wrong flux. The standard Roe scheme already projects the jump with P^-1 since #299. Unit test roe_contact_tests.cpp: a contact and a shear layer give the upwind flux in 2D and 3D. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
The consistent extrapolation and the low-Mach correction called the fluid model with the reconstructed pressure and density before checking that they are positive (possible NaN or fluid-model errors with real-gas models at start-up). Check them first, also rejecting zero and NaN, and check again after the low-Mach correction. Valid states give the same result as before. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
With SST the total energy contains k (CNSVariable subtracts it from the static energy, the free-stream and boundary energies add it), but the convective schemes computed the speed of sound, the eigenvector matrices and the Jacobians as if it did not. Add a k argument (held fixed, default 0) to GetPMatrix, GetPMatrix_inv and GetInviscidProjJac, and to the SIMD pMatrix, pMatrixInv, inviscidProjJac and Roe average. Remove k from the speed of sound of Roe, HLLC, AUSM-type and FVS schemes, use the Roe-averaged k in the Roe matrices, advect the part of Delta(rho E) due to Delta k with the contact wave (Roe, JST-mat), and include k in the accurate AUSM and HLLC Jacobians and in the preaccumulation inputs. Upwind_Residual passes the k of the cells to the numerics, adds it to the total enthalpy of the consistent and low-Mach extrapolations, and checks the speed of sound of each MUSCL face state as well as of the Roe average. Unit tests for the Roe and AUSM contacts with a k jump and the HLLC Jacobians with k. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
…ible solver With SST the boundary states added the free-stream k to the total energy, while the domain next to the boundary has its own k (the free-stream value decays right away, #1851): the Riemann problem at the boundary then sees a jump of total energy that is not a jump of pressure. Use the k of the boundary node in the far-field, Riemann, turbo Riemann, inlet, outlet, supersonic inlet, engine and actuator-disk states, and pass it to the convective numerics of every boundary. Where the interior state is used, remove k from it: static energy of the interior state in BC_Riemann, BC_TurboRiemann and BC_Giles, energy of the DENSITY_VELOCITY Riemann state, total speed of sound at the inlet, engine exhaust and actuator disk. The P, P^-1 and Jacobian matrices of the Riemann boundaries take k, and the boundary total enthalpy of BC_Giles includes it. The initial check for non-physical points also subtracts the free-stream k from the energy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
…a wrong viscous term The axisymmetric source computed the pressure from the total energy without removing k (SST). Subtract it in the pressure and in the energy row of the Jacobian (k held fixed). The viscous part added mu_tot*v*2/3*rho*k/y to the energy equation for every RANS model (with the SA variable in place of k): this term does not come from the stress tensor of the flow solver, remove it. k is set only for SST. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
…n modifiers COMPRESSIBILITY-WILCOX and COMPRESSIBILITY-SARKAR were stored as the production option, overwriting VORTICITY, KATO-LAUNDER or UQ when combined with them (and their switch cases used the strain production). They are already stored in compWilcox and compSarkar: use these flags for the correction, independently of the production modifier. Use beta_star in place of the literal 0.09 in the corrected dissipation of omega. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
…rbo inlet - Stop with an error if the free-stream k or omega of SST is not positive and finite (zero turbulence intensity, viscosity ratio or velocity), which gave mu_t = 0/0 in the whole field. - Reject SST with engine and actuator-disk markers: the turbulence solver has no boundary condition for them (checked after the turbulence model of Euler zones is cleared). - BC_Inlet_Turbo computed omega from the averaged k of the flow solver instead of the imposed k. - Remove a dead write of the wall node solution in the SST wall function. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
Axisymmetric air nozzle with the inlet as a Riemann DENSITY_VELOCITY boundary, whose boundary state takes the energy of the node (containing k) and must remove k before adding it back with the other cases. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
… ambient value options - Accept V1994 and V2003 in SST_OPTIONS (the standard versions of the NASA TMR, with the exact production and 2/3 rho k in the stress tensor), and add TMRBC (far-field omega of the original reference of the NASA TMR) and WALL_OMEGA_LIMIT (clip the omega wall value to the upper limit of omega). - New options L_DOMAIN (approximate length of the domain, for TMRBC) and SST_SUST_TKE_AMB / SST_SUST_OMEGA_AMB (ambient values of the sustaining terms, <= 0 for the defaults of Spalart and Rumsey). - Document the versions, the new options and the range of mu_t/mu of the NASA TMR in config_template.cfg. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
…clip per version - V1994 and V2003 use the exact production of the NASA TMR, P = mu_t (S^2 - 2/3 div(u)^2) - 2/3 rho k div(u) (with VORTICITY and KATO-LAUNDER only the k term is added); the m versions keep P = mu_t S^2. - V1994 evaluates gamma/nu_t P with P/mu_t expanded, guarded by max(mu_t, EPS) where mu_t = 0. - Add the derivative of -2/3 rho k div(u) to the Jacobian diagonal only where it increases it (div(u) > 0). - Set the lower bound of CD_kw from the version (1e-20 for 1994, 1e-10 for 2003, as in the NASA TMR) instead of from the production limiter constant, which happens to have the same exponent. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
The standard (non-m) versions of the NASA TMR keep -2/3 rho k in the Boussinesq stress tensor, which the m versions (and #797) ignore. Add it, only for V1994 and V2003, in: - the viscous fluxes (CAvgGrad_Base::SetStressTensor and the vectorized viscous fluxes; with UQ it is already part of the perturbed Reynolds stress), - the viscous part of the axisymmetric source (radial normal stress in the energy equation), - the wall shear stress of the wall functions (CNSSolver::SetTau_Wall_WF), - the viscous sensitivities of the continuous adjoint (CAdjNSSolver::Viscous_Sensitivity). The other models keep calling the stress tensor without k, so that their results do not change. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
… and WALL_OMEGA_LIMIT - SST_OPTIONS= TMRBC: far-field (and inlet) omega = 10 U / L_DOMAIN, the original reference of the NASA TMR SST page, with k from FREESTREAM_TURB2LAMVISCRATIO (or the inlet viscosity ratio), in the non-dimensionalization of all flow solvers (also in the k of the free-stream energy), in the far-field state of CTurbSSTSolver and in BC_Inlet. - SST_OPTIONS= SUSTAINING: the ambient values of the sustaining terms, SST_SUST_TKE_AMB and SST_SUST_OMEGA_AMB (defaults 1e-6 U^2 and 5 U / REYNOLDS_LENGTH of Spalart and Rumsey, as the NASA TMR SST-sust), are also the free-stream values; mention them in the error for non-positive free-stream values. - SST_OPTIONS= WALL_OMEGA_LIMIT: clip the omega wall value 60 nu / (beta_1 d^2), which grows as 1/d^2 on fine wall grids, to the upper limit of omega used in the rest of the domain. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
…values 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_01LEL91DW5WPbPwgFtCvHga6
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEL91DW5WPbPwgFtCvHga6
Test casesAll runs: 2 MPI ranks. "Before" = the build of the SST bug-fix PR below this one. Files and scripts: sstB (see its README). NASA TMR flat plate (Mach 0.2, Re 5e6, TMR free stream: k = 9e-9 a^2, omega = 125 U/L), 137x97 grid, against the SST-Vm results of CFL3D and FUN3D. The "m" version gives the same history before and after this PR (to round-off), and the standard version gives the same result, because at Mach 0.2 the new terms are negligible.
NASA TMR bump in channel (Mach 0.2, Re 3e6, same free stream), 353x161 grid from su2code/VandV, against the SSTm results of CFL3D and FUN3D. Again the "m" version does not change, and the standard version differs by less than 0.3 %.
Where the standard version matters: the flat plate of #1851 (Mach 6.1, 800 K, turbulence intensity 5 %). Here 2/3 rho k is about 20 % of the pressure. The standard SST-2003 gives about 5 % less skin friction and 6.5 % less wall heat flux than SST-2003m. (6000 iterations; the density residual levels off at about -3.6.) New regression test: |
The TurboRiemann static-pressure outlet now holds the k of the node fixed and removes it from the EOS energy, as the other Riemann kinds do in this branch. The test helpers take k for the expected state, the flux and the Jacobian check.
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>
…update reference values from the CI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…version Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Cs, mixed-out average without k Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…T with non-ideal gas for JST_MAT/preconditioning, NEMO axisymmetric k term removed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, SST JST_MAT regression, test and doc cleanups Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th; drop unused constructor packs (CodeQL) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… rounding changes under fast-math) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@bigfooted almost. This PR sits on #2946, which is now ready for review. I just merged the latest #2946 here. When CI is green, I will take this one out of draft too. It is easier to review #2946 first: this PR only adds the 2/3 rho k term in the stress tensor and the standard SST versions. |
…k/omega check only when used, tkeNeeded guards, shorter note, TestCases back to develop Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bour solution) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sor k branches) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eep the develop formatting Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- UQ with the standard versions: do not subtract 2/3 mu_t div(u)^2 twice. - Add -2/3 rho k to the stress after the wall-function scaling; one tkeInStress flag for the five copies of the check. - Keep the develop expressions when the new options are off, so laminar, SA and default SST results keep their develop values. - SUSTAINING keeps the develop free stream by default. SST_SUST_TKE_AMB and SST_SUST_OMEGA_AMB (set both) make the free stream use the ambient values. - TMRBC is now TMR_FREESTREAM, L_DOMAIN is now SST_DOMAIN_LENGTH. One CConfig helper sets the free-stream k and omega for all flow solvers and inlets. - Config checks for the new options. WALL_OMEGA_LIMIT removed (no case needs it). - New unit test sst_standard_tests.cpp; new regression tests for V1994 with the ambient options and incompressible TMR_FREESTREAM (values from CI). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Values from CI: the new tests, and small rounding changes (-ffast-math) in laminar, SA and transonic_stator cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@bigfooted this is ready for review now. #2946 is merged, and this PR now sits on develop. Changes since your last look, after a self-review:
|
|
Review of #2948 (static review; not built or run locally) Checked, no problems found
1. Standard versions: the omega production sink is explicit For V1994, Options:
2. Test gaps
3. Option interactions and docs
4. Requested changes
|



Proposed Changes
This PR aligns the SST model with the definitions of the NASA Turbulence Modeling Resource (TMR SST page) and with Menter's papers. The default version (V2003m) does not change.
SST versions. The TMR defines two kinds of versions.
The "m" versions (V1994m, V2003m, the default) ignore$\frac{2}{3}\rho k$ in the stress tensor and use the production $P = \mu_t S^2$ . This is what develop does. They are unchanged.
The standard versions (V1994, V2003) keep the full stress tensor and the exact production. On develop they could not be selected:
SU2/Common/include/option_structure.hpp
Lines 1121 to 1123 in a6b7496
They are now enabled. The changes below apply only to them.
Stress tensor. The stress tensor never had$\frac{2}{3}\rho k$ (comment "see Pressure field near wall using SST #797"):
SU2/SU2_CFD/src/numerics/flow/flow_diffusion.cpp
Lines 141 to 142 in a6b7496
SU2/SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp
Lines 152 to 153 in a6b7496
With the standard versions it is now$\tau_{ij} = \mu_t \left(2 S_{ij} - \frac{2}{3} \nabla\cdot u , \delta_{ij}\right) - \frac{2}{3}\rho k , \delta_{ij}$ . The term is added in the momentum and energy equations, in the scalar and vectorized viscous fluxes, in the axisymmetric source and in the wall stress of the continuous adjoint. With wall functions it is added after the wall-function scaling of the stress. With UQ the term is already part of the perturbed Reynolds stress, so it is not added again, and the production does not subtract $\frac{2}{3}\mu_t(\nabla\cdot u)^2$ twice. The other models call the stress tensor as before, so their results do not change.
Production. Develop uses$P = \mu_t S^2$ for all versions:
SU2/SU2_CFD/include/numerics/turbulent/turb_sources.hpp
Lines 964 to 965 in a6b7496
The standard versions now use the exact production,$P = \mu_t \left(S^2 - \frac{2}{3}(\nabla\cdot u)^2\right) - \frac{2}{3}\rho k , \nabla\cdot u$ . With VORTICITY or KATO-LAUNDER, $S$ is replaced by another quantity, so only the $\rho k$ term is added.
SST-1994 omega production. Develop uses$\gamma \rho S^2$ , which is the "m" form:
SU2/SU2_CFD/include/numerics/turbulent/turb_sources.hpp
Lines 972 to 973 in a6b7496
The standard V1994 now uses$\frac{\gamma}{\nu_t} P$ (Menter 1994), with the exact $P$ above. $P/\mu_t$ is expanded, and a guard avoids a division by zero where $\mu_t = 0$ .
Jacobian. The derivative of$-\frac{2}{3}\rho k , \nabla\cdot u$ is added to the diagonal only where it makes the diagonal larger (expansion, $\nabla\cdot u > 0$ ). The residual always has the full term.
For every SST version, the total energy includes k, as on develop. The "m" and standard versions differ only in the stress tensor and the production above.
F1 cross-diffusion clip. The lower bound of the cross-diffusion term was taken from the production limiter constant:
SU2/SU2_CFD/src/variables/CTurbSSTVariable.cpp
Line 72 in a6b7496
SU2/SU2_CFD/src/solvers/CTurbSSTSolver.cpp
Lines 102 to 111 in a6b7496
The values were right by chance: 20 gives$10^{-20}$ for 1994, and 10 gives $10^{-10}$ for 2003, as in the TMR. But they were tied to an unrelated constant. The bound is now set by the version. Results do not change.
TMR_FREESTREAM (new option). Develop builds the free-stream k and omega from the turbulence intensity and the viscosity ratio. The inlet does the same:
SU2/SU2_CFD/src/solvers/CTurbSSTSolver.cpp
Lines 124 to 125 in a6b7496
SU2/SU2_CFD/src/solvers/CTurbSSTSolver.cpp
Lines 644 to 645 in a6b7496
The TMR reports another rule, from Menter's original reference:$\omega = 10, U / L$ , with $L$ the approximate length of the domain. $L$ . This omega is used at far fields, for the initial field and at all inlets. k follows from the viscosity ratio, $k = (\mu_t/\mu), \mu, \omega / \rho$ . The same k goes into the free-stream energy of all flow solvers, NEMO and FEM-DG included. The rule is in one place, in
SST_OPTIONS= TMR_FREESTREAMturns it on, and the new optionSST_DOMAIN_LENGTHgivesCConfig. The run stops ifSST_DOMAIN_LENGTHis not positive.SST-sust ambient values. Develop uses the free-stream k and omega as the ambient values of the sustaining terms:
SU2/SU2_CFD/src/drivers/CDriver.cpp
Lines 1275 to 1277 in a6b7496
SU2/SU2_CFD/include/numerics/turbulent/turb_sources.hpp
Lines 984 to 988 in a6b7496
By default nothing changes: the ambient values are the free-stream values, as on develop. Two new options,$k_{amb} = 10^{-6} U^2$ and $\omega_{amb} = 5, U / L$ (Spalart and Rumsey 2007).
SST_SUST_TKE_AMBandSST_SUST_OMEGA_AMB, set them. Set both or neither; the run stops otherwise. When set, they are also the free-stream k and omega (far fields, initial field, inlets). The turbulence intensity and the viscosity ratio are then not used for k and omega. This also allows a zero free-stream velocity, for exampleMACH_NUMBER= 0with grid motion. To reproduce the TMR SST-sust, setTMR_FREESTREAMand these two options cannot be used together.config_template.cfg. The list of SST options was incomplete, and the viscosity ratio had no guidance:
SU2/config_template.cfg
Lines 24 to 25 in a6b7496
SU2/config_template.cfg
Lines 280 to 281 in a6b7496
It now explains the "m" and standard versions,$\mu_t/\mu$ for SST: $10^{-5}$ to $10^{-2}$ . The default of 10 is not changed.
TMR_FREESTREAM,SST_DOMAIN_LENGTHand the two ambient options, and says that V2003m is the default. It also gives the TMR range of the far-fieldContinuous adjoint. It stays a frozen-turbulence approximation. With SST, develop already stops
ADJ_RANSunlessFROZEN_VISC_CONT= YES:SU2/SU2_CFD/src/drivers/CDriver.cpp
Lines 2221 to 2222 in a6b7496
Only the wall stress of the sensitivities (used with grid motion) gains$\frac{2}{3}\rho k$ with the standard versions:
SU2/SU2_CFD/src/solvers/CAdjNSSolver.cpp
Lines 767 to 769 in a6b7496
At a smooth no-slip wall the SST wall condition sets k = 0, so the term is zero there. The interior adjoint equations have no$\frac{2}{3}\rho k$ term, like the other turbulence terms that the frozen approximation leaves out.
Tests. The test cases are in the comments: the NASA TMR flat plate and bump in channel against the CFL3D and FUN3D results of the TMR, and the flat plate of #1851 at Mach 6.1. The default "m" versions do not change. At Mach 0.2 the standard versions give the same results as the "m" versions, because 2/3 rho k and the divergence of the velocity are negligible there. At Mach 6.1 with 5 % turbulence intensity the standard SST-2003 gives about 5 % less skin friction and 6.5 % less wall heat flux.
Three regression tests cover the new options, and the unit test
sst_standard_tests.cppchecks the production, UQ and the wall-function stress:turb_flatplate_sst_tmrV2003, TMR_FREESTREAM,SST_DOMAIN_LENGTH= 2.33333, viscosity ratio 0.009 (inlet)turb_naca0012_sst_1994_sust_ambV1994, SUSTAINING, ambient values of the TMR SST-sust (far field)inc_turb_naca0012_sst_tmrV2003, TMR_FREESTREAM(far field)Reference values: the SST-sust cases keep their develop values. The new tests are added, with values from the CI. A few laminar, SA and default SST cases (
poiseuille_profile,turb_naca0012_sa,fsi_cht,dsma661_sa,discadj_trans_stator) change in the last digits. They run no new code; the build uses-ffast-math, so the new branches change how the compiler orders the operations.Open point for the reviewers. The omega production of the standard SST-1994,$\frac{\gamma}{\nu_t} P$ , is not clipped at zero (as in #2329). $\mu_t \left(S^2 - \frac{2}{3}(\nabla\cdot u)^2\right)$ is never negative, but $-\frac{2}{3}\rho k , \nabla\cdot u$ is negative in an expansion. So a strong expansion can make the omega production negative. The k production is clipped at zero, and SST-2003 uses the clipped k production, so only SST-1994 is affected. Should it be clipped too?
It is the second half of #2329; the first half, #2946, is merged.
Related Work
PR Checklist
pre-commit run --allto format old commits.🤖 Generated with Claude Code