(vc_buoyant_channel)= # Buoyant Vertical Channel (Laminar Natural Convection) ```{admonition} Status: VALIDATED (matches the analytical solution; error converges with resolution) --- class: tip --- Run on GPU (RTX 3060, single precision) at two gap resolutions. The simulated vertical-velocity profile reproduces the exact natural-convection cubic - peak location exact, physical sign (hot side rises), zero net flux, linear scalar - and the discretization error **decreases with resolution** (shape rel-L2 3.75% -> 2.46%, peak error 3.14% -> 2.07% from N=64 to N=96, ~1st order, set by the halfway-bounce-back walls), certifying the Boussinesq coupling. This is the single-block, feature-alone analytical rung for the stratified-ABL feature (epic #1034); it isolates the Boussinesq buoyancy body force against an exact closed-form solution. All quantities are in **lattice units**. ``` ## Why this case matters This is the **feature-alone foundation** of the stratified-ABL validation ladder. Where the sibling cases exercise buoyancy in composition (case 07's neutral-limit regression across a refinement interface; cases 05/06's turbulent stratified benchmarks with the Monin-Obukhov wall model), this case strips everything else away and asks the single most basic question: **is the Boussinesq body force $F = -\rho_0\,\beta\,(\phi - \phi_\mathrm{ref})\,g$ applied correctly by the Guo source route?** There is no LES turbulence effect, no refinement, no IBM, no wall model - buoyancy is the only driver, and the answer is checked against an exact analytical solution with no fitting and no external data. ## Physical description A fluid gap of width $L$ between two vertical walls held at fixed scalar ("temperature") values: hot ($\phi = 1$) at low $x$, cold ($\phi = 0$) at high $x$. The channel is infinite in the vertical ($z$) direction, modelled as periodic, so the flow is fully developed. The buoyancy force drives an upward current near the hot wall and a downward current near the cold wall, with zero net vertical flux. Axis convention (Fortran, $x$ fastest): $x$ is the wall-normal gap (walls, non-periodic), $y$ is a thin periodic spanwise direction, $z$ is the vertical (gravity) direction and is periodic. The $x$-gap walls are the faces $W$ (low $x$) and $E$ (high $x$). ## Exact analytical solution (the reference) For this fully developed configuration the steady vertical velocity $w = u_z$ is an exact cubic in the wall-normal coordinate $\xi = x/L \in [0, 1]$, and the scalar profile is exactly linear: ```{math} w(\xi) = \frac{A}{12}\left(2\xi^3 - 3\xi^2 + \xi\right), \qquad b(\xi) = b_0\,(1 - \xi), \qquad A = \frac{\beta\,g_z\,b_0\,L^2}{\nu}, ``` with $b_0 = \phi_\mathrm{hot} - \phi_\mathrm{cold}$. The profile has zeros at $\xi = 0,\ 1/2,\ 1$; is antisymmetric about $\xi = 1/2$; peaks at $\xi = 0.211325$ and $\xi = 0.788675$ with $|w|_\mathrm{max} = |A|/(72\sqrt{3}) = 0.00801875\,|A|$; and has zero net flux ($\int_0^1 w\,\mathrm{d}\xi = 0$). This is the classic differentially heated vertical-slot / free-convection-between-plates result (Batchelor 1954; Bird, Stewart & Lightfoot, *Transport Phenomena*). There is **no external reference dataset** - the closed form is the reference (see `reference/README.md`). The zero net flux is not incidental: $\phi_\mathrm{ref}$ is deliberately set to the gap-mean wall value ($0.5$), so the domain-integrated vertical buoyancy force is exactly zero in the periodic channel, giving a genuinely steady, zero-net-flux profile equal to the cubic. ## Numerical acceptance criteria The exact solution is a continuum result; a finite-resolution LBM with halfway-bounce-back and regularized-Dirichlet walls carries a near-wall discretization error that is **first order** in the gap resolution. The case therefore validates on the shape and on **convergence**, run at $N = 64$ and $N = 96$ nodes across the gap. Using the late-window mean fields ($y$-$z$-averaged into the wall-normal profiles, $\xi_i = (i+0.5)/N$): | # | Metric | Tolerance / expectation | | --- | ----------------------------------------------------------------------------------- | ---------------------------------- | | 1 | Profile relative-L2 of $w_\mathrm{sim}(\xi)$ vs the cubic | $< 4\%$ at $N=64$, decreasing | | 2 | Peak $\lvert w\rvert$ vs $\lvert A\rvert/(72\sqrt{3})$ | within $4\%$ at $N=64$, decreasing | | 3 | Peak locations vs $\xi = 0.2113,\ 0.7887$ | within $\pm1$ node (exact) | | 4 | Zero net flux $\lvert\sum w_\mathrm{sim}\rvert / (\lvert w\rvert_\mathrm{peak}\,N)$ | $< 1\%$ | | 5 | Scalar linearity: rel-L2 of $b_\mathrm{sim}(\xi)$ vs $b_0(1-\xi)$ | $< 1\%$ (input check) | | 6 | Convergence: metrics 1-2 must **decrease** from $N=64$ to $N=96$ | monotone (~1st order) | Criterion 6 is the decisive one: a single-grid match could be coincidental, whereas a monotone decrease toward the analytical solution certifies the coupling is correct and the residual is discretization. Criterion 5 is an input check: if the transported scalar is not linear across the gap, the scalar advection-diffusion or the Dirichlet walls are wrong and the velocity comparison is meaningless. ## Simulation setup All values are in lattice units; single refinement level (level 0 only). | Parameter | Value (lattice) | | ----------------------------- | ------------------------------------------------------------------------------------------------- | | Domain $(x, y, z)$ | $64 \times 8 \times 64$, `block_size` 8 | | Periodicity | $y$, $z$ periodic; $x$ walls ($W$ / $E$) | | Wall BC ($x$) | RegularizedHWBB (no-slip) at $W$ and $E$ | | Relaxation time $\tau$ | 0.8 ($\nu = 0.1$) | | Fluid velocity set / operator | D3Q27 / RRBGK | | LES | OFF (laminar; $\mathrm{Gr} = 262$) | | Scalar `temperature` | D3Q7 / RRBGK, $D = 0.1$, initial $\phi = (64 - x)/64$ | | Scalar walls | ScalarRegularizedDirichlet: $W$ $\phi = 1$ (hot), $E$ $\phi = 0$ (cold) | | Buoyancy | $\beta = 0.01$, $g_z = -10^{-3}$, $\rho_0 = 1$, $\phi_\mathrm{ref} = 0.5$ | | Derived amplitude | $A = -0.4096$, $\lvert w\rvert_\mathrm{max} = 3.285\times10^{-3}$ (Ma $\approx 5.7\times10^{-3}$) | | Steps / stats window | 200000 / $[150000, 200000]$ | | Convergence sim | `buoyant_channel_hires`: identical physics at $96 \times 8 \times 96$ ($N=96$, $A = -0.9216$) | The diffusive e-fold is $L^2/(\pi^2\nu) \approx 4150$ steps; 200000 steps is $\sim$15-20 e-folds after which the transient has decayed to the steady cubic. The case runs two simulations - `buoyant_channel` ($N=64$) and `buoyant_channel_hires` ($N=96$) - so the analytical error can be shown to converge with resolution. (results)= ## Results The comparison notebook (`08_buoyant_channel.ipynb`) is executed against the GPU run and presents results as PLOTS, never a bare table: (1) $w_\mathrm{sim}(\xi)$ overlaid on the exact cubic at each resolution, (2) $b_\mathrm{sim}(\xi)$ on the linear profile, and (3) a grouped bar chart of the acceptance metrics at $N=64$ vs $N=96$ showing the error converging. The analytical curve is labelled with its source ("analytical (natural-convection cubic; Batchelor 1954 / BSL Transport Phenomena)"). Measured (late-window means): | Metric | $N=64$ | $N=96$ | | --------------------------- | --------------- | --------- | | Shape rel-L2 | $3.75\%$ | $2.46\%$ | | Peak $\lvert w\rvert$ error | $3.14\%$ | $2.07\%$ | | Peak location $\xi$ | $0.789$ (exact) | exact | | Scalar linearity rel-L2 | $0.79\%$ | $0.53\%$ | | Zero net flux | $0.001\%$ | $0.005\%$ | | Sign (hot side rises) | yes | yes | All qualitative marks are met at both resolutions, and the shape and peak errors decrease monotonically from $N=64$ to $N=96$ (ratio $\approx 0.66 \approx 64/96$, consistent with the ~1st-order wall BCs), converging toward the analytical solution. The Boussinesq buoyancy coupling is validated. (Table shown beneath its plots in the notebook, per the plots-not-tables convention.) ```{toctree} --- hidden: --- 08_buoyant_channel.ipynb ```