-
Notifications
You must be signed in to change notification settings - Fork 5
Gen classical #94
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
Gen classical #94
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move the example to PhasorDynamics. Other than that it looks good.
src/Model/PhasorDynamics/SynchronousMachine/ClassicalGenerator/ClassicalGen.hpp
Outdated
Show resolved
Hide resolved
src/Model/PhasorDynamics/SynchronousMachine/ClassicalGenerator/README.md
Outdated
Show resolved
Hide resolved
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/Model/PhasorDynamics/SynchronousMachine/GenClassical/GenClassical.cpp
Outdated
Show resolved
Hide resolved
…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
.