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

Enable New Saturation Function Consistency Checks #5596

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

Conversation

bska
Copy link
Member

@bska bska commented Sep 10, 2024

Currently opt-in by the new parameter CheckSatfuncConsistency (command line option --check-satfunc-consistency), this PR hooks up the SatfuncConsistencyCheckManager<> pass to the FlowProblem. I hope to make the parameter be "opt-out" at some point, but for now the new pass breaks too many regression tests.

@bska
Copy link
Member Author

bska commented Sep 10, 2024

I'm creating this in draft mode for two reasons

  1. The PR depends on, and contains, the earlier PR Add Top Level Container for Saturation Function Consistency Checks #5592
  2. I'd like to refine the new parameter, ideally to not exist at all, but that will probably require adjustments to the underlying systems to avoid breaking the regression tests.

@bska
Copy link
Member Author

bska commented Sep 10, 2024

jenkins build this please

@bska bska force-pushed the enable-new-satfunc-consistency-checks branch 3 times, most recently from c84978d to d268e8d Compare September 11, 2024 16:37
@bska
Copy link
Member Author

bska commented Sep 11, 2024

jenkins build this please

@bska
Copy link
Member Author

bska commented Sep 11, 2024

jenkins build this please opm-tests=1226

@bska
Copy link
Member Author

bska commented Sep 11, 2024

jenkins build this opm-tests=1226 please

@bska bska force-pushed the enable-new-satfunc-consistency-checks branch from d268e8d to 39b05d0 Compare September 12, 2024 16:03
@bska
Copy link
Member Author

bska commented Sep 12, 2024

jenkins build this please

@bska bska force-pushed the enable-new-satfunc-consistency-checks branch 8 times, most recently from d7d435b to 8572ccd Compare September 20, 2024 12:06
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 bska force-pushed the enable-new-satfunc-consistency-checks branch from 8572ccd to d73e131 Compare September 23, 2024 10:21
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