My Project
Loading...
Searching...
No Matches
AICD.hpp
1/*
2 Copyright 2020 Equinor 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 AICD_HPP_HEADER_INCLUDED
21#define AICD_HPP_HEADER_INCLUDED
22
23#include <opm/input/eclipse/Schedule/MSW/SICD.hpp>
24
25#include <map>
26#include <string>
27#include <utility>
28#include <vector>
29
30namespace Opm {
31
32 class DeckRecord;
33 class DeckKeyword;
34
35} // namespace Opm
36
37namespace Opm { namespace RestartIO {
38 struct RstSegment;
39}} // namespace Opm::RestartIO
40
41namespace Opm {
42
43 class AutoICD : public SICD
44 {
45 public:
46 AutoICD() = default;
47 explicit AutoICD(const DeckRecord& record);
48 explicit AutoICD(const RestartIO::RstSegment& rstSegment);
49
50 static AutoICD serializationTestObject();
51
52 // the function will return a map
53 // [
54 // "WELL1" : [<seg1, aicd1>, <seg2, aicd2> ...]
55 // ....
56 static std::map<std::string, std::vector<std::pair<int, AutoICD>>>
57 fromWSEGAICD(const DeckKeyword& wsegaicd);
58
59 bool operator==(const AutoICD& data) const;
60
61 template<class Serializer>
62 void serializeOp(Serializer& serializer)
63 {
64 this->SICD::serializeOp(serializer);
65 serializer(m_flow_rate_exponent);
66 serializer(m_visc_exponent);
67 serializer(m_oil_density_exponent);
68 serializer(m_water_density_exponent);
69 serializer(m_gas_density_exponent);
70 serializer(m_oil_viscosity_exponent);
71 serializer(m_water_viscosity_exponent);
72 serializer(m_gas_viscosity_exponent);
73 }
74
75 double flowRateExponent() const;
76 double viscExponent() const;
77 double oilDensityExponent() const;
78 double waterDensityExponent() const;
79 double gasDensityExponent() const;
80 double oilViscExponent() const;
81 double waterViscExponent() const;
82 double gasViscExponent() const;
83
84 private:
85 double m_flow_rate_exponent {};
86 double m_visc_exponent {};
87 double m_oil_density_exponent {};
88 double m_water_density_exponent {};
89 double m_gas_density_exponent {};
90 double m_oil_viscosity_exponent {};
91 double m_water_viscosity_exponent {};
92 double m_gas_viscosity_exponent {};
93 };
94} // namespace Opm
95
96#endif // AICD_HPP_HEADER_INCLUDED
Definition AICD.hpp:44
Definition DeckKeyword.hpp:36
Definition DeckRecord.hpp:32
Definition SICD.hpp:46
Class for (de-)serializing.
Definition Serializer.hpp:91
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Definition segment.hpp:34