Skip to main content

Three-phase load flow solver

Project description

CI

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


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)

Uploaded Source

Built Distribution

roseau_load_flow-0.2.1-py3-none-any.whl (47.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page