Turbulence model
RANS equations describe the mean flow. The effect of turbulent eddies on the mean flow appears as extra mixing, which is modelled by a turbulent viscosity \(\nu_t\). A turbulence model computes \(\nu_t\) from the flow.
GUST uses the one-equation k–L model of Axell and Liungman (2001), referred to below as AL01. The model needs two quantities:
the turbulent kinetic energy \(k\), how energetic the eddies are, from its own transport equation ((1));
the length scale \(L\), how large the eddies are, from an algebraic formula. Near the ground the eddies are small; stable stratification makes them smaller still.
The model’s point relations are ERF’s (extern_erf/ERF_RANSClosure.H). The inputs are in the turb namespace
(Input reference).
Eddy viscosity and TKE sources
\(S^2 = 2S_{ij}S_{ij}\): the squared strain rate.
\(N^2 = (g/\theta_0)\,\partial\theta/\partial z\): the squared Brunt–Väisälä frequency.
\(c_\mu\), \(c_\mu'\): stability functions (below). The turbulent Prandtl number is \(c_\mu/c_\mu'\), equal to 1 in neutral flow.
\(C_{\mu 0} = 0.5562\) (
turb.Cmu0) and \(\kappa = 0.41\) (turb.kappa).\(k\) is bounded below by
turb.tke_floor(at least machine epsilon).
Length scale
The length scale starts from the geometric length
capped harmonically at turb.max_geom_lscale. Here \(\kappa\) is the von Kármán constant, \(d\) the wall
distance and \(z_0\) the roughness length. Stratification modifies it:
with the turbulent Richardson number and the constant \(C_b\) (turb.Cb, 0.35)
As in ERF, the unstable length is evaluated once, from \(l_g\).
Stability functions
From AL01, Eqs. 31–32:
The poles of \(c_\mu\) and \(c_\mu'\) lie at \(R_t = -3.5987\) and \(-3.6101\). Below
turb.Rt_crit, \(R_t\) is smoothly mapped towards turb.Rt_min (the map of Burchard and Petersen) so that
it never reaches them; turb.Rt_min must therefore lie above \(-3.598\). Near the pole \(c_\mu\) grows
without bound (1.5 at the default \(-3\), 7.3 at \(-3.5\), 78 at \(-3.59\)).
Neutral wall layer
Because \(\varepsilon\) contains \(C_{\mu 0}^3\), the model reproduces the neutral log law exactly when
\(l_g = \kappa(z + z_0)\), that is, where the cap turb.max_geom_lscale has no effect (set it very large to
remove it, as tutorial 1 does). In the wall layer
at every height, with \(u_*\) the friction velocity.
Wall distance
turb.wall_distance selects the wall distance \(d\) to the ground. With buildings and buildings.wall_tke = on
the closure takes the nearer of the ground and the nearest building wall, each with its own roughness
(Buildings).
terrain_height(default): the height of the cell centre above the ground of its column.tucker: the differential wall distance of Tucker (2003),\[\nabla^2\phi = -1,\quad \phi = 0 \text{ on the ground}, \qquad d = -|\nabla\phi| + \sqrt{|\nabla\phi|^2 + 2\phi} .\]On flat ground \(d\) is the height. Over terrain it approximates the true distance; the error is largest at convex crests (Results).
Model options
turb.face_mean: how the cell diffusivities are averaged to the faces (Spatial discretization).turb.nut_relax: under-relaxation of \(\nu_t\) between iterations.turb.frozen_switch: holds at the floor, during the Newton stage, the cells whose \(k\) was at the floor when Newton started (Solution algorithm). The stable/unstable branch and the \(R_t\) smoothing are not frozen: the length and \(R_t\) are continuously differentiable across them (below).turb.ri_gate: the stratification gate (below).
Smoothness at neutral
With \(y = l_g^2 N^2/(C_b^2 k)\), the stable length is \(l_g(1 + y)^{-1/2}\) and the unstable one
\(l_g(1 - y)^{1/2}\) (before the \(R_t\) smoothing). Both are \(l_g(1 - y/2) + O(y^2)\), so \(L\),
\(R_t\) and \(\nu_t\) have the same value and the same first derivative in \(N^2\) on both sides of
\(N^2 = 0\); only the second derivative jumps. The smoothing map of \(R_t\) has slope 1 on both sides of
turb.Rt_crit. The kink of the closure is the floor \(k_f = \max(k, k_\mathrm{floor})\). (The neutral band
\(|N^2| \le\) machine epsilon, where \(L = l_g\), is a jump in \(L\) of relative size \(y/2\) at
its edge: 8e-10 at \(k\) = 1e-3, but close to 1 at \(k\) = machine epsilon, where \(\nu_t\) is
negligible.) Near the floor the closure is smooth but steep: at \(k\) = 1e-6 the \(N^2\) scale of
\(L\), \(C_b^2 k / l_g^2\), is about 4e-10 s⁻², close to the change of \(N^2\) a finite-difference
Jacobian makes, which then misses \(\partial L/\partial N^2\) by about 30 %.
Stratification gate
In a nearly neutral layer, under an inversion for example, \(N^2\) can be round-off or
numerical noise of either sign. With turb.ri_gate \(= Ri_0 > 0\) the length \(L\) and \(R_t\)
(and through \(R_t\) the stability functions and the heat diffusivity) use
with \(S^2 = 2 S_{ij}S_{ij}\) (\((\partial u/\partial z)^2\) in simple shear, so \(Ri\) is the gradient Richardson number). Where the shear dominates (\(|Ri| \ll Ri_0\)) the stratification is suppressed by \((Ri/Ri_0)^2\); in an inversion (\(|Ri| \gg Ri_0\)) it is kept to within \((Ri_0/Ri)^2\). The gate keeps the sign of \(N^2\), is monotone in \(N^2\) (its slope is at most 1.125, at \(|Ri| = \sqrt{3}\, Ri_0\)), is infinitely differentiable wherever \(S^2 > 0\) (at \(N^2 = S^2 = 0\) it is continuous but not differentiable), and is exact at \(N^2 = 0\), so a neutral run is unchanged bit for bit. The buoyancy production \(P_b = -\nu_t' N^2\) keeps the ungated \(N^2\), so the buoyancy sink of \(k\) stays that of the heat flux \(\nu_t'\,\partial\theta/\partial z\); the buoyancy of the momentum equation is not gated either.
It is a smooth, local form of the neutral switch of Kynema-SGF’s KLAxell (lengthscale_switch: below
meso_sponge_start, when the deck’s surface heat flux is below 1e-5, the neutral length and \(R_t = 0\)).
That switch is a jump in value and depends on a global input: with KLAxell’s defaults (Cb_stable 0.25,
\(\lambda\) = 30 m) at \(N^2\) = 1e-4 s⁻², \(k\) = 0.1 m²/s² and \(z\) = 100 m it changes \(L\)
from 7.2 m to 17.3 m. The gate changes stratified answers: in the stable
surface layer \(Ri\) is about 0.05–0.2, so \(Ri_0\) = 0.01 lowers \(N^2\) there by 3.8 % (at
\(Ri\) = 0.05) to 0.25 % (at 0.2).
It is off by default (Results).
Eddy-viscosity cap for separated flow
A one-equation closure with an algebraic length keeps \(\nu_t\) large in the shear layer
that leaves a crest, so the flow reattaches too soon behind steep terrain (no separation behind the Bolund
escarpment or the Ishihara–Zhou ridge with the default closure). With turb.realizability \(= C_r > 0\) the
new eddy viscosity is capped before the relaxation of turb.nut_relax:
with \(w\) = turb.nut_relax and \(\nu_t^\mathrm{old}\) the stored value of the last iteration. The form
is that of the SST limiter (Bradshaw’s \(-\overline{uw}/k = a_1 = 0.31\)). Durbin’s (1996) time-scale bound is
\(\nu_t \le \alpha k/(\sqrt{6}\,|S|)\) with \(|S|^2 = S_{ij}S_{ij}\); in the \(S\) above it is
\(C_r = \alpha/\sqrt{3} \approx 0.346\) for \(\alpha = 0.6\) (0.245 = \(\alpha/\sqrt{6}\) would be the same
formula with Durbin’s \(|S|\) taken as this \(S\)). Unlike SST it acts everywhere, not only inside the
boundary layer. With the closure’s relations, \(\nu_t S/k = C_{\mu 0}^2 \sqrt{P/\varepsilon}\) in neutral flow, so the
cap acts where \(P/\varepsilon > (C_r/C_{\mu 0}^2)^2\). \(C_r = 0.309\) is 0.1 % below \(C_{\mu 0}^2 = 0.30936\)
for the default \(C_{\mu 0}\): the cap is active in an equilibrium surface layer too, where it lowers
\(\nu_t\) by 0–3 % (most near the wall, where \(P/\varepsilon\) is 1.04–1.05 in the first cells), and it limits
\(\nu_t\) strongly where the strain far exceeds equilibrium, as in the shear layer leaving a crest. Applying the
cap before the relaxation lets \(w < 1\) damp the cap’s changes between iterations: an imposed two-iteration
oscillation of the cap passes with the factor \(w/(2 - w)\) (1/3 at \(w = 0.5\)) instead of 1. Without the
option the cap is the largest real number and the closure is unchanged bit for bit. The derivative the Newton stage
reads follows the cap (\(\mathrm{d}\,\mathrm{cap}/\mathrm{d}k = \mathrm{cap}/k\)); the column first guess
(init.first_guess = column) does not apply it. Around buildings, whose edges fix their separation, the cap fades
out within buildings.limiter_zone building heights (Buildings).
Near-ground blend towards upwind
With the cap, the second-order limited convection can leave a steady run at a fixed,
unconverged state (the rough Ishihara–Zhou ridge stalls at a relative residual of 0.17 with
van_leer and van_albada; first-order upwind converges). With convection.hybrid_sigma_max
\(= \sigma_\mathrm{max} > 0\) the momentum and θ convection of the residual become
\(C_\mathrm{hi}\): the limited scheme of
convection.limiter; \(C_\mathrm{up}\): first-order upwind (the scheme of the implicit side);\(s(t) = t^2(3 - 2t)\) on \([0, 1]\) (0 below, 1 above): a smooth step;
\(a\): the ratio of the closure’s eddy viscosity to the cap (\(a \ge 1\) where the cap acts);
\(d\): the height above the ground (the closure’s wall distance without buildings; with them the ground’s distance alone, Buildings); \(H_h\) =
convection.hybrid_height.
\(\sigma\) is a cell field, interpolated to the faces of \(u, v, w\), updated once per iteration as
\(\sigma \leftarrow \sigma + \lambda(\sigma_t - \sigma)\) with \(\lambda\) = convection.hybrid_relax, and
frozen once the relative residual falls below convection.hybrid_freeze (after at least \(2/\lambda\) updates
on each grid level), so a converged state satisfies one fixed scheme. The blend is of the convection operators,
not of the face fluxes: it is not conservative where \(\sigma\) varies (in a 1-D test with \(\sigma\) rising
from 0 to 0.1 over a few cells, a net source of 0.2–0.4 % of the flux jump; mass is not affected). \(\sigma\) is
not checkpointed, so io.restart with the blend aborts.
Where it acts. Because \(C_r\) is at the equilibrium value, \(a\) is 1.00–1.03 in an equilibrium surface layer, so \(\sigma\) reaches \(\sigma_\mathrm{max}\) over most of the near-ground layer below \(H_h\), on the windward side as well as in the lee; inside a recirculation, where \(k\) is carried in (\(P < \varepsilon\)), \(a\) can fall below 0.8 and the blend switches off. With \(\sigma_\mathrm{max} = 0.1\) the added horizontal numerical diffusion near the ground is of the order of the turbulent viscosity there (about 5 m²/s at 10 m on Askervein) and changes the approach-flow speed-up by about 0.2 %. A gate that acts only above equilibrium (for example \(a > 1.05\)) is not in this version.
Recommended setting
For terrain with separated lees: turb.realizability = 0.309, turb.nut_relax = 0.5,
convection.hybrid_sigma_max = 0.1, convection.hybrid_height = 2.5 terrain heights and
turb.max_geom_lscale = 100 (on Big Southern Butte the length is uncapped with a moving lid, so that the inflow
does not drift over its 18.7 km fetch). \(C_r = 0.309\) is \(C_{\mu 0}^2\) for the default turb.Cmu0
only. On the benchmarks (Tests/Real_Terrain/WindNinja2019, IshiharaZhou,
RUSHIL) every case reaches the steady verdict with it:
Case |
Default closure |
Recommended setting |
|---|---|---|
Ishihara–Zhou ridge, smooth (tunnel reattachment 150–200 m) |
no reversed flow; U rms 0.80 m/s |
reversed 42–170 m; 0.30 m/s |
Ishihara–Zhou ridge, rough (250–300 m) |
reversed 59–122 m; 0.70 m/s |
reversed 47–173 m; 0.58 m/s |
RUSHIL Hill 3 (tunnel 0.27a–2.17a at 0.1 H) |
0.64a–1.27a; 0.50 m/s |
0.58a–1.45a; 0.48 m/s |
RUSHIL Hill 5 / Hill 8 |
not steady / attached, 0.23 m/s |
attached, 0.21 m/s / attached, 0.20 m/s |
Askervein, all masts (RMSE) |
1.24 m/s |
0.97 m/s |
Bolund cases 1 / 3 / 4, all masts (RMSE) |
1.46 / 0.66 / 0.89 m/s |
1.25 / 0.64 / 1.23 m/s |
Bolund case 4 (flow from the east, the lee over the escarpment) is slower than measured in the lee with the
cap. On Big Southern Butte the lee separates only on the unsmoothed terrain with a 4 m first layer
(Tests/Real_Terrain/WindNinja2019/inputs_bsb_srtm: lee RMSE 2.58 m/s against 3.53 m/s on the paper-like mesh,
with 68 m first cells and smoothed terrain).
Tests/Paper/JWEIA2026 runs all the variants of the paper on this setting (without and with the sensor, the
limit without the blending, first-order upwinding, the sensitivity to \(C_r\), \(\sigma_\mathrm{max}\)
and \(H_h\), and the grids) and draws its figures.
The comparison uses data made openly available by N. Wagenbrenner (windninja-tools, the Big Southern Butte database and Wagenbrenner et al. 2019), T. Ishihara and T. Zhou (the ridge wind-tunnel data) and ERCOFTAC (the RUSHIL data of Khurshudyan, Snyder and Nekrasov); we thank them. The case READMEs list the sources and licences.