-
Notifications
You must be signed in to change notification settings - Fork 122
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
Enable New Saturation Function Consistency Checks #5596
Draft
bska
wants to merge
3
commits into
OPM:master
Choose a base branch
from
bska:enable-new-satfunc-consistency-checks
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
I'm creating this in draft mode for two reasons
|
jenkins build this please |
bska
force-pushed
the
enable-new-satfunc-consistency-checks
branch
3 times, most recently
from
September 11, 2024 16:37
c84978d
to
d268e8d
Compare
jenkins build this please |
jenkins build this please opm-tests=1226 |
jenkins build this opm-tests=1226 please |
bska
force-pushed
the
enable-new-satfunc-consistency-checks
branch
from
September 12, 2024 16:03
d268e8d
to
39b05d0
Compare
jenkins build this please |
bska
force-pushed
the
enable-new-satfunc-consistency-checks
branch
8 times, most recently
from
September 20, 2024 12:06
d7d435b
to
8572ccd
Compare
bska
force-pushed
the
enable-new-satfunc-consistency-checks
branch
4 times, most recently
from
September 26, 2024 07:57
c1288bc
to
6159eef
Compare
This functionality has been tested in Equinor and I'm looking forward to see this going into master. |
This commit introduces a set of callback functions, packaged in an abstract base class SatfuncCheckPointInterface<Scalar>, for querying and populating the saturation function end-points that get probed by the individual consistency checks. Member function SatfuncCheckPointInterface::pointID(cellIdx) translates the active cell index 'cellIdx' into a point ID, assumed to be unique on at least the current MPI rank. This function will return 'nullopt' if the 'cellIdx' is not eligible for this particular end-point. This typically happens for the region based tabulated (unscaled) saturation function checks when the 'cellIdx' happens to be in a region that's already been visited. Member function SatfuncCheckPointInterface::populateCheckPoint(cellIdx, endPoints) fills in (assigns) all data members of the 'endPoints' structure with the pertinent values for the active cell 'cellIdx'. We implement this interface for the tabulated/unscaled end-points in derived class UnscaledSatfuncCheckPoint<Scalar> and for the scaled end-points in derived class ScaledSatfuncCheckPoint<Scalar>. The former keeps track of which saturation regions have been visited and short-circuits its 'pointID()' member function based on that information while the latter uses an instance of the former in order initialise the 'endPoints' structure in its populateCheckPoint() member function.
This commit introduces a new top-level "manager" for all saturation function consistency checks. This component associates collections of saturation function curves with per-cell or per-region end-point definitions and provides an interface to run all checks for all interior entities (i.e., active cells) in a DUNE grid view. We form one set of SatfuncConsistencyChecks objects for each SatfuncCheckPointInterface<> object, thereby enabling running the same set of consistency checks for both the unscaled, tabulated, per-region saturation functions and the per-cell scaled saturation functions. The latter is executed only if the run enables end-point scaling for the saturation functions while the former is executed only if the run does not enable end-point scaling. At present we're limited to reversible and non-directional saturation functions for the drainage process only, but those restrictions will be lifted in due time. As an aid to enabling the pertinent individual checks, we add a private factory function which considers the run's active phases and whether or not the run uses the alternative, three-point horizontal scaling method ("SCALECRS = YES").
The new parameter CheckSatfuncConsistency, command line option --check-satfunc-consistency, allows users to opt out of running the checks, e.g., because the curves are not of primary interest in the use case. We check the unscaled curves if the run does not activate the end-point scaling option and the scaled curves otherwise. At present we're limited to reversible and non-directional saturation functions for the drainage process, but those restrictions will be lifted in due time.
bska
force-pushed
the
enable-new-satfunc-consistency-checks
branch
from
September 26, 2024 17:05
6159eef
to
08dc4e1
Compare
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.
Currently opt-in by the new parameter
CheckSatfuncConsistency
(command line option--check-satfunc-consistency
), this PR hooks up theSatfuncConsistencyCheckManager<>
pass to theFlowProblem
. I hope to make the parameter be "opt-out" at some point, but for now the new pass breaks too many regression tests.