Skip to content

Refactor for Zips and Gens #42

@dexterurbane

Description

@dexterurbane
  1. Zips and Gens should derive from a common class, e.g. PowerFlow. (Would need to rename the existing PowerFlow.h to e.g. PowerFlowUtils.h.

  2. PowerFlow has following:

ComponentPtr<Bus> bus0;
ComponentPtr<Bus> bus1;
const Phases& phases0(); // Which phases & in what order at bus0
const Phases& phases1(); // Ditto bus1
Mat<Complex> S() const

0 is the source of the power flow, and 1 is the destination. The sign of (real) S designates whether power is added or removed from the network between the source and the destination; positive = power expended / load. Note that this is not a potential type function - e.g. for a real load between two buses, positive = energy being removed from the network and expended as e.g. heat, no matter whether we move from side 0 to 1 or vice versa. Thus, by convention, S can be set to an upper triangular matrix. We enforce this convention.

For loads and generations to ground, the matrix is n x 1, phase1 should be set to Phase::G and bus1 should be set to nullptr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions