Last updated: 2026-11-04 8 min read

A pressure difference drives fully developed laminar flow through a square duct. Because velocity does not vary along the duct, advection vanishes and the momentum equation becomes a cross-sectional Poisson equation with a series solution. This case directly checks Boreas's no-slip conditions on four walls, diffusion solver, pressure-driven openings, and spatial convergence order. Results are from Boreas v0.10.0 on CPU; the two finest-mesh decks were also run on GPU.

Model and boundary conditions

square-duct-laminar-flow model and boundary conditions

A pressure difference between the duct ends drives flow; all four sidewalls are no-slip. Velocity arrows show the resulting flow direction. Schematic; not to scale.

Analytical solution

For a square of side a, coordinates y′ and z′ measured from its center (|y′|, |z′| ≤ a/2), and pressure gradient G = −dp/dx, the fully developed velocity is (Shah and London, 1978):

u(y′,z′)=4a2Gμπ3∑i=1,3,5,…(−1)(i−1)/2i3[1−cosh⁡(iπz′/a)cosh⁡(iπ/2)]cos⁡ ⁣(iπy′a)u(y',z') = \frac{4a^2 G}{\mu\pi^3} \sum_{i=1,3,5,\dots} \frac{(-1)^{(i-1)/2}}{i^3} \left[1 - \frac{\cosh(i\pi z'/a)}{\cosh(i\pi/2)}\right] \cos\!\left(\frac{i\pi y'}{a}\right) umean=a2G12μ[1−192π5∑i=1,3,5,…tanh⁡(iπ/2)i5]u_{mean} = \frac{a^2 G}{12\mu} \left[1 - \frac{192}{\pi^5} \sum_{i=1,3,5,\dots} \frac{\tanh(i\pi/2)}{i^5}\right]

The series gives fRe = 2a²G/(μu_mean) = 56.908 and u_max/u_mean = 2.0963, consistent with the published values 56.91 and 2.096. Boreas cell values are compared with the series evaluated at cell centers.

Simulation setup

ItemBoreas setting
DuctSquare cross-section a = 0.05 m; axial length of four cells, since the fully developed solution is independent of the axial coordinate
BoundariesFour no-slip walls; pressure outlets at both ends, with gauge pressure ΔP at the inlet and zero at the outlet
Fluidν = 1e-3 m²/s, ρ = 1.2 kg/m³, G = 0.4097 Pa/m (set for u_mean = 0.03 m/s; Re_Dh = 1.5)
MeshUniform h = a/N, N = 8, 16, 32, 64 (up to 16,384 cells)
Timedt = 0.01 s, 10 s total (four viscous times a²/ν = 2.5 s)
AdvectionSemi-Lagrangian and upwind; both coincide because advection is zero
ComparisonRMS and maximum cell-center differences at the mid-duct cross-section, normalized by u_max; mean velocity and fRe from outlet flow

Velocity profile

Square-duct laminar velocity profile compared with the series solution

Markers show semi-Lagrangian velocities in the cell row nearest the duct axis; the solid line is the series solution. Coarse-mesh rows lie half a cell away from the axis (z/a in the legend). Errors are calculated against the series at each actual cell center.

Mesh convergence

Square-duct profile and mean-velocity errors under mesh refinement

Top: cross-sectional RMS profile error normalized by u_max. Bottom: mean-velocity error. Dashed guides have second-order slope. Semi-Lagrangian and upwind overlap.

N8163264
Mean velocity error [%]+5.878+1.496+0.376+0.094
fRe53.7556.0756.7056.86
Profile RMS error/u_max1.94e-25.00e-31.26e-33.16e-4
Maximum profile error/u_max2.34e-26.26e-31.61e-34.09e-4

All errors fall by about a factor of four when mesh spacing is halved (ratios 3.9–4.0), consistent with second-order centered diffusion and the half-cell Dirichlet wall condition. On coarse meshes, mean velocity is too high and fRe too low because a one-cell linear approximation underestimates wall shear. This error vanishes at the same order under refinement.

Transient history and CPU–GPU comparison

Mean velocity history on the N = 64 square-duct mesh

Mean velocity relative to the series solution for N = 64. Steady state is reached in about 2 s; semi-Lagrangian and upwind overlap.

Both N = 64 decks were also run on GPU. GPU mean-velocity error is +0.089% (CPU +0.094%), and profile RMS error is 2.96e-4 (CPU 3.16e-4). The differences are on the scale of the fp32 diffusion-solver tolerance.

Quantitative results

MetricValue
Mean velocity error, N = 64 [%]+0.094
fRe, N = 64 (series: 56.908)56.86
Profile RMS error/u_max, N = 643.16e-4
Mesh convergence order, N = 8–642
GPU mean velocity error, N = 64 [%]+0.089

Because advection is zero, this case does not assess advection-scheme accuracy. See the flat-plate boundary-layer and lid-driven-cavity validations for cases with advection.