SpectraSim Documentation
Parameter · 08 Mesh

Target y+

mesh.target_y_plus Step 08 · Mesh

The dimensionless distance from the wall to the centre of the first cell that the prism-layer plan aims for. The program turns it into a first-layer thickness y1y_1 before meshing, from a friction estimate at the fastest port.

Last updated

Theory

Near a wall the velocity of a turbulent flow follows a universal profile once the distance is scaled with the viscous length ν/uτ\nu/u_\tau. The scaled distance y+y^+ says where the first cell centre sits: in the viscous sublayer (y+≲5y^+ \lesssim 5), the buffer layer (5<y+<305 < y^+ < 30) or the logarithmic region (y+>30y^+ > 30).

The flow is not solved yet when the mesh is built, so the friction velocity uτu_\tau is estimated from a smooth-pipe skin-friction correlation, equation (2), at the bulk velocity UU of the fastest port and the equivalent circular diameter DD of that port. The flow through the outlets is shared by area, because the split is only known after the solve. Equation (3) then gives the first-layer thickness whose cell centre lies at the target y+y^+.

With curvature sizing and wall functions, y1y_1 is used as a fraction of the finest wall cell hwh_w, limited to 0.05 hw≤y1≤0.3 hw0.05\,h_w \le y_1 \le 0.3\,h_w; the number of layers on auto is reduced (never below 3) until the whole stack, equation (4), fits in 0.8 hw0.8\,h_w. The plan is written to logs/layer_plan.log. The y+ estimate on the Mesh step and the y+ the solver reports after the run both quote the cell centre, so the three numbers can be compared directly.

Equations

y+=(y1/2) uτν,uτ=UCf2y^+ = \frac{(y_1/2)\,u_\tau}{\nu}, \qquad u_\tau = U\sqrt{\frac{C_f}{2}}
(1)
Cf=0.079 Re−1/4  (Re<105),Cf=0.046 Re−1/5  (Re≥105),Re=UDν,D=4A/πC_f = 0.079\,Re^{-1/4}\ \ (Re < 10^5), \qquad C_f = 0.046\,Re^{-1/5}\ \ (Re \ge 10^5), \qquad Re = \frac{U D}{\nu}, \qquad D = \sqrt{4A/\pi}
(2)
wheremeaningunit
y+y^+Distance of the first cell centre from the wall, in wall units-
y1y_1First-layer (first-cell) thicknessm
uτu_\tauFriction velocitym/s
ν\nuKinematic viscosity of the gasm²/s
CfC_fFanning skin-friction coefficient of a smooth pipe-
UUBulk velocity of the fastest port, Q/AQ/Am/s
DDEquivalent circular diameter of that portm
AAArea of the portm²
y1=2 y+ νuτy_1 = \frac{2\,y^+\,\nu}{u_\tau}
(3)
δ=y1 rN−1r−1≤0.8 hw\delta = y_1\,\frac{r^{N} - 1}{r - 1} \le 0.8\,h_w
(4)
wheremeaningunit
δ\deltaThickness of the whole prism-layer stackm
rrExpansion ratio between neighbouring layers-
NNNumber of layers-
hwh_wSize of the finest wall cellm

Default and rule

Default
30 (wall function), 1 (low-Re)Computed by the program
Rule

On auto the target follows the wall treatment: y+=30y^+ = 30 with the wall function, which puts the first cell centre at the start of the logarithmic region, past the buffer layer; y+=1y^+ = 1 with the low-Re treatment, which resolves the viscous sublayer. A typed value is kept as typed and gets a warning when it does not suit the wall treatment.

Source

The wall function is Spalding's single law of the wall (Spalding, 1961), valid from the sublayer to the logarithmic region. The target of 30 is the program's default: it places the first cell centre with a resolution margin past the buffer layer. The skin-friction correlations of equation (2) are the smooth-pipe Blasius form and its high-Reynolds-number counterpart.

Valid range y+ ≤ 300 (wall function), ≤ 5 (low-Re)

Continuous wall function

The wall function is valid for any y+y^+ (Spalding, 1961). A first cell in the buffer layer does not stop the run; the report marks it as advisory, because the wall shear there is the least accurate.

Upper limit

After the run, quality gate 2 fails when the average wall y+y^+ exceeds 300 (wall function) or 5 (low-Re): such a first cell is too coarse for any wall treatment.

Estimate before the solve

uτu_\tau comes from a smooth-pipe correlation at the bulk velocity. Separated, swirling or jet flow inside the muffler moves the achieved y+y^+ away from the target; compare it with the solved value on the Results step.

References 1

  1. Spalding, D. B. (1961). A single formula for the law of the wall. Journal of Applied Mechanics, 28(3), 455-458. DOI 10.1115/1.3641728