Heat Exchanger

Create Function

For creating a single heat exchanger unit:

create_heat_exchanger(net, from_junction, to_junction, diameter_m, qext_w, loss_coefficient=0, name=None, index=None, in_service=True, type='heat_exchanger', **kwargs)

Creates a heat exchanger element in net[“heat_exchanger”] from heat exchanger parameters.

Parameters:
  • net (pandapipesNet) – The net for which this heat exchanger should be created

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

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

  • diameter_m (float) – The heat exchanger inner diameter in [m]

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

  • loss_coefficient (float) – An additional pressure loss coefficient, introduced by e.g. bends

  • name (str, default None) – The name of the heat exchanger

  • 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 the heat exchanger is in service or False if it is out of service

  • type (str) – Not used yet

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

Returns:

index - The unique ID of the created heat exchanger

Return type:

int

Example:
>>> create_heat_exchanger(net, from_junction=0, to_junction=1,
>>>                       diameter_m=40e-3, qext_w=2000)

For creating multiple heat exchangers at once:

create_heat_exchangers(net, from_junctions, to_junctions, diameter_m, qext_w, loss_coefficient=0, name=None, index=None, in_service=True, type='heat_exchanger', **kwargs)

Convenience function for creating many heat exchangers at once. Parameters ‘from_junctions’ and ‘to_junctions’ must be arrays of equal length. Other parameters may be either arrays of the same length or single values.

Parameters:
  • net (pandapipesNet) – The net for which the heat exchangers should be created

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

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

  • diameter_m (Iterable(float) or float) – The heat exchangers inner diameter in [m]

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

  • loss_coefficient (Iterable(float) or float) – An additional pressure loss coefficient, introduced by e.g. bends

  • name (Iterable(str) or str, default None) – The name of the heat exchangers

  • index (Iterable(str) or str, 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 exchangers created.

  • in_service (Iterable(bool) or bool, default True) – True if the heat exchangers are in service or False if they are out of service

  • type (Iterable(str) or str, default "heat exchanger") – Not used yet

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

Returns:

index - The unique IDs of the created heat exchangers

Return type:

Iterable(int), default None

Example:
>>> create_heat_exchangers(net, from_junctions=[0,1], to_junctions=[2,3],
>>>                       diameter_m=40e-3, qext_w=2000)

Component Table Data

net.heat_exchanger

Parameter

Datatype

Value Range

Explanation

name

string

Name of the heat exchanger

from_junction

integer

\(>\) 0

Index of junction at which the heat exchanger starts

to_junction

integer

\(>\) 0

Index of junction at which the heat exchanger ends

diameter_m

float

\(\gt\) 0

Equivalent inner diameter of the heat exchanger [m]

qext_w

float

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

loss_coefficient

float

\(\geq\) 0

An additional loss coefficient which might account for e.g. bends

in_service

boolean

True / False

Specifies if the heat exchanger is in service.

type

string

Type variable to classify heat exchangers

Result Table Data

net.res_heat_exchanger

Parameter

Datatype

Explanation

v_mean_m_per_s

float

The mean velocity of fluid in the heat exchanger [m/s]

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]

mdot_from_kg_per_s

float

Mass flow into heat exchanger [kg/s]

mdot_to_kg_per_s

float

Mass flow out of heat exchanger [kg/s]

vdot_norm_m3_per_s

float

Norm volume flow [m^3/s]

reynolds

float

Average Reynolds number