-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added docs for distribution bus and distribution load (#37)
* added docs for distribution bus and distribution load * added examples for distribution transformer * first stable release * upgraded actions_python_ruff from 1.0.0 to 1.0.1 * added check src in ruff lint
- Loading branch information
1 parent
428b51e
commit d364b89
Showing
16 changed files
with
1,017 additions
and
48 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -48,3 +48,11 @@ api/index | |
cim/index | ||
``` | ||
|
||
|
||
```{toctree} | ||
:caption: Usage | ||
:hidden: true | ||
usage/index | ||
``` |
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,9 @@ | ||
# Distributio Branch | ||
|
||
_under development_ | ||
|
||
## Matrix Impedance Branch | ||
|
||
## Geometry Branch | ||
|
||
## Sequence Impedance Branch |
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,91 @@ | ||
# Distribution Bus | ||
|
||
Single phase bus. | ||
|
||
```python | ||
>>> from gdm import ( | ||
... DistributionBus, | ||
... PositiveVoltage, | ||
... VoltageTypes, | ||
... Phase | ||
... ) | ||
>>> DistributionBus( | ||
... name="Bus-1", | ||
... nominal_voltage=PositiveVoltage(7.62, "kilovolts"), | ||
... voltage_type=VoltageTypes.LINE_TO_GROUND, | ||
... phases=[Phase.A] | ||
... ) | ||
DistributionBus(name='Bus-1', | ||
substation=None, | ||
feeder=None, | ||
voltage_type=<VoltageTypes.LINE_TO_GROUND: 'line-to-ground'>, | ||
phases=[<Phase.A: 'A'>], | ||
voltagelimits=[], | ||
nominal_voltage=<Quantity(7.62, 'kilovolt')>, | ||
coordinate=None) | ||
|
||
``` | ||
|
||
Three phase bus. | ||
|
||
```python | ||
>>> DistributionBus( | ||
... name="Bus-1", | ||
... nominal_voltage=PositiveVoltage(7.62, "kilovolts"), | ||
... voltage_type=VoltageTypes.LINE_TO_GROUND, | ||
... phases=[Phase.A, Phase.B, Phase.C] | ||
... ) | ||
DistributionBus(name='Bus-1', | ||
substation=None, | ||
feeder=None, | ||
voltage_type=<VoltageTypes.LINE_TO_GROUND: 'line-to-ground'>, | ||
phases=[<Phase.A: 'A'>, <Phase.B: 'B'>, <Phase.C: 'C'>], | ||
voltagelimits=[], | ||
nominal_voltage=<Quantity(7.62, 'kilovolt')>, | ||
coordinate=None) | ||
|
||
``` | ||
|
||
A bus with cartesian coordinates. | ||
|
||
```python | ||
>>> from gdm import Location | ||
>>> DistributionBus( | ||
... name="Bus-1", | ||
... nominal_voltage=PositiveVoltage(7.62, "kilovolts"), | ||
... voltage_type=VoltageTypes.LINE_TO_GROUND, | ||
... phases=[Phase.A, Phase.B, Phase.C], | ||
... coordinate=Location(x=10.0, y=20.0) | ||
... ) | ||
DistributionBus(name='Bus-1', | ||
substation=None, | ||
feeder=None, | ||
voltage_type=<VoltageTypes.LINE_TO_GROUND: 'line-to-ground'>, | ||
phases=[<Phase.A: 'A'>, <Phase.B: 'B'>, <Phase.C: 'C'>], | ||
voltagelimits=[], | ||
nominal_voltage=<Quantity(7.62, 'kilovolt')>, | ||
coordinate=Location(name='', x=10.0, y=20.0, crs=None)) | ||
|
||
``` | ||
|
||
A bus with coordinate reference system. | ||
|
||
```python | ||
>>> from gdm import Location | ||
>>> DistributionBus( | ||
... name="Bus-1", | ||
... nominal_voltage=PositiveVoltage(7.62, "kilovolts"), | ||
... voltage_type=VoltageTypes.LINE_TO_GROUND, | ||
... phases=[Phase.A, Phase.B, Phase.C], | ||
... coordinate=Location(x=10.0, y=20.0, crs='epsg:4326') | ||
... ) | ||
DistributionBus(name='Bus-1', | ||
substation=None, | ||
feeder=None, | ||
voltage_type=<VoltageTypes.LINE_TO_GROUND: 'line-to-ground'>, | ||
phases=[<Phase.A: 'A'>, <Phase.B: 'B'>, <Phase.C: 'C'>], | ||
voltagelimits=[], | ||
nominal_voltage=<Quantity(7.62, 'kilovolt')>, | ||
coordinate=Location(name='', x=10.0, y=20.0, crs='epsg:4326')) | ||
|
||
``` |
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,213 @@ | ||
# Distribution Load | ||
|
||
## Single Phase Constant Power Load | ||
|
||
Creating a single-phase constant power load connected to a bus. A constant power load means that the power (both real and reactive) remains constant irrespective of voltage variations. The parameters p_real and p_imag are set to 1.0, indicating that the load is a constant power type. | ||
|
||
```python | ||
>>> from gdm import ( | ||
... DistributionBus, | ||
... DistributionLoad, | ||
... LoadEquipment, | ||
... PositiveVoltage, | ||
... VoltageTypes, | ||
... PhaseLoadEquipment, | ||
... Phase, | ||
... ActivePower, | ||
... ReactivePower | ||
... ) | ||
>>> bus1 = DistributionBus( | ||
... name="Bus-1", | ||
... nominal_voltage=PositiveVoltage(7.62, "kilovolts"), | ||
... voltage_type=VoltageTypes.LINE_TO_GROUND, | ||
... phases=[Phase.A] | ||
... ) | ||
>>> phase_load_equipment = PhaseLoadEquipment( | ||
... name="Phase-Load-1", | ||
... real_power=ActivePower(3.5, "kilowatt"), | ||
... reactive_power=ReactivePower(0, "kilovar"), | ||
... z_real=0, | ||
... z_imag=0, | ||
... i_real=0, | ||
... i_imag=0, | ||
... p_real=1.0, | ||
... p_imag=1.0 | ||
... ) | ||
>>> load_equipment = LoadEquipment( | ||
... name="LoadEquipment-1", | ||
... phase_loads=[phase_load_equipment] | ||
... ) | ||
>>> DistributionLoad( | ||
... name="Load-1", | ||
... bus=bus1, | ||
... phases=[Phase.A], | ||
... equipment=load_equipment | ||
... ).pprint() | ||
DistributionLoad( | ||
name='Load-1', | ||
substation=None, | ||
feeder=None, | ||
bus=DistributionBus( | ||
name='Bus-1', | ||
substation=None, | ||
feeder=None, | ||
voltage_type=<VoltageTypes.LINE_TO_GROUND: 'line-to-ground'>, | ||
phases=[<Phase.A: 'A'>], | ||
voltagelimits=[], | ||
nominal_voltage=<Quantity(7.62, 'kilovolt')>, | ||
coordinate=None | ||
), | ||
phases=[<Phase.A: 'A'>], | ||
equipment=LoadEquipment( | ||
name='LoadEquipment-1', | ||
phase_loads=[ | ||
PhaseLoadEquipment( | ||
name='Phase-Load-1', | ||
real_power=<Quantity(3.5, 'kilowatt')>, | ||
reactive_power=<Quantity(0, 'kilovar')>, | ||
z_real=0.0, | ||
z_imag=0.0, | ||
i_real=0.0, | ||
i_imag=0.0, | ||
p_real=1.0, | ||
p_imag=1.0, | ||
num_customers=None | ||
) | ||
], | ||
connection_type=<ConnectionType.STAR: 'STAR'> | ||
) | ||
) | ||
|
||
``` | ||
|
||
## Three Phase Delta Connected Constant Power Load | ||
|
||
|
||
For the three-phase delta-connected constant power load, we need to define the load for all three phases (A, B, and C) and set the connection type to delta. In a delta connection, the load is connected between phases rather than from phase to neutral (as in a star connection). | ||
|
||
|
||
|
||
```python | ||
>>> from gdm import ( | ||
... DistributionBus, | ||
... DistributionLoad, | ||
... LoadEquipment, | ||
... PositiveVoltage, | ||
... VoltageTypes, | ||
... PhaseLoadEquipment, | ||
... Phase, | ||
... ActivePower, | ||
... ReactivePower, | ||
... ConnectionType | ||
... ) | ||
>>> bus2 = DistributionBus( | ||
... name="Bus-2", | ||
... nominal_voltage=PositiveVoltage(13.8, "kilovolts"), | ||
... voltage_type=VoltageTypes.LINE_TO_LINE, | ||
... phases=[Phase.A, Phase.B, Phase.C] | ||
... ) | ||
>>> phase_load_equipment_a = PhaseLoadEquipment( | ||
... name="Phase-Load-A", | ||
... real_power=ActivePower(5.0, "kilowatt"), | ||
... reactive_power=ReactivePower(2.0, "kilovar"), | ||
... z_real=0, | ||
... z_imag=0, | ||
... i_real=0, | ||
... i_imag=0, | ||
... p_real=1.0, | ||
... p_imag=1.0 | ||
... ) | ||
>>> phase_load_equipment_b = PhaseLoadEquipment( | ||
... name="Phase-Load-B", | ||
... real_power=ActivePower(5.0, "kilowatt"), | ||
... reactive_power=ReactivePower(2.0, "kilovar"), | ||
... z_real=0, | ||
... z_imag=0, | ||
... i_real=0, | ||
... i_imag=0, | ||
... p_real=1.0, | ||
... p_imag=1.0 | ||
... ) | ||
>>> phase_load_equipment_c = PhaseLoadEquipment( | ||
... name="Phase-Load-C", | ||
... real_power=ActivePower(5.0, "kilowatt"), | ||
... reactive_power=ReactivePower(2.0, "kilovar"), | ||
... z_real=0, | ||
... z_imag=0, | ||
... i_real=0, | ||
... i_imag=0, | ||
... p_real=1.0, | ||
... p_imag=1.0 | ||
... ) | ||
>>> load_equipment_delta = LoadEquipment( | ||
... name="LoadEquipment-Delta", | ||
... phase_loads=[phase_load_equipment_a, phase_load_equipment_b, phase_load_equipment_c], | ||
... connection_type=ConnectionType.DELTA | ||
... ) | ||
>>> distribution_load_delta = DistributionLoad( | ||
... name="Load-Delta", | ||
... bus=bus2, | ||
... phases=[Phase.A, Phase.B, Phase.C], | ||
... equipment=load_equipment_delta | ||
... ) | ||
>>> distribution_load_delta.pprint() | ||
DistributionLoad( | ||
name='Load-Delta', | ||
substation=None, | ||
feeder=None, | ||
bus=DistributionBus( | ||
name='Bus-2', | ||
substation=None, | ||
feeder=None, | ||
voltage_type=<VoltageTypes.LINE_TO_LINE: 'line-to-line'>, | ||
phases=[<Phase.A: 'A'>, <Phase.B: 'B'>, <Phase.C: 'C'>], | ||
voltagelimits=[], | ||
nominal_voltage=<Quantity(13.8, 'kilovolt')>, | ||
coordinate=None | ||
), | ||
phases=[<Phase.A: 'A'>, <Phase.B: 'B'>, <Phase.C: 'C'>], | ||
equipment=LoadEquipment( | ||
name='LoadEquipment-Delta', | ||
phase_loads=[ | ||
PhaseLoadEquipment( | ||
name='Phase-Load-A', | ||
real_power=<Quantity(5.0, 'kilowatt')>, | ||
reactive_power=<Quantity(2.0, 'kilovar')>, | ||
z_real=0.0, | ||
z_imag=0.0, | ||
i_real=0.0, | ||
i_imag=0.0, | ||
p_real=1.0, | ||
p_imag=1.0, | ||
num_customers=None | ||
), | ||
PhaseLoadEquipment( | ||
name='Phase-Load-B', | ||
real_power=<Quantity(5.0, 'kilowatt')>, | ||
reactive_power=<Quantity(2.0, 'kilovar')>, | ||
z_real=0.0, | ||
z_imag=0.0, | ||
i_real=0.0, | ||
i_imag=0.0, | ||
p_real=1.0, | ||
p_imag=1.0, | ||
num_customers=None | ||
), | ||
PhaseLoadEquipment( | ||
name='Phase-Load-C', | ||
real_power=<Quantity(5.0, 'kilowatt')>, | ||
reactive_power=<Quantity(2.0, 'kilovar')>, | ||
z_real=0.0, | ||
z_imag=0.0, | ||
i_real=0.0, | ||
i_imag=0.0, | ||
p_real=1.0, | ||
p_imag=1.0, | ||
num_customers=None | ||
) | ||
], | ||
connection_type=<ConnectionType.DELTA: 'DELTA'> | ||
) | ||
) | ||
|
||
``` |
Oops, something went wrong.