BlackoilPhases.hpp
Go to the documentation of this file.
1/*
2 Copyright 2010, 2011, 2012 SINTEF ICT, Applied Mathematics.
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_BLACKOILPHASES_HEADER_INCLUDED
21#define OPM_BLACKOILPHASES_HEADER_INCLUDED
22
23#include <array>
24#include <vector>
25
26namespace Opm
27{
28
30 {
31 public:
32 static const int MaxNumPhases = 3;
33
34 // "Crypto phases" are "phases" (or rather "conservation quantities") in the
35 // sense that they can be active or not and canonical indices can be translated
36 // to and from active ones. That said, they are not considered by num_phases or
37 // MaxNumPhases. The crypto phases which are currently implemented are solvent,
38 // polymer, energy, polymer molecular weight, foam and brine.
39 static const int NumCryptoPhases = 7;
40
41 // enum ComponentIndex { Water = 0, Oil = 1, Gas = 2 };
42 enum PhaseIndex { Aqua = 0, Liquid = 1, Vapour = 2, Solvent = 3, Polymer = 4, Energy = 5, PolymerMW = 6, Foam = 7, Brine = 8, ZFraction = 9 };
43 };
44
45 struct PhaseUsage : public BlackoilPhases
46 {
47 PhaseUsage() = default;
48 explicit PhaseUsage(std::vector<BlackoilPhases::PhaseIndex> phases);
49
50
51 std::array<int, MaxNumPhases + NumCryptoPhases> phase_used;
52 std::array<int, MaxNumPhases + NumCryptoPhases> phase_pos;
53
57 bool has_energy{};
58 // polymer molecular weight
60 bool has_foam{};
61 bool has_brine{};
63
64 };
65
66} // namespace Opm
67
68#endif // OPM_BLACKOILPHASES_HEADER_INCLUDED
Definition: BlackoilPhases.hpp:30
static const int MaxNumPhases
Definition: BlackoilPhases.hpp:32
static const int NumCryptoPhases
Definition: BlackoilPhases.hpp:39
PhaseIndex
Definition: BlackoilPhases.hpp:42
@ Liquid
Definition: BlackoilPhases.hpp:42
@ Aqua
Definition: BlackoilPhases.hpp:42
@ ZFraction
Definition: BlackoilPhases.hpp:42
@ Vapour
Definition: BlackoilPhases.hpp:42
@ Foam
Definition: BlackoilPhases.hpp:42
@ Energy
Definition: BlackoilPhases.hpp:42
@ Solvent
Definition: BlackoilPhases.hpp:42
@ Polymer
Definition: BlackoilPhases.hpp:42
@ PolymerMW
Definition: BlackoilPhases.hpp:42
@ Brine
Definition: BlackoilPhases.hpp:42
Definition: BlackoilPhases.hpp:27
Definition: BlackoilPhases.hpp:46
bool has_polymer
Definition: BlackoilPhases.hpp:56
bool has_foam
Definition: BlackoilPhases.hpp:60
bool has_energy
Definition: BlackoilPhases.hpp:57
bool has_polymermw
Definition: BlackoilPhases.hpp:59
PhaseUsage(std::vector< BlackoilPhases::PhaseIndex > phases)
std::array< int, MaxNumPhases+NumCryptoPhases > phase_used
Definition: BlackoilPhases.hpp:51
bool has_solvent
Definition: BlackoilPhases.hpp:55
std::array< int, MaxNumPhases+NumCryptoPhases > phase_pos
Definition: BlackoilPhases.hpp:52
int num_phases
Definition: BlackoilPhases.hpp:54
bool has_brine
Definition: BlackoilPhases.hpp:61
bool has_zFraction
Definition: BlackoilPhases.hpp:62
PhaseUsage()=default