Sink
Create Function
For creating a single sink:
- create_sink(net, junction, mdot_kg_per_s, scaling=1.0, name=None, index=None, in_service=True, type='sink', **kwargs)
Adds one sink in table net[“sink”].
- Parameters:
net (pandapipesNet) – The net for which this sink should be created
junction (int) – The index of the junction to which the sink is connected
mdot_kg_per_s (float, default None) – The required mass flow
scaling (float, default 1) – An optional scaling factor to be set customly
name (str, default None) – A name tag for this sink
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 for in service, False for out of service
type (str, default None) – Type variable to classify the sink
kwargs – Additional keyword arguments will be added as further columns to the net[“sink”] table
- Returns:
index - The unique ID of the created element
- Return type:
int
- Example:
>>> new_sink_id = create_sink(net, junction=2, mdot_kg_per_s=0.1)
For creating multiple sinks at once:
- create_sinks(net, junctions, mdot_kg_per_s, scaling=1.0, name=None, index=None, in_service=True, type='sink', **kwargs)
Convenience function for creating many sinks at once. Parameter ‘junctions’ must be an array of the desired length. Other parameters may be either arrays of the same length or single values.
- Parameters:
net (pandapipesNet) – The net for which this sink should be created
junctions (Iterable(int)) – The index of the junctions to which the sinks are connected
mdot_kg_per_s (Iterable or float, default None) – The required mass flow
scaling (Iterable or float, default 1) – An optional scaling factor to be set customly
name (Iterable or str, default None) – Name tags for the sinks
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 for in service, False for out of service
type (Iterable or str, default None) – Type variables to classify the sinks
kwargs – Additional keyword arguments will be added as further columns to the net[“sink”] table
- Returns:
index - The unique IDs of the created elements
- Return type:
array(int)
- Example:
>>> new_sink_ids = create_sinks(net, junctions=[1, 5, 10], >>> mdot_kg_per_s=[0.1, 0.05, 0.2])
Component Table Data
net.sink
Parameter |
Datatype |
Value Range |
Explanation |
name |
string |
Name of the sink |
|
junction |
integer |
Index of connected junction |
|
mdot_kg_per_s |
float |
\(\geq 0\) |
Drawn mass flow [kg/s] |
scaling * |
float |
\(\geq 0\) |
Scaling factor to adapt the drawn mass flow |
in_service* |
boolean |
True / False |
Specifies if the sink is in service. |
type |
string |
Component type |
Physical Model
A sink draws a specified mass flow from the connected junction. Note that positive mass flow values correspond to flows leaving the network system.
Sinks are typically used to model loads in hydraulic systems. Please note that sinks cannot be used to model loads for the pandapipes heat mode. In this case, to model a heat flow drawn by a consumer, the heat exchanger component can be used.
Result Table Data
net.res_sink
Parameter |
Datatype |
Explanation |
mdot_kg_per_s |
float |
Drawn mass flow [kg/s] |