Consider Active Phases When Initializing Satfunc Endpoints

This commit passes the run's notion of its active phases, an object
of type Opm::Phases, through to the initialisation layer for the
saturation functions' scaling properties.  In particular, this
allows us to discriminate between the phases and to not index into
tables or properties that would not be appropriate (e.g., maximum
gas saturation (SGU) in a simulation run without active gas).

Moreover, we now have enough information to know to look for SOF2 in
two-phase run using family II saturation function keywords.  These
changes are necessary in order to extend Flow's support for the
FILLEPS output request to two-phase runs.
This commit is contained in:
Bård Skaflestad
2020-01-16 18:20:31 +01:00
parent 847182c25a
commit 19ecc3d30e
28 changed files with 667 additions and 385 deletions

View File

@@ -35,6 +35,8 @@
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/Box.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/FieldPropsManager.hpp>
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
@@ -107,7 +109,7 @@ BOOST_AUTO_TEST_CASE(InvalidInput) {
Opm::EclipseGrid grid( deck );
Opm::TableManager tm(deck);
Opm::EclipseGrid eg( deck );
Opm::FieldPropsManager fp(deck, eg, tm);
Opm::FieldPropsManager fp(deck, Opm::Phases{true, true, true}, eg, tm);
// Invalid direction
std::vector<const Opm::DeckKeyword*> keywords0;
@@ -173,7 +175,7 @@ BOOST_AUTO_TEST_CASE(NotSupported) {
Opm::EclipseGrid grid( deck );
Opm::TableManager tm(deck);
Opm::EclipseGrid eg( deck );
Opm::FieldPropsManager fp(deck, eg, tm);
Opm::FieldPropsManager fp(deck, Opm::Phases{true, true, true}, eg, tm);
// Not support NOAQUNNC behaviour
@@ -234,7 +236,7 @@ BOOST_AUTO_TEST_CASE(DefaultedRegions) {
Opm::EclipseGrid grid( deck );
Opm::TableManager tm(deck);
Opm::EclipseGrid eg( deck );
Opm::FieldPropsManager fp(deck, eg, tm);
Opm::FieldPropsManager fp(deck, Opm::Phases{true, true, true}, eg, tm);
std::vector<const Opm::DeckKeyword*> keywords0;
@@ -294,7 +296,7 @@ BOOST_AUTO_TEST_CASE(MULTREGT_COPY_MULTNUM) {
Opm::Deck deck = createCopyMULTNUMDeck();
Opm::TableManager tm(deck);
Opm::EclipseGrid eg(deck);
Opm::FieldPropsManager fp(deck, eg, tm);
Opm::FieldPropsManager fp(deck, Opm::Phases{true, true, true}, eg, tm);
BOOST_CHECK_NO_THROW(fp.has_int("FLUXNUM"));
BOOST_CHECK_NO_THROW(fp.has_int("MULTNUM"));