Add thermal multi-segment well parsing support#5233
Conversation
And update copyright year to 2026
|
jenkins build this please |
There was a problem hiding this comment.
Pull request overview
This PR extends the Eclipse deck parsing/scheduling for thermal multi-segment wells by adding support for additional thermal properties in WELSEGS/COMPSEGS and introducing a new WSEGHEAT keyword to define per-segment heat-transfer coefficients.
Changes:
- Parse and store pipe-wall thermal properties from
WELSEGSwith per-segment override + fallback to record-1 defaults. - Parse and propagate
COMPSEGSthermal connection length intoConnection. - Add
WSEGHEATkeyword definition, parsing, schedule application, and tests covering coefficient operations, validation, and deck-order behavior.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/parser/MultisegmentWellTests.cpp | Adds integration and unit tests for WELSEGS thermal fields, COMPSEGS thermal length, and WSEGHEAT behavior/validation. |
| opm/input/eclipse/share/keywords/keyword_list.cmake | Registers the new WSEGHEAT keyword for keyword generation. |
| opm/input/eclipse/share/keywords/001_Eclipse300/W/WSEGHEAT | Defines the WSEGHEAT keyword schema and item dimensions/defaults. |
| opm/input/eclipse/share/keywords/000_Eclipse100/W/WELSEGS | Extends WELSEGS schema with pipe-wall thermal items (top + per-segment). |
| opm/input/eclipse/Schedule/Well/WellConnections.cpp | Preserves thermal length when updating/opening existing connections. |
| opm/input/eclipse/Schedule/Well/Well.hpp | Adds Well::updateWSEGHEAT() API entry point. |
| opm/input/eclipse/Schedule/Well/Well.cpp | Implements Well::updateWSEGHEAT() by delegating to WellSegments. |
| opm/input/eclipse/Schedule/Well/Connection.hpp | Adds thermalLength() API, stores/serializes m_thermal_length, and threads it through updateSegment(). |
| opm/input/eclipse/Schedule/Well/Connection.cpp | Implements thermalLength(), updates serialization test object and equality to include thermal length. |
| opm/input/eclipse/Schedule/MSW/WellSegments.hpp | Extends segment construction with wall thermal properties and declares updateWSEGHEAT(). |
| opm/input/eclipse/Schedule/MSW/WellSegments.cpp | Parses WELSEGS wall properties with fallback, unifies missing-segment handling, and applies WSEGHEAT records to segments. |
| opm/input/eclipse/Schedule/MSW/SegmentHeatTransfer.hpp | Introduces data model for WSEGHEAT coefficients + record parsing API. |
| opm/input/eclipse/Schedule/MSW/SegmentHeatTransfer.cpp | Implements WSEGHEAT parsing + item validation for resistance/target/temp requirements. |
| opm/input/eclipse/Schedule/MSW/Segment.hpp | Stores wall thermal properties and per-segment heat-transfer coefficients; adds update/apply APIs. |
| opm/input/eclipse/Schedule/MSW/Segment.cpp | Implements storage/accessors for thermal wall props and WSEGHEAT coefficient operations (replace/add/remove/clear, SEG cap). |
| opm/input/eclipse/Schedule/MSW/MSWKeywordHandlers.cpp | Adds WSEGHEAT handler: expands patterns, preserves deck order per well, applies to schedule state. |
| opm/input/eclipse/Schedule/MSW/Compsegs.cpp | Parses COMPSEGS thermal length and propagates it into connection segment updates. |
| opm/input/eclipse/Parser/ParseContext.hpp | Renames missing-segment context key to SCHEDULE_MISSING_SEGMENT and broadens description. |
| opm/input/eclipse/Parser/ParseContext.cpp | Registers SCHEDULE_MISSING_SEGMENT instead of the old key. |
| CMakeLists_files.cmake | Adds new SegmentHeatTransfer compilation unit and public header install. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /// A multisegment-well keyword (e.g. WSEGAICD, WSEGSICD, WSEGVALV, | ||
| /// WSEGHEAT) references a missing well segment. | ||
| /// | ||
| /// Typically generates a warning and drops the device. Note, | ||
| /// however, that there are likely to be other issues in the input | ||
| /// deck when this situation occurs. | ||
| const static std::string SCHEDULE_ICD_MISSING_SEGMENT; | ||
| const static std::string SCHEDULE_MISSING_SEGMENT; |
There was a problem hiding this comment.
The build is fine and I think it is fine also. I would like to have some comments from @bska regarding this point, in case there are some other implications that I could not think of.
following copilot reviewing comments.
|
jenkins build this please |
912eef6 to
0a93406
Compare
more properly reports the range of the segments does not match any existing segment.
using SCHEDULE_MSW_KEYWORD_ON_NON_MSW_WELL category
|
I am marking the PR as ready for review now. |
|
jenkins build this please |
|
jenkins build this please |
|
I think Jenkins is having some hectic. |
WELSEGS: parse the pipe-wall thermal properties (items 10-15) — wall area, volumetric heat capacity and thermal conductivity — with per-segment fallback to the record-1 defaults.
COMPSEGS: parse the effective thermal connection length (item 10), if defaulted, using the grid thickness.
WSEGHEAT: parse and apply the new keyword — COMP/SEG/TEMP heat-transfer coefficients with +/-/NONE set operations, a five-coefficient-per-segment cap, input validation, and deck-order application across overlapping well-name patterns.