ECLPropertyUnitConversion.hpp
Go to the documentation of this file.
1/*
2 Copyright 2017 Statoil ASA.
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 OPM_ECLPROPERTYUNITCONVERSION_HEADER_INCLUDED
21#define OPM_ECLPROPERTYUNITCONVERSION_HEADER_INCLUDED
22
23#include <memory>
24#include <vector>
25
26namespace Opm {
27
28 class ECLRestartData;
29 class ECLInitFileData;
30
31 namespace ECLUnits {
32
33 struct UnitSystem;
34
43 std::unique_ptr<const UnitSystem>
45
54 std::unique_ptr<const UnitSystem>
56
62 std::unique_ptr<const UnitSystem> internalUnitConventions();
63
69 std::unique_ptr<const UnitSystem> metricUnitConventions();
70
76 std::unique_ptr<const UnitSystem> fieldUnitConventions();
77
83 std::unique_ptr<const UnitSystem> labUnitConventions();
84
90 std::unique_ptr<const UnitSystem> pvtmUnitConventions();
91
95 struct Convert
96 {
102 {
103 public:
106
109
114
124
131
142
149
156
168 virtual void appliedTo(std::vector<double>& x) const = 0;
169
170 protected:
177 const UnitSystem* from() const;
178
185 const UnitSystem* to() const;
186
187 private:
189 class Impl;
190
192 std::unique_ptr<Impl> pImpl_;
193 };
194
197 class Pressure : public PhysicalQuantity {
198 public:
226 void appliedTo(std::vector<double>& press) const override;
227 };
228
232 public:
274 void appliedTo(std::vector<double>& mu) const override;
275 };
276
279 class GasFVF : public PhysicalQuantity {
280 public:
324 void appliedTo(std::vector<double>& Bg) const override;
325 };
326
329 class OilFVF : public PhysicalQuantity {
330 public:
372 void appliedTo(std::vector<double>& Bo) const override;
373 };
374
378 public:
416 void appliedTo(std::vector<double>& Rs) const override;
417 };
418
422 public:
460 void appliedTo(std::vector<double>& Rv) const override;
461 };
462 };
463
464 } // namespace ECLUnits
465} // namespace Opm
466
467#endif // OPM_ECLPROPERTYUNITCONVERSION_HEADER_INCLUDED
Definition: ECLResultData.hpp:177
Definition: ECLResultData.hpp:57
Definition: ECLPropertyUnitConversion.hpp:377
void appliedTo(std::vector< double > &Rs) const override
Definition: ECLPropertyUnitConversion.hpp:279
void appliedTo(std::vector< double > &Bg) const override
Definition: ECLPropertyUnitConversion.hpp:329
void appliedTo(std::vector< double > &Bo) const override
Definition: ECLPropertyUnitConversion.hpp:102
PhysicalQuantity(const PhysicalQuantity &rhs)
PhysicalQuantity & operator=(const PhysicalQuantity &rhs)
PhysicalQuantity(PhysicalQuantity &&rhs)
const UnitSystem * from() const
PhysicalQuantity & operator=(PhysicalQuantity &&rhs)
PhysicalQuantity & to(const UnitSystem &usys)
PhysicalQuantity & from(const UnitSystem &usys)
virtual void appliedTo(std::vector< double > &x) const =0
Definition: ECLPropertyUnitConversion.hpp:197
void appliedTo(std::vector< double > &press) const override
Definition: ECLPropertyUnitConversion.hpp:421
void appliedTo(std::vector< double > &Rv) const override
Definition: ECLPropertyUnitConversion.hpp:231
void appliedTo(std::vector< double > &mu) const override
std::unique_ptr< const UnitSystem > labUnitConventions()
std::unique_ptr< const UnitSystem > internalUnitConventions()
std::unique_ptr< const UnitSystem > pvtmUnitConventions()
std::unique_ptr< const UnitSystem > metricUnitConventions()
std::unique_ptr< const UnitSystem > fieldUnitConventions()
std::unique_ptr< const UnitSystem > serialisedUnitConventions(const ECLRestartData &rstrt)
std::vector< double > init(const std::string &kewyord, const TableManager &tables, const Phases &phases, const std::vector< double > &cell_depth, const std::vector< int > &num, const std::vector< int > &endnum)
Definition: A.hpp:4
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t x(y+z)
Definition: ECLPropertyUnitConversion.hpp:96
Definition: ECLUnitHandling.hpp:30