power-grid-model is a Python library for steady-state distribution power system analysis. The core of the library is written in C++. Using it for calculation can give a significant boost to performance, especially for asymmetric calculations.
Currently power-grid-model supports limited components hence some of components or features are not supported. You can find the complete details about them here. An exception will be raised for them.
First imports and initialize a basic network
import pandapower as pp
from pandapower.networks import example_simple
net = example_simple()
# Remove Generator since its not supported yet
net["gen"] = net["gen"].iloc[:0]
A powerflow can be run using power-grid-model for calculation by using the pp.runpp_pgm
function. The function has its own arguments different from pp.runpp()
pp.runpp_pgm(net)
net.res_bus
vm_pu | va_degree | p_mw | q_mvar | |
---|---|---|---|---|
0 | 1.020390 | 50.002110 | 7.776054e-01 | 3.923591e+00 |
1 | 1.020553 | 50.004272 | 9.659178e-09 | -5.178393e-08 |
2 | 1.020553 | 50.004272 | 2.272012e-08 | -9.998678e-01 |
3 | 1.007663 | -99.760602 | -2.291840e-08 | -5.021892e-09 |
4 | 1.007663 | -99.760602 | -1.263901e-08 | 2.271646e-08 |
5 | 1.007687 | -99.762083 | 7.659661e-14 | -1.713588e-13 |
6 | 1.006282 | -99.606095 | -8.000000e-01 | 2.900000e+00 |
To know more about the library, refer to power-grid-model and repository and power-grid-model documentation. The conversion from pandapower net to and from power-grid-model is handled by power-grid-model-io (power-grid-model-io documentation).
The user however would usually not have to concern with these as power-grid-model is integrated into pandapower powerflow functions directly.