Skip to content

Commit eddd015

Browse files
committed
Bump version
1 parent aec912e commit eddd015

File tree

15 files changed

+88
-65
lines changed

15 files changed

+88
-65
lines changed

doc/Changelog.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ og:description: See what's new in the latest release of Roseau Load Flow !
1717

1818
# Changelog
1919

20-
## Unreleased
20+
## Version 0.9.1
21+
22+
```{note}
23+
The wheels for Windows are temporarily unavailable anymore. If you need them, please post an issue on GitHub.
24+
```
2125

2226
- {gh-pr}`231` Add `LineParameters.from_power_factory` and `TransformerParameters.from_power_factory`
2327
methods to easily import PowerFactory lines and transformer models into Roseau Load Flow.

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
# The full version, including alpha/beta/rc tags
2525
version = "0.9"
26-
release = "0.9.0"
26+
release = "0.9.1"
2727

2828
# -- General configuration ---------------------------------------------------
2929

doc/models/Line/Parameters.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,10 +541,10 @@ Please note that for underground lines, the provided height $h$ must be negative
541541
... line_type=rlf.LineType.UNDERGROUND,
542542
... conductor_type=rlf.ConductorType.AL,
543543
... insulator_type=rlf.InsulatorType.PVC,
544-
... section=150, #mm²
545-
... section_neutral=70, #mm²
546-
... height=-1.5, # m # Underground so negative!
547-
... external_diameter=0.049, #m
544+
... section=150, # mm²
545+
... section_neutral=70, # mm²
546+
... height=-1.5, # m # Underground so negative!
547+
... external_diameter=0.049, # m
548548
... )
549549

550550
>>> line_parameters.z_line

doc/usage/Catalogues.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ the values in different units. For instance, if you want to get transformer para
304304
nominal power of 3150 kVA, the following two commands return the same table:
305305

306306
```pycon
307-
>>> rlf.TransformerParameters.get_catalogue(sn=3150e3) # in VA by default
307+
>>> rlf.TransformerParameters.get_catalogue(sn=3150e3) # in VA by default
308308

309309
>>> import roseau.load_flow as rlf
310310
... rlf.TransformerParameters.get_catalogue(sn=rlf.Q_(3150, "kVA"))
@@ -484,7 +484,9 @@ the method `get_catalogue` to narrow down the result to a single line in the cat
484484
For instance, these parameters filter the results down to a single line parameters:
485485

486486
```pycon
487-
>>> rlf.LineParameters.from_catalogue(line_type="underground", conductor_type="al", section=240)
487+
>>> rlf.LineParameters.from_catalogue(
488+
... line_type="underground", conductor_type="al", section=240
489+
... )
488490
LineParameters(id='U_AL_240')
489491
```
490492

@@ -520,7 +522,7 @@ to create line parameters with different numbers of phases using the `nb_phases`
520522
In case no or several results match the parameters, an error is raised:
521523

522524
```pycon
523-
>>> rlf.LineParameters.from_catalogue(name= r"U_AL.*")
525+
>>> rlf.LineParameters.from_catalogue(name=r"U_AL.*")
524526
RoseauLoadFlowException: Several line parameters matching the query (name='U_AL.*') have been found:
525527
'U_AL_19', 'U_AL_20', 'U_AL_22', 'U_AL_25', 'U_AL_28', 'U_AL_29', 'U_AL_33', 'U_AL_34', 'U_AL_37',
526528
'U_AL_38', 'U_AL_40', 'U_AL_43', 'U_AL_48', 'U_AL_50', 'U_AL_54', 'U_AL_55', 'U_AL_59', 'U_AL_60',

doc/usage/Connecting_Elements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ the new load.
116116

117117
```pycon
118118
>>> new_bus = rlf.Bus(id="new_bus", phases="abcn")
119-
>>> new_load = rlf.PowerLoad(id="new_load", bus=new_bus, phases="an", powers=[6e3]) # W
119+
>>> new_load = rlf.PowerLoad(id="new_load", bus=new_bus, phases="an", powers=[6e3]) # W
120120
```
121121

