Loading...
Searching...
No Matches
ThreePointHorizontalConsistencyChecks.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 THREE_POINT_HORIZONTAL_CONSISTENCY_CHECKS_HPP_INCLUDED
#define THREE_POINT_HORIZONTAL_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::ThreePointHorizontal {
template <typename Scalar>
class DisplacingOil_GO : public PhaseCheckBase<Scalar>
{
public:
std::size_t numExportedCheckValues() const override { return 5; };
void exportCheckValues(Scalar* exportedCheckValues) const override
{
exportedCheckValues[0] = this->swl_;
exportedCheckValues[1] = this->sogcr_;
exportedCheckValues[2] = this->sgcr_;
exportedCheckValues[3] = Scalar{1} - (this->sogcr_ + this->swl_);
exportedCheckValues[4] = this->sgu_;
}
std::string description() const override
{
return { "Mobile displacing oil in three point "
"horizontally scaled gas/oil system" };
}
std::string condition() const override
{
return { "SGCR < 1-SOGCR-SWL <= SGU" };
}
void columnNames(std::string* headers) const override
{
headers[0] = "SWL";
headers[1] = "SOGCR";
headers[2] = "SGCR";
headers[3] = "1-SOGCR-SWL";
headers[4] = "SGU";
}
private:
Scalar swl_{};
Scalar sogcr_{};
Scalar sgcr_{};
Scalar sgu_{};
void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
};
template <typename Scalar>
class DisplacingOil_OW : public PhaseCheckBase<Scalar>
{
public:
std::size_t numExportedCheckValues() const override { return 5; };
void exportCheckValues(Scalar* exportedCheckValues) const override
{
exportedCheckValues[0] = this->sgl_;
exportedCheckValues[1] = this->sowcr_;
exportedCheckValues[2] = this->swcr_;
exportedCheckValues[3] = Scalar{1} - (this->sowcr_ + this->sgl_);
exportedCheckValues[4] = this->swu_;
}
std::string description() const override
{
return { "Mobile displacing oil in three point "
"horizontally scaled oil/water system" };
}
std::string condition() const override
{
return { "SWCR < 1-SOWCR-SGL <= SWU" };
}
void columnNames(std::string* headers) const override
{
headers[0] = "SGL";
headers[1] = "SOWCR";
headers[2] = "SWCR";
headers[3] = "1-SOWCR-SGL";
headers[4] = "SWU";
}
private:
Scalar sgl_{};
Scalar sowcr_{};
Scalar swcr_{};
Scalar swu_{};
void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
};
} // namespace Opm::Satfunc::PhaseChecks::ThreePointHorizontal
#endif // THREE_POINT_HORIZONTAL_CONSISTENCY_CHECKS_HPP_INCLUDED
Opm::Satfunc::PhaseChecks::PhaseCheckBase
Base class for all phase saturation function consistency checks.
Definition PhaseCheckBase.hpp:35
Opm::Satfunc::PhaseChecks::ThreePointHorizontal::DisplacingOil_GO
Verify that critical saturation of displacing phase (oil/liquid) is strictly between critical and max...
Definition ThreePointHorizontalConsistencyChecks.hpp:39
Opm::Satfunc::PhaseChecks::ThreePointHorizontal::DisplacingOil_GO::description
std::string description() const override
Descriptive textual summary of this check.
Definition ThreePointHorizontalConsistencyChecks.hpp:58
Opm::Satfunc::PhaseChecks::ThreePointHorizontal::DisplacingOil_GO::condition
std::string condition() const override
Textual representation of the consistency condition.
Definition ThreePointHorizontalConsistencyChecks.hpp:65
Opm::Satfunc::PhaseChecks::ThreePointHorizontal::DisplacingOil_GO::columnNames
void columnNames(std::string *headers) const override
Retrieve names of the exported check values.
Definition ThreePointHorizontalConsistencyChecks.hpp:74
Opm::Satfunc::PhaseChecks::ThreePointHorizontal::DisplacingOil_GO::exportCheckValues
void exportCheckValues(Scalar *exportedCheckValues) const override
Get a linearised copy of the Scalar values involved in the check.
Definition ThreePointHorizontalConsistencyChecks.hpp:48
Opm::Satfunc::PhaseChecks::ThreePointHorizontal::DisplacingOil_GO::numExportedCheckValues
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition ThreePointHorizontalConsistencyChecks.hpp:42
Opm::Satfunc::PhaseChecks::ThreePointHorizontal::DisplacingOil_OW
Verify that critical saturation of displacing phase (oil) is strictly between critical and maximum wa...
Definition ThreePointHorizontalConsistencyChecks.hpp:114
Opm::Satfunc::PhaseChecks::ThreePointHorizontal::DisplacingOil_OW::description
std::string description() const override
Descriptive textual summary of this check.
Definition ThreePointHorizontalConsistencyChecks.hpp:133
Opm::Satfunc::PhaseChecks::ThreePointHorizontal::DisplacingOil_OW::columnNames
void columnNames(std::string *headers) const override
Retrieve names of the exported check values.
Definition ThreePointHorizontalConsistencyChecks.hpp:149
Opm::Satfunc::PhaseChecks::ThreePointHorizontal::DisplacingOil_OW::exportCheckValues
void exportCheckValues(Scalar *exportedCheckValues) const override
Get a linearised copy of the Scalar values involved in the check.
Definition ThreePointHorizontalConsistencyChecks.hpp:123
Opm::Satfunc::PhaseChecks::ThreePointHorizontal::DisplacingOil_OW::numExportedCheckValues
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition ThreePointHorizontalConsistencyChecks.hpp:117
Opm::Satfunc::PhaseChecks::ThreePointHorizontal::DisplacingOil_OW::condition
std::string condition() const override
Textual representation of the consistency condition.
Definition ThreePointHorizontalConsistencyChecks.hpp:140