Appearance
Turbulence
FLUME runs large-eddy simulations of compressible wall-bounded and free turbulence (#119) with these pieces:
| Piece | Selected by | Section |
|---|---|---|
| Algebraic subgrid-scale models (Vreman, WALE, Sigma) | [turbulence] sgs_model | Subgrid-scale models |
| Kinetic-energy-preserving central flux away from shocks | [numerics] scheme_space = hybrid-kep-weno | Hybrid central/WENO |
| Impermeable no-slip walls | wall-noslip, wall-isothermal faces | Closed inviscid fluxes |
| Equilibrium and inverse-transformation wall models | wall-modelled faces | Wall model |
| Turbulent boundary-layer inflow | inflow-digital-filter faces | Digital-filter inflow |
| Turbulent boundary-layer inflow from the layer itself | inflow-recycling faces | Recycling-rescaling inflow |
| Constant mass flow in a periodic channel | [forcing] type = mass-flow | Mass-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
| Model | Vanishes in | |
|---|---|---|
| Vreman (2004) | ||
| WALE (Nicoud & Ducros 1999) | pure shear | |
| Sigma (Nicoud et al. 2011) | pure shear, 2-D flow, solid rotation |
The model constants are taken from other discretisations and are not calibrated on WENO.
Where it enters.
Time step. The largest
Limits.
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: 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
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),
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 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 (
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
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
, along the parallel velocity of the sample; - the energy flux is the wall heat flux
; - the normal momentum keeps the mirrored pressure.
The sample is the 3rd cell off the wall, 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
Equilibrium model
The model is the equilibrium thin layer between the wall and the sample, with uniform pressure across it:
with classical) or semi-local, as Yang & Lv 2018 and Chen et al. 2022).
Integrated once,
- 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
of the fixed point. An Aitken step on every second iteration, used before, is exact only on a geometric sequence; on the others it stopped a few samples on an extrapolated iterate, 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:
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,
The temperature comes from the Reynolds analogy anchored at the sample (their Eq. 2.5), 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
Measured by test_wall_model:
- in the constant-property limit it equals the equilibrium model to
; - against Eq. 2.2 integrated as printed on
intervals, on a cold wall and on a hot one, falling to and with 160 and 640 intervals (the error is the grid's, not the algebra's); - no non-finite result in
random samples.
On a laminar channel (
Input filter
wall_model_filter
- The average takes the sample once per step, at the first stage (from
). Every stage uses with its own sample, so 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
Eddy viscosity below the matching height
The face takes
With wall_model_eddy_viscosity = .true. the cells whose centre lies below
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
Pressure gradient
The equilibrium model balances a constant stress across the layer, so its wall_model_pressure_gradient = .true. (equilibrium model only) the momentum balance keeps the pressure gradient along the sample velocity, as Wang & Moin (2002) do:
so an adverse gradient strong enough gives
- 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
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_filteraverages 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 .wmfof a checkpoint). The turbulent wall-pressure gradient of a single LES sample is as large as, and the model is not linear in it: on an instantaneous slice of the Mach 2.28 layer upstream of the interaction (S4b, – ) the gradient has an rms of against a mean of , a median of 1.4, and the model with it raises the mean of the zero-pressure-gradient layer by 13 %. The mean gradient of an interaction lasts much longer than the turbulent one, so a of a few keeps it and removes most of the noise. takes the instantaneous gradient. - Solve. The same 16 plain fixed-point steps on the same 40 intervals, within
of 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,
, of either sign of the gradient, to , with under the adverse one; - a zero gradient is the equilibrium model to the convergence of the two iterations (test bound
); 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
intervals with 400 iterations: within of for a mild and a strong adverse gradient ( in both) and a favourable one; - no non-finite result in
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 wall_model_pressure_gradient_ypg
and
Measured by test_wall_model:
- the laminar limit,
, with above and below and either sign of the gradient: within of (the second quadrature by trapezoids, exact for , second order on the parabola); is the model above bit for bit, within of it; - the hot turbulent layer above against the same equations on
intervals: within ; under the strong adverse gradient , where the model above gives ; - no non-finite result in
random samples.
Fed with the resolved convection
The thin-boundary-layer balance between the wall and
with wall_model_convection = .true. (with wall_model_pressure_gradient and its filter, not with wall_model_pressure_gradient_ypg) .wmf), and
Measured by test_wall_model:
- a zero convection is the pressure-gradient model within
; - the laminar limit with a convection linear in
, : within of (the second quadrature by trapezoids, second order on the quadratic ); - the hot turbulent layer under Sutherland's law with a convection opposing and adding to the gradient, against the same equations on
intervals: within ; - no non-finite result in
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, wall_model_resolved_stress = .true. (with wall_model_convection)
.wmf), linear between the wall (
The same key takes the forcing out of the eddy viscosity: its velocity scale is
That scale fails under a strong adverse gradient. Where
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
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
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,
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
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
In the shock/boundary-layer interaction (S4l) the wall stress separates in the mean over
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):
- Plane. A uniform grid over the face,
df_spacingapart (adjusted to divide the domain), periodic along a periodic span. - Filter. Uniform random numbers of zero mean and unit variance are filtered along both plane axes with
, normalised to unit sum of squares, the integral length in nodes, half-width . The filtered field has unit variance and integral length , that of ; its correlation is . - Time. The streamwise correlation is a temporal one,
, , once per step. Unit variance is kept, and the correlation is . - Stresses. The signals become velocity fluctuations by the Cholesky factor of the table's stress tensor (Lund, Wu & Squires 1998), with
. - Thermodynamics. The strong Reynolds analogy,
, written so that it holds at the wall. The pressure is the free stream's, and .
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
at Mach 2.5 against for recycling (Huang, Duan & Choudhari 2022); measured here, is within 4 % of its developed level from , 24 % below it at (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.
- Plane. The
ngccell layers ending at the station, a translation of the ghost layers by: ghost layer , at , takes the cells at . 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). - Fluctuations. Per layer and wall-normal row, the spanwise Favre mean
and the mean density: (three components) and . - Rescaling. A ghost at height
takes the fluctuations at (inner: the viscous length grows by ) and at (outer), linear between the plane's rows, blended by , , and damped by . The velocity fluctuations are scaled by , the friction velocity ratio; the density one is clipped to . A source above the plane gives none. - Span shift. The plane is read
rr_shiftof the span away (half by default), which breaks the streamwise locking of the recycled structures. - State. The table's mean plus the fluctuations at the free-stream pressure.
make_tbl.py --inflow recycling sets them from the momentum integral
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
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
, 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
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 <output_basename>-turbulence_history.dat, to measure how much the scheme dissipates. It does not change the solution; 0, the default, computes nothing.
with 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
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 (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.