Spalart-Allmaras source residual
The SA working-variable transport equation combines production, destruction, and a limited cross-diffusion contribution. The pure policy functions below represent the scalar algebra used by the production implementation.
Model terms
The spectral contribution uses the negative part of a scalar rate:
The implementation uses precombined inputs at this policy boundary: cw1k represents the effective coefficient multiplying fw in the destruction term; in the current caller it is cw1 times kappa squared because rs contains the inverse kappa-squared factor. nuTildeRs represents the product of the working variable and rs, and cb2OverSigma represents cb2 divided by sigma. The caller computes these values from the active model constants and local flow state.
In the current implementation, the scaling is assembled as follows:
Source-level mapping
Mathematical term |
Pure API |
Production call site |
|---|---|---|
Production P |
SaProduction |
TurbCom::CalcSrcSa |
Destruction D |
SaDestruction |
TurbCom::CalcSrcSa |
Unbounded diffusion |
SaDiffusion |
TurbCom::CalcSrcSa |
Limited diffusion |
SaLimitedDiffusion |
TurbCom::CalcSrcSa |
Combined residual |
SaSourceResidual |
TurbCom::CalcSrcSa |
Negative part |
SaNegativePart |
SA implicit source linearization |
Formula-level verification
tests/solver/turb_sa_policy_test.cpp checks each source component against fixed values independently evaluated from the equations above. The test set also checks both branches of the diffusion limiter, the final signed combination, and the piecewise negative-part function.
These tests establish the scalar algebra at the pure-policy boundary. They do not prove that the caller supplies the correct gradients, wall distance, strain measure, Reynolds scaling, model variant, or boundary values. Those require separate component and flow-level evidence.
Verification and validation are different questions
The NASA Turbulence Modeling Resource (TMR) explicitly separates code/model verification from validation:
The SA model definition at https://tmbwg.github.io/turbmodels/spalart.html documents the standard SA equations, constants, and model variants. Standard SA must not be confused with SA-neg, SA-noft2, or correction variants.
The 2D zero-pressure-gradient flat-plate verification case at https://tmbwg.github.io/turbmodels/flatplate.html provides nested grids and reference solutions intended to check whether an implementation follows the specified equations and boundary conditions.
The corresponding flat-plate validation case at https://tmbwg.github.io/turbmodels/flatplate_val.html compares quantities of interest such as skin-friction coefficient versus momentum-thickness Reynolds number and mean velocity profile u+(y+) against theoretical correlations.
Eca, Hoekstra, Hay, and Pelletier (2005) provide a manufactured solution that includes source functions for the Spalart-Allmaras transport equation. This is a stronger route for checking the assembled differential operator and its source terms than comparing only a converged engineering flow.
A source term is not generally a directly measured experimental observable. Therefore, compare its scalar components with the governing equations, published model definitions, and manufactured-solution expressions. Compare observable flow quantities (for example Cf, u+(y+), and Re_theta) with TMR reference correlations or experimental/DNS data in a separate validation study.
A plotted curve is useful only when its provenance is explicit: record the equation or dataset, model variant, constants, nondimensionalization, sampling points, and the code path that generated the OneFLOW values. Do not treat a plot generated by a second copy of the same implementation formula as independent verification.
References
Spalart, P. R. and Allmaras, S. R. (1994). A One-Equation Turbulence Model for Aerodynamic Flows. Recherche Aerospatiale, No. 1, pp. 5-21. The journal publication takes precedence over the earlier AIAA-92-0439 conference version for the standard model definition.
Eca, L., Hoekstra, M., Hay, A., and Pelletier, D. (2005). A Manufactured Solution for a Two-Dimensional Steady Wall-Bounded Incompressible Turbulent Flow. IST Report D72-34 / EPM Report EMP-RT-2005-08. https://tmbwg.github.io/turbmodels/Eca1/Report_D72_34_EMP_RT_2005_8.pdf
NASA/TMBWG, Spalart-Allmaras Model: https://tmbwg.github.io/turbmodels/spalart.html.
NASA/TMBWG, 2D Zero Pressure Gradient Flat Plate Verification and Validation: https://tmbwg.github.io/turbmodels/flatplate.html https://tmbwg.github.io/turbmodels/flatplate_val.html
Related pages: sa_closure.rst, sa_eddy_viscosity.rst, sa_prod_strain.rst, and verification_layers.rst.
Pure APIs: SaProduction, SaDestruction, SaDiffusion, SaLimitedDiffusion, SaSourceResidual, and SaNegativePart. Tests: turb_sa_policy_test. Wiring: TurbCom::CalcSrcSa.