Skip to content

Turbulence ​

FLUME runs large-eddy simulations of compressible wall-bounded and free turbulence (#119) with these pieces:

PieceSelected bySection
Algebraic subgrid-scale models (Vreman, WALE, Sigma)[turbulence] sgs_modelSubgrid-scale models
Kinetic-energy-preserving central flux away from shocks[numerics] scheme_space = hybrid-kep-wenoHybrid central/WENO
Impermeable no-slip wallswall-noslip, wall-isothermal facesClosed inviscid fluxes
Equilibrium and inverse-transformation wall modelswall-modelled facesWall model
Turbulent boundary-layer inflowinflow-digital-filter facesDigital-filter inflow
Turbulent boundary-layer inflow from the layer itselfinflow-recycling facesRecycling-rescaling inflow
Constant mass flow in a periodic channel[forcing] type = mass-flowMass-flow forcing
Kinetic-energy budget and wall histories[diagnostics]Diagnostics

All of them are Euler only (euler, and euler-de where stated); MHD is refused. The keys are in the input reference; the results are on the turbulence verification page.

Subgrid-scale models ​

[turbulence] sgs_model (input) adds an eddy viscosity μt=ρνt to the dissipative fluxes. g is the velocity gradient and Δ the geometric mean of the active steps of the block:

ModelνtVanishes in
Vreman (2004)cBβ/(αijαij), αij=∂iuj, βij=∑mΔm2αmiαmjαij of rank 1, pure shear among them
WALE (Nicoud & Ducros 1999)(cΔ)2(SijdSijd)3/2/((SijSij)5/2+(SijdSijd)5/4)pure shear
Sigma (Nicoud et al. 2011)(cΔ)2ς3(ς1−ς2)(ς2−ς3)/ς12, ςi the singular values of gpure shear, 2-D flow, solid rotation

The model constants are taken from other discretisations and are not calibrated on WENO.

Where it enters. νt is computed once per stage from the auxiliary variables with 2nd-order central gradients, on the interior cells and 2 ghost layers, since the fluxes read it up to the second ghost. The dissipative kernels then add τ and the heat flux with μ=μt and k=μtcp/Prt on top of the molecular ones; the flux is linear in both. The face value is the mean of the two cells, which cannot go negative where a 4-point interpolant could; the 4th-order correction takes the cell value. The isotropic part of the subgrid stress is dropped. The reflux and the inter-realm register see the total flux, so conservation is unchanged.

Time step. The largest 2max(4/3,γ/Prt)νt∑d1/Δxd2 of the domain is added to the limit of every cell. It is an over-estimate, independent of the partition, taken from the committed state of the previous step; the growth of νt during a step is not bounded.

Limits. Δ is per block, so μt jumps at a 2:1 face. The first time step of a multi-realm run takes its limit from seam ghosts that are not filled yet. A model counts as a dissipative term: the positivity limiter and immersed solids are refused with it.

Hybrid central/WENO ​

scheme_space = hybrid-kep-weno (input) computes the WENO flux splitting as weno does, then replaces the flux with a non-dissipative one at the faces away from shocks.

Sensor. Ducros et al. (1999), per cell from 2nd-order central velocity gradients: Ψ=θ2/(θ2+|ω|2+ε), ε=10−8(a/Δxmin)2 (hybrid_floor, not calibrated). A cell is also flagged where the relative density jump across it exceeds hybrid_jump (0.1, not calibrated), because the Ducros ratio is zero at a contact. A face takes the central flux when Ψ< hybrid_threshold (0.2) in the 4 cells −1…2 along its direction.

Central flux. 6th-order, kinetic-energy- and pressure-equilibrium-preserving, in the conservative form of Pirozzoli (2011) with the two-point flux of Shima et al. (2021), ⟨a⟩=(al+ar)/2:

Fi+1/2=2∑l=13al∑m=0l−1f(i−m,i−m+l),a=(3/4,−3/20,1/60),fρ=⟨ρ⟩⟨un⟩,fρui=⟨ρ⟩⟨un⟩⟨ui⟩+⟨p⟩δni,fE=⟨ρ⟩⟨un⟩ul⋅ur2+⟨p⟩⟨un⟩γ−1+un,lpr+un,rpl2.

Each face holds one flux, so conservation holds whichever kernel set it. WENO is computed everywhere, so the scheme costs what weno costs plus the overwrite; the two kernel sets are not fused.

Seams and boundaries. The central stencil must not read ghost cells that are not a same-level copy. A face along d whose stencil reaches the ghost cells of a 2:1 face, a physical face or a forest seam normal to d keeps the WENO flux, so a seam and its reflux stay what they are under weno. A flag acts along its own normal only. On such grids the sensor is exchanged like a state, one more halo exchange per stage: otherwise the two blocks of a same-level interface can take different fluxes at their common face and lose conservation (2⋅10−7 measured on a 2:1 box).

hybrid_skin relaxes this rule for measurement (input). The default stays WENO: on a smooth flow the central skin is closer to the DNS, but with a shock at a seam there is no reference (verification).

With a subgrid-scale model. The eddy viscosity is zero on flagged cells. The rule is per cell: a WENO face next to a flagged cell, or on a skin, can still carry the model. The sensor and its exchange then run twice per stage.

No-slip walls: closed inviscid fluxes ​

At a wall-noslip or wall-isothermal face of a hydrodynamic model every inviscid face flux except the normal momentum is set to zero before the dissipative fluxes are added, so the wall is impermeable. The mirrored ghost of an isothermal wall has another density, and without the closure the split flux carries mass, energy and scalars through the face at O(h3): +11 % of the mass over a coarse turbulent channel run. MHD walls keep their fluxes.

Wall model ​

A wall-modelled face (input) mirrors its ghosts as wall-inviscid and replaces the flux through the wall face, after every other dissipative flux:

  • no mass flux;
  • the parallel momentum flux is τw, along the parallel velocity of the sample;
  • the energy flux is the wall heat flux qw;
  • the normal momentum keeps the mirrored pressure.

The sample is the 3rd cell off the wall, h=2.5Δ, or the height wall_model_height, interpolated linearly between the two cells around it. Kawai & Larsson (2012) place the sample off the first cell. Equilibrium wall models are usually matched at 0.1–0.3 of δ with Δ/hwm≲0.3–0.4: the 3rd cell sits at that bound and moves with the grid.

Equilibrium model ​

The model is the equilibrium thin layer between the wall and the sample, with uniform pressure across it:

ddy[(μ+μt)dUdy]=0,ddy[(μ+μt)UdUdy+cp(μPr+μtPrt)dTdy]=0,

with μt=κyρτw(1−e−y+/A+)2 and the local density. The damping coordinate is y+=yτwρw/μw (classical) or y∗=yτwρ/μ with the local density and viscosity (semi-local, as Yang & Lv 2018 and Chen et al. 2022). κ=0.41, A+=17, Prt=0.9; T=Tw and U=0 at the wall, the sample values at y=h.

Integrated once, τw and qw follow from two quadratures for a given temperature profile:

  • 40 intervals stretched by 1.3, a rule exact for a coefficient linear on each interval;
  • 16 plain fixed-point iterations: the error falls at about the rate 1/2 of the under-relaxed temperature, and over a sweep of samples the result is within 7⋅10−5 of the fixed point. An Aitken step on ln⁡τw every second iteration, used before, is exact only on a geometric sequence; on the others it stopped a few samples on an extrapolated iterate, τw up to 2.7 times the fixed point (more than 5 % off: about 2 samples in 1000 of a random sweep, 1.4 % of S4c's mean samples);
  • the temperature iterate under-relaxed and kept positive, and the laminar stress if all else fails.

The cost per wall face is fixed, on the device too. Measured by the unit test test_wall_model: τw within 0.6 % of a fine quadrature for h+=102–105 (5.5 % at 106); the Crocco relation to round-off; a hot compressible layer against an independent solver to 3⋅10−3; no non-finite result in 2⋅105 random samples up to 4.5 wall sound speeds.

Inverse-velocity-transformation model ​

wall_model = inverse-transformation follows Griffin, Fu & Moin (2023, J. Fluid Mech. 970, A36). It keeps the constant-property layer above, at the same semi-local height, St+=1/(1+κy∗D2), D=1−e−y∗/A+, and maps its strain to the compressible one by inverting the total-stress-based transformation (their Eq. 2.2):

dU+dy∗=[1μ+St+−1μ++ρ+(1+y+2ρ+dρ+dy+−y+μ+dμ+dy+)]−1.

The temperature comes from the Reynolds analogy anchored at the sample (their Eq. 2.5), T=Tw+sPr(Tr−Tw)UUe(1−UUs)+(UUs)2(Ts−Tw), Tr=Te+Pr1/3Ue2/(2cp), s=1.14, so qw=scpτw(Tr−Tw)/Ue. The edge state Ue, Te is an input (wall_model_edge_velocity, wall_model_edge_temperature): the paper locates the edge in the flow, which a face kernel cannot do.

The property gradients follow from T(U) (uniform pressure, power-law viscosity), so for the physical strain g=dU/dy Eq. 2.2 is the quadratic Fβyg2−(E+F+Kβy)g+K=0, with E=κy∗D2μw/μ, F=ρ/ρw, K=τwF/μ, β=T′(U)(12+ω)/T. FLUME takes its positive root when β<0 (the other is negative), else the root nearer K/(E+F). That value is the strain without the gradients, the exact laminar τw/μ; the equation also holds the spurious root 1/(βy) of dy∗/dy=0. The layer is integrated from the wall on the same 40 stretched intervals, each exact for 1/g linear in y and corrected twice, and shot on ln⁡τw (secant, 8 shots).

Measured by test_wall_model:

  • in the constant-property limit it equals the equilibrium model to 3⋅10−8;
  • against Eq. 2.2 integrated as printed on 2⋅105 intervals, 3.9⋅10−3 on a cold wall and 7.8⋅10−3 on a hot one, falling to 3⋅10−4 and 5⋅10−5 with 160 and 640 intervals (the error is the grid's, not the algebra's);
  • no non-finite result in 2⋅105 random samples.

On a laminar channel (h+≈1) it equals the equilibrium model, and on a hot wall it departs from it.

Input filter ​

wall_model_filter =Tf averages the sampled velocity, pressure and density of each wall face in time, a¯←(1−e)a¯+ea, e=min(Δt/Tf,1), as Kawai & Larsson (2012) recommend against the noise of a single LES sample.

  • The average takes the sample once per step, at the first stage (from qn). Every stage uses (1−e)a¯+ea with its own sample, so Tf→0 is the unfiltered model bit for bit.
  • The residual of a balanced gravity equilibrium uses the unfiltered model and leaves the averages alone.
  • The averages restart from the next sample at the start and after a regrid.
  • A checkpoint carries them (<restart_basename>-proc<rank>.wmf, each block's averages after its Morton code, checked on load), so a restart continues the run bit for bit. A checkpoint without the file restarts them with a warning.

Near the steady state of a laminar channel Tf=0.05 moves the force by 3⋅10−4, the lag Tf|df/dt|/f; over an early transient Tf=1 moves it by 1.4⋅10−2.

Eddy viscosity below the matching height ​

The face takes τw and qw from the sample, and nothing in the cells between the wall and h carries them there unless a subgrid model does. At Mach 3 the first cell then drains: colder than the wall, dense, its flow reversed (channel at Mach 3).

With wall_model_eddy_viscosity = .true. the cells whose centre lies below h take the model's own eddy viscosity, μt=κyρτwD2, D=1−e−y+/A+ with the damping of the face (semi-local for the inverse model). y is the cell centre, ρ and μ are the cell's, and τw comes from the instantaneous sample, never the filtered one. The cell takes the larger of it and a subgrid model's, after the hybrid mask. It goes through the subgrid flux kernels (kt=μtcp/Prt) and the subgrid time-step limit. In a log layer μtdU/dy=τw, so the resolved layer carries the modelled stress.

The columns of the two ghost layers along the wall are computed from their ghost cells, so the two blocks of a face agree on its flux: the same cells split into 2 or 4 blocks per direction agree to round-off, against 2⋅10−6 with those columns left out. Without the key nothing changes, bit for bit.

Pressure gradient ​

The equilibrium model balances a constant stress across the layer, so its τw has the sign of the sample speed: under the shock of an interaction it can fall, but it cannot reverse while the flow at h still moves downstream (interaction). With wall_model_pressure_gradient = .true. (equilibrium model only) the momentum balance keeps the pressure gradient along the sample velocity, as Wang & Moin (2002) do:

(μ+μt)dUdy=τw+dpdxy,U(h)=τw∫0hdyμ+μt+dpdx∫0hydyμ+μt,

so an adverse gradient strong enough gives τw<0 with U(h)>0. The eddy viscosity takes the velocity scale (|τw|+|dp/dx|y)/ρ, uτ and the pressure scale combined as Duprat et al. (2011) do, so a zero gradient is the equilibrium model. The energy flux cpkdT/dy+(τw+ydp/dx)U is constant across the layer. The convective terms stay out: the later literature calls keeping one and not the other inconsistent, since the two partly balance in the wall layer, so the model can over-respond.

  • Gradient. Per wall-parallel direction, the central difference of the pressure of the sample cell's neighbours (both sample cells, weighted as the sample, when h falls between two), projected on the sample velocity. It reads the ghost cells along the wall at a block face.
  • Its filter. wall_model_pressure_gradient_filter =Tp averages it in time with an exponential filter of its own, as the input filter does the sample (the sixth average of the face, in the .wmf of a checkpoint). The turbulent wall-pressure gradient of a single LES sample is as large as τw/h, and the model is not linear in it: on an instantaneous slice of the Mach 2.28 layer upstream of the interaction (S4b, x=35–50) the gradient has an rms of 1.1⋅10−2 against a mean of 8⋅10−4, |dp/dx|h/τw a median of 1.4, and the model with it raises the mean τw of the zero-pressure-gradient layer by 13 %. The mean gradient of an interaction lasts much longer than the turbulent one, so a Tp of a few δ/Ue keeps it and removes most of the noise. Tp=0 takes the instantaneous gradient.
  • Solve. The same 16 plain fixed-point steps on the same 40 intervals, within 7⋅10−5 of |τw|+|dp/dx|h of the converged value over a sweep of samples.
  • Below the matching height the eddy viscosity stays the equilibrium model's: its ghost columns hold no filtered gradient, and an unfiltered one would bring the noise back.
  • History. The wall history evaluates the same model.

Measured by test_wall_model:

  • the laminar limit, U(h)=τwh/μ+(dp/dx)h2/(2μ), of either sign of the gradient, to 2.6⋅10−7, with τw<0 under the adverse one;
  • a zero gradient is the equilibrium model to the convergence of the two iterations (test bound 10−3); with the key off the faces call the equilibrium solver itself, bit for bit;
  • a hot turbulent layer under Sutherland's law against the same equations on 2⋅105 intervals with 400 iterations: within 3.4⋅10−3 of |τw|+|dp/dx|h for a mild and a strong adverse gradient (τw<0 in both) and a favourable one;
  • no non-finite result in 105 random samples.

Without the key nothing changes, bit for bit.

Bernoulli-consistent variant ​

Above the viscous layer of an adverse-gradient layer the convective term balances the pressure gradient (Bernoulli), so a model that keeps one and drops the other over-responds: Hickel, Touber, Bodart & Larsson (2012), a priori on the wall-resolved LES of the IUSTI interaction, find it separating much too early. Their parametrised convection is −(dp/dx)min(y/ypg,1), with ypg=ypg∗(μw2/(ρw|dp/dx|))1/3 and ypg∗=4. With wall_model_pressure_gradient_ypg =ypg∗>0 the model takes it: the net forcing (dp/dx)(1−min(y/ypg,1)) integrates to the stress τw+(dp/dx)g(y),

g(y)=y−y22ypg(y<ypg),g(y)=ypg2(y≥ypg),

and g replaces y in the stress, in the second quadrature and in the velocity scale of the eddy viscosity. The net forcing vanishes above ypg. 0, the default, keeps the model above, bit for bit.

Measured by test_wall_model:

  • the laminar limit, U(h)μ=τwh+(dp/dx)∫0hgdy, with ypg above and below h and either sign of the gradient: within 5.7⋅10−4 of |τw|+|dp/dx|h (the second quadrature by trapezoids, exact for g=y, second order on the parabola);
  • ypg∗=0 is the model above bit for bit, ypg≫h within 10−5 of it;
  • the hot turbulent layer above against the same equations on 2⋅105 intervals: within 2.7⋅10−3; under the strong adverse gradient τw=1.30⋅10−3, where the model above gives −0.69⋅10−3;
  • no non-finite result in 105 random samples.

Fed with the resolved convection ​

The thin-boundary-layer balance between the wall and h keeps the convection with the pressure gradient (Wang & Moin 2002; Park & Moin 2014):

(μ+μt)dUdy=τw+S(y),S(y)=∫0y(dpdx+C)dy′,

with C the convection along the sample velocity. With wall_model_convection = .true. (with wall_model_pressure_gradient and its filter, not with wall_model_pressure_gradient_ypg) C comes from the resolved flow: ∑tet∑j∂(ρutuj)/∂xj, e the unit sample velocity, in the cells up to the sample (at most 4), by central differences along the wall and, along the normal, (G2+3G1)/(3Δ) in the first cell (the wall's flux G=0 half a cell below) and central differences above. The cell values are filtered in time with the gradient's filter (averages 7 to 10 of the face, in the .wmf), and C is linear between the cell centres, 0 at the wall, constant beyond the last. S replaces (dp/dx)y in the stress, in the second quadrature and in the velocity scale. Where the resolved flow obeys Bernoulli, C≈−dp/dx and the forcing vanishes; where the near-wall flow is slow or reversed, it is the pressure gradient (interaction).

Measured by test_wall_model:

  • a zero convection is the pressure-gradient model within 10−10;
  • the laminar limit with a convection linear in y, U(h)μ=τwh+(dp/dx)h2/2+ah3/6: within 1.03⋅10−3 of |τw|+|dp/dx|h+|a|h2 (the second quadrature by trapezoids, second order on the quadratic S);
  • the hot turbulent layer under Sutherland's law with a convection opposing and adding to the gradient, against the same equations on 2⋅105 intervals: within 3⋅10−3;
  • no non-finite result in 105 random samples with random convections.
The resolved shear stress ​

The convection fed to the model is the instantaneous resolved one, and its time mean holds the gradient of the resolved shear stress, ∂⟨ρue′uη′⟩/∂η (η away from the wall), which the model's eddy viscosity already represents: counted twice, it raises τw (by 5 to 12 % in the zero-gradient layer of the interaction runs, S4h). Park & Moin (2014) lower the model's eddy viscosity by the resolved one, μt,wm=μt,mix−ρ|⟨u′v′⟩|/(dU/dy); in the model's balance this is the same as removing the resolved stress from the forcing. With wall_model_resolved_stress = .true. (with wall_model_convection)

(μ+μt)dUdy=τw+S(y)−R(y),R=⟨ρueuη⟩−⟨ρue⟩⟨ρuη⟩⟨ρ⟩,

R at the centres of the convection cells from four running averages per cell (ρ, ρue, ρuη, ρueuη, filtered with the gradient's filter; averages 11 to 26 of the face, in the .wmf), linear between the wall (R=0) and the centres, constant beyond. The wall-parallel fluctuation terms are not removed.

The same key takes the forcing out of the eddy viscosity: its velocity scale is |τw|/ρ, as in the thin-boundary-layer model of Wang & Moin (2002), and the forcing enters the balance linearly. The filtered resolved forcing fluctuates as much as τw itself (on the Mach 2.5 zero-gradient layer, S(h) has an rms of 1.0⋅10−3 against a mean τw of 0.97⋅10−3), and |S| in the scale raises the mean τw: a priori on the filtered averages of that layer (77760 wall columns), against the equilibrium model, the convection-fed model gives +22.9 %, with the resolved stress removed +12.4 %, and with the scale |τw|/ρ as well −1.5 %.

That scale fails under a strong adverse gradient. Where τw approaches zero the eddy viscosity vanishes with it, the balance between the wall and h becomes laminar, and the integrated forcing, of order (dp/dx)h/2, outweighs μU(h)/h by two orders of magnitude: τw jumps to a large negative value whether or not the resolved flow reverses. In the interaction (S4i) the key returns Cf down to −3.4⋅10−3 under a first cell that moves forward everywhere, and the interaction shrinks. The key passes the zero-gradient layer and fails the interaction: a velocity scale that keeps the mean forcing (the adverse gradient) without its fluctuation is not in FLUME. Tested a priori on both flows (interaction), Duprat et al.'s (2011) mixed scale, the total stress of the slow forcing, a slow pressure gradient, Park & Moin's (2014) local modelled stress and a κ matched to the resolved slope at h each fail one of them or sit at its edge; the forcing filtered much longer than the code's, in both the balance and S4h's scale, passes both.

wall_model_velocity_scale = tau | sum sets the scale apart from the resolved stress (default tau with wall_model_resolved_stress, sum without: the models above, bit for bit). The slow-forcing model is wall_model_resolved_stress = .true., wall_model_velocity_scale = sum and a wall_model_pressure_gradient_filter long against the forcing's fluctuation: the filter acts on the pressure gradient, the convection and the resolved-stress averages alike.

Measured by test_wall_model: with no convection and R=ry, the model is the pressure-gradient model with dp/dx−r within 10−10; R=0 is the convection-fed model; with the scale from τw alone, no forcing is the equilibrium model and R=ry is the model with dp/dx−r, within 10−10.

Viscosity coupling ​

wall_model_coupling = viscosity changes how the model's stress reaches the flow, whatever the model (#126). With the default flux the ghosts mirror as wall-inviscid and the face takes the model's τw along the sample velocity: the wall stress can reverse only where the model's output does, which for the equilibrium model means where the velocity at the matching height reverses on average. In the shock/boundary-layer interaction the first cells reverse in the mean below a forward sample (S4k) and the face keeps the drag of a forward flow.

With viscosity, after De Vanna, Bernardini, Picano & Benini (2022), the no-slip condition is kept and the model enters through the wall viscosity: the ghosts are wall-noslip's (velocity reflected about the resting wall, the inviscid fluxes through the face closed but the pressure, above), and the parallel momentum through the face is the stress of the first cell's no-slip gradient, (μw+μwsgs)2v1/Δy, with μwsgs≥0 raised until its magnitude reaches the model's:

τw=max(μw2|v1|Δy, |τwwm|)v1|v1|,

v1 the wall-parallel velocity of the first cell, μw the viscosity at the wall temperature (wall_coupling_viscosity, adam_flume_wall_model_library.F90). The direction follows the first cell, so a reversed first cell reverses the wall stress; the magnitude is the model's, or the molecular no-slip stress where that is larger (a resolved wall). The heat flux stays the model's: a conductivity raised on the first cell's temperature difference would flip the heat flux where that difference changes sign near the recovery temperature (not done). The wall history records the stress applied, so its Cf turns negative where the first cell reverses. De Vanna et al. also switch the model off where the wall is resolved (Δx+<40, Δy+<3, Δz+<15); FLUME's wall grids never are (not done).

Measured by test_wall_model: forward and reversed first cells, the larger of the two stresses, an oblique velocity, none at rest. Leg wm14 of turbulence/check.sh: the key acts against flux, an explicit flux agrees with the default, the block layouts and rank counts agree, the CPU and the GPU agree, and on a laminar channel the history's τw balances the driving force.

In the shock/boundary-layer interaction (S4l) the wall stress separates in the mean over 1.66δ0, where the flux coupling's stays positive, and Lint is 10.3 % above the DNS's. On the zero-gradient layer it fails: on the Mach 2.5 flat plate Cf falls 8.7 % below the flux coupling's, −11.3 % against the DNS (boundary layer). Under the flux coupling the first cell runs faster than its no-slip stress allows (1.08 times the model's there); the maximum takes that stress, slows the first cell to the DNS's velocity and the cells above it below the DNS's, and the model, reading a slower sample, returns a lower τw. De Vanna et al. match the model's stress exactly with the resolved gradient; the lower bound μwsgs≥0 is FLUME's (the variant without it is not tested).

Limits ​

  • Isothermal walls only.
  • The inverse model takes a fixed edge state.
  • A restart needs the same ranks, as every FLUME checkpoint.
  • The wall faces are rebuilt each step, so after a regrid too, but no test regrids along a wall.

Digital-filter inflow ​

An inflow-digital-filter face (input) feeds a spatially developing turbulent boundary layer: the mean of a profile table plus fluctuations with its Reynolds stresses. The method is the digital filter of Klein, Sadiki & Janicka (2003) in the form of Touber & Sandham (2009) and Xie & Castro (2008):

  1. Plane. A uniform grid over the face, df_spacing apart (adjusted to divide the domain), periodic along a periodic span.
  2. Filter. Uniform random numbers of zero mean and unit variance are filtered along both plane axes with bk=exp⁡(−π|k|/n), normalised to unit sum of squares, n=L/Δ the integral length in nodes, half-width 2n. The filtered field has unit variance and integral length 2L/π, that of exp⁡(−πr/2L); its correlation is (1+πr/n)e−πr/n.
  3. Time. The streamwise correlation is a temporal one, ψ←ψe−πΔt/2T+ψnew1−e−πΔt/T, T=Lx/U∞, once per step. Unit variance is kept, and the correlation is e−πt/2T.
  4. Stresses. The signals become velocity fluctuations by the Cholesky factor of the table's stress tensor (Lund, Wu & Squires 1998), with R13=R23=0.
  5. Thermodynamics. The strong Reynolds analogy, T′/T¯=−(γ−1)M¯2u′/U¯, written T′=−(γ−1)U¯u′ρ¯/(γp∞) so that it holds at the wall. The pressure is the free stream's, and ρ′/ρ¯=−T′/T¯.

The plane lives on the host, and every rank builds the same one from one random stream and the forest's global step. Once per step each rank lists the ghost rows beyond the face and interpolates their states bilinearly in the plane. The CPU writes them after the face pass of every boundary fill; on FNL they are copied to the device and written by a small kernel. In the edge and corner passes the face is extrapolated. The plane is saved with the restart (<restart_basename>.dff), so a restart continues bit for bit; without the file a fresh field starts, with a warning.

The boundary-layer initial condition (initial conditions) fills the domain with the mean of the same table.

Limits.

  • Euler only, one face per realm, the wall on the minimum side of its axis.
  • With a periodic span, the ghosts beyond the face and the span are filled by the periodic exchange, so they lag the plane by one boundary fill.
  • A digital filter needs a recovery length after the inlet, about 40δi at Mach 2.5 against 20δi for recycling (Huang, Duan & Choudhari 2022); measured here, Cf is within 4 % of its developed level from x=53δi, 24 % below it at x≈27 (boundary layer).

Recycling-rescaling inflow ​

An inflow-recycling face (input, #121) feeds the layer with its own turbulence: the mean of the digital filter's table plus the fluctuations at a station rr_x downstream, rescaled to the face. It is the variant of the STREAmS solver (Pirozzoli, Bernardini & Grasso; read from the STREAmS-2 source, recyc_prepare and bcrecyc) of the method of Lund, Wu & Squires (1998): the mean stays prescribed, only the fluctuations are recycled.

  1. Plane. The ngc cell layers ending at the station, a translation of the ghost layers by L=nint(xr/Δ)Δ: ghost layer g, at x=−(g−12)Δ, takes the cells at x=L−(g−12)Δ. Every rank writes the cells it owns into one global plane and an allreduce sums it, so the plane is the same on every rank whatever the decomposition (a count of the writes checks that each entry is written once).
  2. Fluctuations. Per layer and wall-normal row, the spanwise Favre mean u~=∑ρu/∑ρ and the mean density: u″=u−u~ (three components) and ρ′=ρ−ρ¯.
  3. Rescaling. A ghost at height y takes the fluctuations at βy (inner: the viscous length grows by β=δv(xr)/δv(0)) and at (δ(xr)/δ(0))y (outer), linear between the plane's rows, blended by W(η)=12(1+tanh⁡4(η−0.2)0.2+0.6η/tanh⁡4), η=y/δ, and damped by 12(1−tanh⁡4(η−2)). The velocity fluctuations are scaled by β, the friction velocity ratio; the density one is clipped to [−0.75,4]ρ¯. A source above the plane gives none.
  4. Span shift. The plane is read rr_shift of the span away (half by default), which breaks the streamwise locking of the recycled structures.
  5. State. The table's mean plus the fluctuations at the free-stream pressure.

β and the thickness ratio are keys: make_tbl.py --inflow recycling sets them from the momentum integral dθ/dx=Cf/2 with van Driest II (Kármán–Schoenherr) from the table's θ to xr, δ growing as θ and δv as 1/Cf, as STREAmS sets them from its mean-profile model, never from the run. Unlike STREAmS, the first cell keeps its fluctuation: STREAmS zeroes it, a DNS cell below y+=1, where here it is the wall model's log-layer cell.

Once per step, before the first stage, from the committed state: each rank gathers its plane cells (on FNL from the device), the plane is summed and its fluctuations taken, and the ghost rows are listed where the digital filter's are (the CPU at every boundary fill, FNL when copying them to the device, also after a map rebuild) and written by the same kernel. Edges and corners are extrapolated. The face keeps no state: a restart continues bit for bit.

Measured on the Mach 2.5 layer at δi/12 against the digital filter, same restart, model and window (boundary layer): the digital filter's dip, Cf 24 % below the downstream level at x≈27δi, is gone; beyond the station Cf over van Driest II stays within −2.0 and +3.8 % of that level and is within 4 % of it from x=10δi (the digital filter from 53). The recovery length of the gate's measure (3 % of the run's own developed mean) is 26δi against 50; against the common downstream level at 3 %, both reach it at x=55, because the recycled layer runs up to 3.8 % above it around x=50 (cause not identified).

Limits.

  • Euler only, one face per realm, the wall on the minimum side of its axis; the cells at the face and at the station on one level, at rr_spacing.
  • The ratios are those of a correlation, fixed for the run.
  • Recycling is known to add a spurious frequency, the recycling period xr/U, to the incoming layer (Morgan et al., as cited in the llm-wiki's inflow-generation page); not measured here.
  • The plane costs a device gather, an allreduce of 5×ngc×ny×nz values and a host pass over the ghost rows every step: 3 % of the wall time per step on the Mach 2.5 case (0.63 s against the digital filter's 0.61 s, one A30 node each, a single pair of runs).

Mass-flow forcing ​

[forcing] type = mass-flow (input) drives a periodic channel at a constant mass flow. Once per step a uniform momentum is added along axis so that the volume mean of the momentum is bulk_momentum; the total energy gains the change of kinetic energy. Euler only.

The force per unit volume (the added momentum over the step) is written to <output_basename>-forcing_history.dat (header VARIABLES="it" "time" "f", then one row per save) on the conservation-history cadence, in the output units of [reference]. At a statistically steady state its mean times the half height is the wall shear stress. A restart appends to the file.

Turbulence diagnostics ​

Kinetic-energy budget ​

[diagnostics] turbulence_history_save = N (input) writes every N steps the volume integrals of the kinetic-energy budget of a compressible flow to <output_basename>-turbulence_history.dat, to measure how much the scheme dissipates. It does not change the solution; 0, the default, computes nothing.

K=∫12ρ|u|2dV,Z=∫12ρ|ω|2dV,εs=∫μ|ω|2dV,εd=∫43μθ2dV,ε=∫τij∂ui∂xjdV,pd=∫pθdV,

with θ=∇⋅u and τ, μ those of the dissipative fluxes. The gradients are 4th-order central differences of the auxiliary variables, whatever dissipative_order is. The integrals are sums, not divided by the volume. With a subgrid model the file gains a last column, eps_sgs.

The exact equation is dK/dt=pd−ε. What is left of the measured drop of K after the integral of ε−pd is the numerical dissipation of the scheme, plus the truncation error of the integrals. On a periodic box with constant μ, ε=εs+εd only in the limit of exact integration.

Each row refreshes the ghosts and the auxiliary variables of the committed state. On a forest of several realms there is no step-0 row, because the seams are not built yet.

Wall histories ​

[diagnostics] wall_history_save = N writes <output_basename>-wall_<face>_history.dat, one file per wall-modelled face: it, time, then the wall shear stress along wall_history_axis (positive for the drag of a flow along +axis) and the wall heat flux (kdT/dy at the wall, positive when the gas is hotter), each area-averaged over the face cells in wall_history_bins equal bins along the axis. The model is evaluated on the committed state at its sample with the solvers of the face fluxes, so the history is the stress the solver applies (with wall_model_filter, the unfiltered sample; with wall_model_pressure_gradient_filter, the filtered gradient the face takes).

References ​

  • Ducros F. et al. (1999), Large-eddy simulation of the shock/turbulence interaction, J. Comput. Phys. 152, 517–549.
  • Duprat C., Balarac G., Métais O., Congedo P. M., Brugière O. (2011), A wall-layer model for large-eddy simulations of turbulent flows with/out pressure gradient, Phys. Fluids 23, 015101.
  • Griffin K. P., Fu L., Moin P. (2023), J. Fluid Mech. 970, A36.
  • Kawai S., Larsson J. (2012), Wall-modeling in large eddy simulation: length scales, grid resolution, and accuracy, Phys. Fluids 24, 015105.
  • Klein M., Sadiki A., Janicka J. (2003), A digital filter based generation of inflow data for spatially developing direct numerical or large eddy simulations, J. Comput. Phys. 186, 652–665.
  • Lund T. S., Wu X., Squires K. D. (1998), Generation of turbulent inflow data for spatially-developing boundary layer simulations, J. Comput. Phys. 140, 233–258.
  • Nicoud F., Ducros F. (1999), Subgrid-scale stress modelling based on the square of the velocity gradient tensor, Flow Turbul. Combust. 62, 183–200.
  • Nicoud F., Baya Toda H., Cabrit O., Bose S., Lee J. (2011), Using singular values to build a subgrid-scale model for large eddy simulations, Phys. Fluids 23, 085106.
  • Shima N., Kuya Y., Tamaki Y., Kawai S. (2021), Preventing spurious pressure oscillations in split convective form discretization for compressible flows, J. Comput. Phys. 427, 110060.
  • Touber E., Sandham N. D. (2009), Large-eddy simulation of low-frequency unsteadiness in a turbulent shock-induced separation bubble, Theor. Comput. Fluid Dyn. 23, 79–107.
  • Vreman A. W. (2004), An eddy-viscosity subgrid-scale model for turbulent shear flow: algebraic theory and applications, Phys. Fluids 16, 3670–3681.
  • Wang M., Moin P. (2002), Dynamic wall modeling for large-eddy simulation of complex turbulent flows, Phys. Fluids 14, 2043–2051.
  • Xie Z.-T., Castro I. P. (2008), Efficient generation of inflow conditions for large eddy simulation of street-scale flows, Flow Turbul. Combust. 81, 449–470.