// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- // vi: set et ts=4 sw=4 sts=4: /* This file is part of the Open Porous Media project (OPM). OPM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. OPM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OPM. If not, see . Consult the COPYING file in the top-level source directory of this module for the precise wording of the license and the list of copyright holders. */ /*! * \file * * \copydoc Opm::BlackOilProblem */ #ifndef EWOMS_BLACKOIL_PROBLEM_HH #define EWOMS_BLACKOIL_PROBLEM_HH #include "blackoilproperties.hh" #include namespace Opm { /*! * \ingroup BlackOilModel * \brief Base class for all problems which use the black-oil model. */ template class BlackOilProblem : public MultiPhaseBaseProblem { private: using ParentType = MultiPhaseBaseProblem; using Implementation = GetPropType; using Scalar = GetPropType; using IntensiveQuantities = GetPropType; using Simulator = GetPropType; public: /*! * \copydoc Doxygen::defaultProblemConstructor * * \param simulator The manager object of the simulation */ BlackOilProblem(Simulator& simulator) : ParentType(simulator) {} /*! * \brief Returns the maximum value of the gas dissolution factor at the current time * for a given degree of freedom. * * This is required for the DRSDT keyword. */ Scalar maxGasDissolutionFactor(unsigned, unsigned) const { return std::numeric_limits::max()/2; } /*! * \brief Returns the maximum value of the oil vaporization factor at the current * time for a given degree of freedom. * * This is required for the DRVDT keyword. */ Scalar maxOilVaporizationFactor(unsigned, unsigned) const { return std::numeric_limits::max()/2; } /*! * \brief Returns the maximum value of the oil saturation seen at the current time * for a given degree of freedom. * * This is required for the VAPPARS keyword. */ Scalar maxOilSaturation(unsigned) const { return 1.0; } /*! * \brief Returns the index of the relevant region for thermodynmic properties */ template unsigned pvtRegionIndex(const Context&, unsigned, unsigned) const { return 0; } /*! * \brief Returns the index of the relevant region for saturation functions */ template unsigned satnumRegionIndex(const Context&, unsigned, unsigned) const { return 0; } /*! * \brief Returns the index of the relevant region for solvent mixing functions */ template unsigned miscnumRegionIndex(const Context&, unsigned, unsigned) const { return 0; } /*! * \brief Returns the index of the relevant region for polymer mixing functions */ template unsigned plmixnumRegionIndex(const Context&, unsigned, unsigned) const { return 0; } /*! * \brief Returns the compressibility of the porous medium of a cell */ template Scalar rockCompressibility(const Context&, unsigned, unsigned) const { return 0.0; } /*! * \brief Returns the reference pressure for rock the compressibility of a cell */ template Scalar rockReferencePressure(const Context&, unsigned, unsigned) const { return 1e5; } /*! * \brief Returns the reference temperature * * This is only relevant for temperature dependent quantities, in particular those * needed by the module for energy conservation. */ Scalar referenceTemperature() const { return 273.15 + 15.56; /* [K] */ } /*! * \brief Returns the porosity multiplier due to water-induced rock compaction * * This is a somewhat exotic feature. Most likely you will not need to touch this * method. */ template Scalar rockCompPoroMultiplier(const IntensiveQuantities&, unsigned) const { return 1.0; } private: //! Returns the implementation of the problem (i.e. static polymorphism) Implementation& asImp_() { return *static_cast(this); } //! \copydoc asImp_() const Implementation& asImp_() const { return *static_cast(this); } }; } // namespace Opm #endif