Skip to content

adding WELL_THP_UPDATE event. - #5298

Draft
GitPaean wants to merge 4 commits into
OPM:masterfrom
GitPaean:network-well-without-vfp
Draft

adding WELL_THP_UPDATE event. #5298
GitPaean wants to merge 4 commits into
OPM:masterfrom
GitPaean:network-well-without-vfp

Conversation

@GitPaean

Copy link
Copy Markdown
Member

Adds a WELL_THP_UPDATE schedule event and a SimulatorUpdate::thp_respec_wells set, raised whenever WCONPROD, WCONHIST, WELTARG THP/VFP or WTMULT THP (re)specifies a well THP limit or VFP table — also when the entered values are unchanged, which PRODUCTION_UPDATE does not cover.

@GitPaean GitPaean added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Aug 18, 2026
Raised when the well THP limit and/or VFP table is (re)specified: by
WCONPROD or WCONHIST, by WELTARG with THP or VFP control, or by WTMULT
with THP control. Unlike PRODUCTION_UPDATE it is raised also when the
entered values are unchanged, since re-specifying either input cancels
a THP limit imposed dynamically by the simulator (e.g. by network
balancing).
The new thp_respec_wells set carries the WELL_THP_UPDATE information
through ACTIONX processing, where report-step events do not reach the
simulator.
@GitPaean
GitPaean force-pushed the network-well-without-vfp branch from 3898831 to f7dfc71 Compare August 18, 2026 08:58
@GitPaean

Copy link
Copy Markdown
Member Author

jenkins build this please

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new schedule event (WELL_THP_UPDATE) and simulator update tracking (SimulatorUpdate::thp_respec_wells) to detect when a well’s THP limit and/or VFP table is (re)specified via schedule keywords—even when the specified values are unchanged (a case not reliably covered by PRODUCTION_UPDATE).

Changes:

  • Introduces ScheduleEvents::WELL_THP_UPDATE with documentation explaining when it should be emitted.
  • Records THP/VFP (re)specification in handlers for WCONPROD, WCONHIST, WELTARG (THP/VFP), and WTMULT (THP), and tracks affected wells via HandlerContext::thp_respec_well() into SimulatorUpdate::thp_respec_wells.
  • Adds a parser/schedule regression test verifying WELL_THP_UPDATE behavior across several keyword scenarios.

Reviewed changes

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

Show a summary per file
File Description
tests/parser/ScheduleTests.cpp Adds coverage asserting WELL_THP_UPDATE is raised for THP/VFP re-specification scenarios, including unchanged values.
opm/input/eclipse/Schedule/Well/WellPropertiesKeywordHandlers.cpp Emits WELL_THP_UPDATE for WTMULT THP (currently only in producer branch).
opm/input/eclipse/Schedule/Well/WellKeywordHandlers.cpp Emits WELL_THP_UPDATE for WCONPROD, WCONHIST, and WELTARG THP/VFP cases.
opm/input/eclipse/Schedule/HandlerContext.hpp Declares HandlerContext::thp_respec_well() for tracking THP/VFP (re)specification.
opm/input/eclipse/Schedule/HandlerContext.cpp Implements thp_respec_well() to populate SimulatorUpdate::thp_respec_wells.
opm/input/eclipse/Schedule/Events.hpp Adds the WELL_THP_UPDATE enum value and updates event documentation.
opm/input/eclipse/Schedule/Action/SimulatorUpdate.hpp Adds/serializes/merges/resets/compares the new thp_respec_wells set.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread opm/input/eclipse/Schedule/Well/WellKeywordHandlers.cpp Outdated
Comment thread opm/input/eclipse/Schedule/Well/WellPropertiesKeywordHandlers.cpp Outdated
@GitPaean
GitPaean force-pushed the network-well-without-vfp branch from f7dfc71 to 35ccb76 Compare August 18, 2026 09:18
WCONINJE and WCONINJH, and WELTARG THP/VFP and WTMULT THP on injectors,
re-specify the injector THP limit and/or VFP table just like the
producer variants. Consumers gate on the well type where it matters.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 7 out of 7 changed files in this pull request and generated no new comments.

Suppressed comments (4)

opm/input/eclipse/Schedule/HandlerContext.cpp:56

  • Use the same pointer-check style as the surrounding methods (e.g. affected_well/record_tran_change) to keep HandlerContext consistent.
void HandlerContext::thp_respec_well(const std::string& well_name)
{
    if (sim_update != nullptr) {
        sim_update->thp_respec_wells.insert(well_name);
    }
}

opm/input/eclipse/Schedule/Events.hpp:117

  • Grammar: "THP limit and/or VFP table" is a plural subject, so this should be "have been (re)specified".
            /// The well THP limit and/or VFP table has been (re)specified

opm/input/eclipse/Schedule/Action/SimulatorUpdate.hpp:75

  • Grammar: "THP limit and/or VFP table" is plural, so this should be "have been (re)specified".
    /// Wells whose THP limit and/or VFP table has been (re)specified by

opm/input/eclipse/Schedule/HandlerContext.hpp:110

  • Grammar: the subject is plural ("THP limit and/or VFP table"), so this should use "have been".
    //! \brief Mark that the THP limit and/or VFP table of a well has been

@GitPaean

Copy link
Copy Markdown
Member Author

jenkins build this please

@GitPaean

Copy link
Copy Markdown
Member Author

jenkins build this opm-simulators=7333 please

@GitPaean

Copy link
Copy Markdown
Member Author

jenkins build this opm-simulators=7333 failure_report please

1 similar comment
@GitPaean

Copy link
Copy Markdown
Member Author

jenkins build this opm-simulators=7333 failure_report please

@GitPaean

Copy link
Copy Markdown
Member Author

https://ci.opm-project.org/job/opm-common-PR-builder/10164/

02_6_uda_model5_stdw looks fine, while 01_gsatprod6 needs to look into.

Build Artifacts
01_gsatprod6.pdf 954.89 KiB view
02_6_uda_model5_stdw.pdf 1.38 MiB view

@GitPaean

Copy link
Copy Markdown
Member Author

for the 01_gsatprod6, without tuning, it is difficult to see which one is better,

But if we turn the tuning on, this PR fixed the issue that the well THP can be lower than the nodal pressure,

master,

image

this PR,
image

Will check the version without tuning on more.

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.

2 participants