Loading...
Searching...
No Matches
OilPhaseConsistencyChecks.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 OIL_PHASE_CONSISTENCY_CHECKS_HPP_INCLUDED
#define OIL_PHASE_CONSISTENCY_CHECKS_HPP_INCLUDED
#include <opm/simulators/utils/satfunc/SatfuncConsistencyChecks.hpp>
#include <opm/simulators/utils/satfunc/PhaseCheckBase.hpp>
#include <cstddef>
#include <string>
namespace Opm::Satfunc::PhaseChecks::Oil {
template <typename Scalar>
class SOcr_GO : public PhaseCheckBase<Scalar>
{
public:
std::size_t numExportedCheckValues() const override { return 1; };
void exportCheckValues(Scalar* exportedCheckValues) const override
{
exportedCheckValues[0] = this->sogcr_;
}
std::string description() const override
{
return { "Non-negative critical oil saturation in G/O system" };
}
std::string condition() const override
{
return { "0 <= SOGCR < 1" };
}
void columnNames(std::string* headers) const override
{
headers[0] = "SOGCR";
}
private:
Scalar sogcr_{};
void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
};
template <typename Scalar>
class SOmin_GO : 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->sgu_;
exportedCheckValues[2] = this->swl_ + this->sgu_;
}
std::string description() const override
{
return { "Non-negative minimum oil saturation in G/O system" };
}
std::string condition() const override
{
return { "SWL + SGU <= 1" };
}
void columnNames(std::string* headers) const override
{
headers[0] = "SWL";
headers[1] = "SGU";
headers[2] = "SWL + SGU";
}
private:
Scalar swl_{};
Scalar sgu_{};
void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
};
template <typename Scalar>
class MobileOil_GO_SGmin : public PhaseCheckBase<Scalar>
{
public:
std::size_t numExportedCheckValues() const override { return 4; };
void exportCheckValues(Scalar* exportedCheckValues) const override
{
exportedCheckValues[0] = this->swl_;
exportedCheckValues[1] = this->sgl_;
exportedCheckValues[2] = this->sogcr_;
exportedCheckValues[3] = Scalar{1} - (this->swl_ + this->sgl_);
}
std::string description() const override
{
return { "Mobile oil saturation in G/O system at minimum gas saturation" };
}
std::string condition() const override
{
return { "SOGCR < 1 - SWL - SGL" };
}
void columnNames(std::string* headers) const override
{
headers[0] = "SWL";
headers[1] = "SGL";
headers[2] = "SOGCR";
headers[3] = "1 - SWL - SGL";
}
private:
Scalar swl_{};
Scalar sgl_{};
Scalar sogcr_{};
void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
};
template <typename Scalar>
class MobileOil_GO_SGcr : public PhaseCheckBase<Scalar>
{
public:
std::size_t numExportedCheckValues() const override { return 4; };
void exportCheckValues(Scalar* exportedCheckValues) const override
{
exportedCheckValues[0] = this->swl_;
exportedCheckValues[1] = this->sgcr_;
exportedCheckValues[2] = this->sogcr_;
exportedCheckValues[3] = Scalar{1} - (this->swl_ + this->sgcr_);
}
std::string description() const override
{
return { "Mobile oil saturation in G/O system at critical gas saturation" };
}
std::string condition() const override
{
return { "SOGCR < 1 - SWL - SGCR" };
}
void columnNames(std::string* headers) const override
{
headers[0] = "SWL";
headers[1] = "SGCR";
headers[2] = "SOGCR";
headers[3] = "1 - SWL - SGCR";
}
private:
Scalar swl_{};
Scalar sgcr_{};
Scalar sogcr_{};
void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
};
// -----------------------------------------------------------------------
template <typename Scalar>
class SOcr_OW : public PhaseCheckBase<Scalar>
{
public:
std::size_t numExportedCheckValues() const override { return 1; };
void exportCheckValues(Scalar* exportedCheckValues) const override
{
exportedCheckValues[0] = this->sowcr_;
}
std::string description() const override
{
return { "Non-negative critical oil saturation in O/W system" };
}
std::string condition() const override
{
return { "0 <= SOWCR < 1" };
}
void columnNames(std::string* headers) const override
{
headers[0] = "SOWCR";
}
private:
Scalar sowcr_{};
void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
};
template <typename Scalar>
class SOmin_OW : public PhaseCheckBase<Scalar>
{
public:
std::size_t numExportedCheckValues() const override { return 3; };
void exportCheckValues(Scalar* exportedCheckValues) const override
{
exportedCheckValues[0] = this->sgl_;
exportedCheckValues[1] = this->swu_;
exportedCheckValues[2] = this->sgl_ + this->swu_;
}
std::string description() const override
{
return { "Non-negative minimum oil saturation in G/O system" };
}
std::string condition() const override
{
return { "SGL + SWU <= 1" };
}
void columnNames(std::string* headers) const override
{
headers[0] = "SGL";
headers[1] = "SWU";
headers[2] = "SGL + SWU";
}
private:
Scalar sgl_{};
Scalar swu_{};
void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
};
template <typename Scalar>
class MobileOil_OW_SWmin : public PhaseCheckBase<Scalar>
{
public:
std::size_t numExportedCheckValues() const override { return 4; };
void exportCheckValues(Scalar* exportedCheckValues) const override
{
exportedCheckValues[0] = this->swl_;
exportedCheckValues[1] = this->sgl_;
exportedCheckValues[2] = this->sowcr_;
exportedCheckValues[3] = Scalar{1} - (this->swl_ + this->sgl_);
}
std::string description() const override
{
return { "Mobile oil saturation in O/W system at minimum water saturation" };
}
std::string condition() const override
{
return { "SOWCR < 1 - SWL - SGL" };
}
void columnNames(std::string* headers) const override
{
headers[0] = "SWL";
headers[1] = "SGL";
headers[2] = "SOWCR";
headers[3] = "1 - SWL - SGL";
}
private:
Scalar swl_{};
Scalar sgl_{};
Scalar sowcr_{};
void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
};
template <typename Scalar>
class MobileOil_OW_SWcr : public PhaseCheckBase<Scalar>
{
public:
std::size_t numExportedCheckValues() const override { return 4; };
void exportCheckValues(Scalar* exportedCheckValues) const override
{
exportedCheckValues[0] = this->sgl_;
exportedCheckValues[1] = this->swcr_;
exportedCheckValues[2] = this->sowcr_;
exportedCheckValues[3] = Scalar{1} - this->swcr_ - this->sgl_;
}
std::string description() const override
{
return { "Mobile oil saturation in O/W system at critical water saturation" };
}
std::string condition() const override
{
return { "SOWCR < 1 - SWCR - SGL" };
}
void columnNames(std::string* headers) const override
{
headers[0] = "SGL";
headers[1] = "SWCR";
headers[2] = "SOWCR";
headers[3] = "1 - SWCR - SGL";
}
private:
Scalar sgl_{};
Scalar swcr_{};
Scalar sowcr_{};
void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
};
} // namespace Opm::Satfunc::PhaseChecks::Oil
#endif // OIL_PHASE_CONSISTENCY_CHECKS_HPP_INCLUDED
Opm::Satfunc::PhaseChecks::Oil::MobileOil_GO_SGcr
Verify that critical oil saturation in gas/oil system is strictly smaller than oil saturation at crit...
Definition OilPhaseConsistencyChecks.hpp:219
Opm::Satfunc::PhaseChecks::Oil::MobileOil_GO_SGcr::description
std::string description() const override
Descriptive textual summary of this check.
Definition OilPhaseConsistencyChecks.hpp:237
Opm::Satfunc::PhaseChecks::Oil::MobileOil_GO_SGcr::exportCheckValues
void exportCheckValues(Scalar *exportedCheckValues) const override
Get a linearised copy of the Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:228
Opm::Satfunc::PhaseChecks::Oil::MobileOil_GO_SGcr::columnNames
void columnNames(std::string *headers) const override
Retrieve names of the exported check values.
Definition OilPhaseConsistencyChecks.hpp:252
Opm::Satfunc::PhaseChecks::Oil::MobileOil_GO_SGcr::numExportedCheckValues
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:222
Opm::Satfunc::PhaseChecks::Oil::MobileOil_GO_SGcr::condition
std::string condition() const override
Textual representation of the consistency condition.
Definition OilPhaseConsistencyChecks.hpp:243
Opm::Satfunc::PhaseChecks::Oil::MobileOil_GO_SGmin
Verify that critical oil saturation in gas/oil system is strictly smaller than maximum oil saturation...
Definition OilPhaseConsistencyChecks.hpp:152
Opm::Satfunc::PhaseChecks::Oil::MobileOil_GO_SGmin::condition
std::string condition() const override
Textual representation of the consistency condition.
Definition OilPhaseConsistencyChecks.hpp:176
Opm::Satfunc::PhaseChecks::Oil::MobileOil_GO_SGmin::columnNames
void columnNames(std::string *headers) const override
Retrieve names of the exported check values.
Definition OilPhaseConsistencyChecks.hpp:185
Opm::Satfunc::PhaseChecks::Oil::MobileOil_GO_SGmin::numExportedCheckValues
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:155
Opm::Satfunc::PhaseChecks::Oil::MobileOil_GO_SGmin::description
std::string description() const override
Descriptive textual summary of this check.
Definition OilPhaseConsistencyChecks.hpp:170
Opm::Satfunc::PhaseChecks::Oil::MobileOil_GO_SGmin::exportCheckValues
void exportCheckValues(Scalar *exportedCheckValues) const override
Get a linearised copy of the Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:161
Opm::Satfunc::PhaseChecks::Oil::MobileOil_OW_SWcr
Verify that critical oil saturation in oil/water system is strictly smaller than oil saturation at cr...
Definition OilPhaseConsistencyChecks.hpp:470
Opm::Satfunc::PhaseChecks::Oil::MobileOil_OW_SWcr::condition
std::string condition() const override
Textual representation of the consistency condition.
Definition OilPhaseConsistencyChecks.hpp:494
Opm::Satfunc::PhaseChecks::Oil::MobileOil_OW_SWcr::columnNames
void columnNames(std::string *headers) const override
Retrieve names of the exported check values.
Definition OilPhaseConsistencyChecks.hpp:503
Opm::Satfunc::PhaseChecks::Oil::MobileOil_OW_SWcr::numExportedCheckValues
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:473
Opm::Satfunc::PhaseChecks::Oil::MobileOil_OW_SWcr::exportCheckValues
void exportCheckValues(Scalar *exportedCheckValues) const override
Get a linearised copy of the Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:479
Opm::Satfunc::PhaseChecks::Oil::MobileOil_OW_SWcr::description
std::string description() const override
Descriptive textual summary of this check.
Definition OilPhaseConsistencyChecks.hpp:488
Opm::Satfunc::PhaseChecks::Oil::MobileOil_OW_SWmin
Verify that critical oil saturation in oil/water system is strictly smaller than maximum oil saturati...
Definition OilPhaseConsistencyChecks.hpp:403
Opm::Satfunc::PhaseChecks::Oil::MobileOil_OW_SWmin::condition
std::string condition() const override
Textual representation of the consistency condition.
Definition OilPhaseConsistencyChecks.hpp:427
Opm::Satfunc::PhaseChecks::Oil::MobileOil_OW_SWmin::numExportedCheckValues
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:406
Opm::Satfunc::PhaseChecks::Oil::MobileOil_OW_SWmin::columnNames
void columnNames(std::string *headers) const override
Retrieve names of the exported check values.
Definition OilPhaseConsistencyChecks.hpp:436
Opm::Satfunc::PhaseChecks::Oil::MobileOil_OW_SWmin::exportCheckValues
void exportCheckValues(Scalar *exportedCheckValues) const override
Get a linearised copy of the Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:412
Opm::Satfunc::PhaseChecks::Oil::MobileOil_OW_SWmin::description
std::string description() const override
Descriptive textual summary of this check.
Definition OilPhaseConsistencyChecks.hpp:421
Opm::Satfunc::PhaseChecks::Oil::SOcr_GO
Verify that critical oil saturation in gas/oil system is in valid range.
Definition OilPhaseConsistencyChecks.hpp:36
Opm::Satfunc::PhaseChecks::Oil::SOcr_GO::columnNames
void columnNames(std::string *headers) const override
Retrieve names of the exported check values.
Definition OilPhaseConsistencyChecks.hpp:66
Opm::Satfunc::PhaseChecks::Oil::SOcr_GO::numExportedCheckValues
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:39
Opm::Satfunc::PhaseChecks::Oil::SOcr_GO::description
std::string description() const override
Descriptive textual summary of this check.
Definition OilPhaseConsistencyChecks.hpp:51
Opm::Satfunc::PhaseChecks::Oil::SOcr_GO::exportCheckValues
void exportCheckValues(Scalar *exportedCheckValues) const override
Get a linearised copy of the Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:45
Opm::Satfunc::PhaseChecks::Oil::SOcr_GO::condition
std::string condition() const override
Textual representation of the consistency condition.
Definition OilPhaseConsistencyChecks.hpp:57
Opm::Satfunc::PhaseChecks::Oil::SOcr_OW
Verify that critical oil saturation in oil/water system is in valid range.
Definition OilPhaseConsistencyChecks.hpp:287
Opm::Satfunc::PhaseChecks::Oil::SOcr_OW::description
std::string description() const override
Descriptive textual summary of this check.
Definition OilPhaseConsistencyChecks.hpp:302
Opm::Satfunc::PhaseChecks::Oil::SOcr_OW::condition
std::string condition() const override
Textual representation of the consistency condition.
Definition OilPhaseConsistencyChecks.hpp:308
Opm::Satfunc::PhaseChecks::Oil::SOcr_OW::numExportedCheckValues
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:290
Opm::Satfunc::PhaseChecks::Oil::SOcr_OW::columnNames
void columnNames(std::string *headers) const override
Retrieve names of the exported check values.
Definition OilPhaseConsistencyChecks.hpp:317
Opm::Satfunc::PhaseChecks::Oil::SOcr_OW::exportCheckValues
void exportCheckValues(Scalar *exportedCheckValues) const override
Get a linearised copy of the Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:296
Opm::Satfunc::PhaseChecks::Oil::SOmin_GO
Verify that minimum oil saturation in gas/oil system is in valid range.
Definition OilPhaseConsistencyChecks.hpp:90
Opm::Satfunc::PhaseChecks::Oil::SOmin_GO::numExportedCheckValues
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:93
Opm::Satfunc::PhaseChecks::Oil::SOmin_GO::exportCheckValues
void exportCheckValues(Scalar *exportedCheckValues) const override
Get a linearised copy of the Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:99
Opm::Satfunc::PhaseChecks::Oil::SOmin_GO::columnNames
void columnNames(std::string *headers) const override
Retrieve names of the exported check values.
Definition OilPhaseConsistencyChecks.hpp:122
Opm::Satfunc::PhaseChecks::Oil::SOmin_GO::condition
std::string condition() const override
Textual representation of the consistency condition.
Definition OilPhaseConsistencyChecks.hpp:113
Opm::Satfunc::PhaseChecks::Oil::SOmin_GO::description
std::string description() const override
Descriptive textual summary of this check.
Definition OilPhaseConsistencyChecks.hpp:107
Opm::Satfunc::PhaseChecks::Oil::SOmin_OW
Verify that minimum oil saturation in oil/water system is in valid range.
Definition OilPhaseConsistencyChecks.hpp:341
Opm::Satfunc::PhaseChecks::Oil::SOmin_OW::exportCheckValues
void exportCheckValues(Scalar *exportedCheckValues) const override
Get a linearised copy of the Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:350
Opm::Satfunc::PhaseChecks::Oil::SOmin_OW::condition
std::string condition() const override
Textual representation of the consistency condition.
Definition OilPhaseConsistencyChecks.hpp:364
Opm::Satfunc::PhaseChecks::Oil::SOmin_OW::description
std::string description() const override
Descriptive textual summary of this check.
Definition OilPhaseConsistencyChecks.hpp:358
Opm::Satfunc::PhaseChecks::Oil::SOmin_OW::columnNames
void columnNames(std::string *headers) const override
Retrieve names of the exported check values.
Definition OilPhaseConsistencyChecks.hpp:373
Opm::Satfunc::PhaseChecks::Oil::SOmin_OW::numExportedCheckValues
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition OilPhaseConsistencyChecks.hpp:344
Opm::Satfunc::PhaseChecks::PhaseCheckBase
Base class for all phase saturation function consistency checks.
Definition PhaseCheckBase.hpp:35
Opm::EclEpsScalingPointsInfo
Definition SatfuncCheckPointInterface.hpp:28