My Project
Loading...
Searching...
No Matches
JFunc.hpp
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
23namespace Opm {
24
25class Deck;
26
27class JFunc
28{
29public:
30
31 enum class Flag { BOTH, WATER, GAS };
32 enum class Direction { XY, X, Y, Z };
33
34 JFunc();
35 explicit JFunc(const Deck& deck);
36
37 static JFunc serializationTestObject();
38
39 double alphaFactor() const;
40 double betaFactor() const;
41 double goSurfaceTension() const;
42 double owSurfaceTension() const;
43 const Flag& flag() const;
44 const Direction& direction() const;
45
46 bool operator==(const JFunc& data) const;
47
48 template<class Serializer>
49 void serializeOp(Serializer& serializer)
50 {
51 serializer(m_flag);
52 serializer(m_owSurfaceTension);
53 serializer(m_goSurfaceTension);
54 serializer(m_alphaFactor);
55 serializer(m_betaFactor);
56 serializer(m_direction);
57 }
58
59private:
60 Flag m_flag; // JFUNC flag: WATER, GAS, or BOTH. Default BOTH
61 double m_owSurfaceTension; // oil-wat surface tension. Required if flag is BOTH or WATER
62 double m_goSurfaceTension; // gas-oil surface tension. Required if flag is BOTH or GAS
63 double m_alphaFactor; // alternative porosity term. Default 0.5
64 double m_betaFactor; // alternative permeability term. Default 0.5
65 Direction m_direction; // XY, X, Y, Z. Default XY
66};
67} // Opm::
68
69#endif /* OPM_JFUNC_HPP_ */
Definition Deck.hpp:49
Definition JFunc.hpp:28
Class for (de-)serializing.
Definition Serializer.hpp:84
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30