You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pypsa
Dear all,
I recently added DC-Links to my network. I simply used the direct links, connecting 2 AC-Busses by a link. This works fine for the LOPF and the LPF. But when I try to run a PF on the results, the DC-Links dont show any power-flow. Do I have to take the detour by creating DC Busses, connecting them to the AC Busses via Link and connect the DC busses by a DC-line? Whats the difference between the PF and the LPF here?
Best wishes,
Elias
Fabian Neumann
unread,
Dec 17, 2021, 11:14:50 AM12/17/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Elias Althoff, pypsa
Hi Elias,
links connecting AC buses directly shouldn't be a problem. For the PF,
do you set n.links_t.p_set? Generally, this has to be done for all
controllable components.
Visitor Address:
Einsteinufer 25 (TA 8)
10587 Berlin
Elias Althoff
unread,
Dec 18, 2021, 5:34:29 AM12/18/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pypsa
Hey Fabian,
thanks for the answer. Its weird though, because it behaves differently for me.
You were right, I did not set a p_set, only p_nom. The LOPF used it like a line and sent whatever was optimal through it. The links were "ignored" in the PF - no power flow. Now, that I set the p_set, there is a power flow of whatever I set in p_set in the PF. In the LOPF, the power flow still varies.
I actually prefer it to be variable. I dont want to force a specific number through the link. I want it to be done by the system. Is that possible as well? I mean it seems to me like this is whats happening in the LOPF in my case.
Best wishes,
Elias
Elias Althoff
unread,
Dec 18, 2021, 5:38:28 AM12/18/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pypsa
I just had a look into the documentation and for p_set it says: "
The dispatch set point for p0 of the link in PF."
So there seems to be a difference. That makes it very complicated to run a PF on my LOPF results, because the DC links will behave differently.
Fabian Neumann
unread,
Dec 18, 2021, 6:13:26 AM12/18/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to py...@googlegroups.com
Hi Elias,
the PF (and LPF) will always depend on the set points of all the
controllable components (obtained either through LOPF or set manually).
The HVDC links belong to this category of components for which we can
control the power flow and for which their flow is not governed by KVL.
Just like generators and loads, links contribute to the net power
injections at each bus which serves as input to PF. PF is not suitable
to determine the flow in links, that's the job of LOPF like for
generator dispatch.
Not sure I understood the second e-mail. The point of the p_set is that
the flows in the DC links are consistent across LOPF outputs and PF inputs.
Best wishes,
Fabian N
On 18.12.21 11:38, Elias Althoff wrote:
> I just had a look into the documentation and for p_set it says: " The
> --
> 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
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pypsa
Hi Fabian,
thanks again. I checked your code and solved it accordingly. It is working now for both LPF and PF. While having a look at your code I wondered about another thing we were talking about in another post - updating the line attributes when extending the grid. you solved it using this bit:
if lines_ext_untyped_b.any(): for attr in ("r", "x"): n.lines.loc[lines_ext_untyped_b, attr] = lines[attr].multiply( lines["s_nom"] / n.lines["s_nom_opt"]
In my case I used the 'type' column to specify my cable type, so by definition the r and x values get overwritten. ("Name of line standard type. If this is not an empty string “”, then the line standard type impedance parameters are multiplied with the line length and divided/multiplied by num_parallel to compute x, r, etc. This will override any values set in r, x, and b. If the string is empty, PyPSA will simply read r, x, etc.")
So that for loop would not solve that problem for me, would it?
Best wishes,
Elias
Fabian Neumann
unread,
Dec 19, 2021, 3:22:16 PM12/19/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to py...@googlegroups.com
Hi Elias,
this code block is only for the untyped lines (where type == ''). Below
that is a code block where the num_parallels are updated for typed lines: