Name the cell when the IMPES storage matrix is singular - #7264
Conversation
| // The storage derivatives of this cell carry no | ||
| // information about how to combine the mass balances - | ||
| // seen on gas condensate with vaporised water and | ||
| // precipitated salt. Weight the pressure equation alone |
There was a problem hiding this comment.
I do not understand this sentence, what is meant by "Weight the pressure equation alone"? And it seems this would not throw and thereby chop the step, also what does that have to do with degenerate cells?
ad2baf9 to
a6b19f4
Compare
|
Fair — two of the three claims in that comment were wrong. Catching the exception means nothing throws, so the step is not chopped, and the "degenerate cell" framing was hand-waving. Cut it back to what the code does: on a singular storage matrix, fall back to I do not have a real explanation for why the storage matrix is singular on that deck, so I have not tried to write one. |
A cell whose storage-derivative matrix is singular makes
getTrueImpesWeights() throw, and since solver setup is wrapped in
OPM_CATCH_AND_RETHROW_AS_CRITICAL_ERROR the run dies pointing at the
linear-solver JSON, which is not the problem:
Original error: getTrueImpesWeights() failed:
FMatrixError [luDecomposition]: matrix is singular
Catch the FMatrixError and rethrow with the offending cell identified,
so the deck can be investigated:
Original error: getTrueImpesWeights() failed: Singular storage matrix
when forming the CPR pressure weights for cell 688 (Cartesian
index 688). The storage derivatives of that cell are rank
deficient, so the pressure equation cannot be formed there.
No fallback weight is substituted. bweights is indexed by equation
while rhs is indexed by primary variable, so copying rhs would put unit
weight on whichever equation happens to share the pressure variable's
index -- an arbitrary choice, and one that goes on to make the CPR
pressure system itself singular.
Reproduced on spe1_precsalt/GASCONDENSATE_VAPWAT_PRECSALT, which is
where the singular matrix was found. Why the storage derivatives are
rank deficient on that deck is still open; this only makes the failure
say where to look.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
a6b19f4 to
82d2263
Compare
|
Reworked: it now throws with the cell identified instead of substituting a weight. The fallback was wrong, not just badly commented — So this is diagnostic only now: same failure, but it names the cell rather than blaming the solver JSON. |
A cell whose storage-derivative matrix is singular makes
getTrueImpesWeights()throw, and since solver setup is wrapped inOPM_CATCH_AND_RETHROW_AS_CRITICAL_ERRORthe run dies pointing at the linear-solver JSON, which is not the problem:Now:
Diagnostic only — it still fails, but says where. Reproduced on
spe1_precsalt/GASCONDENSATE_VAPWAT_PRECSALT; why that cell is rank deficient is still open.An earlier version substituted
bweights = rhsinstead of throwing. That was wrong:bweightsis indexed by equation andrhsby primary variable, so it put unit weight on whichever equation shares the pressure variable index — and that fed a singular pressure system into the CPR setup, which is exactly the follow-on failure the first version ran into.Separately: the "faulty linear solver JSON specification" hint is misleading for every non-configuration failure caught by that macro — worth revisiting, not touched here.