Add Group Structure Visualisation for RstState Objects - #5310
Draft
bska wants to merge 4 commits into
Draft
Conversation
Member
Author
|
I'm creating this PR in draft mode because it depends on, and contains, the earlier PR #5309. I will keep the PR in a draft state until such time as it is ready for review and merging. |
bska
force-pushed
the
rststate-wgstruct
branch
from
August 24, 2026 10:47
89be1bb to
317710c
Compare
bska
force-pushed
the
rststate-wgstruct
branch
3 times, most recently
from
August 25, 2026 08:23
c2ccd99 to
ca7b723
Compare
PRs OPM#2651 and OPM#2663 added a "Runspec" argument to the restart loader as a means of inferring the maximum number of actions, the number of conditions per action and other essential pieces of information needed to correctly interpret the *ACT and *ACN restart file arrays. While this practice has served us well in the interim, it's strictly speaking somewhat fragile. A restarted simulation run is allowed to increase these dimensions compared to the base run and in that case we'd be basing our offsets on out-of-bounds values. This commit switches to loading the base run's action dimensions directly from the pertinent INTEHEAD array items which, in turn, enables removing the Runspec argument to RstState::load(). We still need the run's number of tabulated PVT regions in order to correctly load the oil vaporisation properties, but I want to push the scattering to the client side at some point in the future. For now we add a new overload of RstState::load() function that takes the number of PVT regions as an optional<int>--defaulting to nullopt which we treat as a single PVT region--and make the overload taking the Runspec argument call the other overload. The Runspec overload will be marked "deprecated" once all downstream users have been converted to the new overload. The one compromise that we have to add here is a floating-point based derivation of each actions "start" time. We would previously infer this from the Runspec argument's START value, but this is no longer available. Instead we use a calculation based on the RstHeader's "sim_time()" and the SimTim element of DOUBHEAD. Other derivations may be possible, but this appears sufficiently accurate for now. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This is in preparation of adding support for emitting dot-style graph output from well/group objects contained in an RstState object loaded from a restart file. We introduce a GroupHierarchy helper structure that normalises the hierarchy information whether obtained directly from a Schedule object (run's last report step) or from an RstState object (follow-up work). The existing dot-style output is then generated from a GroupHierarchy instance. For now we copy the relevant names into this GroupHierarchy. If that turns out to be a bottleneck, then we'll rethink this choice.
This will enable extending the "wellgraph" utility to support visualising groups and wells loaded directly from a restart file instead of having input decks as its only source of information.
bska
force-pushed
the
rststate-wgstruct
branch
from
August 25, 2026 09:15
ca7b723 to
f2d5d0b
Compare
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.
This will enable extending the
wellgraphutility to support visualising groups and wells loaded directly from a restart fileinstead of having input decks as its only source of information.