Gen classical#94
Conversation
abirchfield
left a comment
There was a problem hiding this comment.
I would move the example to PhasorDynamics. Other than that it looks good.
|
Small suggestion, but for admittance values use capital letters No other suggestions other than documentation, good job sir. |
|
Quick comment: @abirchfield and @lukelowry suggested Can we agree on that name and use it consistently across the GridKit code? |
|
Thank you all for the feedback. I have incorporated all the suggestions. Please let me know if any further changes are needed. |
pelesh
left a comment
There was a problem hiding this comment.
Very nice work! A few minor things to address, mainly about designing tests.
Also, there are merge conflicts that need to be resolved. The feature branch needs to be rebased with respect to develop.
| Bus<double, size_t> bus1(0.9949877346411762, 0.09999703952427966); | ||
| BusInfinite<double, size_t> bus2(1.0, 0.0); | ||
| Branch<double, size_t> branch(&bus1, &bus2, 0.0, 0.1, 0, 0); |
There was a problem hiding this comment.
A comment would be helpful to explain why Bus-1 is initialized like this. The numbers are not intuitive.
There was a problem hiding this comment.
I am not sure I have good explanation for why the numbers are the way they are. I copied that from one of Adam's examples. Maybe if you have good numbers, I can use those instead.
There was a problem hiding this comment.
The other example was for a different machine. I am not sure it applies here. I would try first Vr = 1 and Vi =0 and see if the solver can converge to the steady-state solution from there.
CC @abirchfield
…updated CMake files accordingly.
…assical.cpp Consistent format
|
Rebased to the most recent |
|
@shakedregev You might want sundials@develop (or a the specific commit) for this. See #118. |
|
Closing in favor of #127 |

Description
Implemented the second-order classical generator model as a Phasor Dynamics family of components. This model has been used to simulate a 2-bus example and the results outputted to a .csv file. New CMake files have been added as needed, and existing ones have been updated to incorporate the new additions.
This closes #73
Proposed changes
I have added a test case that sets up the system with a consistent DAE solution through the initialize method of the classical generator model and checks that the residual is zero. Another test case has been added to verify that the residuals are correct for other states different from the initialization. Additionally, the CMake files have been updated, and I have built and verified that all configurations work correctly.
Checklist
-Wall -Wpedantic -Wconversion -Wextra.