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