mosaik-pandapipes
This is an adapter for using the massflow network calculation program pandapipesin a mosaik simulation.
This simulator is still work in progress. If there is a need for a specific attribute und parameter to implement, leave an issue here.
Usage
Installation
Currently, this package is not on PyPI, so you need to install it from this git repository directly.
Setup
First, add the simulator to your SIM_CONFIG:
SIM_CONFIG = {
"Pandapipes": {"python": "mosaik_components.pandapipes:Simulator"},
...
}
Having created your world, you can then start an instance of the simulator via
pp_sim = world.start("Pandapipes", step_size=900)
The step_size specifies at which steps this simulator runs. If you don’t give a step size or set it to None, the simulator will run in event-based mode, i.e. whenever it receives new input.
Finally, you can create the Grid entity. There are several ways of doing this:
-
If you have a pandapowerNet instance
netin your scenario and the pandapower simulator is running in the same Python instance, you can use that grid by callinggrid = pp_sim.Grid(net=net)
-
If the grid is in a JSON file (in pandapower’s format), you can call
grid = pp_sim.Grid(json=path_to_json)
-
Similarly, if the grid is in an Excel file,
grid = pp_sim.Grid(xlsx=path_to_xlsx)
The simulator supports only one grid entity. If you want to simulate several grids, you need to start several instances of the simulator.
Identifying grid elements
The Grid entity grid will have a child entity for each supported element in the grid. You can access them via grid.children. You can filter for specific types of entities by checking the child entity's type attribute or eid.
Connecting other simulators to the grid
You can connect positive entities to source and negative to sink, or both to a storage.
Table of entity types and attributes
| Entity type | Attribute | In/Out | Description |
|---|---|---|---|
| Grid | meta entity representing the entire grid | ||
| Junction | a junction in the grid | ||
p[bar] |
out | The junction pressure [bar] | |
t[k] |
out | The junction temperature [K] | |
| Source | a source in the grid | ||
mdot_source[kg/s] |
in | Mass flow injection [kg/s] | |
mdot[kg/s] |
out | Mass flow injection [kg/s] | |
| Sink | a sink in the grid | ||
mdot_sink[kg/s] |
in | Drawn mass flow [kg/s] | |
mdot[kg/s] |
out | Drawn mass flow [kg/s] | |
| Storage | a load in the grid | ||
mdot_storage[kg/s] |
in | Mass flow in stationary pipeflow calculation [kg/s] | |
mdot[kg/s] |
out | Mass flow [kg/s] (> 0: charging / < 0: discharging) | |
| Pipe | apipe in the grid | ||
Re |
Out | Average Reynolds number | |
lamda |
Out | Average valve friction factor | |
v_mean[m/s] |
Out | The mean valve velocity [m/s] | |
| Valve | a valve in the grid | ||
Re |
Out | Average Reynolds number | |
lamda |
Out | Average valve friction factor | |
v_mean[m/s] |
Out | The mean valve velocity [m/s] |
Metadata
Release files for mosaik-pandapipes 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mosaik_pandapipes-0.1.0.tar.gz | 6.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mosaik_pandapipes-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.9 kB
Release files / mosaik_pandapipes-0.1.0.tar.gz
| Download URL | mosaik_pandapipes-0.1.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
732668bb4d9e7d2eb5dbd870deee67ac07616916dc5ca1a7318105a0bd79c649
|
|
BLAKE2b-256 checksum How to use checksums |
5b627b0ff8012c2302cd5bbc038e38ea90d5b2b2362f05fd8ae46b63120ed4ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.13 Linux/5.4.109+
|
Release files / mosaik_pandapipes-0.1.0-py3-none-any.whl
| Download URL | mosaik_pandapipes-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a55ba1b76a7e98174b9b2fc5e478483dcbb3321223030da0ff75aaf772c74871
|
|
BLAKE2b-256 checksum How to use checksums |
4ff895aadd0932faee6eeef08ca8b5bc7e08968cd65b4367ebe6fc20e0e2ddcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.13 Linux/5.4.109+
|