122122
At this point, they don't belong to any network:

doc/usage/Extras.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ use the {meth}`~roseau.load_flow.models.Bus.res_voltage_unbalance` method on a 3
156156
the Voltage Unbalance Factor (VUF) as per the IEC definition:
157157

158158
```{math}
159-
VUF = \frac{|V_n|}{|V_p|} * 100 (\%)
159+
VUF = \frac{|V_{\mathrm{n}}|}{|V_{\mathrm{p}}|} \times 100 (\%)
160160
```
161161

162-
Where $V_n$ is the negative-sequence voltage and $V_p$ is the positive-sequence voltage.
162+
Where $V_{\mathrm{n}}$ is the negative-sequence voltage and $V_{\mathrm{p}}$ is the positive-sequence voltage.
163163

164164
```{note}
165165
Other definitions of voltage unbalance could be added in the future. If you need a specific

doc/usage/Flexible_Loads.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,11 @@ As a consequence, the provided apparent power for phase `'a'` is the maximum tha
179179
... bus=load_bus3,
180180
... phases="abcn",
181181
... powers=[si, 0, 0], # W
182-
... flexible_params=[fp, rlf.FlexibleParameter.constant(), rlf.FlexibleParameter.constant()],
182+
... flexible_params=[
183+
... fp,
184+
... rlf.FlexibleParameter.constant(),
185+
... rlf.FlexibleParameter.constant(),
186+
... ],
183187
... )
184188
```
185189

@@ -239,14 +243,24 @@ production is totally shut down.
239243
>>> # Let's try with PQ(u) control, by injecting reactive power before reducing active power
240244
... en.loads["load3"].disconnect()
241245
... fp = rlf.FlexibleParameter.pq_u_production(
242-
... up_up=240, up_max=250, uq_min=200, uq_down=210, uq_up=235, uq_max=240, s_max=4000 # V and VA
246+
... up_up=240,
247+
... up_max=250,
248+
... uq_min=200,
249+
... uq_down=210,
250+
... uq_up=235,
251+
... uq_max=240,
252+
... s_max=4000, # V and VA
243253
... )
244254
... flexible_load = rlf.PowerLoad(
245255
... id="load3",
246256
... bus=load_bus3,
247257
... phases="abcn",
248258
... powers=[si, 0, 0],
249-
... flexible_params=[fp, rlf.FlexibleParameter.constant(), rlf.FlexibleParameter.constant()],
259+
... flexible_params=[
260+
... fp,
261+
... rlf.FlexibleParameter.constant(),
262+
... rlf.FlexibleParameter.constant(),
263+
... ],
250264
... )
251265
```
252266

doc/usage/Getting_Started.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,9 @@ Network elements can be updated. Here, the load's power values are changed to cr
489489
unbalanced situation.
490490

491491
```pycon
492-
>>> load.powers = rlf.Q_([15, 0, 0], "kVA") # <- 15 kW on phase "a", 0 W on phases "b" and "c"
492+
>>> load.powers = rlf.Q_(
493+
... [15, 0, 0], "kVA"
494+
... ) # <- 15 kW on phase "a", 0 W on phases "b" and "c"
493495
>>> en.solve_load_flow()
494496
(3, 1.686343545e-07)
495497
>>> load_bus.res_potentials

doc/usage/Plotting.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,35 @@ are junction buses. The color of the buses is changed when highlighted.
3939
>>> import folium
4040

4141
>>> def buses_style_function(feature):
42-
... if feature["properties"]["id"].startswith("HVMV"): # HV/MV substation
42+
... if feature["properties"]["id"].startswith("HVMV"): # HV/MV substation
4343
... return {
4444
... "fill": True,
4545
... "fillColor": "#000000",
4646
... "color": "#000000",
4747
... "fillOpacity": 1,
4848
... "radius": 7,
4949
... }
50-
... elif feature["properties"]["id"].startswith("MVLV"): # MV/LV substations
50+
... elif feature["properties"]["id"].startswith("MVLV"): # MV/LV substations
5151
... return {
5252
... "fill": True,
5353
... "fillColor": "#234e83",
5454
... "color": "#234e83",
5555
... "fillOpacity": 1,
5656
... "radius": 5,
5757
... }
58-
... else: # Junction buses
58+
... else: # Junction buses
5959
... return {
6060
... "fill": True,
6161
... "fillColor": "#234e83",
6262
... "color": "#234e83",
6363
... "fillOpacity": 1,
6464
... "radius": 3,
6565
... }
66+
...
6667

6768
>>> def buses_highlight_function(feature):
6869
... return {"color": "#cad40e", "fillColor": "#cad40e"}
70+
...
6971

7072
>>> buses_tooltip = folium.GeoJsonTooltip(
7173
... fields=["id", "phases"],
@@ -82,10 +84,12 @@ The same is done for the lines.
8284
```pycon
8385
>>> def lines_style_function(feature):
8486
... return {"color": "#234e83", "weight": 4}
87+
...
8588

8689

8790
>>> def lines_highlight_function(feature):
8891
... return {"color": "#cad40e"}
92+
...
8993

9094

9195
>>> lines_tooltip = folium.GeoJsonTooltip(

doc/usage/Short_Circuit.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,16 @@ All the following tables are rounded to 2 decimals to be properly displayed.
106106
>>> en.res_branches
107107
```
108108

109-
| branch_id | phase | type | current1 | current2 | power1 | power2 | potential1 | potential2 |
110-
| :-------- | :---- | :--- | -----------------: | --------------: | -----------------: | ----------------------: | --------------: | ----------------: |
111-
| line1 | a | line | 374.19+65.47j | -374.2-65.22j) | 86414.44-15119.6j | -69427.92+23726.69j | 230.94-0j | 190.79-30.15j |
112-
| line1 | b | line | -373.43-65.15j | 373.71+64.99j) | 56149.99+67164.05j | -39212.61-58608.72j | -115.47-200j | -75.38-169.94j |
113-
| line1 | c | line | -0.88-0.32j | 0.61+0.24j) | 37.17-214.38j | -22.32+155.56j | -115.47+200j | -116.82+208.22j |
114-
| line1 | n | line | 0.16-0.01j | -0.13-0j) | 0j | -0.17+1.03j | 0j | 1.38-8.15j |
115-
| line2 | a | line | **374.2+65.22j** | -374.11-64.94j) | 69427.92-23726.69j | **-15076.23+41188.79j** | 190.79-30.15j | **57.67-100.09j** |
116-
| line2 | b | line | **-373.71-64.99j** | 374.11+64.94j) | 39212.61+58608.72j | **15076.23-41188.79j** | -75.38-169.94j | **57.67-100.09j** |
117-
| line2 | c | line | -0.61-0.24j | -0j | 22.32-155.56j | -0-0j | -116.82+208.22j | -119.55+224.61j |
118-
| line2 | n | line | 0.13+0j | -0j | 0.17-1.03j | -0j | 1.38-8.15j | 4.18-24.45j |
109+
| branch_id | phase | type | current1 | current2 | power1 | power2 | potential1 | potential2 |
110+
| :-------- | :---- | :--- | -------------: | -----------------: | -----------------: | ----------------------: | --------------: | ----------------: |
111+
| line1 | a | line | 374.19+65.47j | -374.2-65.22j | 86414.44-15119.6j | -69427.92+23726.69j | 230.94-0j | 190.79-30.15j |
112+
| line1 | b | line | -373.43-65.15j | 373.71+64.99j | 56149.99+67164.05j | -39212.61-58608.72j | -115.47-200j | -75.38-169.94j |
113+
| line1 | c | line | -0.88-0.32j | 0.61+0.24j | 37.17-214.38j | -22.32+155.56j | -115.47+200j | -116.82+208.22j |
114+
| line1 | n | line | 0.16-0.01j | -0.13-0j | 0j | -0.17+1.03j | 0j | 1.38-8.15j |
115+
| line2 | a | line | 374.2+65.22j | **-374.11-64.94j** | 69427.92-23726.69j | **-15076.23+41188.79j** | 190.79-30.15j | **57.67-100.09j** |
116+
| line2 | b | line | -373.71-64.99j | **374.11+64.94j** | 39212.61+58608.72j | **15076.23-41188.79j** | -75.38-169.94j | **57.67-100.09j** |
117+
| line2 | c | line | -0.61-0.24j | -0j | 22.32-155.56j | -0-0j | -116.82+208.22j | -119.55+224.61j |
118+
| line2 | n | line | 0.13+0j | -0j | 0.17-1.03j | -0j | 1.38-8.15j | 4.18-24.45j |
119119

120120
Looking at the line results of the second bus of the line `line2`, which is `bus2` where we added the short-circuit,
121121
one can notice that:
@@ -139,16 +139,16 @@ short-circuit then create a new one between phases "a", "b", and "c".
139139
>>> en.res_branches
140140
```
141141

142-
| branch_id | phase | type | current1 | current2 | power1 | power2 | potential1 | potential2 |
143-
| :-------- | :---- | :--- | --------------: | --------------: | -----------------: | ------------------: | -------------: | --------------: |
144-
| line1 | a | line | 364.42-152.4j | -364.45+152.64j | 84159.75+35195.32j | -62323.26-24107.78j | 230.94-0j | 169.06-4.66j |
145-
| line1 | b | line | -329.25-298.27j | 329.5+298.09j | 97671.94+31407.98j | -74421.29-19633.88j | -115.47-200j | -94.56-145.13j |
146-
| line1 | c | line | -35.27+450.66j | 35.03-450.73j | 94203.88+44984.19j | -73584.22-31005.25j | -115.47+200j | -80.99+156.96j |
147-
| line1 | n | line | 0.11-0.01j | -0.08-0.01j | 0j | -0.5+0.64j | 0j | 6.47-7.18j |
148-
| line2 | a | line | 364.45-152.64j | -364.48+152.85j | 62323.26+24107.78j | 3461.67-1626.3j | 169.06-4.66j | **-6.49+7.18j** |
149-
| line2 | b | line | -329.5-298.09j | 329.7+297.94j | 74421.29+19633.88j | 1.41+4300.23j | -94.56-145.13j | **-6.49+7.18j** |
150-
| line2 | c | line | -35.03+450.73j | 34.78-450.79j | 73584.22+31005.25j | -3463.08-2673.93j | -80.99+156.96j | **-6.49+7.18j** |
151-
| line2 | n | line | 0.08+0.01j | -0j | 0.5-0.64j | -0j | 6.47-7.18j | 19.44-21.56j |
142+
| branch_id | phase | type | current1 | current2 | power1 | power2 | potential1 | potential2 |
143+
| :-------- | :---- | :--- | --------------: | ------------------: | -----------------: | --------------------: | -------------: | --------------: |
144+
| line1 | a | line | 364.42-152.4j | -364.45+152.64j | 84159.75+35195.32j | -62323.26-24107.78j | 230.94-0j | 169.06-4.66j |
145+
| line1 | b | line | -329.25-298.27j | 329.5+298.09j | 97671.94+31407.98j | -74421.29-19633.88j | -115.47-200j | -94.56-145.13j |
146+
| line1 | c | line | -35.27+450.66j | 35.03-450.73j | 94203.88+44984.19j | -73584.22-31005.25j | -115.47+200j | -80.99+156.96j |
147+
| line1 | n | line | 0.11-0.01j | -0.08-0.01j | 0j | -0.5+0.64j | 0j | 6.47-7.18j |
148+
| line2 | a | line | 364.45-152.64j | **-364.48+152.85j** | 62323.26+24107.78j | **3461.67-1626.3j** | 169.06-4.66j | **-6.49+7.18j** |
149+
| line2 | b | line | -329.5-298.09j | **329.7+297.94j** | 74421.29+19633.88j | **1.41+4300.23j** | -94.56-145.13j | **-6.49+7.18j** |
150+
| line2 | c | line | -35.03+450.73j | **34.78-450.79j** | 73584.22+31005.25j | **-3463.08-2673.93j** | -80.99+156.96j | **-6.49+7.18j** |
151+
| line2 | n | line | 0.08+0.01j | -0j | 0.5-0.64j | -0j | 6.47-7.18j | 19.44-21.56j |
152152

153153
Now the potentials of the three phases are equal and the currents and powers add up to zero at the bus where the
154154
short-circuit is applied.
@@ -173,10 +173,10 @@ between phase "a" and ground.
173173
| line1 | b | line | 0.96-0.74j | -0.65+0.52j | 36.74-277.43j | -10.48+232.63j | -115.47-200j | -163.66-224.36j |
174174
| line1 | c | line | -0.81-0.43j | 0.55+0.33j | 8.47-212.03j | -29.32+150.27j | -115.47+200j | -159.37+177.78j |
175175
| line1 | n | line | 0.24-0.25j | -0.21+0.22j | 0j | 4.52+15.58j | 0j | -48.11-24.34j |
176-
| line2 | a | line | 95.86-188.37j | -95.99+188.69j | 16871.5+29433.8j | -0j | 160.32-7.98j | **0j** |
177-
| line2 | b | line | 0.65-0.52j | 0j | 10.48-232.63j | -0-0j | -163.66-224.36j | -265.1-275.72j |
178-
| line2 | c | line | -0.55-0.33j | -0j | 29.32-150.27j | -0-0j | -159.37+177.78j | -252.37+130.63j |
179-
| line2 | n | line | 0.21-0.22j | -0j | -4.52-15.58j | -0-0j | -48.11-24.34j | -149.45-75.72j |
176+
| line2 | a | line | 95.86-188.37j | -95.99+188.69j | 16871.5+29433.8j | 0j | 160.32-7.98j | **0j** |
177+
| line2 | b | line | 0.65-0.52j | **0j** | 10.48-232.63j | 0j | -163.66-224.36j | -265.1-275.72j |
178+
| line2 | c | line | -0.55-0.33j | **0j** | 29.32-150.27j | 0j | -159.37+177.78j | -252.37+130.63j |
179+
| line2 | n | line | 0.21-0.22j | **0j** | -4.52-15.58j | 0j | -48.11-24.34j | -149.45-75.72j |
180180

181181
```pycon
182182
>>> en.res_grounds
@@ -186,8 +186,8 @@ between phase "a" and ground.
186186
| :-------- | --------: |
187187
| gnd | 0+0j |
188188

189-
Here the potential at phase "a" of bus `b2` is zero, equal to the ground potential. The sum of the currents in the
190-
other phases is also zero indicating that the current of phase "a" went through the ground.
189+
Here the potential at phase "a" of bus `b2` is zero, equal to the ground potential. The currents in the
190+
other phases are also zero indicating that the current of phase "a" went through the ground.
191191

192192
## Additional notes
193193

@@ -199,6 +199,7 @@ short-circuit, or when forgetting parameters.
199199
... load = rlf.PowerLoad("load", bus=en.buses["b2"], powers=[10, 10, 10])
200200
... except RoseauLoadFlowException as e:
201201
... print(e)
202+
...
202203
The power load 'load' is connected on bus 'b2' that already has a short-circuit.
203204
It makes the short-circuit calculation impossible. [bad_short_circuit]
204205
```
@@ -208,6 +209,7 @@ It makes the short-circuit calculation impossible. [bad_short_circuit]
208209
... en.buses["b2"].add_short_circuit("a")
209210
... except RoseauLoadFlowException as e:
210211
... print(e)
212+
...
211213
For the short-circuit on bus 'b2', expected at least two phases or a phase and a ground.
212214
Only phase 'a' is given. [bad_phase]
213215
```

0 commit comments

Comments
 (0)