SpectraSim Documentation
Parameter · 05 Boundary Conditions

Roughness constant

wall.roughness.Cs Step 05 · Boundary Conditions

The roughness constant of the rough-wall function: it sets how strongly a given roughness height shifts the log law. 0.5 corresponds to uniform sand-grain roughness. Used only when the roughness height is positive.

Last updated

Theory

OpenFOAM's nutkRoughWallFunction (OpenFOAM user guide, 2026), written by the program when Wall roughness height is above 0, uses CsC_s in its roughness function. In the fully rough regime the downward shift of the logarithmic velocity profile is equation (1): a larger CsC_s makes the same ksk_s act as a rougher wall. In the transitional regime (2.25<ks+<902.25 < k_s^+ < 90) the function blends from smooth to this form. With ks=0k_s = 0 the wall is smooth and CsC_s has no effect.

Equations

ΔB=1κln⁡(1+Csks+)(ks+≥90),ks+=uτksν\Delta B = \frac{1}{\kappa}\ln\left(1 + C_s k_s^+\right) \quad (k_s^+ \ge 90), \qquad k_s^+ = \frac{u_\tau k_s}{\nu}
(1)
wheremeaningunit
ΔB\Delta BShift of the log law-
κ\kappavon Kármán constant, 0.41-
CsC_sRoughness constant (this setting)-
ks+k_s^+Roughness Reynolds number-
uτu_\tauFriction velocitym/s
ν\nuKinematic viscositym²/s

Default and rule

Default
0.5
Rule

0.5.

Source

OpenFOAM's rough-wall function and its default (OpenFOAM user guide, 2026); the regime limits 2.25 and 90 and the meaning of 0.5 as uniform sand grains follow the usual rough-wall formulation.

Valid range 0.5-1 (uniform sand grains: 0.5); used only when k_s > 0

Values

0.5 for uniform sand grains; values up to about 1 are used for non-uniform roughness.

Only with roughness

No effect while the roughness height is 0.

References 1

  1. OpenCFD Ltd. (2026). OpenFOAM user guide. openfoam.com. Web page