Heat Consumer

Create Function

For creating a single heat consumer unit:

create_heat_consumer(net, from_junction, to_junction, qext_w=None, controlled_mdot_kg_per_s=None, deltat_k=None, treturn_k=None, name=None, index=None, in_service=True, type='heat_consumer', **kwargs)

Creates a heat consumer element in net[“heat_consumer”] from heat consumer parameters.

Parameters:
  • net – The net for which this heat consumer should be created

  • from_junction (int) – ID of the junction on one side which the heat consumer will be connected with

  • to_junction (int) – ID of the junction on the other side which the heat consumer will be connected with

  • qext_w (float, default None) – External heat flux in [W]. If positive, heat is extracted from the network. If negative, heat is being fed into the network from a heat source.

  • controlled_mdot_kg_per_s (float, default None) – Mass flow set point in [kg/s].

  • deltat_k (float, default None) – Temperature difference set point between flow and return in [K].

  • treturn_k (float, default None) – Return temperature set point in [K].

  • name (str, default None) – Name of the heat consumer element

  • index (int, default None) – Force a specified ID if it is available. If None, the index one higher than the highest already existing index is selected.

  • in_service (bool, default True) – True if heat consumer is in service or False if it is out of service

  • type (str, default "heat_consumer") – Currently not used - possibility to specify a certain type of heat consumer

  • kwargs (dict) – Additional keyword arguments will be added as further columns to the net[“heat_consumer”] table

Returns:

index - The unique ID of the created heat consumer

Return type:

int

Example:
>>> create_heat_consumer(net,from_junction=0, to_junction=1, diameter_m=40e-3, qext_w=20000,
>>>                     controlled_mdot_kg_per_s=0.4, name="heat_consumer1")

For creating multiple heat consumers at once:

create_heat_consumers(net, from_junctions, to_junctions, qext_w=None, controlled_mdot_kg_per_s=None, deltat_k=None, treturn_k=None, name=None, index=None, in_service=True, type='heat_consumer', **kwargs)

Creates several heat consumer elements in net[“heat_consumer”] from heat consumer parameters.

Parameters:
  • net – The net for which this heat consumer should be created

  • from_junctions (Iterable(int)) – IDs of the junctions on one side which the heat consumers will be connected with

  • to_junctions (Iterable(int)) – IDs of the junctions on the other side which the heat consumers will be connected with

  • qext_w (Iterable(float) or float, default None) – External heat flux in [W]. If positive, heat is extracted from the network. If negative, heat is being fed into the network from a heat source.

  • controlled_mdot_kg_per_s (Iterable(float) or float, default None) – Mass flow set point in [kg/s].

  • deltat_k (Iterable(float) or float, default None) – Temperature difference set point between flow and return in [K].

  • treturn_k (Iterable(float) or float, default None) – Return temperature set point in [K].

  • name (Iterable(str) or str, default None) – Names of the heat consumer elements

  • index (Iterable(int) or int, default None) – Force specified IDs if they are available. If None, the index one higher than the highest already existing index is selected and counted onwards for the amount of heat consumers created.

  • in_service (Iterable(bool) or bool, default True) – True for heat consumers that are in service, False for those out of service

  • type (Iterable(str) or str, default "heat_consumer") – Currently not used - possibility to specify certain types of heat consumers

  • kwargs (dict) – Additional keyword arguments will be added as further columns to the net[“heat_consumer”] table

Returns:

index - The unique IDs of the created heat consumers

Return type:

int

Example:
>>> create_heat_consumers(net,from_junctions=[0, 3], to_junctions=[1, 5],
>>>                       qext_w=20000, controlled_mdot_kg_per_s=[0.5, 0.9])

Component Table Data

net.heat_consumer

Parameter

Datatype

Value Range

Explanation

name

string

Name of the heat consumer

from_junction

integer

\(>\) 0

Index of junction at which the heat consumer starts

to_junction

integer

\(>\) 0

Index of junction at which the heat consumer ends

qext_w

float

The heat flow entering or leaving the heat consumer [W]

controlled_mdot_kg_per_s

float

Mass flow set point [kg/s]

deltat_k

float

Temperature difference set point between flow and return [K]

treturn_k

float

Return temperature set point [K]

in_service

boolean

True / False

Specifies if the heat consumer is in service.

Result Table Data

net.res_heat_consumer

Parameter

Datatype

Explanation

p_from_bar

float

Pressure at “from”-junction [bar]

p_to_bar

float

Pressure at “to”-junction [bar]

t_from_k

float

Temperature at “from”-junction [K]

t_to_k

float

Temperature at “to”-junction [K]

t_outlet_k

Temperature at the outlet [K]

mdot_from_kg_per_s

float

Mass flow into heat consumer [kg/s]

mdot_to_kg_per_s

float

Mass flow out of heat consumer [kg/s]

vdot_norm_m3_per_s

float

Norm volume flow [m^3/s] for gases

vdot_m3_per_s

float

Volume flow [m^3/s] for incompressible fluids

reynolds

float

Average Reynolds number

lambda

float

Average Lambda value

normfactor_from

float

Normfactor for gases at the “from”-junction

normfactor_to

float

Normfactor for gases at the “to”-junction