Skip to content

[DualPorosity] Add Runspec dual-porosity accessors + register SIGMAV in FieldProps - #5237

Open
arturcastiel wants to merge 2 commits into
OPM:masterfrom
arturcastiel:dualporosity-runspec-sigmav
Open

[DualPorosity] Add Runspec dual-porosity accessors + register SIGMAV in FieldProps#5237
arturcastiel wants to merge 2 commits into
OPM:masterfrom
arturcastiel:dualporosity-runspec-sigmav

Conversation

@arturcastiel

Copy link
Copy Markdown
Member

[DualPorosity] Add Runspec dual-porosity accessors + register SIGMAV in FieldProps

Summary

  • Adds Runspec::dualPorosity() and Runspec::fracturePermeabilityScalingDisabled() — RUNSPEC-section
    accessors mirroring the existing co2Storage() pattern (private member, ctor init-list entry,
    deck-read block, serializeOp entry, getter).
  • Registers SIGMAV in FieldProps::GRID::double_keywords (per-cell, unit 1/Length*Length).
    SIGMA is intentionally not registered there — its schema declares a single global scalar
    ("size": 1), not a per-cell array, and this registry has no broadcast path for a size-1 keyword.
    It's read directly from its deck record by whichever code consumes it instead.
  • Adds a missing "dimension" field to SIGMAV's own keyword schema so
    DeckItem::getSIDoubleData() can resolve its SI dimension at parse time.
  • Purely additive: existing single-porosity decks are unaffected — the new accessors return
    false/absent unless the deck contains the corresponding keyword.

Why

There was previously no way to query "does this deck have DUALPORO?", or to read SIGMA/SIGMAV
values through FieldProps — both keywords parse today but have zero consumers. This PR makes that
state queryable. It does not change any simulator behavior on its own (the simulator layer still
rejects these keywords today; lifting that is separate, follow-on work).

Changes

  • Runspec.hpp / Runspec.cpp — two new accessors, plus the two other field-completeness lists
    this pattern requires (operator==(), rst_cmp()) and serializationTestObject() (the factory
    the serialization round-trip test actually exercises — omitting it would let that test pass even
    with a broken serializeOp).
  • FieldProps.hpp — register SIGMAV in GRID::double_keywords.
  • SIGMAV's keyword schema — add "dimension": "1/Length*Length".

Tests

  • RunspecTests: DualPorosity, DualPorosity_absent
  • FieldPropsTests: SigmaVFieldProps, SigmaDeckScalar
  • Serialization: Runspec round-trip

Notes

  • SIGMA cannot go through FieldProps at all — registering it in double_keywords throws on any
    grid with more than one cell, since the registry has no single-value broadcast path.
  • Out of scope here: lifting the simulator-side abort on these keywords, grid handling, and
    transfer-term physics — this PR only makes the deck state queryable in opm-common.

…in FieldProps

Add Runspec::dualPorosity() and Runspec::fracturePermeabilityScalingDisabled()
RUNSPEC-section accessors, mirroring the existing co2Storage() pattern:
private member, ctor init-list entry, deck-read block, serializeOp entry,
and getter. Also thread the two new members through the other two
field-completeness lists this pattern requires -- Runspec::operator==()
and Runspec::rst_cmp() -- and through
Runspec::serializationTestObject(), the factory the M4 serialization
round-trip test actually exercises.

Register SIGMAV in FieldProps::GRID::double_keywords (per-cell, unit
1/Length*Length). SIGMA is deliberately not registered there: its schema
declares a single global scalar ("size": 1), not a per-cell array, and
double_keywords has no broadcast path for a size-1 keyword -- it is read
directly from its deck record by whichever code consumes it instead. Add
a missing "dimension" field to SIGMAV's own JSON schema so
DeckItem::getSIDoubleData() can resolve its SI dimension at parse time.

New tests: RunspecTests::DualPorosity, RunspecTests::DualPorosity_absent,
FieldPropsTests::SigmaVFieldProps, FieldPropsTests::SigmaDeckScalar.

ctest: Serialization, RunspecTests, FieldPropsTests all pass.
@arturcastiel arturcastiel added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Jul 1, 2026
A test comment said "Registered in this PR" -- a PR is transient and
the comment outlives it. The preceding sentence already states the
fact neutrally (fits GRID::double_keywords exactly like PORO/PERMX),
so the PR-reference added nothing and violated the project's
no-PR-sequence-references-in-comments convention.
@arturcastiel

Copy link
Copy Markdown
Member Author

jenkins build this please

@arturcastiel
arturcastiel marked this pull request as ready for review July 2, 2026 07:49
@arturcastiel

Copy link
Copy Markdown
Member Author

@bska

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:irrelevant This PR is a minor fix and should not appear in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant