Skip to content

Numerical aquifers: option to keep them out of the grid - #5286

Draft
hnil wants to merge 3 commits into
OPM:masterfrom
hnil:pr/numerical-aquifer-mode
Draft

Numerical aquifers: option to keep them out of the grid#5286
hnil wants to merge 3 commits into
OPM:masterfrom
hnil:pr/numerical-aquifer-mode

Conversation

@hnil

@hnil hnil commented Aug 11, 2026

Copy link
Copy Markdown
Member

Adds NumericalAquiferMode (grid | aux). In aux mode an AQUNUM cell is left
inactive 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

hnil and others added 3 commits August 11, 2026 10:12
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>
@hnil hnil added the manual:enhancement This is an enhancement/improvent that needs to be documented in the manual label Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:enhancement This is an enhancement/improvent that needs to be documented in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant