GasPhaseConsistencyChecks.hpp
Go to the documentation of this file.
1/*
2 Copyright 2024 Equinor AS
3
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef GAS_PHASE_CONSISTENCY_CHECKS_HPP_INCLUDED
21#define GAS_PHASE_CONSISTENCY_CHECKS_HPP_INCLUDED
22
25
26#include <cstddef>
27#include <string>
28
30
34 template <typename Scalar>
35 class SGmin : public PhaseCheckBase<Scalar>
36 {
37 public:
39 std::size_t numExportedCheckValues() const override { return 1; };
40
45 void exportCheckValues(Scalar* exportedCheckValues) const override
46 {
47 exportedCheckValues[0] = this->sgl_;
48 }
49
51 std::string description() const override
52 {
53 return { "Non-negative minimum gas saturation" };
54 }
55
57 std::string condition() const override
58 {
59 return { "0 <= SGL < 1" };
60 }
61
66 void columnNames(std::string* headers) const override
67 {
68 headers[0] = "SGL";
69 }
70
71 private:
73 Scalar sgl_;
74
82 void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
83 };
84
88 template <typename Scalar>
89 class SGmax : public PhaseCheckBase<Scalar>
90 {
91 public:
93 std::size_t numExportedCheckValues() const override { return 1; };
94
99 void exportCheckValues(Scalar* exportedCheckValues) const override
100 {
101 exportedCheckValues[0] = this->sgu_;
102 }
103
105 std::string description() const override
106 {
107 return { "Positive maximum gas saturation must not exceed one" };
108 }
109
111 std::string condition() const override
112 {
113 return { "0 < SGU <= 1" };
114 }
115
120 void columnNames(std::string* headers) const override
121 {
122 headers[0] = "SGU";
123 }
124
125 private:
127 Scalar sgu_;
128
136 void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
137 };
138
142 template <typename Scalar>
143 class SGcr : public PhaseCheckBase<Scalar>
144 {
145 public:
147 std::size_t numExportedCheckValues() const override { return 3; };
148
153 void exportCheckValues(Scalar* exportedCheckValues) const override
154 {
155 exportedCheckValues[0] = this->sgl_;
156 exportedCheckValues[1] = this->sgcr_;
157 exportedCheckValues[2] = this->sgu_;
158 }
159
161 std::string description() const override
162 {
163 return { "Mobile gas saturation" };
164 }
165
167 std::string condition() const override
168 {
169 return { "SGL <= SGCR < SGU" };
170 }
171
176 void columnNames(std::string* headers) const override
177 {
178 headers[0] = "SGL";
179 headers[1] = "SGCR";
180 headers[2] = "SGU";
181 }
182
183 private:
185 Scalar sgl_;
186
188 Scalar sgcr_;
189
191 Scalar sgu_;
192
200 void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
201 };
202
203} // namespace Opm::Satfunc::PhaseChecks::Gas
204
205#endif // GAS_PHASE_CONSISTENCY_CHECKS_HPP_INCLUDED
Definition: GasPhaseConsistencyChecks.hpp:144
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition: GasPhaseConsistencyChecks.hpp:147
std::string description() const override
Descriptive textual summary of this check.
Definition: GasPhaseConsistencyChecks.hpp:161
std::string condition() const override
Textual representation of the consistency condition.
Definition: GasPhaseConsistencyChecks.hpp:167
void columnNames(std::string *headers) const override
Definition: GasPhaseConsistencyChecks.hpp:176
void exportCheckValues(Scalar *exportedCheckValues) const override
Definition: GasPhaseConsistencyChecks.hpp:153
Definition: GasPhaseConsistencyChecks.hpp:90
std::string description() const override
Descriptive textual summary of this check.
Definition: GasPhaseConsistencyChecks.hpp:105
void columnNames(std::string *headers) const override
Definition: GasPhaseConsistencyChecks.hpp:120
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition: GasPhaseConsistencyChecks.hpp:93
std::string condition() const override
Textual representation of the consistency condition.
Definition: GasPhaseConsistencyChecks.hpp:111
void exportCheckValues(Scalar *exportedCheckValues) const override
Definition: GasPhaseConsistencyChecks.hpp:99
Definition: GasPhaseConsistencyChecks.hpp:36
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition: GasPhaseConsistencyChecks.hpp:39
std::string description() const override
Descriptive textual summary of this check.
Definition: GasPhaseConsistencyChecks.hpp:51
void exportCheckValues(Scalar *exportedCheckValues) const override
Definition: GasPhaseConsistencyChecks.hpp:45
void columnNames(std::string *headers) const override
Definition: GasPhaseConsistencyChecks.hpp:66
std::string condition() const override
Textual representation of the consistency condition.
Definition: GasPhaseConsistencyChecks.hpp:57
Definition: PhaseCheckBase.hpp:35
Definition: GasPhaseConsistencyChecks.hpp:29
Definition: SatfuncConsistencyChecks.hpp:35