Skip to content

Expand Collection of Segment Level RFT Output Arrays#5119

Open
bska wants to merge 1 commit intoOPM:masterfrom
bska:more-icd-rft-arrays
Open

Expand Collection of Segment Level RFT Output Arrays#5119
bska wants to merge 1 commit intoOPM:masterfrom
bska:more-icd-rft-arrays

Conversation

@bska
Copy link
Copy Markdown
Member

@bska bska commented Apr 16, 2026

This PR introduces three new (static) segment level output arrays in the RFT file. Each of these arrays are sized according to the number of segments. Regular segments and valves (defined by keyword WSEGVALV) get zero-valued entries, whereas inflow control devices (keywords WSEGAICD and WSEGSICD) get non-zero values.

  • SEGLEN is the ICD's length along the segment
  • SEGQICD is the ICD's maximum absolute flow rate
  • SEGFSCAL is the ICD's effective scaling factor (SICD::scalingFactor(), calculated by updateScalingFactor())

@bska bska added the manual:new-feature This is a new feature and should be described in the manual label Apr 16, 2026
@bska
Copy link
Copy Markdown
Member Author

bska commented Apr 16, 2026

I'm creating this PR in draft mode for several reasons

I will keep the PR in a draft state until such time as it is ready for review and merging.

@bska bska force-pushed the more-icd-rft-arrays branch 4 times, most recently from a40e2dd to d487d90 Compare April 17, 2026 15:26
@bska bska force-pushed the more-icd-rft-arrays branch 4 times, most recently from c7440e5 to 1598109 Compare April 29, 2026 12:19
@bska
Copy link
Copy Markdown
Member Author

bska commented Apr 29, 2026

jenkins build this please

@bska bska force-pushed the more-icd-rft-arrays branch from 1598109 to d4596c9 Compare April 30, 2026 16:06
@bska
Copy link
Copy Markdown
Member Author

bska commented Apr 30, 2026

I'm creating this PR in draft mode for several reasons

I've added unit tests to this PR now and I'm fairly confident that it does what it's supposed to do for the typical case. We may need to revisit this at a later time if an unexpected corner case comes up, but for now I'm marking the PR as "ready for review".

Please be aware that the msw/MSW-2D-VERT-02 regression test case will fail as a result of this work. The test case requests segment level RFT output for the PROD01 well and these new rft output arrays will therefore not match the existing reference solution. We'll need to update that reference solution once this PR is accepted for merging.

For now I'll just run a build check that ignores those extra output arrays.

@bska bska marked this pull request as ready for review April 30, 2026 16:13
@bska
Copy link
Copy Markdown
Member Author

bska commented Apr 30, 2026

jenkins build this ignore_extra please

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the segment-level RFT (SEG) output written by WriteRFT.cpp by adding three new per-segment arrays intended to expose ICD-specific properties, and updates the SEG-related unit tests to validate presence and values for wells with no ICDs, valves, and ICDs.

Changes:

  • Add three new segment-level RFT arrays: SEGLEN, SEGQICD, and SEGFSCAL.
  • Populate these arrays with ICD-specific values for AICD/SICD segments and zeros for regular/valve segments.
  • Extend tests/test_RFT.cpp to assert the new arrays exist and validate expected values across scenarios.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
opm/output/eclipse/WriteRFT.cpp Writes new SEG arrays and records ICD length, max abs rate, and scaling factor per segment.
tests/test_RFT.cpp Adds SEG-array presence checks and new test cases covering no-ICD, valve, and ICD datasets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread opm/output/eclipse/WriteRFT.cpp Outdated
@bska bska force-pushed the more-icd-rft-arrays branch 5 times, most recently from 57c4261 to 2fde154 Compare May 6, 2026 12:47
@bska
Copy link
Copy Markdown
Member Author

bska commented May 6, 2026

jenkins build this please

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread opm/output/eclipse/WriteRFT.cpp
@bska bska force-pushed the more-icd-rft-arrays branch from 2fde154 to cafc96a Compare May 6, 2026 18:04
@bska
Copy link
Copy Markdown
Member Author

bska commented May 6, 2026

jenkins build this please

@bska bska requested a review from Copilot May 6, 2026 18:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread tests/test_RFT.cpp Outdated
@bska bska force-pushed the more-icd-rft-arrays branch from cafc96a to f9da520 Compare May 7, 2026 08:53
@tskille
Copy link
Copy Markdown
Contributor

tskille commented May 7, 2026

This has now been tested in Equinor and results are good. Looking forward to see this go into master.

@bska
Copy link
Copy Markdown
Member Author

bska commented May 7, 2026

This has now been tested in Equinor and results are good. Looking forward to see this go into master.

Thank you for testing, this is greatly appreciated!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@bska bska force-pushed the more-icd-rft-arrays branch 2 times, most recently from 151616b to c7a61c6 Compare May 8, 2026 08:31
This commit introduces three new (static) segment level output
arrays in the RFT file.  Each of these arrays are sized according to
the number of segments.  Regular segments and valves (defined by
keyword WSEGVALV) get zero-valued entries, whereas inflow control
devices (keywords WSEGAICD and WSEGSICD) get non-zero values.

  * SEGLEN is the ICD's length along the segment
  * SEGQICD is the ICD's maximum absolute flow rate
  * SEGFSCAL is the ICD's effective scaling factor
    (SICD::scalingFactor(), calculated by updateScalingFactor())

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@bska bska force-pushed the more-icd-rft-arrays branch from c7a61c6 to 8a83bd1 Compare May 8, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:new-feature This is a new feature and should be described in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants