Home▸Physics & Mechanics▸Smart Home Thermal & Energy Model (2D)

Smart Home Thermal & Energy Model (2D)

A single-node RC thermal model of a house: heat loss scales with insulation R-value and the indoor/outdoor gap, solar gain follows a day/night cycle, and a bang-bang heat-pump thermostat holds the setpoint while metering every kWh it uses.

Physics & Mechanics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-smart-home-model ↗ Open standalone

This 2D companion replaces the 3D scene's decorative sliders with an actual thermal model: a single-node RC analogy where the house has one lumped heat capacity, heat leaks out through the walls in proportion to the indoor/outdoor temperature gap divided by the insulation R-value, and a bang-bang thermostat switches a heat pump on and off around the setpoint with a small hysteresis band so it doesn't chatter. Push the outdoor temperature down or the insulation quality down and watch the heat pump's duty cycle and metered kWh climb; raise the setpoint or the HVAC power and see how fast the house recovers.

⚙ Under the hood

A single-node RC thermal model with day/night solar gain and a hysteresis-controlled heat-pump thermostat that meters its own energy use in kWh.

thermal modelrc circuit analogythermostat hysteresisheat pumpenergy metering2d

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

FAQ

Why does the 2D version look so different from the 3D scene?

The 3D original's sliders were decorative — they didn't feed any real formula. This companion builds the genuine physics instead: an RC thermal model with a real heat-loss equation, real solar gain, and a real thermostat control loop.

What does "R-value" control?

It scales the house's heat-loss coefficient (UA). Higher R-value means less heat escapes per degree of indoor/outdoor difference, so the heat pump runs less and uses less energy.

Why does the thermostat have a hysteresis band?

Without one, the heat pump would switch on and off every frame as the temperature crosses the setpoint. A small dead-band around the setpoint keeps it running in sensible on/off cycles, like a real thermostat.

What did you find?

Add reproduction steps (optional)