Governing model
The tank is represented by equal-volume vertical layers. For layer i, temperature evolves as
dTᵢ/dt = (Q/Vᵢ)(Tᵢ₋₁ − Tᵢ) + α∂²T/∂z² − λ(Tᵢ − Tₐ) + Pᵢ/(ρcₚVᵢ)
The bottom boundary uses the inlet temperature. The top layer supplies the outlet. The diffusion term has insulated end boundaries. A fixed-step fourth-order Runge–Kutta integrator advances the coupled layers.
Heat and flow
λ = UA/(ρcₚV) · E = ρcₚV T̄
Textbook constants: water density ρ = 997 kg/m³ and specific heat cₚ = 4,180 J/(kg·K), representative values near room temperature. Illustrative geometry: tank height 1.50 m. The 32 layers and 0.10 s integration step are scaled numerical choices, not a claim about a particular cylinder.
What is simplified
- The tank is one-dimensional: radial circulation, inlet-jet shape and detailed buoyant plumes are not resolved.
- Axial mixing is represented by an effective diffusivity. The high-mixing preset is a deliberately exaggerated stratification failure.
- Heat loss is spread uniformly through the water using one overall UA value, rather than solving wall conduction.
- The upper element heats the top fifth of the tank and uses an ideal thermostat. Real elements, sensors and controls have finite geometry and delay.
- Water properties are held constant; phase change, boiling, pressure and pipe heat capacity are outside this model.
Reading the checks
The diffusion check compares the numerical decay of a cosine temperature mode with its textbook exponential solution. The advection check compares the outlet response of equal mixed layers with the exact tanks-in-series expression. The energy check compares the tank's calculated energy change with the integrated inlet, outlet, heater and ambient heat flows. Each reports percentage difference.
All scenario settings and readouts are illustrative. Textbook labels identify reference constants or closed-form relationships; scaled labels identify numerical choices. This is an educational model, not a design tool for sizing or certifying a hot-water installation.