Large Eddy Simulation resolves turbulent structures directly rather than modeling them, making it far more accurate than RANS for unsteady, separated, or acoustically sensitive flows. But LES is also 10–1000 times more expensive and requires mesh resolution, time steps, and boundary conditions that are completely different from RANS setups. This guide covers everything needed to configure a correct LES in OpenFOAM.
RANS (Reynolds-Averaged Navier-Stokes) models the entire turbulence spectrum using a statistical model. It is fast, robust, and appropriate for attached boundary layer flows where the turbulence model assumptions hold. For most industrial engineering problems — flow over streamlined bodies, pipe flows, simple heat exchangers — RANS gives adequate accuracy at a fraction of the cost.
LES directly resolves large turbulent eddies (those larger than the mesh filter width) and only models the smallest scales (sub-grid scale, SGS). This makes LES necessary when:
DES (Detached Eddy Simulation) is a hybrid: RANS near walls, LES in separated regions. OpenFOAM supports DES through the SpalartAllmarasDES and kOmegaSSTDES models — a cost-effective intermediate option.
The first change from a RANS case is the turbulence model specification in constant/turbulenceProperties:
simulationType LES;
LES
{
LESModel WALE;
delta cubeRootVol;
printCoeffs on;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
WALECoeffs
{
Ck 0.094;
Ce 1.048;
}
}
The delta entry controls how the filter width (the LES length scale) is computed. cubeRootVol uses the cube root of the cell volume, which is the standard choice for unstructured meshes.
OpenFOAM provides several sub-grid scale models. The three most commonly used are:
WALE is the recommended default for most cases. Its key advantage is that the SGS viscosity goes to zero correctly near walls (scaling as y³) without requiring explicit wall damping functions. This makes it well-suited for wall-bounded flows and transitional problems. The model coefficient Ck = 0.094 is appropriate for most cases.
LESModel Smagorinsky;
SmagorinskyCoeffs
{
Ck 0.094;
Ce 1.048;
}
The classic Smagorinsky model is simple and robust but requires wall damping functions (van Driest damping) near walls. Without damping, it is overly dissipative in the near-wall region. It is appropriate for free shear flows (jets, mixing layers, wakes far from walls) where wall effects are minimal.
LESModel dynamicKEqn;
dynamicKEqnCoeffs
{
filter simple;
}
dynamicKEqn solves a transport equation for SGS kinetic energy and uses the dynamic procedure to compute the model coefficient locally. This makes it more accurate in flows with significant spatial variation in turbulence intensity (e.g., flows transitioning from laminar to turbulent, or flows entering from a duct into a larger volume). It is more computationally expensive than WALE or Smagorinsky.
Mesh quality requirements for LES are fundamentally different from RANS and are the primary cost driver.
For wall-resolved LES, which correctly captures the turbulent boundary layer without wall modeling:
For a flat plate at Re = 10⁶, this requires roughly 10⁹ cells — wall-resolved LES is primarily a research tool for simple geometries.
In wall-modeled LES, the inner boundary layer is not resolved but approximated using a wall model. The first cell can be placed at y+ = 30–100. This reduces the cell count by 1–3 orders of magnitude and is the practical approach for engineering LES. OpenFOAM supports wall-modeled LES through the nutURoughWallFunction and nutkWallFunction — the same wall functions used in RANS — applied in the LES context.
In the free stream, the LES filter width (cell size) should sit in the inertial subrange of the turbulence energy spectrum. The mesh should resolve at least 80% of the total turbulent kinetic energy. A practical check: after the simulation, compute the ratio of resolved turbulent kinetic energy to modeled SGS energy — if the SGS energy exceeds 20% of total, the mesh is too coarse.
LES boundary conditions require turbulent fluctuations at inlets. A mean velocity profile alone produces a laminar inlet that takes many flow-through times to develop turbulence — corrupting the results.
// 0/U inlet patch
inlet
{
type turbulentDFSEMInlet;
delta 0.1; // boundary layer thickness
d (1 0 0); // flow direction
Uref 10.0;
Lref 0.1;
nCellPerEddy 5;
mapMethod nearestCell;
value uniform (10 0 0);
}
DFSEM (Divergence-Free Synthetic Eddy Method) generates physically consistent turbulent fluctuations that satisfy continuity. It requires inlet turbulence statistics (Reynolds stresses) which can come from a precursor RANS simulation.
For canonical flows (channel, pipe, flat plate), a periodic/cyclic domain with a body force driving the flow is the most accurate and computationally efficient approach. Set the inlet and outlet as cyclic patches and add a pressure gradient source term in fvOptions.
Use inletOutlet for velocity and fixedValue for pressure at outlets. Avoid hard walls directly downstream of turbulent regions — add a buffer zone of low-turbulence flow before the outlet to prevent backflow instability.
application pimpleFoam;
startFrom latestTime;
stopAt endTime;
endTime 5.0;
deltaT 1e-4;
adjustTimeStep yes;
maxCo 0.5;
maxDeltaT 1e-3;
writeControl timeStep;
writeInterval 100;
purgeWrite 5; // keep only last 5 snapshots to save disk
runTimeModifiable true;
Key points for LES controlDict:
LES uses transient solvers. pimpleFoam with appropriate settings is the standard choice:
PIMPLE
{
nOuterCorrectors 1; // PISO mode for LES
nCorrectors 2;
nNonOrthogonalCorrectors 0;
momentumPredictor yes;
}
With nOuterCorrectors 1, PIMPLE operates in pure PISO mode — no outer iterations, maximum accuracy at small time steps. For LES at Co < 0.5, this is correct. Only increase nOuterCorrectors if you need larger time steps.
LES results must be averaged over many flow-through times to obtain converged mean statistics. Add a fieldAverage function object to controlDict:
functions
{
fieldAverage1
{
type fieldAverage;
libs (fieldFunctionObjects);
writeControl writeTime;
timeStart 2.0; // start after transient
fields
(
U { mean on; prime2Mean on; base time; }
p { mean on; prime2Mean on; base time; }
);
}
}
Set timeStart to the time after which initial transients have been purged. prime2Mean on computes the Reynolds stress tensor (the time-averaged velocity fluctuation product), needed for turbulence validation.
Use LES when you need time-accurate turbulence data: aeroacoustics, massively separated flows, flows with strong vortex dynamics, or when RANS consistently fails for your geometry. For engineering cases with steady-state goals and attached boundary layers, RANS is almost always more cost-effective.
WALE is the best default choice: it has correct near-wall scaling without wall damping functions and handles transitional flows well. Use Smagorinsky only for free shear flows far from walls. dynamicKEqn is more accurate in spatially varying flows but adds computational cost.
Wall-resolved LES requires y+ < 1 at the wall with Δx+ = 50–150 and Δz+ = 15–40. Wall-modeled LES can use y+ of 30–100, reducing the mesh size dramatically. In the free stream, the mesh should resolve at least 80% of the turbulent kinetic energy.
Target a Courant number below 0.5, ideally 0.2–0.3. Use adjustable time stepping with maxCo 0.5 in controlDict. The LES time step is typically 10–100x smaller than for equivalent RANS simulations.
Run for at least 5–10 flow-through times to purge initial transients. Then collect statistics for another 10–20 flow-through times. Total simulation time is typically 15–30 flow-through times. Monitor convergence of the mean velocity profile to determine when statistics are stationary.
Yes, and this is recommended. Run RANS first to get a converged mean flow, then map it to the LES mesh with mapFields. Add turbulent fluctuations at the inlet using turbulentDFSEMInlet. The RANS initial condition significantly reduces the LES transient time.
Upload your LES case and CFDpilot checks your SGS model, Courant number, fvSchemes, and mesh quality against LES requirements.
Review my LES →