-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add shortcircuit analysis api (#640)
adds short-circuit analysis APIs Signed-off-by: Christian Biasuzzi <christian.biasuzzi@soft.it>
- Loading branch information
Showing
26 changed files
with
1,458 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ of pypowsybl classes and methods. | |
sensitivity | ||
flowdecomposition | ||
dynamic | ||
shortcircuit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
Short-circuit analysis | ||
====================== | ||
|
||
.. module:: pypowsybl.shortcircuit | ||
|
||
|
||
Run a short-circuit analysis | ||
---------------------------- | ||
|
||
You can run a short-circuit analysis using the following methods: | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
:toctree: api/ | ||
|
||
create_analysis | ||
ShortCircuitAnalysis.run | ||
set_default_provider | ||
get_default_provider | ||
get_provider_names | ||
|
||
|
||
Parameters | ||
---------- | ||
|
||
The execution of the short-circuit analysis can be customized using short-circuit analysis parameters. | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
:toctree: api/ | ||
|
||
Parameters | ||
|
||
|
||
Define faults | ||
------------- | ||
|
||
You can define faults to be simulated with the following methods: | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
:toctree: api/ | ||
|
||
ShortCircuitAnalysis.set_faults | ||
|
||
|
||
Results | ||
------- | ||
|
||
When the short-circuit analysis is completed, you can inspect its results: | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
:toctree: api/ | ||
|
||
ShortCircuitAnalysisResult | ||
ShortCircuitAnalysisResult.fault_results | ||
ShortCircuitAnalysisResult.feeder_results | ||
ShortCircuitAnalysisResult.limit_violations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ relying as much as possible on practical examples. | |
logging | ||
flowdecomposition | ||
dynamic | ||
shortcircuit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Running a short-circuit analysis | ||
================================ | ||
|
||
You can use the module :mod:`pypowsybl.shortcircuit` in order to perform a shortcircuit analysis on a network. | ||
Please check out the examples below. | ||
|
||
For detailed documentation of involved classes and methods, please refer to the :mod:`API reference <pypowsybl.shortcircuit>`. | ||
|
||
Note that, currently, no simulator is integrated in pypowsybl to perform the short-circuit analysis. | ||
|
||
Short-circuit analysis | ||
---------------------- | ||
|
||
The current APIs allow the simulation of three-phased bus faults, where the fault resistance and reactance, when specified, are connected to the ground in series. | ||
|
||
To perform a short-circuit analysis, you need a network and at least a fault to simulate on this network. | ||
The results of the analysis contain the computed current and voltages on the network after the fault, in three-phased magnitude. | ||
Optionally, depending on specific parameters for the simulation, the results contain also | ||
|
||
- the contributions of each feeder to the short circuit current (parameter with_feeder_result) | ||
- a list of all the violations after the fault (parameter with_limit_violations) | ||
|
||
|
||
.. code-block:: | ||
>>> import pypowsybl as pp | ||
>>> import pypowsybl.network as pn | ||
>>> import pandas as pd | ||
>>> # create a network | ||
>>> n = pn.create_four_substations_node_breaker_network() | ||
>>> # sets some short-circuit parameters | ||
>>> pars = pp.shortcircuit.Parameters(with_feeder_result = False, with_limit_violations = False, study_type = pp.shortcircuit.ShortCircuitStudyType.TRANSIENT) | ||
>>> # create a short-circuit analysis context | ||
>>> sc = pp.shortcircuit.create_analysis() | ||
>>> # create a bus fault on the first two buses | ||
>>> buses = n.get_buses() | ||
>>> sc.set_faults(id = ['fault_1', 'fault_2'], element_id = [buses.index[0], buses.index[1]], r = [1, 1], x = [2, 2]) | ||
>>> # perform the short-circuit analysis | ||
>>> # results = sc.run(n, pars, 'sc_provider_1') | ||
>>> # returns the analysis results | ||
>>> # results.fault_results | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.