Breakthrough-Energy / PreREISE

Generate input data for scenario framework
https://breakthrough-energy.github.io/docs/
MIT License
20 stars 28 forks source link

feat: translate per-length impedance values to whole-line parameters #268

Closed danielolsen closed 2 years ago

danielolsen commented 2 years ago

Pull Request doc

Purpose

Add logic to translate per-distance impedance values to lumped-element values suitable for power system modeling, and to calculate surge impedance loading.

What the code is doing

A new Line class is added, which is a combination of a Tower object (which includes all conductor/bundle information) a length, a voltage, and a freq (frequency). With these, impedances which depend on the system frequency are calculated, and the voltage and surge impedance are used to calculate the surge impedance loading. Per-kilometer shunt admittance and series impedance are used along with the length parameter to calculate equivalent π-model lumped element parameters using the long-line distributed impedance model. The differences between the long-line model and the short- or medium-line model are insignificant for shorter lines, but important for longer ones, and the computational burden to calculate all of them the more complicated way is low compared to everything else the grid-building code does.

There are also a few minor changes to clean up small lingering things from #262, which impact prints but not core functionality.

Testing

A new unit test is added which tests this functionality against an example from a power systems textbook.

Usage Example/Visuals

The new unit test shows how lowest-level parameters are combined to calculate whole-line impedances. This example is single-circuit single-conductor, but other tests demonstrate how multi-circuit and/or bundled conductors can be specified.

Time estimate

15 minutes to understand the code, longer if you want to crack open your own power system textbook and brush up on the logic or try a few examples.