diff --git a/opm/core/fluid/SaturationPropsBasic.cpp b/opm/core/fluid/SaturationPropsBasic.cpp index 077576b04..b168abe6d 100644 --- a/opm/core/fluid/SaturationPropsBasic.cpp +++ b/opm/core/fluid/SaturationPropsBasic.cpp @@ -128,6 +128,15 @@ namespace Opm + /// \return P, the number of phases. + int SaturationPropsBasic::numPhases() const + { + return num_phases_; + } + + + + /// Relative permeability. /// \param[in] n Number of data points. /// \param[in] s Array of nP saturation values. diff --git a/opm/core/fluid/SaturationPropsBasic.hpp b/opm/core/fluid/SaturationPropsBasic.hpp index 3a8e97fa4..62ce1148c 100644 --- a/opm/core/fluid/SaturationPropsBasic.hpp +++ b/opm/core/fluid/SaturationPropsBasic.hpp @@ -30,6 +30,9 @@ namespace Opm /// by which we mean constant, linear or quadratic relative /// permeability functions for a maximum of two phases, /// and zero capillary pressure. + /// + /// TODO: This class can easily be extended to three phases, + /// by adding three-phase relperm behaviour. class SaturationPropsBasic { public: @@ -42,6 +45,9 @@ namespace Opm /// relperm_func ("Linear") Must be "Constant", "Linear" or "Quadratic". void init(const Dune::parameter::ParameterGroup& param); + /// \return P, the number of phases. + int numPhases() const; + /// Relative permeability. /// \param[in] n Number of data points. /// \param[in] s Array of nP saturation values. diff --git a/opm/core/fluid/SaturationPropsFromDeck.hpp b/opm/core/fluid/SaturationPropsFromDeck.hpp index c705b39b6..f745f2e9d 100644 --- a/opm/core/fluid/SaturationPropsFromDeck.hpp +++ b/opm/core/fluid/SaturationPropsFromDeck.hpp @@ -36,6 +36,9 @@ namespace Opm /// Initialize from deck. void init(const Dune::EclipseGridParser& deck); + /// \return P, the number of phases. + int numPhases() const; + /// Relative permeability. /// \param[in] n Number of data points. /// \param[in] s Array of nP saturation values.