JFunc.hpp
Go to the documentation of this file.
1/*
2 Copyright 2016 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_JFUNC_HPP_
21#define OPM_JFUNC_HPP_
22
24
25
26namespace Opm {
27
28class JFunc
29{
30public:
31
32 enum class Flag { BOTH, WATER, GAS };
33 enum class Direction { XY, X, Y, Z };
34
36 explicit JFunc(const Deck& deck);
37
39
40 double alphaFactor() const;
41 double betaFactor() const;
42 double goSurfaceTension() const;
43 double owSurfaceTension() const;
44 const Flag& flag() const;
45 const Direction& direction() const;
46
47 bool operator==(const JFunc& data) const;
48
49 template<class Serializer>
50 void serializeOp(Serializer& serializer)
51 {
52 serializer(m_flag);
53 serializer(m_owSurfaceTension);
54 serializer(m_goSurfaceTension);
55 serializer(m_alphaFactor);
56 serializer(m_betaFactor);
57 serializer(m_direction);
58 }
59
60private:
61 Flag m_flag; // JFUNC flag: WATER, GAS, or BOTH. Default BOTH
62 double m_owSurfaceTension; // oil-wat surface tension. Required if flag is BOTH or WATER
63 double m_goSurfaceTension; // gas-oil surface tension. Required if flag is BOTH or GAS
64 double m_alphaFactor; // alternative porosity term. Default 0.5
65 double m_betaFactor; // alternative permeability term. Default 0.5
66 Direction m_direction; // XY, X, Y, Z. Default XY
67};
68} // Opm::
69
70#endif /* OPM_JFUNC_HPP_ */
Definition: Deck.hpp:115
Definition: JFunc.hpp:29
void serializeOp(Serializer &serializer)
Definition: JFunc.hpp:50
double alphaFactor() const
const Flag & flag() const
Direction
Definition: JFunc.hpp:33
bool operator==(const JFunc &data) const
Flag
Definition: JFunc.hpp:32
static JFunc serializeObject()
const Direction & direction() const
double goSurfaceTension() const
JFunc(const Deck &deck)
double owSurfaceTension() const
double betaFactor() const
Definition: Serializer.hpp:38
Definition: A.hpp:4
static std::string data()
Definition: exprtk.hpp:40022