The Home Energy Model (HEM) is a half-hourly dynamic simulation engine that calculates the energy performance of domestic buildings. Built on BS EN ISO 52016-1:2017, it models heat balance, ventilation, solar gains, and system performance at 30-minute intervals — replacing SAP's monthly steady-state approach with a physics-based simulation capable of accurately representing modern low-carbon technologies.
HEM Architecture
HEM uses a modular architecture that separates the core building physics engine from policy-specific wrappers. The core engine performs the fundamental energy simulation, while wrappers apply the rules, assumptions, and compliance metrics required for specific regulatory purposes.
Core Engine
The core engine is a deterministic simulation that takes a building description (geometry, fabric, systems) and external conditions (weather data) as inputs, then calculates energy flows at half-hourly intervals for a full year — producing 17,520 timesteps. The engine is modular, with separate calculation modules for each physical process:
- Fabric heat loss (HEM-TP-05) — walls, floors, roofs, windows, doors
- Thermal bridges — linear and point thermal bridges at every timestep
- Ventilation & infiltration (HEM-TP-06) — pressure-driven model based on EN 16798-7
- Thermal mass (HEM-TP-07) — dynamic thermal storage in building fabric
- Solar gains (HEM-TP-08) — direct and diffuse solar radiation through glazing and fabric
- External conditions (HEM-TP-03) — weather data and hourly sun position calculation
- Space heating & cooling demand (HEM-TP-04) — heat balance equations per zone
- Domestic hot water (HEM-TP-09) — individual tapping events and stratified storage
- Heat pumps (HEM-TP-12) — variable COP with source/sink temperatures
- PV & battery storage (HEM-TP-18) — generation, self-consumption, and battery behaviour
- Heat emitters (HEM-TP-16) — radiators and underfloor heating performance
- Controls (HEM-TP-17) — heating controls and smart thermostats
Policy Wrappers
Policy wrappers sit on top of the core engine and apply context-specific rules:
- FHS wrapper — applies the Future Homes Standard notional building specification, compliance metrics, and carbon emission factors for new-build compliance
- EPC wrapper (under development) — applies assumptions for Energy Performance Certificates, including reduced data methodology for existing homes
- Future wrappers — the modular architecture allows additional wrappers for other policy uses without changing the core physics
Core Calculation Loop
For each of the 17,520 half-hourly timesteps in a year, HEM executes the following sequence:
- Hot water demand — calculate domestic hot water demand from tapping events and determine energy supplied by the heating system (including cylinder losses and pipework losses)
- Space heating/cooling demand — calculate the heat balance for each zone considering fabric losses, ventilation losses, solar gains, internal gains, and thermal mass effects
- System interactions — additional calculations for multi-service systems (e.g. combi boilers serving both space heating and hot water)
- Electricity balance — calculate PV generation, self-consumption, battery charge/discharge, and grid import/export
- Results aggregation — return timestep results to the active wrapper for post-processing against policy targets
This loop structure means that every interaction between building fabric, weather, occupancy patterns, and mechanical systems is captured at a resolution that reveals real-world performance characteristics invisible to monthly calculations. For the full methodology, see How HEM Calculates.
SAP vs HEM — Technical Comparison
The shift from SAP to HEM represents a fundamental change in calculation methodology. The table below summarises the key technical differences:
| Feature | SAP 10.2 | HEM |
|---|---|---|
| Time resolution | Monthly (12 steps) | Half-hourly (17,520 steps) |
| Zones | 2 fixed (living area + rest) | User-defined zones |
| Heat balance | Simplified monthly method | Dynamic simulation (ISO 52016-1) |
| Ventilation | Simplified wind/shelter factors | Pressure-driven model (EN 16798-7) |
| Solar gains | Monthly radiation, windows only | Half-hourly, direct + diffuse, through fabric |
| Thermal mass | Simplified categories | Full dynamic modelling (ISO 52016-1) |
| Heat pumps | Simplified seasonal performance | Variable COP with source/sink temperatures |
| Hot water | Monthly demand from floor area | Individual tapping events, stratified cylinders |
| PV generation | Monthly | Half-hourly generation and self-consumption |
| Battery storage | Not modelled | Charge/discharge behaviour modelled |
| Carbon factors | Historical (2012 vintage) | Forward-looking (2025–2029 average) |
| Weather data | Regional monthly averages | Hourly data, CIBSE or EPW format |
| Software delivery | Multiple third-party engines | Centralised cloud API (ECaaS) |
| Codebase | Closed (SAP specification document) | Open source (MIT Licence) |
For a non-technical comparison, see SAP vs HEM. For a comparison focused on FHS compliance routes, see SAP 10.3 vs HEM.
HEM Technical Papers
The HEM calculation methodology is documented in a series of technical papers published alongside the HEM technical documentation on GOV.UK. Each paper covers a specific calculation module:
| Paper | Module | Guide |
|---|---|---|
| HEM-TP-01 | General summary of core calculation | — |
| HEM-TP-03 | External conditions and weather data | — |
| HEM-TP-04 | Space heating and cooling demand | How HEM Calculates |
| HEM-TP-05 | Fabric heat loss | Fabric Heat Loss |
| HEM-TP-06 | Ventilation and infiltration | Ventilation |
| HEM-TP-07 | Thermal mass | Thermal Mass |
| HEM-TP-08 | Solar gains and solar absorption | Solar Gains |
| HEM-TP-09 | Energy for domestic hot water | Hot Water |
| HEM-TP-11 | Hot water storage tanks | Hot Water |
| HEM-TP-12 | Heat pump methodology | Heat Pumps |
| HEM-TP-16 | Heat emitters | — |
| HEM-TP-17 | Controls | — |
| HEM-TP-18 | PV generation and self-consumption | Solar PV |
Implementation & Delivery
HEM is delivered through two complementary channels:
ECaaS Platform
The ECaaS (Energy Calculation as a Service) platform is a cloud-based API run by MHCLG that provides the official HEM calculation for statutory purposes. ECaaS will be the only valid means to confirm compliance with Part L when using the HEM route — replacing the current model where multiple software providers build their own SAP engines.
Open Source Codebase
The HEM source code is published under the MIT Licence (Crown Copyright) in two implementations:
- Python (BRE, Azure DevOps) — the reference methodology used for ongoing development and validation
- Rust (MHCLG, GitHub) — the performance-optimised implementation that powers ECaaS
For full details on the codebase structure and how to contribute, see Open Source Guide.
Explore Technical Topics
How HEM Calculates
Core calculation loop, zone model, timestep approach, and heat balance methodology based on ISO 52016-1.
Fabric Heat Loss
U-values, thermal bridging, and the HEM-TP-05 methodology for modelling heat loss through the building envelope.
Ventilation & Infiltration
Pressure-driven ventilation model, air paths, infiltration calculation, and MVHR modelling based on EN 16798-7.
Thermal Mass
Dynamic thermal modelling, effective heat capacity, and HEM-TP-07 methodology for building fabric thermal storage.
Solar Gains
Half-hourly solar irradiance calculation, direct and diffuse radiation, window gains, and fabric absorption.
Hot Water
Individual tapping events, stratified cylinder modelling, pipework losses, and HEM-TP-09 methodology.
Heat Pumps
Variable COP modelling, source and sink temperature dependencies, EN 14825 test data, and sizing implications.
Solar PV & Battery Storage
Half-hourly PV generation, self-consumption modelling, battery charge/discharge behaviour, and HEM-TP-18.
ECaaS Platform Guide
Energy Calculation as a Service API overview, Rust and Python implementations, and software provider integration.
Open Source Guide
GitHub and Azure DevOps repositories, code architecture, contributing guidelines, and collaboration opportunities.
Standards Reference
Complete reference of BS EN ISO and EN standards underpinning HEM calculations.
Frequently Asked Questions
What standard does HEM use for thermal modelling?
HEM uses BS EN ISO 52016-1:2017 for heat balance and dynamic thermal modelling. This standard defines the hourly calculation method for heating and cooling energy needs. HEM extends it to half-hourly intervals and adds modules for ventilation (BS EN 16798-7), heat pumps (EN 14825), and solar gains (BS EN ISO 52010-1).
Is the HEM source code publicly available?
Yes. HEM is published under the MIT Licence (Crown Copyright). The Python reference implementation is maintained by BRE on Azure DevOps, while the Rust performance implementation is maintained by MHCLG on GitHub. The Rust version powers the ECaaS platform.
What are the HEM technical papers?
The HEM technical papers (HEM-TP series) document each calculation module. Key papers include HEM-TP-05 (fabric heat loss), HEM-TP-06 (ventilation), HEM-TP-07 (thermal mass), HEM-TP-12 (heat pumps), and HEM-TP-18 (solar PV). They are published on GOV.UK.
How do software providers access HEM through ECaaS?
Software providers access HEM through the ECaaS API, a cloud-based calculator run by MHCLG. Providers build their own user interfaces and submit inputs to the API, which runs the HEM calculation and returns results. Contact ECaaS@communities.gov.uk for API access.
What are the main technical differences between SAP and HEM?
Key differences include: half-hourly vs monthly time resolution, dynamic simulation (ISO 52016-1) vs simplified heat balance, user-defined zones vs two fixed zones, pressure-driven ventilation modelling vs simplified factors, and variable COP heat pump modelling vs seasonal averages. See our SAP vs HEM comparison for a full breakdown.
Related Pages
What is HEM?
Plain-English overview of the Home Energy Model and what it means for UK homes.
Future Homes Standard
How HEM underpins compliance with the biggest change to Part L since 2006.
For SAP Assessors
How the transition to HEM affects energy assessment workflows and data requirements.
EPCs & HEM
How Energy Performance Certificates are changing under the Home Energy Model.