How can I obtain electrical losses after execute a network.pf()?

66 views
Skip to first unread message

Kelly Costa

unread,
Feb 11, 2020, 9:10:27 AM2/11/20
to pypsa
Even after reading the documentation I couldn't understand a way to obtain all the data necessary to do the calculation manually, since this tip here (https://github.com/PyPSA/PyPSA/issues/106) ended up not being what I actually intended. Is it possible to obtain the necessary data to perform such a calculation (Σ (R * I²))?

Fabian Neumann

unread,
Feb 11, 2020, 9:33:02 AM2/11/20
to py...@googlegroups.com
Hi Kelly,

have you tried (as outlined in
https://pypsa.readthedocs.io/en/latest/design.html#sign-conventions)

```
import pypsa
network = pypsa.Network("mynetwork.nc")
power_losses = network.lines_t.p0 + network.lines_t.p1
```

power_losses will be a pd.DataFrame which gives you losses for each line
and snapshot individually.

Depending on your snapshot weights, you also have to count these in to
obtain energy losses.

To aggregate, just sum over columns and rows.

Otherwise, I am not sure what the problem is. If this doesn't solve your
question, can you be more specific?

Best,

Fabian N
> --
> You received this message because you are subscribed to the Google
> Groups "pypsa" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pypsa+un...@googlegroups.com
> <mailto:pypsa+un...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pypsa/dcad6c8e-cba6-475c-b3e7-b182f5e6d389%40googlegroups.com
> <https://groups.google.com/d/msgid/pypsa/dcad6c8e-cba6-475c-b3e7-b182f5e6d389%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Karlsruhe Institute of Technology (KIT)
Institute for Automation and Applied Informatics (IAI)

Fabian Neumann, M.Sc.
PhD Student in Energy System Modelling

Phone: +49 721 608 25707
Mobile: +49 171 2943831
Fax: +49 721 608 22602
Group Website: www.iai.kit.edu/english/esm.php
Personal Website: www.neumann.fyi
Github: fneum
LinkedIn: fabian-neumann-renewables
ORCID: 0000 0001 8551 1480

Building 445, Office 304
Campus North
Hermann-von-Helmholtz-Platz 1
76344 Eggenstein-Leopoldshafen

KIT – the Research University in the Helmholtz Association

Kelly Costa

unread,
Mar 18, 2020, 12:47:05 PM3/18/20
to pypsa
Thank you, that was it.
Reply all
Reply to author
Forward
0 new messages