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
Viv Python

Notebooks · lib/power/study

Violations, distribution factors and the transfer limit in a generator-interconnection study

A transmission owner asked to connect a new generator at a point of interconnection (POI) runs a system impact study: the network is solved with and without the project, in the base case and under every single contingency, and the project is charged with the limits it breaks that were not broken before. study does the steady-state part:

  • the project is a generator at the POI bus of mw megawatts. With a reactive range (qmin < qmax) it holds the POI at its pre-project voltage as a PV bus; with qmin = qmax it injects that fixed Q;
  • its power is absorbed by the reference bus (sink 1) or by every other generator in proportion to its output (sink 2), the usual stand-ins for the generation the project displaces;
  • n1_ac (power.contingency) runs the base case and the contingencies before and after; a violation (contingency, kind, element) present after and not before is new; one present in both whose loading rose by more than worse_pct percentage points is worsened;
  • the distribution factors are the DC model's flow change on every branch per MW of the project's output, injected at the POI and taken out at the sink;
  • the transfer limit is the largest output with no new violation, found by bisection on the full AC N-1 between 0 and mw_max to within tol_mw.

The contingency numbering is the same before and after: the project's generator is appended after the case's own generators, so every branch and generator keeps its row.

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

This program declares a record type (Study), and records run only in compiled C for now, so the Run buttons here are off. Open it in the workbench and use its C tab to compile it.

Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.

[1]lines 33–242