opm-common
Toggle main menu visibility
Loading...
Searching...
No Matches
FoamConfig.hpp
1
/*
2
Copyright 2019 SINTEF Digital, Mathematics and Cybernetics.
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_FOAMCONFIG_HPP
21
#define OPM_FOAMCONFIG_HPP
22
23
#include <opm/input/eclipse/EclipseState/Phase.hpp>
24
25
#include <cstddef>
26
#include <vector>
27
28
namespace
Opm
29
{
30
31
class
Deck
;
32
class
DeckRecord
;
33
35
class
FoamData
36
{
37
public
:
38
FoamData();
39
FoamData(
const
DeckRecord
& FOAMFSC_record,
const
DeckRecord
& FOAMROCK_record);
40
explicit
FoamData(
const
DeckRecord
& FOAMROCK_record);
41
42
static
FoamData serializationTestObject();
43
44
double
referenceSurfactantConcentration()
const
;
45
double
exponent()
const
;
46
double
minimumSurfactantConcentration()
const
;
47
48
bool
allowDesorption()
const
;
49
double
rockDensity()
const
;
50
51
bool
operator==(
const
FoamData& data)
const
;
52
53
template
<
class
Serializer>
54
void
serializeOp(
Serializer
& serializer)
55
{
56
serializer(reference_surfactant_concentration_);
57
serializer(exponent_);
58
serializer(minimum_surfactant_concentration_);
59
serializer(allow_desorption_);
60
serializer(rock_density_);
61
}
62
63
private
:
64
double
reference_surfactant_concentration_;
65
double
exponent_;
66
double
minimum_surfactant_concentration_;
67
bool
allow_desorption_;
68
double
rock_density_;
69
};
70
72
class
FoamConfig
73
{
74
public
:
75
enum class
MobilityModel {
76
TAB,
77
FUNC
78
};
79
80
FoamConfig() =
default
;
81
explicit
FoamConfig(
const
Deck
&);
82
83
static
FoamConfig serializationTestObject();
84
85
const
FoamData
& getRecord(std::size_t index)
const
;
86
87
Opm::Phase getTransportPhase()
const
;
88
MobilityModel getMobilityModel()
const
;
89
90
std::size_t size()
const
;
91
bool
empty()
const
;
92
93
using
const_iterator = std::vector<FoamData>::const_iterator;
94
const_iterator begin()
const
;
95
const_iterator end()
const
;
96
97
bool
operator==(
const
FoamConfig& data)
const
;
98
99
template
<
class
Serializer>
100
void
serializeOp(
Serializer
& serializer)
101
{
102
serializer(data_);
103
serializer(transport_phase_);
104
serializer(mobility_model_);
105
}
106
107
private
:
108
std::vector<FoamData> data_;
109
Phase transport_phase_ = Phase::GAS;
110
MobilityModel mobility_model_ = MobilityModel::TAB;
111
};
112
113
}
// end namespace Opm
114
115
#endif
// OPM_FOAMCONFIG_HPP
Opm::DeckRecord
Definition
DeckRecord.hpp:32
Opm::Deck
Definition
Deck.hpp:46
Opm::FoamData
Foam behaviour data for a single SATNUM region.
Definition
FoamConfig.hpp:36
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
FoamConfig.hpp
Generated by
1.17.0