Pressure Control

Physical Model

The pressure control component enforces a specific pressure at the controlled_junction. This is achieved by adding a required pressure lift or pressure drop between the from_junction and to_junction, so that controlled_p_bar will be reached at the controlled junction. The controlled junction can be identical to the to_junction to control the pressure directly at the outlet.

Internally, the behaviour is achieved by fixing the pressure variable at controlled_junction in the system matrix and keeping the pressure drop of the pressure control unit variable, so that is calculated during the Newton-Raphson-calculation.

Note

The temperature at the inlet and outlet junction will not be adapted by the pressure control unit. Therefore, these components usually operate isothermal (inlet temperature = outlet temperature). It is assumed that temperature changes due to compression or expansion (Joule-Thomson-effect) are balanced internally by adding or removing heat.

Warning

A sufficient hydraulic connection between from_junction, to_junction and controlled_junction is crucial for proper operation of this component. Hydraulically impossible configurations (e.g., if the controlled junction is on a different stub) or contradicting other pressure control units will lead to non-convergence of the pipeflow.

Create Function

For creating a single pressure control unit:

create_pressure_control(net, from_junction, to_junction, controlled_junction, controlled_p_bar, control_active=True, loss_coefficient=0.0, name=None, index=None, in_service=True, type='pressure_control', **kwargs)

Adds one pressure control that enforces a pressure at a specific junction.

The pressure control unit creates a pressure drop / lift between the ‘from’ and the ‘to’ junction so that the pressure set point at the controlled junction is met. It is required that the controlled junction is hydraulically properly connected to the from and to junction and no other pessure control unit is inbetween.

Parameters
  • net (pandapipesNet) – The net for which this pressure control should be created

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

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

  • controlled_junction (int) – ID of the junction at which the pressure is controlled

  • controlled_p_bar (float) – Pressure set point

  • control_active (bool, default True) – Variable to state whether the pressure control is active (otherwise behaviour similar to open valve)

  • loss_coefficient (float, default 0) – The pressure loss coefficient introduced by the component’s shape (used only if control is not active).

  • name (str) – Name of the pressure control 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 the pressure control is in service or False if it is out of service

  • type (str, default "pressure_control") – Currently not used - possibility to specify a certain type of pressure control

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

Returns

index - The unique ID of the created element

Return type

int

Example

Connect junction 0 and 1 and set the pressure at junction 1 to 5 bar.

>>> create_pressure_control(net, 0, 1, 1, controlled_p_bar=5)

For creating multiple pressure control units at once:

create_pressure_controls(net, from_junctions, to_junctions, controlled_junctions, controlled_p_bar, control_active=True, loss_coefficient=0.0, name=None, index=None, in_service=True, type='pressure_control', **kwargs)

Convenience function for creating many pressure controls 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.

Pressure control units enforce a pressure at a specific junction by creating a pressure drop / lift between the ‘from’ and the ‘to’ junction so that the pressure set point at the controlled junction is met. It is required that the controlled junction is hydraulically properly connected to the from and to junction and no other pessure control unit is inbetween.

Parameters
  • net (pandapipesNet) – The net for which these pressure controls should be created

  • from_junctions (Iterable(int)) – IDs of the junctions on one side which the pressure controls will be connected to

  • to_junctions (Iterable(int)) – IDs of the junctions on the other side to which the pressure controls will be connected to

  • controlled_junctions (Iterable or int) – IDs of the junctions at which the pressure is controlled

  • controlled_p_bar (Iterable or float) – Pressure set points

  • control_active (bool, default True) – Variable to state whether the pressure control is active (otherwise behaviour similar to open valve)

  • loss_coefficient (float, default 0) – The pressure loss coefficient introduced by the component’s shape (used only if control is not active).

  • name (Iterable or str) – Name of the pressure control elements

  • index (Iterable(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.

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

  • type (Iterable or str, default "pressure_control") – Currently not used - possibility to specify a certain type of pressure control

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

Returns

index - The unique IDs of the created elements

Return type

array(int)

Example

Create one unit to connect junction 0 and 1, set the pressure at junction 1 to 5 bar.

And create a 2nd unit to connect junction 2 and 4, set the pressure at junction 3 to 4.9 bar.

>>> create_pressure_controls(net, [0, 2], [1, 4], [1, 3],
>>>                          controlled_p_bar=[5, 4.9])

Component Table Data

net.press_control

Parameter

Datatype

Value Range

Explanation

net

pandapipesNet

The pandapipes net object in whose press_control table the new unit will be added

from_junction

integer

\(>\) 0

Index of junction at which the pressure control unit starts

to_junction

integer

\(>\) 0

Index of junction at which the pressure control unit ends

controlled_junction

integer

> 0

ID of the junction at which the pressure is controlled

controlled_p_bar

float

> 0

Pressure set point [barg]

control_active

boolean

If false, the unit behaves like an open valve

loss_coefficient

float

> ß

Pressure loss coefficient (only effective if control is not active)

name

string

Name of the pressure control unit

index

integer

> 0

Force specific index the press_control-DataFrame, if available

in_service

boolean

True / False

If false, the unit behaves like a closed valve.

type

string

Type variable to classify different kinds of pressure control units (not considered by pandapipes’ calculations)

Result Table Data

net.res_press_control

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]

mdot_to_kg_per_s

float

Mass flow out of pressure control unit [kg/s]

mdot_from_kg_per_s

float

Mass flow into pressure control unit [kg/s]

vdot_norm_m3_per_s

float

Norm volume flow [m^3/s]

deltap_bar

float

Pressure difference between to- and from junction created by the pressure controller [bar]