Governing model
The vertical coordinate z points upward. Charging at the top makes the thermocline move downward at the ideal displacement speed v = Q/A.
∂T/∂t − v ∂T/∂z = αeff ∂²T/∂z² − kw(T − Tamb)
A = πD²/4 · kw = UP/(ρcpA)
Textbook constants: water density ρ = 997 kg/m³ and specific heat cp = 4,180 J/(kg·K), representative values near room temperature. The model uses a illustrative fixed ambient temperature of 20 °C.
Numerical method
The profile is stored in vertical finite volumes. Each fixed 0.5 s step uses first-order upwind advection, centred axial diffusion and an explicit wall-loss term. The step is chosen so the combined advection–diffusion stability measure stays below one across the slider range. Heat entering, heat leaving and side-wall loss are accumulated independently for the energy ledger.
What is simplified
This is a one-dimensional displacement model. It does not resolve radial temperature gradients, buoyant inlet plumes, diffuser geometry, coil heat exchangers, pipe losses, draw-off cycles or changing water properties. Effective axial diffusivity stands in for unresolved mixing. The tank dimensions, inlet conditions, flow rates, diffusivity and insulation settings are illustrative rather than product specifications or design advice.
How to read the checks
The energy check compares the simulated change in stored heat with the separately accumulated boundary-energy ledger. The integral check compares the finite-volume cell sum with a dense Simpson-rule integration of the interpolated temperature profile. The front experiment measures displacement in a longer, boundary-isolated column and compares it with the closed-form Q/A speed. Differences are numerical diagnostics, not experimental validation of a real tank.