Theory
After snapping, the mesher pushes the mesh away from the walls and fills the gap with layers of prism cells whose thickness grows by the Expansion ratio from the wall outwards. All thicknesses are given relative to the size of the cell just outside the layers (relativeSizes true) (OpenFOAM user guide, 2026), so a wall on a coarser refinement level gets a proportionally thicker stack. Layers are grown on every wall, on both sides of every perforated wall (always: without them the wall layers leave a leak around the plate's rim) and on both sides of every internal wall when "layers on internal walls" is on (default).
The program describes the stack in one of two ways:
- Curvature sizing with the wall function: by its FIRST layer. The first layer comes from the target (see Target y+) as a fraction of the finest wall cell , limited to 0.05-0.3; the stack is equation (1). On auto, starts at 6 and is reduced (never below 3) until the stack is at most 0.8 wall cells. A typed is kept and gets a warning when it does not fit. Layers thinner than 0.02 of the local cell are not added (
minThickness). - Uniform sizing, or low-Re: by its LAST layer, = 0.5 (wall function) or 0.1 (low-Re) of the wall cell; layer is , equation (2). Here is not reduced; layers thinner than 0.1 of the local cell are not added.
Where a layer cannot be grown without breaking the mesh-quality limits, the mesher removes it locally and never puts it back. The layer stage works against relaxed limits from its first iteration (non-orthogonality 70°, no tetrahedral-decomposition test), equal to what quality gate 1 accepts, so layers are not removed for breaking a limit the gate does not enforce.
After meshing, the Mesh step reports the share of wall faces with at least one layer (gate 1), the layers built against those requested, the thickness achieved and the share of each port's rim that has layers (advisory rows).
Equations
| where | meaning | unit |
|---|---|---|
| Thickness of the whole stack | m | |
| First (wall) layer thickness, | m | |
| Expansion ratio | - | |
| Number of layers | - | |
| Finest wall cell, | m |
| where | meaning | unit |
|---|---|---|
| Thickness of layer (1 = at the wall) | m | |
| Thickness of the outermost layer | m |
Default and rule
- Default
- auto: 6 (curvature, wall function, reduced to fit), 3 (uniform, wall function), 12 (low-Re)Computed by the programMeasured
- Rule
Auto: 6 with curvature sizing and the wall function, then reduced to fit equation (1); 3 with uniform sizing and the wall function (stack 1.26 wall cells with ); 12 with low-Re (stack 0.62 wall cells with , first layer 0.022 of the wall cell). Before an inlet flow is set, the curvature plan uses a fixed first layer of 0.075 wall cells (6 layers, : a stack of 0.74).
- Source
Six layers is the layer count of a reference mesh of case V1 (a 2.0 m multi-chamber muffler with a perforated pipe and three absorptive packings) made with another mesher.
The y⁺-driven plan was validated on three models (serial meshing), against a plan with a fixed first-layer fraction:
- V3 (a two-inlet single-chamber muffler like V2, with smaller main ports): from 3.81 of 6 layers built (64 %) to 2.74 of 3 (91 %); rim layer coverage from 96 / 76 / 70 % to 96 / 90 / 100 %.
- V4 (a 0.3 m expansion chamber with an extended inlet tube): from 4.11 of 6 (68 %) to 2.82 of 3 (94 %).
- V1 with 6 layers typed: from 3.70 of 6 (62 %) to 4.92 of 6 (82 %); maximum non-orthogonality from 75.50° to 69.97°.
On both smaller models the first layer reached the 0.3 limit and auto fell from 6 to 3 layers, so part of the improvement is that fewer, thicker layers were requested. The 0.8 stack limit and the 0.05-0.3 first-layer range are the program's own choices, not measured optima. 12 layers for low-Re is the low end of the 12-15 layers commonly recommended for a resolved sublayer; no reference is cited for this guidance.
Valid range whole number; auto never below 3
Values
A whole number. Auto never goes below 3; a typed number is used as typed.
Gate 1
Fails when fewer than 80 % of the wall faces keep at least one layer. Advisory rows warn below 80 % of the requested layers built, 70 % of the intended thickness and 90 % of a port rim covered.
Thick stacks
A stack thicker than about one wall cell is often removed in corners and at port rims. If layers are lost, the first thing to try is one layer fewer (the Mesh step proposes it after a failed coverage check).