Numerical aquifers: option to keep them out of the grid - #5286
Draft
hnil wants to merge 3 commits into
Draft
Conversation
A numerical aquifer is pure flow bookkeeping -- a pore volume and a list of connections, with no geometry. ECLIPSE expresses it by taking over a grid cell: the cell is forced active, its pore volume, depth, regions and permeability are overridden, and its connections are added as non-neighbour connections. That is cheap and restart-compatible, and it stays the default. But it is costly for anything which reads the grid as geometry rather than as bookkeeping. Mechanics is the clearest case: the taken-over cell is not rock, and a connection which is not a face cannot carry a traction. It also makes numerical aquifers mutually exclusive with edge-conformal grid processing, since that has no way to handle the generated non-neighbour connections. Add NumericalAquiferMode as a construction option on EclipseState (and, because the grid is built during its construction, on EclipseGrid). In AuxiliaryCells mode the AQUNUM records have no effect on the grid, the field properties or the non-neighbour connections at all; the keywords are still parsed and the aquifer data is still available, and a simulator which selects the mode takes on the job of representing the aquifers itself. Defaulted everywhere, so every existing caller keeps the old behaviour. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A cell named by an AQUNUM record does not belong to the reservoir either way. When the aquifer takes the cell over, the cell has to be active in order to host it, and its transmissibilities to its geometric neighbours are killed. When the aquifer is represented outside the grid the same end is reached more directly: deactivate the cell, so that nothing occupies the space the deck reserved for it. This is what lets existing decks be run in either mode without being rewritten -- they name active cells, as decks do. Two consequences. The AQUNUM records are scanned in both modes now, because the mode decides what happens to those cells rather than whether they are noticed at all. And a record's defaulted items are read from the global field-property arrays by global index rather than the active-cell ones by active index: identical for an active cell, but the cell is deliberately not active here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ner always The scanner keeps a list of the cells that belong to a numerical aquifer, which is what lets a MULTREGT record tell an aquifer connection apart from any other non-neighbour connection -- the NOAQUNNC behaviour. That distinction has nothing to do with whether a grid cell stands in for the aquifer, so it has to be drawn the same way in either representation. It was inside the block that reshapes the grid, and so was skipped along with it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
NumericalAquiferMode(grid|aux). Inauxmode an AQUNUM cell is leftinactive instead of being resurrected and taken over, so the grid keeps only physical
rock; the aquifer volume is carried elsewhere.
Default is unchanged and the existing path is untouched.
Companion PRs: OPM/opm-grid (honour the mode when processing the deck) and
OPM/opm-simulators (the aquifer cells themselves). Draft — CI not yet green.
🤖 Generated with Claude Code