This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Power systems (vp.power)

Steady-state power flow on transmission networks given as MATPOWER cases.

  • Newton-Raphson in polar coordinates, fast-decoupled XB, or the linear DC model
  • generator reactive limits, optionally enforced
  • a sparse admittance matrix and Jacobian, factored by a sparse LU written in Viv

Checked against MATPOWER's solved cases and an independent SciPy power flow, from 9 to 2,383 buses.

Part of the distribution vipyr; it runs from a checkout of the repository. Planned on PyPI as pip install vipyr.

Functions

vp.power.contingency
N-1 contingency analysis: every branch and generator outage solved by AC power flow, with DC PTDF/LODF screening.
vp.power.cpf
The continuation power flow: the PV curve of a transfer into one bus, through the nose.
vp.power.interconnect
A generator-interconnection study: violations before and after the project, distribution factors, and the transfer limit.
vp.power.read_raw
Read a PSS/E RAW file (revisions 32 to 34) into MATPOWER's arrays.
vp.power.runpf
Solve the AC or DC power flow of a MATPOWER case: bus voltages, generator outputs and branch flows.
vp.power.short_circuit
Three-phase short-circuit currents by IEC 60909 at the buses of a case.

Examples in the gallery