A yplus calculator finds the height of the first mesh cell next to a wall in a CFD simulation. Enter the flow speed, the boundary layer length, the density and the viscosity of the fluid, and the y+ that you want. The tool gives the Reynolds number, the skin friction, the friction velocity and the wall distance.
How to use the yplus calculator
- Choose a skin friction correlation.
- Enter the speed, length, density and viscosity in SI units.
- Enter the target y+.
- Press Calculate.
What y+ is
Wikipedia describes the wall coordinate y+ as the distance y to the wall, made dimensionless with the friction velocity and the kinematic viscosity [1]. With the dynamic viscosity μ it is written y+ = y ρ u* ÷ μ, where ρ is the density and u* the friction velocity. It tells you where a point lies in the boundary layer, in units that suit the physics of the wall.
Why it matters in CFD
In a simulation of a turbulent flow, the size of the first cell next to a wall decides whether the wall can be resolved or has to be modelled with a wall function. Wikipedia places the viscous sublayer below 5 wall units, and the buffer layer between 5 and 30 wall units [1]. The tool gives no target y+ range for each turbulence model, so it asks you to enter your own target.
The calculation steps
The tool works in four steps. First the Reynolds number: Re = ρ U L ÷ μ. Then a skin friction coefficient Cf from a correlation. Then the wall shear stress τw = Cf × ½ ρ U², since the skin friction coefficient is the wall shear stress made dimensionless by the dynamic pressure [2], and the friction velocity u* = √(τw ÷ ρ) [1]. Finally the wall distance y = y+ μ ÷ (ρ u*). The tool does these in order and shows each intermediate value so that you can check them.
The correlations
The tool offers five approximations for Cf. Prandtl (1927): 0.074 Re^−0.2. Granville (1977): 0.0776 (log10 Re − 1.88)^−2 + 60 ÷ Re. Schlichting: (2 log10 Re − 0.65)^−2.3. Kempf–Karman (1951): 0.055 Re^−0.182. Schultz-Grunov (1940): 0.427 (log10 Re − 0.407)^−2.64. Schlichting is the default. We did not check these against the original papers, and the tool does not say which one suits which flow. Wikipedia gives a related one-seventh-power law, Cf = 0.0576 Re^−1/5, as a reasonable approximation for low-Reynolds-number turbulent boundary layers [2].
A worked example
Take air at 10 metres per second over a plate 1 metre long, with a density of 1.205 and a viscosity of 1.805 × 10⁻⁵, and a y+ of 1. The Reynolds number is 667,590, the Schlichting skin friction coefficient is 0.004026, the wall shear stress is 0.2426 pascals, the friction velocity is 0.4487 metres per second, and the first cell height is about 0.033 millimetres. The calculator gives 0.03339 millimetres, because a hand calculation with rounded intermediate values is slightly different.
Limits of the correlations
The tool assumes that the correlations hold for Reynolds numbers below 10⁹, and not where the flow is disturbed by an oblique shock wave. That limit is our own working assumption. When your Reynolds number is that high or higher, the calculator adds a note. The correlations are for a boundary layer that grows along a flat plate, so for a curved body, a pipe or a flow with separation, treat the result as a starting point and refine the mesh after a first run.
Dimensions and units
All the boxes use SI units: metres per second, metres, kilograms per cubic metre and pascal-seconds. The dynamic viscosity of air is about 0.00001805 pascal-seconds in the page's example, so type it with all of its zeros. The first cell height is given in millimetres and in micrometres. If you have the kinematic viscosity ν, multiply it by the density to get μ.
Choosing the target y+
The target depends on the turbulence model and on whether you want to resolve the viscous sublayer or use wall functions. Wikipedia puts the viscous sublayer below 5 wall units and the buffer layer from 5 to 30 [1], which helps you see which part of the layer your first cell falls in. For the model that you use, read its manual for a recommended range.
A note on terms
Some descriptions call y+ a local Reynolds number. Strictly it is a dimensionless wall distance built from the friction velocity [1], and the formula above follows that definition. This tool does not model the growth of the layer over the length of the body.
Using the calculator
Fill in the flow data for your case, choose a correlation, and enter the y+ that you want. Read the first cell height, then build the mesh with that height for the first layer and a growth ratio that suits your solver. After a run, check the actual y+ on the wall in your results and adjust the height if it is off. Try two correlations to see how much the answer depends on the choice.
Common mistakes
- Entering the kinematic viscosity as the dynamic viscosity. Multiply by the density first.
- Using a length that is not the boundary layer length. L is the distance along the wall.
- Using non-SI units. All boxes are SI.
- Taking the result as final. Check y+ after the simulation.
What next
Use this often? Add Yplus to your Home screen.
Frequently asked questions
What is a yplus calculator?
A tool that finds the wall distance of the first mesh cell for a target y+ in a CFD simulation.
What is y+?
The distance from the wall made dimensionless with the friction velocity and the kinematic viscosity.
Which skin friction correlation should I use?
The tool does not say which suits which flow. Schlichting is its default.
Where does the viscous sublayer end?
Wikipedia places it below 5 wall units.
When do the correlations not apply?
The tool assumes they hold for Reynolds numbers below 10⁹ and not near an oblique shock.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.