Solving the TBL equation¶
The thin boundary layer model leaves us with a second-order ordinary differential equation for the tangential velocity along the wall normal. This page works through its discretization on the wall-normal stencil and its solution by the tridiagonal matrix algorithm (TDMA), ending with the recovery of the friction velocity that the wall model feeds back to the solver.
Finite-difference stencil¶
The distance \(h_{\mathrm{wm}}\) between \(\mathrm{P_{0}}\) and \(\mathrm{P_{N}}\) is divided in \(N\) points to which the simplified TBL equation is solved through a finite difference scheme:
where \(\nu_{\mathrm{T}}=\nu+\nu_{\mathrm{e}}\)
The \(\nu\) factor in \(\nu_{\mathrm{e}}\) cancels because the derivative is taken with respect to the physical wall-normal coordinate \(x_{n}\) while \(\nu_{\mathrm{e}}\) is expressed in wall units \(x_{n}^{+}=x_{n}u^{*}/\nu\), which is why the prefactor reduces to \(\kappa u^{*}\).
The value for \(x_{n}^{+}\) in a \(i\) point is then \(x_{n}^{+}=\left(h_{\mathrm{wm}}i/N\right)\left(u^{*}/\nu\right)\).
The wall-normal grid for the thin-boundary-layer solve. The TBL equation is discretised on N points from the wall \(\mathrm{P_0}\) to the matching point \(\mathrm{P_N}\); a three-point finite-difference molecule at an interior point couples it to its neighbours, producing the tridiagonal system solved by the TDMA.¶
Equilibrium vs non-equilibrium: the pressure-gradient term
This one term decides which model you are running. Setting \(\partial p / \partial x_{t} = 0\) gives the equilibrium model, valid where the streamwise pressure gradient is small. Retaining it gives the non-equilibrium model, the one to use wherever that gradient is not negligible: separation, reattachment, and adverse-pressure-gradient regions.
The equilibrium lattice-BC solve described on this page sets \(\partial p / \partial x_{t} = 0\), so the source terms \(d_{\left(i\right)}\) vanish. The non-equilibrium model evaluates a single tangential pressure gradient per node by central-differencing the LBM density along the local tangential direction, and applies it uniformly across the interior rows. Since \(p = \rho c_{s}^{2}\),
Tridiagonal system and TDMA¶
The set of velocity equations generated can be solved with a TDMA (tridiagonal matrix algorithm) to which the velocity equation may be written as:
since \(u^{\left(0\right)}=0\), \(a_{1}=0\) and:
For \(2\leq i \leq N-1\). We consider that \(u^{\left(N\right)}=u_{t,\mathrm{P_{N}}}\) and \(c_{\left(N-1\right)}=0\), hence:
The matrix of a linear system is then written as:
For the first term, \(i=1\):
After which, the following coefficients up to \(N-1\) are calculated:
Knowing that \(u_{t}^{\left(N\right)}=u_{t,\mathrm{P_{N}}}\), the remaining velocities are calculated backwards by:
Along these lines, the friction velocity can be calculated with a second-order finite-difference scheme:
Wall-clustered grid¶
The stencil above places the \(N\) points at a uniform physical spacing \(h_{\mathrm{wm}}/N\). Because the wall model is driven by the wall-normal gradient at \(\mathrm{P_0}\), resolution is best spent near the wall. Nassu therefore allows the grid to be clustered toward the wall while keeping the tridiagonal (Thomas) solver untouched: the spacing variation is absorbed into a coordinate map, not a wider stencil.
The solve is carried out on a uniform computational coordinate \(\xi \in \left[0, 1\right]\) with constant spacing \(\Delta\xi = 1/N\), related to the physical wall-normal distance \(x_n\) by an exponential map clustered at the wall (\(\xi = 0\)):
The clustering strength \(\beta \ge 0\) is the TDMA_stretch_beta parameter (default \(\beta = 2\), which places the first node inside the viscous sublayer for a typical near-wall cell of 10-50 wall units); \(\beta \to 0\) recovers the uniform grid \(x_n = h_{\mathrm{wm}}\,\xi\) with \(J = h_{\mathrm{wm}}\), and the wall-unit position becomes \(x_{n}^{+}=x_{n}\left(\xi_i\right)\left(u^{*}/\nu\right)\) in (2).
Rather than expand the variable-coefficient operator, the TBL equation is discretised in its conservative form. Mapping \(\partial_{x_n}\!\left(\nu_{\mathrm{T}}\,\partial_{x_n} u_t\right)\) into \(\xi\) gives
A finite-volume balance on the uniform \(\xi\)-grid, with the flux coefficient \(\Gamma = \nu_{\mathrm{T}}/J\) evaluated at the cell faces \(i\pm\tfrac{1}{2}\), keeps the system tridiagonal:
The face viscosity \(\nu_{\mathrm{T}}\) in \(\Gamma_{i\pm\frac{1}{2}}\) is the van Driest value at the face wall-distance. The conservative form absorbs the \(\partial\nu_{\mathrm{T}}/\partial x_n\) term that appears explicitly in (5)-(7), so no separate eddy-viscosity-derivative coefficient is needed. The forward/backward Thomas sweeps (12)-(13) are identical; only the coefficient assembly changes. The friction velocity (14) carries the metric at the wall,
which reduces to (14) for \(\beta \to 0\) since \(\Delta\xi\,J\left(0\right) = h_{\mathrm{wm}}/N\).