Heat loss and simulation
The Simulate network operation tool is the main computation step in a TESSA study. It takes a fully dimensioned network, a populated district with load curves, and a set of heat sources, and produces the hourly supply and demand picture from which costs, CO₂, and full-load hours are derived.
This page explains what the simulation computes and why each step is ordered the way it is. For the sizing step that must be run first, see Network sizing and hydraulics. For how sources are dispatched when there are multiple, see Multiple sources allocation.
Prerequisites
Before running the simulation, three things must be in place:
- The district must have an hourly load curve (generated by the "Generate building demands" tool — 8760 hourly values).
- All pipe diameters must be set (run "Dimension pipes" first).
- The network must have at least one energy center, one pipe, and one connected building substation.
Running the simulation without these in place will produce missing or zero results for the fields that depend on them.
The three sequential steps
The simulation runs three steps in order:
Each step feeds into the next: heat distribution produces the mass flows needed for the hydraulic solve; the altitude step adds the static head contribution before pumps are sized.
Step 1: Heat distribution
Inputs
The heat distribution step works from:
- The district's aggregate hourly load curve (8760 h, kW per hour)
- The network's working fluid supply and return temperatures
- The substation type at each building connection
- The pipe diameters from the sizing step
Substation models
Each building substation transfers heat from the network to the building according to its type.
Direct substations and heat-exchanger substations are handled identically in the distribution model:
- Heat delivered = building annual demand ×
hx_efficiency(the heat exchanger efficiency; 1.0 for direct connections) - Peak power at the substation = the building's peak power
Booster heat pump (BHP) substations operate differently. The network carries a cold fluid; the BHP at the building extracts heat from that loop and lifts it to the building's required temperature:
- The BHP's COP is computed from the network supply temperature (T_source) and the building's required delivery temperature (T_delivery):
$\(\text{COP} = \eta_\text{Carnot} \cdot \frac{T_\text{delivery}}{T_\text{delivery} - T_\text{source}}\)$
where η_Carnot is the heat pump's efficiency relative to the Carnot cycle (typically 0.4–0.5).
- The BHP's electricity consumption is tracked separately and added to the building's operating costs and CO₂ emissions.
- The cold loop sees only the heat extracted from the ground side, not the full building demand — this is what the network and its pipes must carry.
Source dispatch
Once building demands are known at each hour, the simulation calls the merit-order dispatcher to allocate load to sources at each energy center. The process is described fully in Multiple sources allocation; in brief:
- Sources are dispatched in ascending order number at each hourly timestep until the net demand at that energy center is met.
- If total installed capacity is insufficient to meet peak demand, TESSA automatically adds a virtual "Residual Load Source" to the first energy center to track the shortfall. This is a signal to the user that additional capacity must be added; the residual source should be replaced with real equipment before the study is finalised.
Each source's hourly production is recorded; result fields written per source:
| Field | Description |
|---|---|
rated_power_useful |
Installed capacity delivering heat to the network (kW) |
rated_power_final |
Corresponding final energy consumption (kW, after efficiency) |
annual_energy_useful |
Annual heat delivered to the network (kWh) |
annual_energy_final |
Annual fuel or electricity consumed (kWh) |
full_load_hours |
Equivalent full-load hours = annual_energy_useful / rated_power_useful |
Heat loss model
Network pipes lose heat to the surrounding ground. TESSA uses a simple proportional model by default:
where l_loss_km is the loss fraction per km (default 0.04, i.e. 4% per km), P_transported is the heat power flowing through the segment, and L_km is the segment length in km. This value is derived from published literature for insulated pre-insulated district heating pipes.
Heat loss is set to zero for:
- Cooling networks — fluid temperatures are close to ground temperature, so net heat exchange is negligible.
- Combined heating-and-cooling networks — for the same reason; heat injected in cooling mode roughly offsets the heating-mode loss at these temperature levels.
Seasonal loss distribution
Annual heat loss is distributed across the 8760 hours using a seasonal hourly loss template. The template is based on return of experience from the Geneva CADSIG-CADIOM district heating network and reflects the pattern that losses are higher in winter (when the pipe-to-ground temperature difference is largest) and lower in summer. The resulting per-hour loss curve is added to the district demand curve before sources are dispatched.
The network demand curve
After losses are accounted for, the network demand curve is assembled for each hour:
Cooling demands are subtracted because they represent heat extracted from the return side of the network — they reduce the net heat the sources must supply. The result is the p_with_loss_kw time series (8760 values) stored on the network.
Detailed thermal resistance model
A more detailed heat loss model implementing Section 7.1.3 of the district heating handbook is available in the TESSA codebase. It computes the specific heat loss per degree of temperature difference from pipe geometry: pipe radius, jacket radius, insulation thermal conductivity, ground thermal conductivity, cover depth, and pipe spacing. This model is not yet connected to the simulation workflow; the simple 4%-per-km model is used for all current studies.
Step 2: Altitude
Before the hydraulic solve, TESSA fetches the terrain elevation (metres above sea level) for each network node from a digital elevation model. Elevation differences between nodes create a static head component that must be added to the dynamic pressure losses when sizing the pump:
This step is skipped if terrain data is unavailable; in flat networks the effect is small.
Step 3: Hydraulics and pumping
The third step runs the full Darcy-Weisbach pressure solve and sizes the circulation pumps. This is described in detail in Network sizing and hydraulics. In the simulation context:
- Mass flows and velocities are computed from the heat distribution results of step 1.
- Pressure losses are solved using the Colebrook friction factor correlation.
- Pump heads are computed along the critical hydraulic path at each energy center.
- Pump electricity consumption is recorded hourly and added to network operating costs and CO₂.
What the simulation produces
The table below summarises where results end up after a successful simulation run.
Where to go next
- Network sizing and hydraulics — pipe sizing algorithm and the Darcy-Weisbach pressure solve in full.
- Multiple sources allocation — how merit-order dispatch works across multiple sources and energy centers.
- Geothermal borehole fields — borehole field simulation and how it sets the heat pump's source temperature.
- Networks and heat sources data model — the complete set of fields that the simulation populates.