Thermostat Model (Stock-and-Flow Dynamics)
A system dynamics model of a thermostat-controlled room, simulating temperature changes based on heat inflow from the furnace and heat outflow to the outside, with a feedback loop that adjusts heating based on the discrepancy between desired and actual temperature.
THE IDEA
Thermostat Model (Stock-and-Flow Dynamics)
This model represents room temperature controlled by a thermostat using a stock-and-flow structure. In this simplified equation, the heat-flow terms represent rates of temperature change, with the room’s effective heat capacity absorbed into the coefficients; they are not raw energy quantities.
Stock: Room Temperature
room temperature(t) = room temperature(t – dt) + (heat from furnace – heat to outside) × dt- Initial values: 10°C (cold-room warming) or 18°C (warm-room cooling)
- Time unit: hours (
dt = 1 hour) - Simulation run time: 8 hours and 24 hours
Inflow: Heat from Furnace
heat from furnace = minimum(discrepancy between desired and actual room temperature, 5)
Outflow: Heat to Outside
- For a “normal” house:
heat to outside = discrepancy between inside and outside temperature × 10% - For a very leaky house:
heat to outside = discrepancy between inside and outside temperature × 30%
Converters
thermostat setting = 18°Cdiscrepancy between desired and actual room temperature = maximum(thermostat setting – room temperature, 0)discrepancy between inside and outside temperaturevaries by scenario:- Constant outside temperature:
room temperature – 10°C - Full day-and-night cycle:
room temperature – 24-hour outside temp 24-hour outside tempranges from 10°C (50°F) during the day to –5°C (23°F) at night (see graph).
Graph (Reference)

Note: This model is illustrated in Figures 14 to 20 of the source text.
When to use it
Designing and analyzing residential HVAC control systems
Teaching system dynamics and feedback loops in engineering courses
Simulating energy efficiency of different insulation levels in houses
Understanding the behavior of simple proportional control systems
FROM THEORY TO EVERYDAY LIFE
In practice
Cold room warming with normal insulation
A house starts at 10°C, thermostat set to 18°C. The furnace provides heat proportional to the discrepancy (capped at 5 units). The room temperature rises over time, with heat loss to a constant 10°C outside. The system reaches equilibrium near the set point.
Leaky house during day-night cycle
For a very leaky house (30% heat loss rate), with outside temperature varying from 10°C day to -5°C night, the thermostat struggles to maintain 18°C. The room temperature dips at night as heat loss exceeds furnace capacity.
A MOMENT TO REFLECT
Put it to work.
How does changing the cap on heat from the furnace (currently 5) affect warming speed and the eventual temperature?
What would happen if the thermostat setting were varied over time (e.g., a schedule) instead of fixed at 18°C?
How does the model change if the house had thermal mass (e.g., thick walls) that absorbs heat?
CONTINUE THE CONVERSATION
Source texts
- Thinking in Systems A Primer