[DualPorosity] Add Runspec dual-porosity accessors + register SIGMAV in FieldProps - #5237
Open
arturcastiel wants to merge 2 commits into
Open
[DualPorosity] Add Runspec dual-porosity accessors + register SIGMAV in FieldProps#5237arturcastiel wants to merge 2 commits into
arturcastiel wants to merge 2 commits into
Conversation
…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.
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.
Member
Author
|
jenkins build this please |
arturcastiel
marked this pull request as ready for review
July 2, 2026 07:49
Member
Author
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.
[DualPorosity] Add Runspec dual-porosity accessors + register SIGMAV in FieldProps
Summary
Runspec::dualPorosity()andRunspec::fracturePermeabilityScalingDisabled()— RUNSPEC-sectionaccessors mirroring the existing
co2Storage()pattern (private member, ctor init-list entry,deck-read block,
serializeOpentry, getter).SIGMAVinFieldProps::GRID::double_keywords(per-cell, unit1/Length*Length).SIGMAis 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.
"dimension"field toSIGMAV's own keyword schema soDeckItem::getSIDoubleData()can resolve its SI dimension at parse time.false/absent unless the deck contains the corresponding keyword.Why
There was previously no way to query "does this deck have
DUALPORO?", or to readSIGMA/SIGMAVvalues through
FieldProps— both keywords parse today but have zero consumers. This PR makes thatstate 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 liststhis pattern requires (
operator==(),rst_cmp()) andserializationTestObject()(the factorythe serialization round-trip test actually exercises — omitting it would let that test pass even
with a broken
serializeOp).FieldProps.hpp— registerSIGMAVinGRID::double_keywords.SIGMAV's keyword schema — add"dimension": "1/Length*Length".Tests
RunspecTests:DualPorosity,DualPorosity_absentFieldPropsTests:SigmaVFieldProps,SigmaDeckScalarSerialization:Runspecround-tripNotes
SIGMAcannot go throughFieldPropsat all — registering it indouble_keywordsthrows on anygrid with more than one cell, since the registry has no single-value broadcast path.
transfer-term physics — this PR only makes the deck state queryable in opm-common.