Skip to content

[DualPorosity] (1/5) Add the RUNSPEC porosity model - #5316

Draft
arturcastiel wants to merge 1 commit into
OPM:masterfrom
arturcastiel:dualporo-runspec-modes
Draft

[DualPorosity] (1/5) Add the RUNSPEC porosity model#5316
arturcastiel wants to merge 1 commit into
OPM:masterfrom
arturcastiel:dualporo-runspec-modes

Conversation

@arturcastiel

@arturcastiel arturcastiel commented Aug 24, 2026

Copy link
Copy Markdown
Member

What this does

Adds PorosityModel, a value type for the continuum selection made in the RUNSPEC section:
single porosity (the default), dual porosity (DUALPORO) or dual permeability (DUALPERM),
together with the fracture permeability scaling option (NODPPM). Runspec holds one and
exposes it through Runspec::porosityModel(); no flags are added to Runspec itself.

The type answers the questions downstream code asks — does the run resolve two continua, does
it resolve flow between matrix cells, is fracture permeability scaling active — so the deck is
read in one place and every consumer takes the same answer. It follows the pattern of the other
RUNSPEC value types: constructor from the deck, serialization, equality, a serialization test
object.

Why

First of a short series adding a dual-continuum capability to Flow. A dual-continuum deck
declares twice the layers: the first half in K are matrix cells, the second half their
co-located fracture twins. Nothing can interpret that layout before the porosity model is known,
so this lands first.

Behavior impact

None. Flow still rejects every dual-continuum keyword; this adds the type, its accessor and the
per-cell coupling keyword's registration.

Testing

RunspecTests: the default model, each selection, DUALPERM taking precedence over
DUALPORO, the scaling option with and without NODPPM, equality. test_Serialization: the
round trip.

Requirements and limitations

Nothing consumes the type yet — the code that does follows in the next pull request.
Gravity-drainage options are deliberately not included; that work is separate and later.

@arturcastiel arturcastiel changed the title [DualPorosity] Add dual-continuum RUNSPEC run modes [DualPorosity] (1/5) Add dual-continuum RUNSPEC run modes Aug 24, 2026
@arturcastiel arturcastiel added the manual:enhancement This is an enhancement/improvent that needs to be documented in the manual label Aug 24, 2026
@arturcastiel

Copy link
Copy Markdown
Member Author

jenkins build this please

@arturcastiel
arturcastiel requested a review from bska August 24, 2026 14:44

@bska bska left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd really prefer we not add more single-purpose bool flags directly to Runspec. Could you not create a separate structure for these flags and give it a more descriptive name?

Introduce PorosityModel, a value type for the continuum selection made
in the RUNSPEC section: single porosity (the default), dual porosity
(DUALPORO) or dual permeability (DUALPERM), together with the fracture
permeability scaling option (NODPPM). Runspec holds one of these and
exposes it through Runspec::porosityModel(); no single-purpose flags
are added to Runspec itself.

The type answers the questions downstream code asks -- does the run
resolve two continua, does it resolve flow between matrix cells, and
is fracture permeability scaling active -- so the deck is read in one
place and every consumer takes the same answer. It follows the pattern
of the other RUNSPEC value types: constructor from the deck,
serialization, equality and a serialization test object.

Restrict NODPPM to the RUNSPEC section and register the per-cell
coupling keyword SIGMAV.

Co-authored-by: AXON <axon@arturcastiel.github.io>
@arturcastiel
arturcastiel force-pushed the dualporo-runspec-modes branch from 4af0954 to a0aa790 Compare September 7, 2026 12:36
@arturcastiel arturcastiel changed the title [DualPorosity] (1/5) Add dual-continuum RUNSPEC run modes [DualPorosity] (1/5) Add the RUNSPEC porosity model Sep 7, 2026
@arturcastiel

Copy link
Copy Markdown
Member Author

Agreed, and done. The three flags are gone from Runspec. The selection now lives in a value
type, PorosityModel (opm/input/eclipse/EclipseState/PorosityModel.hpp), which Runspec
holds and exposes through Runspec::porosityModel().

It records the model as an enum — SinglePorosity, DualPorosity, DualPermeability — so
"DUALPERM implies DUALPORO" is a property of the type rather than a comment, plus the NODPPM
option. The questions downstream code asks are methods on it: dualContinuum(),
dualPermeability() and fracturePermeabilityScalingActive(). It follows the pattern of the
other RUNSPEC value types (constructor from the deck, serializeOp, serializationTestObject,
operator==) and is covered in RunspecTests and test_Serialization.

The name follows the EGRID header, whose corresponding item distinguishes single porosity, dual
porosity and dual permeability. If you would prefer a different one, say so and I will rename.

EclipseGrid now reads the same type at construction, so these keywords are parsed in one
place. The later pull requests in the series are rebased onto this.

@arturcastiel

Copy link
Copy Markdown
Member Author

jenkins build this please

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.

2 participants