Mass Storage
Physical Model
A mass storage unit draws/injects a specified mass flow from/into the connected junction. It is implemented similar to a sink, i.e. positive mass flow values correspond to charging of the storage unit, negative mass flows means discharge of the storage unit.
The mass storage component is meant for all storage applications that do not involve relevant temperature changes or changes in the fluid’s composition, e.g., a water tower. It is always assumed that the discharged fluid is of the same temperature and composition as the fluid at the junction where the unit is connected to.
In stationary calculations (c.f. The Pipeflow Function), it acts as a simple sink/source,
without changing m_stored_kg
(since the duration of the mass flow is unknown).
For dynamic behaviour across time steps, an accompaning BasicController has to be implemented,
in which the charging / discharging behaviour and duration of timesteps is defined.
The dynamic calculation can then be started by run_control (for one time step) or
run_timeseries for time series.
Tip
An example storage controller can be found in the respective tutorial.
Warning
This component is only intended for mass storage applications and will likely lead to wrong results if it is used for district heating network applications.
Create Function
For creating a single mass storage:
- create_mass_storage(net, junction, mdot_kg_per_s, init_m_stored_kg=0, min_m_stored_kg=0.0, max_m_stored_kg=inf, scaling=1.0, name=None, index=None, in_service=True, type='mass_storage', **kwargs)
Adds one storage entry in table net[“mass_storage”]. Not suitable for thermal storage tanks.
- Parameters
net (pandapipesNet) – The net for which this storage unit should be created
junction (int) – The index of the junction to which the storage is connected
mdot_kg_per_s (float, default None) – The stationary mass flow. (if fluid flows into storage: > 0, if fluid flows from storage to net: < 0)
init_m_stored_kg (float, default None) – The initially stored mass in the storage
min_m_stored_kg (float) – Minimum amount of fluid that has to remain in the storage unit. (To be used with controllers)
max_m_stored_kg (float, default np.inf) – Maximum amount of fluid that can be stored in the storage unit. (To be used with controllers)
scaling (float, default 1) – An optional scaling factor to be set customly
name (str, default None) – A name tag for this storage unit
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 mass_storage) – Type variable to classify the storage
kwargs – Additional keyword arguments will be added as further columns to the net[“mass_storage”] table
- Returns
index - The unique ID of the created element
- Return type
int
- Example
>>> create_mass_storage(net, junction=2, mdot_kg_per_s=0.1)
Component Table Data
net.mass_storage
Parameter |
Datatype |
Value Range |
Explanation |
net |
pandapipesNet |
The pandapipes net object in whose |
|
junction |
integer |
> 0 |
Index of connected junction |
mdot_kg_per_s |
float |
> 0: charging,< 0: discharging |
Mass flow in stationary pipeflow calculation [kg/s] |
init_m_stored_kg |
float |
greq 0 |
The initially stored mass in the storage in kg. |
min_m_stored_kg |
float |
greq 0 |
Minimum amount of fluid that can be stored in the storage unit. (To be used with controllers) |
max_m_stored_kg |
float |
> 0 |
Maximum amount of fluid that can be stored in the storage unit. (To be used with controllers) |
scaling |
float |
> 0 |
An optional scaling factor to be set customly (default 1.0). Factor will be applied on |
name |
string |
Name of the mass storage unit |
|
index |
integer |
> 0 |
Force a specified ID if it is available. Default None, i.e. the index one higher than the highest already existing index is selected. |
in_service |
boolean |
True / False |
Specifies if the mass storage is in service. |
type |
string |
Component type (default ‘mass_storage’), can be used to distinguish between different kinds of mass storage. Not considered by pandapipes’ calculations. |
Result Table Data
net.res_mass_storage
Parameter |
Datatype |
Explanation |
mdot_kg_per_s |
float |
mass flow [kg/s] (> 0: charging / < 0: discharging) |
More columns may be added by controller implemente by the user,
e.g., m_stored_kg
, filling_level_percent
, etc.