Simulator Must Detect Incompatible Linear Solver Combinations
At the time of writing, the simulator will/may crash if the user tries to run a case using the new default settings from PR #5147, especially using the CPRW linear solver. Crashing is not reasonable behaviour and the simulator must be able to detect when the new defaults will/may end up in this situation and issue an appropriate diagnostic.
Possible approaches include
- Keep a list of known good combinations (e.g, three-phase black-oil case using
CpGrid) and reject all other combinations - Keep a list of known incompatible combinations (e.g., single-phase MICP) and accept all other combinations
The conservative approach is to have a list of known-good combinations.
This issue is a release blocker for the 2024.10 release.
I have looked at behaviour the two known-to-fail-with-cprw testcases MICP.DATA and 2D_POLYMER_INJECTIVITY.DATA, to see where things go wrong.
In the micp case we have two well equations and six reservoir equations. In StandardWellEquations::extractCPRPressureMatrix() this is not handled correctly, as the weights (coming from the reservoir and having size 6) are assumed implicitly to have a size equal to the number of well equations minus 1. See lines 370-374. So we are reading from indices (up to 5) outside the bounds of a smaller matrix (the 2x2 D matrix).
In the polymer injectivity case the effect is the opposite: we have a 23x23 D matrix, and we only read the top left elements of it, not taking most of it into account.
I am not sure how easy this is to fix, or where it should be fixed (the BlackOilMICPModule class, or in StandardWellEquations), @hnil what do you think?
If it is a difficult task, I propose we go with issuing error messages for known bad combinations.
If [fixing the problem] is a difficult task, I propose we go with issuing error messages for known bad combinations.
To be honest I think I'd prefer a list of "known good" combinations for the 2024.10 release and then possibly a list of "known incompatible" combinations for the 2025.04 release.
Release is out and we have a solution for this in place. Closing the issue as resolved.