External Grid¶
Create Function¶
- create_ext_grid(net, junction, p_bar, t_k, name=None, in_service=True, index=None, type='pt')¶
Creates an external grid and adds it to the table net[“ext_grid”]. It transfers the junction that it is connected to into a node with fixed value for either pressure, temperature or both (depending on the type). Usually external grids represent connections to other grids feeding the given pandapipesNet.
- Parameters
net (pandapipesNet) – The net that the external grid should be connected to
junction (int) – The junction to which the external grid is connected
p_bar (float) – The pressure of the external grid
t_k (float, default 285.15) – The fixed temperature at the external grid
name (str, default None) – A name tag for this ext_grid
in_service (bool, default True) – True for in service, False for out of service
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.
type (str, default "pt") –
The external grid type denotes the values that are fixed at the respective node:
”p”: The pressure is fixed, the node acts as a slack node for the mass flow.
”t”: The temperature is fixed and will not be solved for, but is assumed as the node’s mix temperature. Please note that pandapipes cannot check for inconsistencies in the formulation of heat transfer equations yet.
”pt”: The external grid shows both “p” and “t” behavior.
- Returns
index - The unique ID of the created element
- Return type
int
- Example
>>> create_ext_grid(net, junction=2, p_bar=100, t_k=293.15)
Component Table Data¶
net.ext_grid
Parameter |
Datatype |
Value Range |
Explanation |
name |
string |
Name of the external grid |
|
junction |
integer |
Index of connected junction |
|
p_bar |
float |
\(>\) 0 |
Pressure set point [bar] |
t_k |
float |
\(>\) 0 |
Temperature set point [K] |
in_service |
boolean |
True / False |
Specifies if the external grid is in service. |
type |
string |
Naming conventions:
“p” - for node with fixed pressure
“t” - for node with fixed temperature
“pt” - for node with fixed pressure and temperature
|
Type variable to classify external grids |
Physical Model¶
An external grid is used to denote nodes with fixed values of pressure or temperature, that shall not be solved for anymore. In many cases, an external grid represents a connection to a higher-level grid (e.g. representing the medium pressure level in a low pressure grid). Please note the type naming convention, stating that “p” means that the pressure is fixed, “t” means that the temperature is fixed and “pt” means that both values are fixed at the connected junction. For nodes with fixed pressure, the mass flow into or out of the system is not known prior to calculation, but is a result of the pipeflow calculation.
Also note that there has to be at least one fixed value of pressure for hydraulic calculations and one fixed value for temperature in heat transfer calculations for each separate part of the grid. This is also checked for in the connectivity check.
Result Table Data¶
net.res_ext_grid
Parameter |
Datatype |
Explanation |
mdot_kg_per_s |
float |
Mass flow at external grid node [kg/s] (negative if leaving the system) |