Network sizing and hydraulics
Once a network topology is drawn and buildings are connected, two sequential tools turn it into a sized, pressure-solved design: Dimension pipes selects a nominal diameter for each segment based on peak flow, and the hydraulic solver (run as part of Simulate network operation) computes velocities, pressure losses, and pump heads.
This page explains the algorithms behind both steps. For the data fields written to each pipe and node, see Networks and heat sources data model. For what the full simulation computes beyond hydraulics, see Heat loss and simulation.
Pipe sizing
From peak power to flow rate
The goal of pipe sizing is to select the smallest nominal diameter (DN) that keeps fluid velocity and pressure drop inside the envelope defined for that DN in the network's pipe specification table — a minimum velocity to prevent sedimentation, and maximum velocity and pressure-gradient limits to control noise, erosion, and pumping cost. The starting point is the peak volumetric flow rate at each pipe segment.
Peak flow is derived from the peak thermal power the segment must carry:
where P is the peak power (W), ρ is the fluid density (kg/m³), c_p is the specific heat capacity (J/kg·K), and ΔT = T_\text{supply} − T_\text{return} is the temperature spread. Both ρ and c_p are taken from the network's working fluid at its operating temperatures.
Selecting the nominal diameter
Sizing is driven by the network's pipe specification table — an editable, per-network lookup keyed on DN and material that carries each DN's inner diameter and its velocity and pressure-gradient envelope (see Pipe specifications). For each candidate DN the sizer computes the resulting velocity and pressure gradient and applies the table's limits:
velocity = Q / A_inner where A_inner = π (d_inner / 2)²
pressure_gradient = Darcy-Weisbach ΔP/L at that velocity
For each segment, walking DNs from largest to smallest:
reject any DN where velocity > max_velocity_m_s (hard limit)
reject any DN where ΔP/L > max_pressure_gradient_pa_m (hard limit)
prefer the smallest surviving DN with velocity ≥ min_velocity_m_s
if none reaches min velocity → use the smallest surviving DN
if nothing survives the hard limits → use the largest DN (flagged below)
Both the minimum and maximum velocity, and the recommended and maximum pressure gradient, are read per DN row from the spec table — there is no single hard-coded 1–4 m/s rule. The shipped steel defaults use a 0.5 m/s minimum and a 1.5–3.0 m/s maximum that widens with diameter; other materials and edited tables may differ.
Once a DN is selected, the following fields are written to the pipe segment:
maximum_capacity_kw is the thermal power the segment can carry at its DN's maximum velocity — it is a design headroom figure, not a hard limit enforced at runtime.
Sizing validation flags
After a DN is chosen, each pipe is checked against its spec-table row and tagged with two booleans:
| Field | Meaning |
|---|---|
velocity_in_range |
min_velocity_m_s ≤ v ≤ max_velocity_m_s for the chosen DN. |
pressure_gradient_ok |
ΔP/L ≤ max_pressure_gradient_pa_m for the chosen DN. |
A segment whose flow is too low to reach the minimum velocity even at the smallest DN, or whose DN falls outside the spec table, is flagged velocity_in_range = false. These flags surface in the pipe inspector so you can spot segments running outside their envelope — they do not block the run.
Tree vs looped networks
How segment flows are determined before sizing depends on the network topology.
Tree (branched) networks have a unique flow path from each energy center to each building. The peak flow at each segment is the sum of the peak demands of all building substations downstream of it. Sizing runs segment-by-segment from the leaves toward the energy center.
Looped (meshed) networks have multiple paths between energy centers and substations, so flows are not unique. TESSA uses a practical two-pass approach:
- Compute the minimum spanning tree (MST) of the loop topology.
- Size the MST as a tree network using the procedure above.
- For each extra connection that closes a loop, construct a forced MST that includes that connection as a required edge and size it independently.
- For each segment, the final DN is the largest DN selected across all MST passes that include that segment.
This ensures every loop chord is sized to carry a feasible peak flow, while avoiding the need for a full hydraulic flow solver at the sizing stage.
Connections
Building connectors and energy-center connectors are sized independently from the other pipes. Their flow rate comes from their own v_dot value (the volumetric flow at the connected substation or energy center), not from the aggregated downstream demand. This reflects that connector pipes run only to a single substation.
Re-running sizing
The overwrite_diameters flag (default: true) controls whether a new sizing run replaces existing diameters. Set it to false to preserve any segments where you have manually entered a DN — for example, if you know a particular backbone segment must be at least DN 150 for a future extension — while still letting TESSA size the remaining segments.
Darcy-Weisbach hydraulics
The hydraulic pressure solve runs as part of Simulate network operation and uses the Darcy-Weisbach equation together with the Colebrook friction-factor correlation.
Reynolds number and friction factor
The Reynolds number for each pipe segment is:
where μ is the dynamic viscosity of the working fluid. The friction factor f is then computed:
- Laminar flow (Re < 2000): the exact solution, f = 64 / Re.
- Turbulent flow (Re ≥ 2000): TESSA solves the implicit Colebrook equation iteratively:
where ε is the pipe roughness (m). The roughness comes from the network's pipe specification table — per DN row where set, otherwise the network-wide roughness fallback (the steel default is 0.045 mm). Applying a different material preset, or editing the spec table, changes the roughness used here. See Pipe specifications.
Pressure loss per segment
With f determined, the Darcy-Weisbach pressure loss is:
A pressure loss surcharge (default 20%) is added on top of the computed Darcy-Weisbach loss to account for local losses at bends, fittings, and valves. The surcharge factor is applied uniformly across all segments and can be adjusted in the network settings.
Head loss in metres of fluid column is stored alongside the Pa figure:
Results written per pipe after the hydraulic solve:
| Field | Description |
|---|---|
m_dot_kg_s |
Mass flow rate (kg/s) |
v_dot_m3_s |
Volumetric flow rate (m³/s) |
velocity_m_s |
Average velocity (m/s) |
pressure_loss_pa |
Total pressure loss including surcharge (Pa) |
h_f_dw_m |
Head loss in metres of fluid column |
pressure_loss_pa_m |
Pressure loss per metre of pipe (Pa/m) |
Substation pressure losses
Pressure losses at substations are modelled as fixed drops across the heat exchanger or internal equipment:
- Building substation (heat exchanger): default 0.7 bar pressure drop
- Energy center (internal equipment and valves): default 1.0 bar pressure drop
These are converted to head loss via h = ΔP / (ρ · g) and added to the hydraulic path when summing losses from an energy center to a substation.
Static pressure and network pressurisation
After dynamic losses are solved, TESSA computes the absolute pressures at each node. The user designates a reference node — typically the pump inlet at one energy center — and sets a minimum static pressure that must hold everywhere in the network (to prevent the fluid from flashing to steam or drawing in air through joints).
The pressurisation step propagates dynamic pressure from the reference node to every other node along the solved flow paths, then checks that no node drops below the minimum. If any node does, the network's minimum pressure is raised until the constraint is satisfied.
Results per node:
| Field | Description |
|---|---|
pressure_dynamic_supply_pa |
Absolute pressure on the supply side (Pa) |
pressure_dynamic_return_pa |
Absolute pressure on the return side (Pa) |
Pump sizing
Once all pressure losses are known, TESSA sizes the circulation pump at each energy center.
The required pump head at an energy center is the total head loss along the critical path — the hydraulic path from that energy center to the most distant (highest-resistance) substation:
Pump power is then:
where η_pump is the pump efficiency (a user-adjustable parameter, default 0.7). Pump electricity consumption is recorded hourly in the simulation and added to the network's operating costs and CO₂ figures.
Putting sizing and hydraulics together
The full workflow for a first-pass design is:
Dimension pipes must be run before the simulation. If you run the simulation without having sized the network, head losses and pump figures will be zero or absent.
Where to go next
- Networks and heat sources data model — the full set of fields on pipes, nodes, and energy centers.
- Heat loss and simulation — what the time-stepped simulation computes on top of the hydraulic solve.
- Pipe specifications — the DN table, inner diameters, roughness values, and material options.