Add methods for differential and algebraic RHS and Jacobians
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 27
- Forks
- 11
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 23
Description
Summary
Suppose that a GridKit::Model::Evaluator is described by the mathematical model
\begin{split}
x' &= f(x, z, w) \\
0 &= g(x, z, w)
\end{split}
where $x$ are the differential variables, $z$ are the algebraic, and $w$ are external coupling variables, e.g., from buses.
This is a proposal to add the following methods to GridKit::Model::Evaluator:
int evalauteDifferentialRHS(); // f(x, z, w)
int evaluateAlgebraicRHS(); // g(x, z, w)
IdxT sizeDifferential(); // dimension of x
IdxT sizeAlgebraic(); // dimension of z
int evaluateDifferentialJacobianDifferential(); // f_x(x, z, w)
int evaluateDifferentialJacobianAlgebraic(); // f_z(x, z, w)
int evaluateDifferentialJacobianCoupling(); // f_w(x, z, w)
int evaluateAlgebraicJacobianDifferential(); // g_x(x, z, w)
int evaluateAlgebraicJacobianAlgebraic(); // g_z(x, z, w)
int evaluateAlgebraicJacobianCoupling(); // g_w(x, z, w)
Rationale
These functions and Jacobians are needed for multimethod integrators. See also #143
Description
These functions essentially pick out subsets of the computations already done in the evaluateResidual and evaluateJacobian functions. All of the models will need to be separated into the differential and algebraic equations, ideally without needing mass matrices.
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the GridKit::Model::Evaluator interface and its existing evaluateResidual and evaluateJacobian methods. Review issue #143 for the multimethod integrator context, then trace how models currently represent differential and algebraic equations. Done means the proposed RHS, size, and Jacobian methods are defined consistently across the affected models without relying on mass matrices.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100