topotherm.precalculation_hydraulic

This module contains functions for the thermo-hydraulic precalculation of the district heating network.

Functions

  • determine_feed_line_temp : Calculates the supply temperature of the grid according to the outdoor temperature with a linear interpolation between the turning points.

  • max_flow_velocity : Calculates the maximal flow velocity in the pipe.

  • mass_flow : Calculates the maximal mass flow in the pipe.

  • pipe_capacity : Calculates the maximal heat flow in the pipe.

  • capacity_to_diameter : Calculates the diameter of the pipe according to the heat flow.

  • thermal_resistance : Calculates the thermal resistance of the pipe.

  • heat_loss_pipe : Calculates the heat loss of the pipe.

  • regression_thermal_capacity : Calculates the regression factors for the linearization of the thermal capacity of the pipes.

  • regression_heat_losses : Calculates the regression factors for the linearization of the heat losses of the pipes.

Functions

determine_feed_line_temp(ambient_temperature, ...)

Calculate the supply temperature of the grid according to the outdoor

max_flow_velocity(vel_init, diameter, roughness, ...)

Calculate the maximal flow velocity in a pipe based on the maximal

mass_flow(velocity, diameter, density_water)

Calculate the maximal mass flow in the pipe.

pipe_power(mass_flow, temperature_supply, ...)

Calculate the maximal heat flow in the pipe.

capacity_to_diameter(thermal_power, ...)

Calculate the diameter of the pipe according to the heat flow.

thermal_resistance(diameter, diameter_ratio, depth, ...)

Calculate the thermal resistance of a pipe.

heat_loss_pipe(temperature_in, ...)

Calculate the heat loss of a pipe.

regression_thermal_capacity(settings)

Calculate the regression factors for the linearization of the thermal

regression_heat_losses(settings, thermal_capacity)

Calculate the regression factors for the linearization of the heat losses

Module Contents

topotherm.precalculation_hydraulic.determine_feed_line_temp(ambient_temperature, temp_sup_high, temp_sup_low, temp_turn_high, temp_turn_low)[source]

Calculate the supply temperature of the grid according to the outdoor temperature using linear interpolation between the threshold points.

Parameters:
  • ambient_temperature (float) – Ambient temperature (°C).

  • temp_sup_high (float) – Supply temperature high threshold (°C).

  • temp_sup_low (float) – Supply temperature low threshold (°C).

  • temp_turn_high (float) – Threshold for high temperature (°C).

  • temp_turn_low (float) – Threshold for low temperature (°C).

Returns:

Supply temperature of the grid (°C).

Return type:

float

Examples

>>> determine_feed_line_temp(0, 90, 60, 10, -10)
75.0
>>> determine_feed_line_temp(-15, 90, 60, 10, -10)
90.0
>>> determine_feed_line_temp(20, 90, 60, 10, -10)
60.0
topotherm.precalculation_hydraulic.max_flow_velocity(vel_init, diameter, roughness, max_spec_pressure_loss, water_parameters)[source]

Calculate the maximal flow velocity in a pipe based on the maximal specific pressure loss. All inputs must be non-negative real numbers.

Parameters:
  • vel_init (float) – Initial velocity (m/s).

  • diameter (float) – Diameter of the pipe (m).

  • roughness (float) – Roughness of the pipe (m).

  • max_spec_pressure_loss (float) – Maximal specific pressure loss (Pa/m).

  • water_parameters (Settings) – Water parameters instance.

Returns:

Maximal flow velocity (m/s).

Return type:

float

topotherm.precalculation_hydraulic.mass_flow(velocity, diameter, density_water)[source]

Calculate the maximal mass flow in the pipe.

Parameters:
  • velocity (float) – Velocity in the pipe (m/s).

  • diameter (float) – Diameter of the pipe (m).

  • density_water (float) – Density of water (kg/m³).

Returns:

Maximal mass flow (kg/s).

Return type:

float

topotherm.precalculation_hydraulic.pipe_power(mass_flow, temperature_supply, temperature_return, cp_water)[source]

Calculate the maximal heat flow in the pipe.

Parameters:
  • mass_flow (float) – Mass flow in the pipe (kg/s).

  • temperature_supply (float) – Supply temperature (°C or K).

  • temperature_return (float) – Return temperature (°C or K).

  • cp_water (float) – Specific heat capacity of water (J/kg·K).

Returns:

Heat flow in the pipe (W).

Return type:

float

Examples

>>> pipe_capacity(mass_flow=2.0,
...               temperature_supply=80,
...               temperature_return=60,
...               cp_water=4180)
167200.0
topotherm.precalculation_hydraulic.capacity_to_diameter(thermal_power, temperature_supply, temperature_return, cp_water)[source]

Calculate the diameter of the pipe according to the heat flow.

Parameters:
  • thermal_power (float) – Heat power in the pipe (W).

  • temperature_supply (float) – Supply temperature (°C or K).

  • temperature_return (float) – Return temperature (°C or K).

  • cp_water (float) – Specific heat capacity of water (J/kg·K).

Returns:

Diameter of the pipe (m).

Return type:

float

topotherm.precalculation_hydraulic.thermal_resistance(diameter, diameter_ratio, depth, settings)[source]

Calculate the thermal resistance of a pipe.

References

Planungshandbuch Fernwärme Version 1.3 (2021).

Parameters:
  • diameter (float) – Diameter of the pipe (m).

  • diameter_ratio (float) – Outer diameter divided by inner diameter (-).

  • depth (float) – Depth below ground level (m).

  • settings (Settings) – Settings instance.

Returns:

Thermal resistance of the pipe (m·K/W).

Return type:

float

topotherm.precalculation_hydraulic.heat_loss_pipe(temperature_in, thermal_resistance_pipe, ambient_temperature)[source]

Calculate the heat loss of a pipe.

Parameters:
  • temperature_in (float) – Temperature in the pipe (°C or K).

  • thermal_resistance_pipe (float) – Thermal resistance of the pipe (m·K/W).

  • ambient_temperature (float) – Ambient temperature (°C or K).

Returns:

Heat loss of the pipe (W).

Return type:

float

topotherm.precalculation_hydraulic.regression_thermal_capacity(settings)[source]

Calculate the regression factors for the linearization of the thermal capacity of the pipes. This is the first step in the thermo-hydraulic precalculation of the district heating network.

Parameters:

settings (RegressionSettings) – Regression settings instance.

Returns:

Regression factors for the linearization (€/m).

Return type:

dict

topotherm.precalculation_hydraulic.regression_heat_losses(settings, thermal_capacity)[source]

Calculate the regression factors for the linearization of the heat losses of the pipes, based on the calculated thermal capacities (see regression_thermal_capacity).

Parameters:
  • settings (Settings) – Settings instance.

  • thermal_capacity (dict) – Thermal capacity regression factors.

Returns:

Regression factors for the linearization of the heat losses of the pipes.

Return type:

dict