SpectraSim Documentation
Parameter · 05 Boundary Conditions

Wall roughness height

wall.roughness.ks Unit: m Step 05 · Boundary Conditions

The equivalent sand-grain roughness height of the wall. 0 is a hydraulically smooth wall; a positive value switches the wall's turbulent-viscosity condition to the rough-wall function, which lowers the log law and raises the wall friction.

Last updated

Theory

With the wall-function treatment, a smooth wall uses Spalding's law of the wall (nutUSpaldingWallFunction), continuous from the viscous sublayer to the logarithmic region (Spalding, 1961). When ks>0k_s > 0 the program writes OpenFOAM's nutkRoughWallFunction instead (OpenFOAM user guide, 2026), with the same log-law constants κ=0.41\kappa = 0.41, E=eκB=8.43E = e^{\kappa B} = 8.43 (B=5.2B = 5.2) and with ksk_s and CsC_s (Roughness constant). That condition divides EE by a roughness function of the roughness Reynolds number ks+k_s^+, equation (1), which shifts the logarithmic velocity profile down by ΔB\Delta B, equation (2): the wall carries more shear for the same near-wall velocity. Below ks+≈2.25k_s^+ \approx 2.25 the wall behaves as smooth; above about 90 it is fully rough, where ΔB=1κln⁡(1+Csks+)\Delta B = \frac{1}{\kappa}\ln(1 + C_s k_s^+).

The rough-wall function is a log-law wall function, not Spalding's blended law: it assumes the first cell lies in the logarithmic region (y+≳30y^+ \gtrsim 30), and a wall with roughness should be meshed accordingly (Target y+). With the low-Re treatment (Wall treatment) the roughness is not applied (nutLowReWallFunction).

Roughness applies to outer walls and to both sides of internal walls (baffles). It does not affect perforated walls.

Equations

ks+=uτksν,uτ=Cμ1/4kk_s^+ = \frac{u_\tau k_s}{\nu}, \qquad u_\tau = C_\mu^{1/4}\sqrt{k}
(1)
uuτ=1κln⁡ ⁣(E y+fr(ks+,Cs))=1κln⁡y++B−ΔB,ΔB=1κln⁡fr\frac{u}{u_\tau} = \frac{1}{\kappa}\ln\!\left(\frac{E\,y^+}{f_r(k_s^+, C_s)}\right) = \frac{1}{\kappa}\ln y^+ + B - \Delta B, \qquad \Delta B = \frac{1}{\kappa}\ln f_r
(2)
wheremeaningunit
ksk_sEquivalent sand-grain roughness height (this setting)m
ks+k_s^+Roughness Reynolds number-
uτu_\tauFriction velocity from the wall-cell kkm/s
ν\nuKinematic viscositym²/s
κ,E,B\kappa, E, BLog-law constants 0.41, 8.43, 5.2-
frf_rRoughness function of OpenFOAM's rough-wall condition-
ΔB\Delta BDownward shift of the log law-

Default and rule

Default
0 m (smooth wall)
Rule

0 m (smooth).

Source

The log-law constants (κ\kappa 0.41, BB 5.2) are the program's choice. The rough-wall condition and its roughness function are OpenFOAM's nutkRoughWallFunction (OpenFOAM user guide, 2026); the exact transitional form of frf_r is that of the OpenFOAM implementation and is described here only qualitatively.

Valid range ≥ 0; ignored with the low-Re wall treatment

Typical values

Drawn steel tube about 0.00002-0.00005 m, commercial steel about 0.00005 m, rusted or welded sheet up to about 0.0005 m (indicative handbook values).

Not Spalding

A positive roughness replaces the continuous Spalding wall function by a log-law wall function; a first cell in the viscous or buffer layer then gives a wrong wall shear.

Low-Re treatment

Ignored when the wall is resolved to y+≈1y^+ \approx 1.

References 2

  1. OpenCFD Ltd. (2026). OpenFOAM user guide. openfoam.com. Web page
  2. 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