Loading...
Searching...
No Matches
WaterPhaseConsistencyChecks.hpp
/*
Copyright 2024 Equinor AS
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 3 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 <http://www.gnu.org/licenses/>.
*/
#ifndef WATER_PHASE_CONSISTENCY_CHECKS_HPP_INCLUDED
#define WATER_PHASE_CONSISTENCY_CHECKS_HPP_INCLUDED
#include <opm/simulators/utils/satfunc/PhaseCheckBase.hpp>
#include <opm/simulators/utils/satfunc/SatfuncConsistencyChecks.hpp>
#include <cstddef>
#include <string>
namespace Opm::Satfunc::PhaseChecks::Water {
template <typename Scalar>
class SWmin : public PhaseCheckBase<Scalar>
{
public:
std::size_t numExportedCheckValues() const override { return 1; };
void exportCheckValues(Scalar* exportedCheckValues) const override
{
exportedCheckValues[0] = this->swl_;
}
std::string description() const override
{
return { "Non-negative minimum water saturation" };
}
std::string condition() const override
{
return { "0 <= SWL < 1" };
}
void columnNames(std::string* headers) const override
{
headers[0] = "SWL";
}
private:
Scalar swl_{};
void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
};
template <typename Scalar>
class SWmax : public PhaseCheckBase<Scalar>
{
public:
std::size_t numExportedCheckValues() const override { return 1; };
void exportCheckValues(Scalar* exportedCheckValues) const override
{
exportedCheckValues[0] = this->swu_;
}
std::string description() const override
{
return { "Positive maximum water saturation" };
}
std::string condition() const override
{
return { "0 < SWU <= 1" };
}
void columnNames(std::string* headers) const override
{
headers[0] = "SWU";
}
private:
Scalar swu_{};
void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
};
template <typename Scalar>
class SWcr : public PhaseCheckBase<Scalar>
{
public:
std::size_t numExportedCheckValues() const override { return 3; };
void exportCheckValues(Scalar* exportedCheckValues) const override
{
exportedCheckValues[0] = this->swl_;
exportedCheckValues[1] = this->swcr_;
exportedCheckValues[2] = this->swu_;
}
std::string description() const override
{
return { "Mobile water saturation" };
}
std::string condition() const override
{
return { "SWL <= SWCR < SWU" };
}
void columnNames(std::string* headers) const override
{
headers[0] = "SWL";
headers[1] = "SWCR";
headers[2] = "SWU";
}
private:
Scalar swl_{};
Scalar swcr_{};
Scalar swu_{};
void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
};
} // namespace Opm::Satfunc::PhaseChecks::Water
#endif // WATER_PHASE_CONSISTENCY_CHECKS_HPP_INCLUDED
Opm::Satfunc::PhaseChecks::PhaseCheckBase
Base class for all phase saturation function consistency checks.
Definition PhaseCheckBase.hpp:35
Opm::Satfunc::PhaseChecks::Water::SWcr
Verify that critical gas saturation is in valid range.
Definition WaterPhaseConsistencyChecks.hpp:144
Opm::Satfunc::PhaseChecks::Water::SWcr::condition
std::string condition() const override
Textual representation of the consistency condition.
Definition WaterPhaseConsistencyChecks.hpp:167
Opm::Satfunc::PhaseChecks::Water::SWcr::numExportedCheckValues
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition WaterPhaseConsistencyChecks.hpp:147
Opm::Satfunc::PhaseChecks::Water::SWcr::exportCheckValues
void exportCheckValues(Scalar *exportedCheckValues) const override
Get a linearised copy of the Scalar values involved in the check.
Definition WaterPhaseConsistencyChecks.hpp:153
Opm::Satfunc::PhaseChecks::Water::SWcr::columnNames
void columnNames(std::string *headers) const override
Retrieve names of the exported check values.
Definition WaterPhaseConsistencyChecks.hpp:176
Opm::Satfunc::PhaseChecks::Water::SWcr::description
std::string description() const override
Descriptive textual summary of this check.
Definition WaterPhaseConsistencyChecks.hpp:161
Opm::Satfunc::PhaseChecks::Water::SWmax
Verify that maximum gas saturation is in valid range.
Definition WaterPhaseConsistencyChecks.hpp:90
Opm::Satfunc::PhaseChecks::Water::SWmax::columnNames
void columnNames(std::string *headers) const override
Retrieve names of the exported check values.
Definition WaterPhaseConsistencyChecks.hpp:120
Opm::Satfunc::PhaseChecks::Water::SWmax::exportCheckValues
void exportCheckValues(Scalar *exportedCheckValues) const override
Get a linearised copy of the Scalar values involved in the check.
Definition WaterPhaseConsistencyChecks.hpp:99
Opm::Satfunc::PhaseChecks::Water::SWmax::numExportedCheckValues
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition WaterPhaseConsistencyChecks.hpp:93
Opm::Satfunc::PhaseChecks::Water::SWmax::description
std::string description() const override
Descriptive textual summary of this check.
Definition WaterPhaseConsistencyChecks.hpp:105
Opm::Satfunc::PhaseChecks::Water::SWmax::condition
std::string condition() const override
Textual representation of the consistency condition.
Definition WaterPhaseConsistencyChecks.hpp:111
Opm::Satfunc::PhaseChecks::Water::SWmin
Verify that minimum gas saturation is in valid range.
Definition WaterPhaseConsistencyChecks.hpp:36
Opm::Satfunc::PhaseChecks::Water::SWmin::numExportedCheckValues
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition WaterPhaseConsistencyChecks.hpp:39
Opm::Satfunc::PhaseChecks::Water::SWmin::condition
std::string condition() const override
Textual representation of the consistency condition.
Definition WaterPhaseConsistencyChecks.hpp:57
Opm::Satfunc::PhaseChecks::Water::SWmin::description
std::string description() const override
Descriptive textual summary of this check.
Definition WaterPhaseConsistencyChecks.hpp:51
Opm::Satfunc::PhaseChecks::Water::SWmin::exportCheckValues
void exportCheckValues(Scalar *exportedCheckValues) const override
Get a linearised copy of the Scalar values involved in the check.
Definition WaterPhaseConsistencyChecks.hpp:45
Opm::Satfunc::PhaseChecks::Water::SWmin::columnNames
void columnNames(std::string *headers) const override
Retrieve names of the exported check values.
Definition WaterPhaseConsistencyChecks.hpp:66
Opm::EclEpsScalingPointsInfo
Definition SatfuncCheckPointInterface.hpp:28