Closed-domain thermodynamic-pressure rise (sealed heated box)

Note

Scaffold - awaiting GPU execution. The configuration, derivation and analysis notebook are committed; the quantitative comparison is filled in once the case is run on a GPU. The notebook is marked “results pending GPU execution” until then.

Why this case matters

The variable-density low-Mach closure Taha et al.[1] supports two thermodynamic-pressure closures, selected by models.low_mach.domain_closure:

  • open pins the thermodynamic pressure to ambient, \(\mathrm{d}P/\mathrm{d}t = 0\), valid when the domain vents to the environment through an inlet or outlet (the Steckler room fire and the plume cases).

  • closed evolves the spatially-uniform \(P(t)\) from total-mass conservation in a sealed, heated, rigid domain, \(P(t) = M r / I(t)\) with \(I(t) = \int_V (1/T)\,\mathrm{d}V\).

The closed closure was implemented and its mass conservation GPU-verified, but the rate at which the sealed box pressurises was never checked against an analytic value. This case is that check: it has a closed-form target, so it validates the closed-domain pressure evolution directly.

Physics and the analytic target

Take a sealed, rigid (constant volume \(V\)), adiabatic box of ideal gas of fixed mass \(m\), heated at a known total volumetric rate \(Q_\text{total}\) (energy per unit time).

First law for a closed system at constant volume - no boundary work since \(\mathrm{d}V = 0\), and no wall heat loss since the walls are adiabatic:

(1)\[\frac{\mathrm{d}U}{\mathrm{d}t} = Q_\text{total}, \qquad U = m\,c_v\,T \;\;\Rightarrow\;\; m\,c_v\,\frac{\mathrm{d}T}{\mathrm{d}t} = Q_\text{total}.\]

The ideal-gas equation of state at constant \(m\) and \(V\) gives

(2)\[P V = m\,r\,T \;\;\Rightarrow\;\; \frac{\mathrm{d}P}{\mathrm{d}t} = \frac{m\,r}{V}\,\frac{\mathrm{d}T}{\mathrm{d}t}.\]

Eliminating \(\mathrm{d}T/\mathrm{d}t\) between (1) and (2), and using Mayer’s relation \(r = c_p - c_v\) and \(\gamma = c_p/c_v\) so that \(r/c_v = \gamma - 1\), the mass cancels and the rise rate is

(3)\[\boxed{\;\frac{\mathrm{d}P}{\mathrm{d}t} = (\gamma - 1)\,\frac{Q_\text{total}}{V}\;}\]

This is the standard low-Mach result. Differentiating the mass constraint \(M = \int_V \rho\,\mathrm{d}V = (P/r)\int_V (1/T)\,\mathrm{d}V = (P/r)\,I(t)\) and substituting the energy balance \(\rho c_p\,\mathrm{D}T/\mathrm{D}t = Q + \nabla\!\cdot\!(\lambda\nabla T)\) yields the same expression: the conduction term integrates to the wall heat flux, which is zero for adiabatic walls, so it drops out. The result is therefore exact for a sealed rigid adiabatic box - both for uniform and for localized heating - and is asserted to a 2% tolerance to absorb discretization and weakly-compressible error.

Important

Exactness requires adiabatic energy walls (zero wall heat flux). A non-adiabatic temperature wall BC (Dirichlet, Robin or nonzero-flux Neumann) reintroduces the \(\oint \lambda\,\nabla T\cdot\mathbf{n}\,\mathrm{d}A\) term and breaks the target. This case therefore declares no models.low_mach.energy.wall_bcs, so every face keeps the adiabatic zero-gradient ghost.

Setup

A \(32^3\) sealed box (\(V = 32768\) lattice cells) of ideal gas, all six faces no-slip walls (RegularizedHWBB), is heated by a whole-box uniform volumetric source. Uniform heating keeps \(T(t)\) spatially uniform, so \(\rho = P/(rT)\) stays uniform, \(I(t) = V/T(t)\) is trivial, and there is no internal gradient, no conduction redistribution and no dilatation flow - the cleanest possible \(P(t)\) signal. Gravity is zero: with uniform density there is no buoyancy, so the box simply pressurises and the test isolates the pressure closure.

The volumetric source rate is \(Q\) (energy per unit volume per step), so \(Q_\text{total} = Q\,V\) and the target (3) reduces to the single number \(\mathrm{d}P/\mathrm{d}t = (\gamma - 1)\,Q\).

Simulation parameters (lattice units, \(\Delta x = \Delta t = 1\))

Parameter

Value

Domain

\(32 \times 32 \times 32\) (\(V = 32768\))

Boundary conditions

no-slip RegularizedHWBB on all 6 faces

Velocity set / operator

D3Q27 / HRR-BGK

LES / SGS constant

Smagorinsky / \(C_S = 0.1\)

\(\tau\) (\(\nu_0\))

\(0.6\) (\(0.0333\))

bulk_viscosity (\(\nu_b\))

\(0.16667 = 1/6\) (\(\omega_\text{bulk} = 1.0\))

EOS gas constant \(r\)

\(1.0\)

Specific heat \(c_p\)

\(3.5\) (\(c_v = c_p - r = 2.5\))

Heat-capacity ratio \(\gamma\)

\(c_p/c_v = 1.4\) (\(\gamma - 1 = 0.4\))

\(T_\text{ref}\), \(P(0) = P_0\)

\(1.0\), \(1.0\) (\(\rho_\infty = P_0/(rT_\text{ref}) = 1\))

Gravity

\([0, 0, 0]\) (no buoyancy)

domain_closure

closed

Volumetric heat rate \(Q\)

\(1.0\times10^{-5}\) (whole box)

Steps

\(4000\)

Analytic target

\[\frac{\mathrm{d}P}{\mathrm{d}t} = (\gamma - 1)\,\frac{Q_\text{total}}{V} = (\gamma - 1)\,Q = 0.4 \times 1.0\times10^{-5} = 4.0\times10^{-6} \quad \text{per lattice step.}\]

Over the \(4000\)-step run the pressure rises by \(\Delta P \approx 0.016\) (about \(1.6\%\) above \(P_0 = 1\)), and the gas temperature by \(\Delta T = Q\,n_\text{steps}/(\rho c_p) \approx 0.011\) (about \(1.1\%\)) - both small, so the run stays firmly weakly-compressible (\(\mathrm{Ma} \ll 0.1\)) and the \(P(t)\) trace is a clean straight line.

Validation metric

The closed closure holds \(P(t)\) in memory and threads it into the equation-of-state kernels, but does not write it to a series file. Because \(P(t)\) is spatially uniform and the EOS \(\rho = P/(rT)\) holds node-wise, the notebook recovers it exactly from the exported per-cell \(\rho\) and \(T\) fields:

(4)\[P(t) = r\,\langle \rho\,T \rangle_V,\]

forms \(P_n\) from each snapshot, least-squares fits the slope \(\mathrm{d}P/\mathrm{d}t\), and asserts it matches the analytic \((\gamma - 1)\,Q\) to within \(2\%\). It also checks the box stays quiescent (\(\max|\mathbf{u}| \ll 0.1\), confirming no spurious dilatation or checkerboard mode) and that \(\rho\) and \(T\) remain spatially uniform (confirming the closure keeps the sealed box homogeneous).

References