using the reservoir equation index for the coupling matrix C - #7370
using the reservoir equation index for the coupling matrix C#7370GitPaean wants to merge 1 commit into
Conversation
|
jenkins build this please |
There was a problem hiding this comment.
Pull request overview
This PR updates perforation equation assembly so the coupling matrix C is indexed by the reservoir equation index (column) rather than implicitly assuming it matches the well equation index. This is necessary because these indices can diverge for the energy equation (e.g., when brine is active), even though they coincide for mass conservation equations.
Changes:
- Extend
assemblePerforationEq()(standard + multisegment) to accept an explicitreservoirEqIdx/reservoir_eq_idx. - Use
reservoirEqIdxwhen writing intoeqns.C()to ensure correct coupling-column selection. - Update multisegment energy perforation assembly to pass
Indices::contiEnergyEqIdxfor the reservoir-side equation index.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| opm/simulators/wells/StandardWellAssemble.hpp | Adds reservoirEqIdx parameter and documents the well-vs-reservoir index distinction. |
| opm/simulators/wells/StandardWellAssemble.cpp | Uses reservoirEqIdx for the C-matrix column when assembling perforation Jacobians. |
| opm/simulators/wells/StandardWell_impl.hpp | Updates perforation assembly call to provide both well and reservoir equation indices. |
| opm/simulators/wells/MultisegmentWellAssemble.hpp | Adds reservoir_eq_idx parameter and documents the index distinction. |
| opm/simulators/wells/MultisegmentWellAssemble.cpp | Uses reservoir_eq_idx for the C-matrix column when assembling perforation Jacobians. |
| opm/simulators/wells/MultisegmentWell_impl.hpp | Updates mass and energy perforation assembly calls to pass the correct reservoir equation index (notably for energy). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
31ba6cc to
ca8d40e
Compare
assemblePerforationEq() now takes the reservoir equation index for the C column in addition to the well equation index. The two coincide for the mass conservation equations, but differ for the energy equation when, e.g., brine is active.
|
It is not an issue at the moment, since MSW does not support brine. It will be an issue when fully-implicit thermal equation for the standard wells be there. Will hold PR as draft to wait for the later development first. Possibly it will go in with other PRs, likely the thermal equation for the standard well. |
assemblePerforationEq() now takes the reservoir equation index for the C column in addition to the well equation index. The two coincide for the mass conservation equations, but differ for the energy equation when, e.g., brine is active.