feat: Add MGR strategy for thermal single-phase flow with wells and poromechanics - #4006
feat: Add MGR strategy for thermal single-phase flow with wells and poromechanics#4006victorapm wants to merge 6 commits into
Conversation
Thanks, Victor! I can add one based on the sequential case I made for thermoporomechanics reservoir solver. |
|
Thanks, Frank! Feel free to push to this PR |
…ag1/thermalSinglePhasePoromechanicsReservoir
Hey Victor @victorapm, I've added a fim case for However, I found the solutions from the fim and sequential are quite different, e.g., see
|
|
Thanks Frank! Maybe it's an issue with the FIM formulation? @tjb-ltk do you know if all the Jacobian components are being computed correctly? |
|
@frankfeifan @victorapm I'll run the cases and check the well behavior. |
…ag1/thermalSinglePhasePoromechanicsReservoir

cc @castelletto1 @tjb-ltk @frankfeifan
Adds MGR strategy and fixes a formulation bug.
The FIM Jacobian was missing well–reservoir perforation couplings. That is now fixed in this PR. FIM
assembleSystemalready added perforation residuals (mass and energy), butsetupSystembuilt the matrix pattern only fromDofManager. Perforation off-diagonals are not in theDofManagergraph; sequential flow+wells adds them inCoupledReservoirAndWellsBase::setSparsityPattern. In RelWithDebInfo,addToRowBinarySearchUnsortedcan drop those Jacobian entries.The well energy residual was assembled without a matching Jacobian, so the first Newton update blew it up and FIM looked unstable.
PoromechanicsSolvernow takes the flow solver’s sparsity pattern, the same approachPoromechanicsConformingFracturesalready used. ForReservoirAndWellsthat includes perforation couplings; for standalone flow it is the same DofManager pattern as before.