ECLPvtCurveCollection.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_ECLPVTCURVECOLLECTION_HEADER_INCLUDED
21#define OPM_ECLPVTCURVECOLLECTION_HEADER_INCLUDED
22
30
31#include <memory>
32#include <vector>
33
40
41namespace Opm {
42 class ECLInitFileData;
43} // Opm
44
45namespace Opm { namespace ECLPVT {
46
48 {
49 public:
60 const ECLInitFileData& init);
61
74 void setOutputUnits(std::unique_ptr<const ECLUnits::UnitSystem> usys);
75
106 std::vector<PVTGraph>
108 const ECLPhaseIndex phase,
109 const int pvtRegionID) const;
110
148 std::vector<double>
150 const ECLPhaseIndex phase,
151 const int pvtRegionID,
152 const std::vector<double>& phasePress,
153 const std::vector<double>& mixRatio
154 = std::vector<double>()) const;
155
207 std::vector<double>
209 const ECLPhaseIndex phase,
210 const int pvtRegionID,
211 std::vector<double> phasePress, // Mutable copy
212 std::vector<double> mixRatio // Mutable copy
213 = std::vector<double>()) const;
214
215 private:
217 std::shared_ptr<Gas> gas_; // shared => default special member funcs.
218
220 std::shared_ptr<Oil> oil_;
221
224 std::shared_ptr<const ECLUnits::UnitSystem> usys_native_;
225
228 std::shared_ptr<const ECLUnits::UnitSystem> usys_internal_;
229
232 std::shared_ptr<const ECLUnits::UnitSystem> usys_output_{nullptr};
233
243 bool isValidRequest(const ECLPhaseIndex phase,
244 const int pvtRegionID) const;
245
256 std::vector<PVTGraph>
257 convertToOutputUnits(std::vector<PVTGraph>&& graph,
258 const RawCurve curve,
259 const ECLPhaseIndex phase) const;
260 };
261
262}} // Opm::ECLPVT
263
264#endif // OPM_ECLPVTCURVECOLLECTION_HEADER_INCLUDED
Definition: ECLGraph.hpp:52
Definition: ECLResultData.hpp:177
Definition: ECLPvtCurveCollection.hpp:48
ECLPvtCurveCollection(const ECLGraph &G, const ECLInitFileData &init)
std::vector< PVTGraph > getPvtCurve(const RawCurve curve, const ECLPhaseIndex phase, const int pvtRegionID) const
std::vector< double > getDynamicPropertyNative(const RawCurve property, const ECLPhaseIndex phase, const int pvtRegionID, std::vector< double > phasePress, std::vector< double > mixRatio=std::vector< double >()) const
std::vector< double > getDynamicPropertySI(const RawCurve property, const ECLPhaseIndex phase, const int pvtRegionID, const std::vector< double > &phasePress, const std::vector< double > &mixRatio=std::vector< double >()) const
void setOutputUnits(std::unique_ptr< const ECLUnits::UnitSystem > usys)
RawCurve
Definition: ECLPvtCommon.hpp:293
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
ECLPhaseIndex
Definition: ECLPhaseIndex.hpp:28