Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't Lose Events Introduced Immediately After Restart #4417

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bska
Copy link
Member

@bska bska commented Jan 10, 2025

Commit 092f0a2 (PR #4108) introduced logic to ensure that events added at the restart time–e.g., group level controls–would be available during the first time step after restart. This empirically improved non-linear convergence for certain field cases.

This change did however have the unintended side effect of clearing any other events that might happen on the first report step after the restart time. If, in particular, that included introducing a new well (WELSPECS keyword), then the events system would lose the new well and any subsequent changes to the well (e.g., WCONPROD or WELOPEN) would then throw an exception for the unknown well in

WellGroupEvents::addEvent(well, evt)

This PR switches the unconditional 'update_wellgroup_events()' call of commit 092f0a2 into using a new member function

WellGroupEvents::merge(events)

instead. This maintains the intended effect of commit 092f0a2, while also preserving any other events that might happen immediately after the restart time.

@bska
Copy link
Member Author

bska commented Jan 10, 2025

I'm creating this PR in draft mode because it depends on, and contains, the earlier PR #4416. 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 dont-overwrite-events branch 3 times, most recently from 62fe89a to 637d639 Compare January 10, 2025 12:31
bska added 2 commits January 10, 2025 15:50
The resulting object has the union of the events of the two initial
objects.
Commit 092f0a2 (PR OPM#4108) introduced logic to ensure that events
added at the restart time--e.g., group level controls--would be
available during the first time step after restart.  This
empirically improved non-linear convergence for certain field cases.

This change did however have the unintended side effect of clearing
any other events that might happen on the first report step after
the restart time.  If, in particular, that included introducing a
new well (WELSPECS keyword), then the events system would lose the
new well and any subsequent changes to the well (e.g., WCONPROD or
WELOPEN) would then throw an exception for the unknown well in

    WellGroupEvents::addEvent(well, evt)

This commit switches the unconditional 'update_wellgroup_events()'
call of commit 092f0a2 to using the new member function

    WellGroupEvents::merge(events)

instead.  This maintains the intended effect of commit 092f0a2,
while also preserving any other events that might happen immediately
after the restart time.
@bska bska force-pushed the dont-overwrite-events branch from 637d639 to 4d12c3e Compare January 10, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant