# Y+ Calculator

This y+ calculator will assist you in determining the **necessary wall distance** for your CFD analysis. The fluid flow near the wall is a complicated phenomenon. Several models and **approximations** are suggested to estimate the fluid flow parameters in the **vicinity of a surface or wall**. A CFD package utilizes such approximations and solutions to give us an overall impression of fluid flow around an object or along a surface.

Parameters like **skin friction coefficient, y ^{+} wall thickness, and shear stress** are crucial to any fluid flow computation. Establishing a reasonably small mesh sizing strategy is necessary, especially infinite element-based tools like ANSYS FLUENT, OpenFOAM, Simscale, or XFlow. The mesh should be small enough in the proximity of walls for the resolution of the boundary layer phenomenon but coarse enough to be solved on the available computational resources.

A structured meshing is used to maintain this delicate balance between the boundary layer resolution and computation time. It is refined near the crucial areas like walls and surfaces, but coarse as we move away from it. But despite localized mesh strategy, often the computational time is very high. The y^{+} wall thickness method is often used in the case of turbulent flows to solve the near-wall flow problems. This method does not require a very fine mesh and is more **effective in turbulent fluid** flows that are **not fully developed**.

Read on to understand how this y+ wall distance is estimated.

## What is boundary layer?

Before we get into the modeling of the boundary layer, let's understand what the boundary layer is? Consider a case of fluid flowing over an object, say, a flat plate. The edges of the plate in contact with the fluid are known as **boundaries**. When a fluid, let's say, air, is flowing over the plate, certain **particles will stick to the boundary**. In that case, the **velocity of those particles in the vicinity of the boundary would be the same as the boundary**. In some cases, even zero, if the boundary is at rest.

This very narrow region of fluid particles near the boundary is called the boundary layer. The boundary layer consists primarily of **3 subregions or layers**:

- Laminar boundary layer
- Transition region
- Turbulent boundary layer

As one moves **away from the boundary**, we can find the velocity of the particle will be governed by the gradient, $\frac{du}{dy}$ which is ultimately **increasing up to the fluid velocity** or otherwise known as **free stream velocity**. This velocity gradient causes shear resistance and forms a very thin layer of fluid near the boundary. The **thickness of the boundary layer** begins from zero at an edge and **increases** as one moves away from it.

The region where the thickness is very small is known as the **laminar boundary layer**. It is only considered **up to the point where the flow is laminar**. The type of flow can be identified using Reynold's number. Past this point of the laminar boundary layer, the retarded fluid flow increases the thickness of the boundary layer to such a point that it becomes **unstable** and leads to the irregular motion of fluid particles. This layer is known as the **turbulent boundary layer**.

The zone between the two layers where the **transition occurs** is known as the **transition zone**. The y^{+} wall thickness or wall functions approach or modeling strategy is primarily used to find the approximate solution to the behavior of fluid particles in the near-wall region of the turbulent boundary layer by computing the shear stress along the wall.

## Y+ wall functions approach

The wall function approach is introduced because one of the most common turbulence models, $k- \epsilon$, is only valid when the turbulent flow is fully developed. The wall functions are introduced to solve for the fluid flow in the near-wall or boundary region. They are used to **connect the fluid flow in the near-wall region with fully developed turbulent flow**. This method also helps **reduce elements in the wall region**, assisting in reducing computation time.

The boundary layer is usually **meshed with prism shape cells** to capture the boundary layer and its viscous sublayer effectively. In CFD solvers, this method is often known as **inflation layer meshing**. An example of inflation layer meshing is shown in the figure below.

The viscous sublayer is often **so thin** that it is not possible to resolve it using mesh. Therefore, the y^{+} wall function method is used. Now, what is y^{+}? — The y^{+} parameter is known as the **dimensionless wall thickness parameter**, which is used to implement the wall functions approach. The formula to estimate y^{+} is:

where $y$, $u_*$, $\rho$, and $\mu$ are the **wall distance, friction velocity, density of the fluid, and dynamic viscosity**, respectively. The friction velocity can be estimated using the wall shear stress, τ_{w}, using the equation:

The wall shear stress, $\tau_w$, is calculated using the **skin friction coefficient**, $C_f$, and free stream velocity, $U_f$.

The skin friction coefficient is a crucial parameter to obtaining the wall distance especially because there are **several approximation solutions** coined by different researchers since Prandtl. The approximations available in the calculator are:

- Prandtl (1927) — $0.074 \ Re_{x}^{-0.2}$
- Granville (1977) — $0.0776 \ [{\log_{10} Re_{x}} - 1.88]^{-2} + 60Re_{x}^{-1}$
- Schlichting — $2\ [{\log_{10} Re_{x}} - 0.65]^{-2.3}$
- Kempf-Karman (1951) — $0.055 \ Re_{x}^{-0.182}$
- Schultz-Grunov (1940) — $0.427 \ [{\log_{10} Re_{x}} - 0.407]^{-2.64}$

where $Re_x$ is the Reynold's number, is given by the formula:

where $L$ is the length of boundary of layer. Also, note that the above approximations are valid with **Reynold's number, $Re_x < 10^9$**.

## How to calculate wall distance?

To calculate wall distance:

- Enter
**freestream velocity**, U_{f}. - Insert the
**density of fluid**, ρ. - Fill in the
**dynamic viscosity**, μ. - Enter the
**length of boundary layer**, L. - Give in the
**dimensionless distance**, y^{+}. - The y+ calculator will return the
**Reynold's number**. - Select the approximation for
**skin friction coefficient**from the list. - The wall y+ calculator will determine the following parameters:
**Wall shear stress**, 𝜏_{w};**Friction velocity**, U^{*}; and**Wall distance**, y.

## Example: Using the wall y+ calculator

Estimate the wall thickness, y based on the fluid flow over a flat plate having freestream velocity, `10 m/s`

with boundary layer being `1 m`

long. Take the y^{+} value as 1 and fluid to be air.

- Enter
**freestream velocity**, $U_f$ = 10 m/s.

The density and dynamic viscosity of the air are pre-filled for you. - Enter the
**length of boundary layer**, L. - Give in the
**dimensionless distance**, y^{+}. - The
**Reynold's number**, $Re_x$ is:

- Select the approximation for
**skin friction coefficient**from the list. Let's use the default**Schlichting**approximation for this example. - The y+ calculator will determine the following parameters:

**Wall sheat stress**:

**Friction velocity**:

**Wall distance**:

## FAQ

### What is y+ wall distance?

The y^{+} wall distance is defined as the dimensionless thickness or thickness of the wall as a function of Reynold's number. It can also be written as local Reynold's number.

### How do I calculate skin friction coefficient?

To calculate skin friction using Prandtl approximation:

- Find
**Reynold's number**, Re_{x}. - Evaluate the expression
**Re**._{x}^{-0.2} **Multiply**the result by 0.074 to obtain the skin friction coefficient.

### How to calculate wall shear stress?

To obtain wall shear stress:

- Find the
**square of freestream velocity**. **Multiply**it with the density of fluid and skin friction coefficient.**Divide**the resultant by 2.

### How do I calculate y wall distance?

To calculate wall distance, y:

**Multiply**dimensionless thickness, y^{+}, by dynamic viscosity.**Divide**the product by the density of the fluid.**Divide**the result by friction velocity.