Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor for Zips and Gens #42

Open
dexterurbane opened this issue Nov 22, 2016 · 0 comments
Open

Refactor for Zips and Gens #42

dexterurbane opened this issue Nov 22, 2016 · 0 comments

Comments

@dexterurbane
Copy link
Contributor

  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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant