Algorithm Search⌘K

Techniquecore

Direct numerical simulation of turbulence

Also called DNS of turbulence.

Resolves all scales down to the Kolmogorov scale. The grid needs about Re^(9/4) points and Re^(3/4) time steps, so the total cost grows like Re^3.

Direct numerical simulation (DNS) of turbulence is the numerical solution of the Navier-Stokes equations on a grid and with a time step fine enough to resolve every eddy, from the size of the flow down to the Kolmogorov scale, with no turbulence model. The Kolmogorov 1941 theory gives the smallest scale η=(ν3/ε)1/4\eta = (\nu^3/\varepsilon)^{1/4} and the estimate that the number of grid points grows like Re9/4Re^{9/4}, the number of time steps like Re3/4Re^{3/4}, and the total work like Re3Re^3. Large eddy simulation is the cheaper neighbor: it resolves only the large eddies and represents the rest by a subgrid model such as the Smagorinsky model or the dynamic subgrid model. Reynolds-averaged models resolve none of the eddies.

In plain words

Turbulence is a tangle of eddies of all sizes. A direct simulation follows every one of them. It uses the flow equations as they are, with no extra rules, and it makes the grid so fine that even the smallest eddies span a few cells. This makes the result as good as an experiment for the flow it computes, and better in one way: every value at every point and time is available. The price is very high. When the flow gets faster or larger, the smallest eddies get smaller, so the grid needs many more points and the time steps must get shorter. A tenfold rise in speed costs about a thousand times more work. So direct simulation is a research tool for simple flows at moderate speeds, and its results are used to test the cheaper models.

When it applies

  • The flow is turbulent and the Reynolds number Re=UL/νRe = UL/\nu is low or moderate, so that Re9/4Re^{9/4} grid points fit in memory. Here UU and LL are the velocity and size of the large eddies and ν\nu is the kinematic viscosity in m^2/s.
  • The geometry is simple: a periodic box (homogeneous turbulence), a channel, a pipe, a boundary layer on a flat plate, a mixing layer or a jet.
  • The aim is understanding or reference data: statistics such as the Reynolds stresses and the dissipation, which are hard to measure, and data to test RANS closures and subgrid models.
  • It does not apply to most engineering flows. An airliner wing at Re≈107Re \approx 10^7 would need of the order of 101610^{16} points by the estimate below.

The template

Resolution (rule of thumb). Choose the grid spacing Δx\Delta x so that the smallest resolved wavenumber band reaches the dissipation range. For a pseudo-spectral method with NN points per side of a box of side L\mathcal L, the largest wavenumber after dealiasing is kmax=23N2πLk_{max} = \frac{\sqrt 2}{3} N \frac{2\pi}{\mathcal L}, and the usual criterion is kmaxη≥1.5k_{max}\eta \ge 1.5. This criterion is a rule fitted to how well the dissipation spectrum converges; values near 1 are also in use. Choose the box several integral scales wide, so that the largest eddies do not feel the periodicity.

Time step (rule of thumb). For an explicit time stepping, keep the Courant number Co=∣u∣maxΔt/ΔxCo = |u|_{max}\Delta t / \Delta x below about 1 (the CFL condition sets the hard limit for the scheme, and accuracy for the small eddies wants a step near τη\tau_\eta or smaller).

Cost (heuristic). With Δx∼η\Delta x \sim \eta and ε∼U3/L\varepsilon \sim U^3/L:

  • grid points: (L/η)3∼Re9/4(L/\eta)^3 \sim Re^{9/4};
  • time step: Δt∼Δx/U∼η/U\Delta t \sim \Delta x / U \sim \eta / U, so a run over one large-eddy time L/UL/U takes L/η∼Re3/4L/\eta \sim Re^{3/4} steps;
  • work: about Re9/4⋅Re3/4=Re3Re^{9/4} \cdot Re^{3/4} = Re^3, times a factor log⁡N\log N for the FFT in a spectral code.

The constants depend on the definition of ReRe, the resolution criterion and the number of large-eddy times needed for converged statistics (often tens). The exponents follow from the K41 scaling and are as reliable as it is.

Steps.

  1. Pick the domain, the boundary conditions and the forcing (a fixed pressure gradient in a channel, a forcing of the lowest wavenumbers in a box, or none for decaying turbulence).
  2. Discretize in space with a high-accuracy method: spectral methods in periodic directions, Chebyshev polynomials across a channel, or high-order finite differences on a staggered grid.
  3. Advance in time with a Runge-Kutta method for the nonlinear term and often an implicit step for the viscous term, and enforce ∇⋅u=0\nabla \cdot u = 0 by a projection or by working with divergence-free basis functions.
  4. In a pseudo-spectral code, compute the product u⋅∇uu \cdot \nabla u in physical space and remove aliasing errors by the 2/3 rule or by phase shifts.
  5. Start from a random field with a chosen spectrum, run until the statistics stop drifting, then average over time and over the homogeneous directions.
  6. Check the resolution: the energy and dissipation spectra fall off by several decades at kmaxk_{max}, the mean dissipation matches the energy input, and statistics do not change when the grid is refined.

Classic examples

Isotropic turbulence in a box. Orszag and Patterson (1972) used a pseudo-spectral method on a 32332^3 grid, the first direct simulation of three-dimensional turbulence. Later box simulations reached grids of several thousand points per side and are used to measure the Kolmogorov constant and intermittency.

Channel flow. Kim, Moin and Moser (1987) simulated a channel at friction Reynolds number Reτ=uτδ/ν=180Re_\tau = u_\tau \delta / \nu = 180, with Fourier modes along the walls and Chebyshev polynomials across. The grid had about 4×1064 \times 10^6 points. Their mean profile and Reynolds stresses became the reference for near-wall models and for wall functions.

Cost table (by hand). With points Re9/4Re^{9/4} and steps Re3/4Re^{3/4} per large-eddy time and all constants set to one:

ReRe grid points steps work
10310^3 5.6×1065.6 \times 10^6 178 10910^9
10410^4 10910^9 1000 101210^{12}
10510^5 1.8×10111.8 \times 10^{11} 5623 101510^{15}
10610^6 3.2×10133.2 \times 10^{13} 31623 101810^{18}

For example 104⋅9/4=10910^{4 \cdot 9/4} = 10^9 and 104⋅3/4=10310^{4 \cdot 3/4} = 10^3. Each tenfold rise in ReRe multiplies the work by 1000.

Variations

  • Pseudo-spectral DNS in periodic boxes, the most accurate per grid point for homogeneous turbulence.
  • Finite difference and finite volume DNS on staggered grids (the MAC grid), with second- or higher-order central schemes that conserve kinetic energy. These handle more complex geometry, at the price of more points per eddy.
  • Forced and decaying turbulence. Forcing the large scales gives a statistically steady state; decaying runs mimic grid turbulence.
  • Scalars and other physics. DNS can carry temperature, a passive scalar, buoyancy, particles or a reacting species, each with its own small scale (for a scalar with low diffusivity, the Batchelor scale, smaller than η\eta).
  • Quasi-DNS or under-resolved DNS. A grid with kmaxηk_{max}\eta somewhat below 1 captures most of the energy but not the dissipation spectrum. It is a different method and must be reported as such.

Pitfalls

  • Under-resolution. A grid too coarse for η\eta piles up energy at the highest wavenumbers and gives wrong dissipation and intermittency statistics. Check the spectrum.
  • Aliasing. Without dealiasing, the nonlinear term in a pseudo-spectral code feeds false energy into resolved modes and can make the run unstable.
  • Box too small. If the box is not several integral scales wide, or a channel is too short in the stream direction, the large eddies interact with their periodic copies and the statistics change.
  • Unconverged statistics. Averages over too few large-eddy times, or taken before the start-up transient has gone, have large random errors. Report the averaging time.
  • Comparing at different Reynolds numbers. DNS is often at lower ReRe than the experiment it is compared with; low-ReRe effects, such as a short inertial range, are real features of the DNS, not errors.

Exercises

  1. Water at 20 C has ν=1.0×10−6\nu = 1.0 \times 10^{-6} m^2/s. For ε=10−2\varepsilon = 10^{-2} m^2/s^3, find η\eta. (Answer: (10−18/10−2)1/4=10−4(10^{-18}/10^{-2})^{1/4} = 10^{-4} m.)
  2. A code runs a flow at Re=2000Re = 2000 in one day. Estimate the time for Re=20 000Re = 20\,000 on the same machine. (Answer: about 10310^3 days, from the Re3Re^3 estimate.)
  3. A pseudo-spectral run in a box of side 2π2\pi m has N=512N = 512 and η=0.004\eta = 0.004 m. Does it meet kmaxη≥1.5k_{max}\eta \ge 1.5? (Answer: kmax=23⋅512=241k_{max} = \frac{\sqrt 2}{3} \cdot 512 = 241 1/m, so kmaxη=0.97k_{max}\eta = 0.97; it does not.)

References

  1. Stephen B. Pope, Turbulent Flows, Cambridge University Press, 2000, Chapter 9 (9.1.1 the pseudo-spectral method, 9.1.2 the computational cost, 9.1.3 artificial modifications, 9.2.1 channel flow)
  2. Steven A. Orszag and G. S. Patterson, Numerical simulation of three-dimensional homogeneous isotropic turbulence, Physical Review Letters 28(2), 1972, 76-79, the first direct simulation of isotropic turbulence, pseudo-spectral on a 32^3 grid
  3. John Kim, Parviz Moin and Robert Moser, Turbulence statistics in fully developed channel flow at low Reynolds number, Journal of Fluid Mechanics 177, 1987, 133-166, the channel flow at a friction Reynolds number of 180, with Fourier and Chebyshev expansions
  4. Parviz Moin and Krishnan Mahesh, Direct numerical simulation, a tool in turbulence research, Annual Review of Fluid Mechanics 30, 1998, 539-578, resolution requirements, numerical methods and the uses of the data

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • three classic examples