WaterPhaseConsistencyChecks.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 WATER_PHASE_CONSISTENCY_CHECKS_HPP_INCLUDED
21#define WATER_PHASE_CONSISTENCY_CHECKS_HPP_INCLUDED
22
25
26#include <cstddef>
27#include <string>
28
30
34 template <typename Scalar>
35 class SWmin : 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->swl_;
48 }
49
51 std::string description() const override
52 {
53 return { "Non-negative minimum water saturation" };
54 }
55
57 std::string condition() const override
58 {
59 return { "0 <= SWL < 1" };
60 }
61
66 void columnNames(std::string* headers) const override
67 {
68 headers[0] = "SWL";
69 }
70
71 private:
73 Scalar swl_;
74
82 void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
83 };
84
88 template <typename Scalar>
89 class SWmax : 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->swu_;
102 }
103
105 std::string description() const override
106 {
107 return { "Positive maximum water saturation" };
108 }
109
111 std::string condition() const override
112 {
113 return { "0 < SWU <= 1" };
114 }
115
120 void columnNames(std::string* headers) const override
121 {
122 headers[0] = "SWU";
123 }
124
125 private:
127 Scalar swu_;
128
136 void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
137 };
138
142 template <typename Scalar>
143 class SWcr : 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->swl_;
156 exportedCheckValues[1] = this->swcr_;
157 exportedCheckValues[2] = this->swu_;
158 }
159
161 std::string description() const override
162 {
163 return { "Mobile water saturation" };
164 }
165
167 std::string condition() const override
168 {
169 return { "SWL <= SWCR < SWU" };
170 }
171
176 void columnNames(std::string* headers) const override
177 {
178 headers[0] = "SWL";
179 headers[1] = "SWCR";
180 headers[2] = "SWU";
181 }
182
183 private:
185 Scalar swl_;
186
188 Scalar swcr_;
189
191 Scalar swu_;
192
200 void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
201 };
202
203} // namespace Opm::Satfunc::PhaseChecks::Water
204
205#endif // WATER_PHASE_CONSISTENCY_CHECKS_HPP_INCLUDED
Definition: PhaseCheckBase.hpp:35
Definition: WaterPhaseConsistencyChecks.hpp:144
std::string condition() const override
Textual representation of the consistency condition.
Definition: WaterPhaseConsistencyChecks.hpp:167
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition: WaterPhaseConsistencyChecks.hpp:147
void exportCheckValues(Scalar *exportedCheckValues) const override
Definition: WaterPhaseConsistencyChecks.hpp:153
void columnNames(std::string *headers) const override
Definition: WaterPhaseConsistencyChecks.hpp:176
std::string description() const override
Descriptive textual summary of this check.
Definition: WaterPhaseConsistencyChecks.hpp:161
Definition: WaterPhaseConsistencyChecks.hpp:90
void columnNames(std::string *headers) const override
Definition: WaterPhaseConsistencyChecks.hpp:120
void exportCheckValues(Scalar *exportedCheckValues) const override
Definition: WaterPhaseConsistencyChecks.hpp:99
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition: WaterPhaseConsistencyChecks.hpp:93
std::string description() const override
Descriptive textual summary of this check.
Definition: WaterPhaseConsistencyChecks.hpp:105
std::string condition() const override
Textual representation of the consistency condition.
Definition: WaterPhaseConsistencyChecks.hpp:111
Definition: WaterPhaseConsistencyChecks.hpp:36
std::size_t numExportedCheckValues() const override
Number of Scalar values involved in the check.
Definition: WaterPhaseConsistencyChecks.hpp:39
std::string condition() const override
Textual representation of the consistency condition.
Definition: WaterPhaseConsistencyChecks.hpp:57
std::string description() const override
Descriptive textual summary of this check.
Definition: WaterPhaseConsistencyChecks.hpp:51
void exportCheckValues(Scalar *exportedCheckValues) const override
Definition: WaterPhaseConsistencyChecks.hpp:45
void columnNames(std::string *headers) const override
Definition: WaterPhaseConsistencyChecks.hpp:66
Definition: WaterPhaseConsistencyChecks.hpp:29
Definition: SatfuncConsistencyChecks.hpp:35