FluidStateBlackoil.hpp
1 /*
2  Copyright 2010 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_FLUIDSTATEBLACKOIL_HEADER_INCLUDED
21 #define OPM_FLUIDSTATEBLACKOIL_HEADER_INCLUDED
22 
23 
24 #include "BlackoilDefs.hpp"
25 
26 
27 namespace Opm
28 {
33  {
34  Scalar temperature_;
35  CompVec surface_volume_;
36  PhaseVec phase_pressure_;
37  PhaseVec phase_volume_density_;
38  Scalar total_phase_volume_density_;
39  PhaseVec formation_volume_factor_;
40  PhaseVec solution_factor_;
41  PhaseToCompMatrix phase_to_comp_; // RB^{-1} in Fortran ordering
42  PhaseVec saturation_;
43  PhaseVec phase_compressibility_;
44  Scalar total_compressibility_;
45  Scalar experimental_term_;
46  PhaseVec viscosity_;
47  PhaseVec relperm_;
48  PhaseJacobian drelperm_;
49  PhaseVec mobility_;
50  PhaseJacobian dmobility_;
51  };
52 
53 
57  struct AllFluidStates : public BlackoilDefs
58  {
59  // Canonical state variables.
60  std::vector<CompVec> surface_volume_density; // z
61  std::vector<PhaseVec> phase_pressure; // p
62 
63  // Variables from PVT functions.
64  std::vector<PhaseVec> formation_volume_factor; // B
65  std::vector<PhaseVec> formation_volume_factor_deriv; // dB/dp
66  std::vector<PhaseVec> solution_factor; // R
67  std::vector<PhaseVec> solution_factor_deriv; // dR/dp
68  std::vector<PhaseVec> viscosity; // mu
69 
70  // Variables computed from PVT data.
71  // The A matrices are all in Fortran order (or, equivalently,
72  // we store the transposes).
73  std::vector<PhaseToCompMatrix> state_matrix; // A' = (RB^{-1})'
74  std::vector<PhaseVec> phase_volume_density; // u
75  std::vector<Scalar> total_phase_volume_density; // sum(u)
76  std::vector<PhaseVec> saturation; // s = u/sum(u)
77  std::vector<PhaseVec> phase_compressibility; // c
78  std::vector<Scalar> total_compressibility; // cT
79  std::vector<Scalar> experimental_term; // ex = sum(Ai*dA*Ai*z)
80 
81  // Variables computed from saturation.
82  std::vector<PhaseVec> relperm; // kr
83  std::vector<PhaseJacobian> relperm_deriv; // dkr/ds
84  std::vector<PhaseVec> mobility; // lambda
85  std::vector<PhaseJacobian> mobility_deriv; // dlambda/ds
86  };
87 
88 } // end namespace Opm
89 
90 
91 #endif // OPM_FLUIDSTATEBLACKOIL_HEADER_INCLUDED
Definition: BlackoilDefs.hpp:33
Class for immiscible dead oil and dry gas.
Definition: applier.hpp:18
Fluid state for a black oil model.
Definition: FluidStateBlackoil.hpp:32
Multiple fluid states for a black oil model.
Definition: FluidStateBlackoil.hpp:57