My Project
BlackoilPhases.hpp
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 
26 namespace 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 
54  int num_phases;
55  bool has_solvent;
56  bool has_polymer;
57  bool has_energy;
58  // polymer molecular weight
59  bool has_polymermw;
60  bool has_foam;
61  bool has_brine;
62  bool has_zFraction;
63 
64  };
65 
66 } // namespace Opm
67 
68 #endif // OPM_BLACKOILPHASES_HEADER_INCLUDED
Definition: BlackoilPhases.hpp:30
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:27
Definition: BlackoilPhases.hpp:46