Flow Control
Physical Model
The flow control component enforces a specific mass flow between two junctions. This is very helpful to control the mass flow in district heating networks.
Warning
It is recommended to use the flow control components only in looped networks. Using the flow controller in non-looped networks, in particular on stubs, can likely lead to non-convergence of the pipeflow.
Create Function
For creating a single flow control unit:
- create_flow_control(net, from_junction, to_junction, controlled_mdot_kg_per_s, control_active=True, name=None, index=None, in_service=True, type='fc', **kwargs)
Adds one flow control with a constant mass flow in table net[“flow_control”].
- Parameters:
net (pandapipesNet) – The net for which this flow control should be created
from_junction (int) – ID of the junction on one side which the flow control will be connected with
to_junction (int) – ID of the junction on the other side which the flow control will be connected with
controlled_mdot_kg_per_s (float) – Mass flow set point
control_active (bool, default True) – Variable to state whether the flow control is active (otherwise similar to open valve)
name (str) – Name of the flow 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 flow controller is in service or False if it is out of service
type (str, default "fc") – Currently not used - possibility to specify a certain type of flow control
kwargs – Additional keyword arguments will be added as further columns to the net[“flow_control”] table
- Returns:
index - The unique ID of the created elements
- Return type:
int
- Example:
>>> create_flow_control(net, 0, 1, 0.5, 0.8)
For creating multiple flow control units at once:
- create_flow_controls(net, from_junctions, to_junctions, controlled_mdot_kg_per_s, control_active=True, name=None, index=None, in_service=True, type='fc', **kwargs)
Convenience function for creating many flow 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.
- Parameters:
net (pandapipesNet) – The net for which these flow controls should be created
from_junctions (Iterable(int)) – IDs of the junctions on one side which the flow 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_mdot_kg_per_s (Iterable or float) – Mass flow set points
control_active (bool, default True) – Variable to state whether the flow control is active (otherwise similar to open valve)
name (Iterable or str) – Name of the flow 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 flow controls are in service or False if they are out of service
type (Iterable or str, default "fc") – Currently not used - possibility to specify a certain type of flow control
kwargs – Additional keyword arguments will be added as further columns to the net[“flow_control”] table
- Returns:
index - The unique IDs of the created elements
- Return type:
array(int)
- Example:
Create two flow controllers between junction 0 and 1 with 0.5 kg/s and junction 2 and 4 with 0.9 kg/s, respectively.
>>> create_flow_controls(net, [0, 2], [1, 4], [0.5, 0.9])
Component Table Data
net.flow_control
Parameter |
Datatype |
Value Range |
Explanation |
net |
pandapipesNet |
The pandapipes net object in whose |
|
from_junction |
integer |
\(>\) 0 |
Index of junction at which the flow control unit starts |
to_junction |
integer |
\(>\) 0 |
Index of junction at which the flow control unit ends |
controlled_mdot_kg_per_s |
float |
The mass flow set point [kg/s] |
|
diameter |
float |
> 0 |
diameter to derive the cross-sectional area |
control_active |
boolean |
If false, the unit behaves like an open valve |
|
name |
string |
Name of the flow control unit |
|
in_service |
boolean |
True / False |
If false, the unit behaves like a closed valve. |
type |
string |
Type variable to classify different kinds of flow control units (not considered by pandapipes’ calculations) |
Result Table Data
net.res_flow_control
Parameter |
Datatype |
Explanation |
v_mean_m_per_s |
float |
The mean velocity of fluid in the flow control unit [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 flow control unit [kg/s] |
mdot_to_kg_per_s |
float |
Mass flow out of flow control unit [kg/s] |
vdot_norm_m3_per_s |
float |
Norm volume flow [m^3/s] |
reynolds |
float |
Average Reynolds number |