-
Notifications
You must be signed in to change notification settings - Fork 7
PhasorDynamics simulations with sparse Jacobians #312
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
base: develop
Are you sure you want to change the base?
Conversation
f80e836 to
8a6ddd0
Compare
05e2ddb to
3285026
Compare
| sys.evaluateResidual(); | ||
| sys.evaluateJacobian(); |
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.
These calls should not be made here. Evaluating residual and Jacobian should be done by the numerical integrator only, not a user code.
| sys.evaluateResidual(); | |
| sys.evaluateJacobian(); |
| sys.initialize(); | ||
| sys.evaluateResidual(); | ||
| sys.evaluateJacobian(); |
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.
Since this is a workaround we should either hide these lines in SystemModel or comment them as temporary.
| sys.initialize(); | ||
| sys.evaluateResidual(); | ||
| sys.evaluateJacobian(); |
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.
See earlier comments. Allocating and initializing system here is ok but evaluating residual and Jacobian may be confusing for the user.
0a47f42 to
ad67082
Compare
Description
This adds the ability to run
PhasorDynamicsexamples with sparse Jacobian. The component Jacobians are obtained with Enzyme and assembled into the system Jacobian.cc @lukelowry @abirchfield
Proposed changes
Checklist
-Wall -Wpedantic -Wconversion -Wextra.Further comments
This is still using
COO_Matrix. I suggest we merge #307 and re-use Jacobian assembly.Comparison plots between current (sparse Jacobians) and reference (dense Jacobians computed by IDA with finite differences)
ThreeBus_Basic

ThreeBus_Classical

TenGenGenrou

TenGenGenClassical
