powsybl / powsybl-core

A framework to build power system oriented software

Home Page:https://www.powsybl.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stability of bus voltage and angle

flo-dup opened this issue · comments

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Voltage and angle of bus taken from first terminal encountered

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
On a node breaker network, after computing a loadflow, with powsybl-iidm-impl, add a load to an existing bus of the bus view

  • either with a low node number (lower than the lowest node number), then the terminal ref is the terminal of the new load, hence the bus voltage and angle are NaN
  • or with a high node number (higher than the lowest node number), then the terminal ref remains the same terminal, hence the bus voltage and angle are defined

What is the expected behavior?
The bus voltage and angle should be the same in both cases.

What is the motivation / use case for changing the behavior?
Stable V and angle, not based on traversing order

Other information
Unit test:

Network network = FictitiousSwitchFactory.create();
LoadFlow.run(network);

VoltageLevel vlN = network.getVoltageLevel("N");
Terminal.BusView loadBusView = network.getLoad("CE").getTerminal().getBusView(); // bus containing nodes 3, 4, 5

// loadBusView.getBus().getV() now is equal to 234kV
vlN.getNodeBreakerView().newInternalConnection().setNode1(3).setNode2(23).add();
vlN.newLoad().setId("newLoad").setP0(1).setQ0(1).setNode(23).add();
// loadBusView.getBus().getV() remains equal to 234kV

vlN.newLoad().setId("newLoad").setP0(1).setQ0(1).setNode(3).add();
// loadBusView.getBus().getV() is now equal to NaN