Three-phase load flow solver
Project description
Roseau Load Flow
Installation
The simplest way is to download the docker container attached to this repository and to start it. I will start a Jupyterlab session with the package installed.
Usage
There are 2 main ways to execute a load flow with thunders:
From files
By giving path to the needed files:
from roseau.load_flow import ElectricalNetwork
en = ElectricalNetwork.from_dgs(path=path) # DGS
en = ElectricalNetwork.from_json(path=path) # Json
en.solve_load_flow(auth=("username", "password"))
From code
By describing the network and its components, here is a simple example:
from roseau.load_flow import Ground, VoltageSource, Bus, PowerLoad, PotentialRef, SimplifiedLine, ElectricalNetwork, LineCharacteristics
import numpy as np
ground = Ground()
vn = 400 / np.sqrt(3)
voltages = [vn, vn * np.exp(-2 / 3 * np.pi * 1j), vn * np.exp(2 / 3 * np.pi * 1j)]
vs = VoltageSource(
id="source",
n=4,
ground=ground,
source_voltages=voltages,
)
load_bus = Bus(id="load bus", n=4)
load = PowerLoad(id="power load", n=4, bus=load_bus, s=[100 + 0j, 100 + 0j, 100 + 0j])
line_characteristics = LineCharacteristics(type_name="test", z_line=np.eye(4, dtype=complex))
line = SimplifiedLine(
id="line",
n=4,
bus1=vs,
bus2=load_bus,
line_characteristics=line_characteristics,
length=10 # km
)
p_ref = PotentialRef(element=ground)
en = ElectricalNetwork(buses=[vs, load_bus], branches=[line], loads=[load], special_elements=[p_ref, ground])
# or
# en = ElectricalNetwork.from_element(vs)
en.solve_load_flow(auth=("username", "password"))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
roseau_load_flow-0.2.1.tar.gz
(39.5 kB
view hashes)
Built Distribution
Close
Hashes for roseau_load_flow-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a43edcc31e3e1c81bd419254595cb8f028134f812328114a38594cc5397326cd |
|
MD5 | 31742c8eec4b0ea181b8ccd501b8c9c7 |
|
BLAKE2b-256 | 5f4a23668c88a433a8e9d29cc55a66f8667423e5bca51c5ccf1c2a89e3190527 |