Skip to content

Commit

Permalink
Merge branch 'main' into loadflow_api_updates
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneLt authored Feb 14, 2024
2 parents d896bca + abcae66 commit 6bd5c84
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Notebooks demonstrating PyPowSyBl features can be found in this [repository](htt

## Installation

PyPowSyBl is released on [PyPi](https://pypi.org/project/pypowsybl/) for Python 3.7 to 3.11, on Linux, Windows and MacOS.
PyPowSyBl is released on [PyPi](https://pypi.org/project/pypowsybl/) for Python 3.8 to 3.12, on Linux, Windows and MacOS.

First, make sure you have an up-to-date version of pip and setuptools:
```bash
Expand Down Expand Up @@ -144,7 +144,7 @@ And then, to build the documentation:
make html
```

Web pages are generated in repository _build/html/ for preview before openning a pull request.
Web pages are generated in repository _build/html/ for preview before opening a pull request.
You can for example open it with firefox browser:

```bash
Expand Down
8 changes: 4 additions & 4 deletions pypowsybl/shortcircuit/impl/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ class Parameters: # pylint: disable=too-few-public-methods
"""
Parameters for a short-circuit analysis execution.
Please check the Powsybl's short-circuit APIs documentation, for detailed information.
Please check the PowSyBl short-circuit APIs documentation, for detailed information.
.. currentmodule:: pypowsybl.shortcircuit
Args:
with_fortescue_result: indicates whether the currents and voltages are to be given in three-phase magnitude or
detailed with magnitude and angle on each phase. This parameter also applies to the feeder results and
voltage results.
with_feeder_result: indicates whether the contributions of each feeder to the short circuit current at the fault
with_feeder_result: indicates whether the contributions of each feeder to the short-circuit current at the fault
node should be calculated.
with_limit_violations: indicates whether limit violations should be returned after the calculation. If true, a
list of buses where the calculated shortcircuit current is higher than the maximum admissible current (stored in
list of buses where the calculated short-circuit current is higher than the maximum admissible current (stored in
ip_max in the identifiableShortCircuit extension) or lower than the minimum admissible current (stored in ip_min
in the identifiableShortCircuit extension).
with_voltage_result: indicates whether the voltage profile should be calculated on every node of the network
min_voltage_drop_proportional_threshold: specifies a threshold for filtering the voltage results.
Only nodes where the voltage drop due to the short circuit is greater than this property are retained.
study_type: specifies the type of short circuit study. It can be SUB_TRANSIENT, TRANSIENT or STEADY_STATE.
study_type: specifies the type of short-circuit study. It can be SUB_TRANSIENT, TRANSIENT or STEADY_STATE.
"""

def __init__(self,
Expand Down
2 changes: 1 addition & 1 deletion pypowsybl/shortcircuit/impl/short_circuit_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def set_faults(self, df: DataFrame = None, **kwargs: ArrayLike) -> None:

def run(self, network: Network, parameters: Parameters = None,
provider: str = '', reporter: Reporter = None) -> ShortCircuitAnalysisResult:
""" Runs an short-circuit analysis.
""" Runs a short-circuit analysis.
Args:
network: Network on which the short-circuit analysis will be computed
Expand Down
22 changes: 11 additions & 11 deletions pypowsybl/shortcircuit/impl/short_circuit_analysis_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ def __init__(self, handle: _pypowsybl.JavaHandle, with_fortescue_result: bool):
def fault_results(self) -> pd.DataFrame:
"""
contains the results, for each fault, in a dataframe representation. The rows are fault ids and the columns are:
- status: the status of the computation, can be SUCCESS, NO_SHORTCIRCUIT_DATA (in case that the reactances of
- status: the status of the computation, can be SUCCESS, NO_SHORT_CIRCUIT_DATA (in case the reactances of
generators are missing), SOLVER_FAILURE or FAILURE
- short_circuit_power: the value of the shortcircuit power (in MVA)
- time_constant: the duration before reaching the permanent shortcircuit current
- short_circuit_power: the value of the short-circuit power (in MVA)
- time_constant: the duration before reaching the permanent short-circuit current
- current: the current at the fault, either only the three-phase magnitude or detailed with magnitudes and
angles on each phase (in kA)
angles on each phase (in A)
- voltage: the voltage at the fault, either only the three-phase magnitude or detailed with magnitudes and
angles on each phase (in kV)
Expand All @@ -37,10 +37,10 @@ def fault_results(self) -> pd.DataFrame:
@property
def feeder_results(self) -> pd.DataFrame:
"""
contains the contributions of each feeder to the short circuit current, in a dataframe representation. The rows
are the ids of contributing connectable ids sorted by faults and the columns is just the current, either in
three-phase magnitude or detailed with magnitude and angle for each phase. The currents are in kV.
It should be empty when the parameter with_feeder_result is set to false
contains the contributions of each feeder to the short-circuit current, in a dataframe representation. The rows
are the ids of contributing connectable ids sorted by faults and the columns is the current, either in
three-phase magnitude or detailed with magnitude and angle for each phase. The magnitude of the currents are in
A. It should be empty when the parameter with_feeder_result is set to false
"""
return create_data_frame_from_series_array(_pypowsybl.get_feeder_results(self._handle, self._with_fortescue_result))

Expand All @@ -52,10 +52,10 @@ def limit_violations(self) -> pd.DataFrame:
- subject_name: the name of the equipment where the violation occurs
- limit_type: the type of limit violation, can be LOW_SHORT_CIRCUIT_CURRENT or HIGH_SHORT_CIRCUIT_CURRENT
- limit_name
- limit: the value of the limit that is violated (maximum or minimum admissible short-circuit current) in kV
- limit: the value of the limit that is violated (maximum or minimum admissible short-circuit current) in A
- acceptable_duration
- limit_reduction
- value: the calculated short-circuit current that is too high or too low (in kV)
- value: the calculated short-circuit current that is too high or too low (in A)
- side: in case of a limit on a branch, the side where the violation has been detected
It should be empty when the parameter with_limit_violations is set to false
"""
Expand All @@ -64,7 +64,7 @@ def limit_violations(self) -> pd.DataFrame:
@property
def voltage_bus_results(self) -> pd.DataFrame:
"""
contains a list of all the short circuit voltage bus results, in a dataframe representation.
contains a list of all the short-circuit voltage bus results, in a dataframe representation.
The rows are for each fault the IDs of the buses sorted by voltage level ID and the columns are:
- initial_voltage_magnitude: the initial voltage at the bus in kV
- voltage_drop_proportional: the voltage drop in percent
Expand Down

0 comments on commit 6bd5c84

Please sign in to comment.