Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/powsybl/powsybl-open-loadflow
An open source loadflow based on PowSyBl
https://github.com/powsybl/powsybl-open-loadflow
energy-system java klu load-flow loadflow power-flow power-system-simulation power-systems powerflow powsybl
Last synced: 3 months ago
JSON representation
An open source loadflow based on PowSyBl
- Host: GitHub
- URL: https://github.com/powsybl/powsybl-open-loadflow
- Owner: powsybl
- License: mpl-2.0
- Created: 2019-10-01T13:48:47.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T15:11:50.000Z (7 months ago)
- Last Synced: 2024-04-15T08:50:54.256Z (7 months ago)
- Topics: energy-system, java, klu, load-flow, loadflow, power-flow, power-system-simulation, power-systems, powerflow, powsybl
- Language: Java
- Homepage:
- Size: 7.24 MB
- Stars: 43
- Watchers: 12
- Forks: 5
- Open Issues: 44
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- open-sustainable-technology - PowSyBl Open Load Flow - An open source library written in Java, that makes it easy to write complex software for power systems simulations and analysis. (Energy Systems / Energy System Modeling Frameworks)
README
# PowSyBl Open Load Flow
[![Actions Status](https://github.com/powsybl/powsybl-open-loadflow/workflows/CI/badge.svg)](https://github.com/powsybl/powsybl-open-loadflow/actions)
[![Coverage Status](https://sonarcloud.io/api/project_badges/measure?project=com.powsybl%3Apowsybl-open-loadflow&metric=coverage)](https://sonarcloud.io/component_measures?id=com.powsybl%3Apowsybl-open-loadflow&metric=coverage)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=com.powsybl%3Apowsybl-open-loadflow&metric=alert_status)](https://sonarcloud.io/dashboard?id=com.powsybl%3Apowsybl-open-loadflow)
[![MPL-2.0 License](https://img.shields.io/badge/license-MPL_2.0-blue.svg)](https://www.mozilla.org/en-US/MPL/2.0/)
[![Slack](https://img.shields.io/badge/slack-powsybl-blueviolet.svg?logo=slack)](https://join.slack.com/t/powsybl/shared_invite/zt-rzvbuzjk-nxi0boim1RKPS5PjieI0rA)PowSyBl (**Pow**er **Sy**stem **Bl**ocks) is an open source library written in Java, that makes it easy to write complex
software for power systems’ simulations and analysis. Its modular approach allows developers to extend or customize its
features.PowSyBl is part of the LF Energy Foundation, a project of The Linux Foundation that supports open source innovation projects
within the energy and electricity sectors.
Read more at https://www.powsybl.org !
This project and everyone participating in it is under the [Linux Foundation Energy governance principles](https://www.powsybl.org/pages/overview/governance) and must respect the [PowSyBl Code of Conduct](https://github.com/powsybl/.github/blob/main/CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable behavior to [[email protected]](mailto:[email protected]).## PowSyBl vs PowSyBl Open Load Flow
PowSyBl Open Load Flow provides:
- An open-source implementation of the [LoadFlow API from PowSyBl Core](https://www.powsybl.org/pages/documentation/simulation/powerflow/), supporting DC and AC calculations.
- An open-source implementation of the [SecurityAnalysis API from PowSyBl Core](https://www.powsybl.org/pages/documentation/simulation/securityanalysis/), supporting DC and AC calculations.
- An open-source implementation of the [SensitivityAnalysis API from PowSyBl Core](https://www.powsybl.org/pages/documentation/simulation/sensitivity/), supporting DC and AC calculations.Most of the code is written in Java. It only relies on native code for the [KLU](http://faculty.cse.tamu.edu/davis/suitesparse.html) sparse linear solver. Linux, Windows and MacOS are supported. KLU is distributed with license LGPL-2.1+.
### Common features
The AC calculations are based on full Newton-Raphson algorithm. The DC calculations are based on direct current linear approximation. Open Load Flow relies on:
- Fast and robust convergence, based on [KLU](http://faculty.cse.tamu.edu/davis/suitesparse.html) sparse solver.
- Distributed slack (on generators, on loads, or on conform loads); Manual or automatic slack bus selection as explained [here](https://www.powsybl.org/pages/documentation/simulation/powerflow/openlf.html#parameters).
- Support of generators' active and reactive power limits, including the support of reactive capability curves.
- 5 voltage initialization modes: flat, warm, angles-only based on a DC load flow, magnitude-only initialization based on a specific initializer, or both voltages angle and magnitude initialization based on the two previous methods.
- Support of zero impedance branches, including complex zero impedance subnetworks, particularly important in case of voltage controls and topology changes involved in contingencies or in remedial actions.
- Multiple synchronous component calculation, generally linked to HVDC lines.
- Modeling of secondary voltage control following research of [Balthazar Donon, Liège University](https://www.montefiore.uliege.be/cms/c_3482915/en/montefiore-directory?uid=u239564).
- Support of asymmetrical calculations.
- Implementation of three methods to update the state vector in the Newton-Raphson algorithm: classic, rescaling under maximum voltage change and linear search rescaling.### About controls
Open Load Flow supports:
- Generator and static var compensator voltage remote control through PQV bus modelling. It supports any kind of shared voltage control between controllers that can be generators, static var compensators, or VSC converter stations.
- Static var compensator local voltage control with a slope (support the powsybl-core extension [```VoltagePerReactivePowerControl```](https://www.powsybl.org/pages/documentation/grid/model/extensions.html).
- Local and remote phase control: phase tap changers can regulate active power flows or limit currents at given terminals.
- Local and remote voltage control by transformers, including shared controls.
- Local and remote voltage control by shunts, including shared controls.
- Remote reactive power control of a branch by generators, including shared controls.
- Remote reactive power control of a branch by transformers.Heterogeneous voltage controls management has become a key feature. All well-modeled voltage controls are kept and managed through a priority and a complex management of zero impedance lines. The generators have the first priority, followed by transformers, and then shunts. In a load flow run, in a controlled bus, only the main voltage control of highest priority controls voltage. When incremental outer loops are used, secondary priorities voltage controls can help generators that have reached reactive limits.
### Security analysis implementation
- Network in node/breaker topology and in bus/breaker topology.
- Support of all types of contingency. Note that in case of a shunt compensator contingency, we don't support a contingency on it with a global voltage control by shunts at this stage. Bus contingency and bus bar section contingency are supported, leading in many case to branches opened at one side.
- All kind of operational limits violations detection on branches (permanent and temporary limits): current limits, apparent power limits, active power limits.
- High and low voltage limits violations detection on buses.
- Voltage angle limits violation.
- Complex cases where the contingency leads to another synchronous component where a new resolution has to be performed are not supported at that stage. The loss of slack bus during a contingency is not supported yet, but the work is in progress.
- The active and reactive power flows on branches, as well as angle and voltage at buses, can be monitored and collected for later analysis after the base case and after each contingency.
- Remedial actions such as: switch action, terminal(s) connection action, re-dispatching action### Sensitivity analysis implementation
Open Load Flow both supports both AC and DC calculations. Even though it comes from the same powsybl-core API, the calculations behind are radically different. The AC post-contingency sensitivities calculation is based on the same principles than the AC security analysis. The DC post-contingency sensitivities calculation is highly optimized and fully documented [here](https://www.powsybl.org/pages/documentation/simulation/sensitivity/openlf.html).
It supports all types of sensitivity factors that can be found in the API:
- Variables: injection increase, phase angle shift, HVDC set point increase. For AC calculations only: voltage target increase of generator, static var compensator, transformers or shunt.
- Functions: the active power flow or the current on a branch. For AC calculations only: the voltage on a bus.The following contingency types are supported:
- Branch contingencies,
- Load and generator contingencies,
- HVDC line contingency.## Getting started
Running a load flow with PowSyBl Open Load Flow is easy. First let's start loading a IEEE 14 bus network. We first add a few Maven
dependencies to respectively have access to network model, IEEE test networks and simple logging capabilities:```xml
com.powsybl
powsybl-iidm-impl
6.4.1com.powsybl
powsybl-ieee-cdf-converter
6.4.1org.slf4j
slf4j-simple
2.0.13```
We are now able to load the IEEE 14 bus:
```java
Network network = IeeeCdfNetworkFactory.create14();
```After adding a last Maven dependency on Open Load Flow implementation:
```xmlcom.powsybl
powsybl-open-loadflow
1.12.0```
We can run the load flow with default parameters on the network:
```java
LoadFlow.run(network);
```State variables and power flows computed by the load flow are have been updated inside the network model, and we can, for instance
print on standard output buses voltage magnitude and angle:```java
network.getBusView().getBusStream().forEach(b -> System.out.println(b.getId() + " " + b.getV() + " " + b.getAngle()));
```
## Contributing to PowSyBl Open Load FlowPowSyBl Open Load Flow could support more features. The following list is not exhaustive and is an invitation to collaborate:
We can always increase or improves features and implementations. We have thought about:
- Improving performances of the AC security and sensitivity analysis implementations.
- Support of all remedial action types available in the API.
- Contingency propagation in AC and DC sensitivity analyses.For more details, to report bugs or if you need more features, visit our [github](https://github.com/powsybl/powsybl-open-loadflow/issues) and do not hesitate to write new issues.
## Using Maven Wrapper
If you don't have a proper Maven installation, you could use the provided Apache Maven Wrapper scripts.
They will download a compatible maven distribution and use it automatically.You can see the [Using Maven Wrapper](https://github.com/powsybl/powsybl-core/tree/main#using-maven-wrapper) section of the [powsybl-core](https://github.com/powsybl/powsybl-core) documentation if you want further information on this subject.