My Project
Loading...
Searching...
No Matches
Equil.hpp
1#ifndef OPM_EQUIL_HPP
2#define OPM_EQUIL_HPP
3
4#include <cstddef>
5#include <vector>
6
7namespace Opm {
8 class DeckKeyword;
9 class DeckRecord;
10
12 public:
13 EquilRecord() = default;
14 EquilRecord(double datum_depth_arg, double datum_depth_pc_arg,
15 double woc_depth, double woc_pc,
16 double goc_depth, double goc_pc,
17 bool live_oil_init,
18 bool wet_gas_init,
19 int target_accuracy,
20 bool humid_gas_init);
21 explicit EquilRecord(const DeckRecord& record);
22
23 static EquilRecord serializationTestObject();
24 double datumDepth() const;
25 double datumDepthPressure() const;
26 double waterOilContactDepth() const;
27 double waterOilContactCapillaryPressure() const;
28 double gasOilContactDepth() const;
29 double gasOilContactCapillaryPressure() const;
30
31 bool liveOilInitConstantRs() const;
32 bool wetGasInitConstantRv() const;
33 int initializationTargetAccuracy() const;
34 bool humidGasInitConstantRvw() const;
35
36 bool operator==(const EquilRecord& data) const;
37
38 template<class Serializer>
39 void serializeOp(Serializer& serializer)
40 {
41 serializer(datum_depth);
42 serializer(datum_depth_ps);
43 serializer(water_oil_contact_depth);
44 serializer(water_oil_contact_capillary_pressure);
45 serializer(gas_oil_contact_depth);
46 serializer(gas_oil_contact_capillary_pressure);
47 serializer(live_oil_init_proc);
48 serializer(wet_gas_init_proc);
49 serializer(init_target_accuracy);
50 serializer(humid_gas_init_proc);
51 }
52
53 private:
54 double datum_depth = 0.0;
55 double datum_depth_ps = 0.0;
56 double water_oil_contact_depth = 0.0;
57 double water_oil_contact_capillary_pressure = 0.0;
58 double gas_oil_contact_depth = 0.0;
59 double gas_oil_contact_capillary_pressure = 0.0;
60
61 bool live_oil_init_proc = false;
62 bool wet_gas_init_proc = false;
63 int init_target_accuracy = 0;
64 bool humid_gas_init_proc = false;
65 };
66
68 public:
69 StressEquilRecord() = default;
70 explicit StressEquilRecord(const DeckRecord& record);
71
72 static StressEquilRecord serializationTestObject();
73
74 bool operator==(const StressEquilRecord& data) const;
75
76 double datumDepth() const;
77 double datumPosX() const;
78 double datumPosY() const;
79 double stressXX() const;
80 double stressXX_grad() const;
81 double stressYY() const;
82 double stressYY_grad() const;
83 double stressZZ() const;
84 double stressZZ_grad() const;
85
86 template<class Serializer>
87 void serializeOp(Serializer& serializer)
88 {
89 serializer(datum_depth);
90 serializer(datum_posx);
91 serializer(datum_posy);
92 serializer(stress_xx);
93 serializer(stress_xx_grad);
94 serializer(stress_yy);
95 serializer(stress_yy_grad);
96 serializer(stress_zz);
97 serializer(stress_zz_grad);
98 }
99
100 private:
101 double datum_depth = 0.0;
102 double datum_posx = 0.0;
103 double datum_posy = 0.0;
104 double stress_xx = 0.0;
105 double stress_xx_grad = 0.0;
106 double stress_yy = 0.0;
107 double stress_yy_grad = 0.0;
108 double stress_zz = 0.0;
109 double stress_zz_grad = 0.0;
110 };
111
112 template<class RecordType>
114 public:
115 using const_iterator = typename std::vector<RecordType>::const_iterator;
116
117 EquilContainer() = default;
118 explicit EquilContainer( const DeckKeyword& );
119
120 static EquilContainer serializationTestObject();
121
122 const RecordType& getRecord(std::size_t id) const;
123
124 size_t size() const;
125 bool empty() const;
126
127 const_iterator begin() const;
128 const_iterator end() const;
129
130 bool operator==(const EquilContainer& data) const;
131
132 template<class Serializer>
133 void serializeOp(Serializer& serializer)
134 {
135 serializer(m_records);
136 }
137
138 private:
139 std::vector<RecordType> m_records;
140 };
141
144}
145
146#endif //OPM_EQUIL_HPP
Definition DeckKeyword.hpp:36
Definition DeckRecord.hpp:32
Definition Equil.hpp:113
Definition Equil.hpp:11
Class for (de-)serializing.
Definition Serializer.hpp:84
Definition Equil.hpp:67
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30