You set kOmegaSST in your case and it runs. Later you open kOmegaSSTBase.C to find out what a coefficient does, or why the production term is written as GbyNu with a c1_/a1_ factor, and the file takes a while to read. This page lists what the model does in OpenFOAM, in the order the code does it: the coefficients, how they are blended, the eddy viscosity, the two production limiters and the optional decay control.
Read from kOmegaSSTBase.C and kOmegaSSTBase.H in OpenFOAM v2306 and v2506 (ESI, openfoam.com), where the two files are identical, and in OpenFOAM 9 and OpenFOAM-dev (Foundation, openfoam.org). No case was run for this page. Where the two forks differ, the section says so.
The defaults are the same in both forks. They are the values of Menter, Kuntz and Langtry (2003).
| Keyword | Default | Used in |
|---|---|---|
alphaK1, alphaK2 | 0.85, 1.0 | Diffusion of k |
alphaOmega1, alphaOmega2 | 0.5, 0.856 | Diffusion of omega, cross-diffusion term |
beta1, beta2 | 0.075, 0.0828 | Destruction of omega |
gamma1, gamma2 | 5/9, 0.44 | Production of omega |
betaStar | 0.09 | Dissipation of k, blending functions, limiters |
a1, b1 | 0.31, 1.0 | Eddy viscosity limiter |
c1 | 10.0 | Production limiters |
F3 | off | Optional rough-wall term in the eddy viscosity |
To change one, add a kOmegaSSTCoeffs sub-dictionary and list only what you change:
// ESI: constant/turbulenceProperties
RAS
{
RASModel kOmegaSST;
turbulence on;
printCoeffs on;
kOmegaSSTCoeffs
{
a1 0.31;
}
}
// Foundation 9: constant/momentumTransport, same block with "model kOmegaSST;"
With printCoeffs on, the solver prints the full list it uses when it starts. That is the quickest way to confirm an override was read.
One thing confuses people who compare with the paper. OpenFOAM writes the diffusivity of k as alphaK*nut + nu. The paper writes it as nu + sigma_k*nut. So alphaK1 = 0.85 is the paper's sigma_k1 = 0.85, a factor that multiplies the eddy viscosity. It is not a turbulent Prandtl number that divides it.
Every coefficient with a 1 and a 2 is blended with the function F1:
coefficient = F1*(value1 - value2) + value2
F1 is 1 near a wall, where the model behaves like k-omega, and 0 far from walls, where it behaves like k-epsilon. The code computes it as:
CDkOmega = 2*alphaOmega2 * (grad(k) . grad(omega)) / omega
arg1 = min( min( max( sqrt(k)/(betaStar*omega*y), 500*nu/(y^2*omega) ),
4*alphaOmega2*k / (max(CDkOmega, 1e-10)*y^2) ),
10 )
F1 = tanh(arg1^4)
y is the distance to the nearest wall. The model asks the mesh for it, so the case needs a wallDist entry in fvSchemes, for example method meshWave;.
nut = a1*k / max( a1*omega, b1*F2*sqrt(S2) )
S2 = 2*magSqr(symm(grad(U)))
F2 = tanh(arg2^2), arg2 = min( max( 2*sqrt(k)/(betaStar*omega*y), 500*nu/(y^2*omega) ), 100 )
Away from walls F2 is 0 and the expression reduces to nut = k/omega. Inside a boundary layer, when the strain rate is large, the second argument of the max takes over and holds the eddy viscosity down. This is the "shear stress transport" part of the name: the turbulent shear stress is kept below about a1*k.
With F3 on, F2 is multiplied by a second function, F3 = 1 - tanh(arg3^4) with arg3 = min(150*nu/(omega*y^2), 10). It comes from Hellsten (1998) and switches the limiter off very close to rough walls. It is off by default in both forks.
Stuck on this in your own case?
CFDpilot is an AI agent for OpenFOAM that runs in your terminal. It reads the case files and the solver log on your machine, and shows every change as a diff before it edits a file.
Diagnose my case →Start free · 200 credits · nothing charged
The code first computes the production from the velocity gradient, divided by the eddy viscosity:
GbyNu0 = grad(U) && dev(twoSymm(grad(U)))
G = nut*GbyNu0
Then each equation gets its own limited version.
In the k equation, production is capped at c1 times the dissipation:
Pk = min( G, c1*betaStar*k*omega )
In the omega equation, the production term is gamma*GbyNu, with:
GbyNu = min( GbyNu0, (c1/a1)*betaStar*omega*max(a1*omega, b1*F2*sqrt(S2)) )
The second expression looks arbitrary until you divide the first cap by the eddy viscosity of section 3:
c1*betaStar*k*omega / nut
= c1*betaStar*k*omega * max(a1*omega, b1*F2*sqrt(S2)) / (a1*k)
= (c1/a1)*betaStar*omega*max(a1*omega, b1*F2*sqrt(S2))
So it is the same cap, written without k and without a division by nut. Both limiters do one job: they stop turbulence from building up where the strain is high and the flow is not sheared, such as the stagnation region in front of a bluff body. Lowering c1 tightens the cap. The header of the file notes that the production terms follow the 2001 paper by Menter and Esch, because the form printed in the 2003 paper contains a typo.
The Foundation version applies the same two limits. In OpenFOAM-dev there is no separate GbyNu() function: the min is written inline in the omega equation.
In a long external-flow domain, k and omega decay between the inlet and the body, so the turbulence that reaches the body is not the one you set at the inlet. The ESI version has an option for this, from Spalart and Rumsey (2007):
kOmegaSSTCoeffs
{
decayControl yes;
kInf 1e-5; // your far-field k, m2/s2
omegaInf 10; // your far-field omega, 1/s
}
The two numbers above are placeholders. Use the free-stream values of your own case. With the option on, the code adds one source to each equation:
k equation: + betaStar*omegaInf*kInf
omega equation: + beta*omegaInf^2
Each source equals the destruction term evaluated at the far-field values. When k and omega reach kInf and omegaInf, source and destruction cancel and the decay stops.
decayControl is off by default. When it is off, the code sets both far-field values to zero and the sources vanish.kInf and omegaInf are read from the dictionary and the solver prints "Employing decay control with kInf: ... and omegaInf: ..." at start-up.decayControl keyword.printCoeffs on, compare the printed block with the table in section 1. A typo in a keyword is not an error: the default is used and the wrong keyword is ignored.F1 and F2 depend on y. A patch that should be a wall but has another type changes y everywhere near it, and with it the blending.k or nut is very large in front of a body, the production limiter is the term that acts there. Check c1 has not been raised.CFDpilot is an AI agent for OpenFOAM that runs in your terminal. It reads the case files and the solver log on your machine, and shows every change as a diff before it edits a file.
Diagnose my case →Start free · 200 credits · nothing charged
alphaK1 0.85, alphaK2 1.0, alphaOmega1 0.5, alphaOmega2 0.856, beta1 0.075, beta2 0.0828, betaStar 0.09, gamma1 5/9, gamma2 0.44, a1 0.31, b1 1.0, c1 10.0 and F3 off. The values are the same in the ESI version (v2306, v2506) and in the Foundation version (9, dev).
It is the turbulence production divided by the eddy viscosity, computed from the velocity gradient. The omega equation uses it as its production term, after limiting it to (c1/a1)*betaStar*omega*max(a1*omega, b1*F2*sqrt(S2)). That limit is the k production limit, c1*betaStar*k*omega, divided by the eddy viscosity.
c1 caps turbulence production at c1 times the dissipation. With the default of 10, the production of k can never exceed 10*betaStar*k*omega. The cap is there to stop turbulence building up in stagnation regions. The same cap, divided by the eddy viscosity, is applied to the production term of the omega equation.
Add a kOmegaSSTCoeffs sub-dictionary inside the RAS dictionary and list only the coefficients you want to change. The file is constant/turbulenceProperties in the ESI version and constant/momentumTransport in Foundation versions 8 and later. With printCoeffs on, the solver prints the values it uses at start-up.
It is an option of the ESI version, off by default. It adds a source to each equation, built from the far-field values kInf and omegaInf, so that k and omega stop decaying once they reach those values. It is meant for external aerodynamics, where free-stream turbulence otherwise decays between the inlet and the body. The Foundation version has no such option.