Chapter 08 Model
The heated-tank model
State vector, four sub-models and explicit Euler method
The heated-tank model describes a pressure vessel with water and a headspace of steam and air by five state variables. Four sub-models (mass balance of the water, energy balance, pressure calculation and a delayed heating element) are advanced with the explicit Euler method in the time step Δt = 50 ms. The digital sensors B1 to B4, which correspond to the signals of the exam board, are derived from the state.
The technical core of the thesis is the derivation of the model. What is replicated is a pressure vessel with a volume of 0.5 m³, containing water, above it a headspace of steam and air (steam space), heated with up to 150 kW (Fig. 7a).
State vector
The state vector x(k) holds the water mass, the internal energy of the water, the steam mass, the air mass and the currently effective heating power. Everything else is calculated from it: the water temperature from energy and mass (ϑ_w = E_w / (m_w · c_w) with c_w = 4180 J/(kg·K)) and the pressure from the partial pressures of steam and air according to the ideal gas equation.
The four sub-models
The model consists of four coupled parts (Fig. 11b):
- Mass balance of the water: The water mass grows via the inlet valves and decreases via the outflow and the evaporation. The outflow rate depends on the square root of the pressure.
- Energy balance: It adds the heating energy and subtracts the evaporation energy and the outflow loss.
- Pressure calculation: The pressure in the headspace follows from steam mass and air mass with their gas constants; the partial pressures are added according to Dalton.
- Heating element: The heating power follows the setpoint with a delay (section “Why the heating is sluggish”).
Whether water evaporates at all is decided by the saturation pressure, which is calculated from the temperature with the Antoine equation: if it exceeds the pressure in the tank, the water boils (Fig. 10). It rises steeply with temperature. At 100 °C it is about 1.01 bar; the alarm threshold B4 is at 2.8 bar, the safety valve at 3.5 bar.
Why the heating is sluggish
A heating element does not become hot abruptly. It is modelled as a first-order lag element (PT1 element) with a time constant of τ = 12 s: after one time constant the heating power has reached 63.2 % of its final value, after three time constants about 95 %, after five 99.3 % (Fig. 8). A higher-order model would require more parameters without adding anything for the purpose of the thesis.
From the system of differential equations to the clock
The coupled equations are discretised with the explicit Euler method: x(k+1) = x(k) + f(x(k), u(k)) · Δt with Δt = 50 ms. This is the simplest one-step method, and that is precisely an advantage here: it fits into a fixed cycle, can be followed step by step and can be checked against the analytical solution (Chapter 10). For the PT1 element, the method is stable as long as Δt/τ < 2 holds; here the ratio is about 0.004 (Fig. 11b). This statement concerns only the heating element.
Sensors and valves
Digital sensors are derived from the state: B1 reports the upper fill level from 450 l, B2 the lower fill level at 50 l or less, B3 the temperature from 95 °C and B4 the pressure from 2.8 bar. The plant is actuated via the inlet valves Y1 and Y2, the drain valve Y3, the vent valve Y4 and the heating command E1. These are exactly the signals that would also be present at the exam board of the heated tank (Chapter 1).
How the model is called in the fixed cycle is described in Chapter 9; the check against expected values follows in Chapter 10.






