ReservoirPropertyTracerFluid.hpp
Go to the documentation of this file.
1//===========================================================================
2//
3// File: ReservoirPropertyTracerFluid.hpp
4//
5// Created: Thu Apr 15 10:45:00 2010
6//
7// Author(s): Atgeirr F Rasmussen <atgeirr@sintef.no>
8// Bård Skaflestad <bard.skaflestad@sintef.no>
9//
10// $Date$
11//
12// $Revision$
13//
14//===========================================================================
15
16/*
17 Copyright 2010 SINTEF ICT, Applied Mathematics.
18 Copyright 2010 Statoil ASA.
19
20 This file is part of The Open Reservoir Simulator Project (OpenRS).
21
22 OpenRS is free software: you can redistribute it and/or modify
23 it under the terms of the GNU General Public License as published by
24 the Free Software Foundation, either version 3 of the License, or
25 (at your option) any later version.
26
27 OpenRS is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 GNU General Public License for more details.
31
32 You should have received a copy of the GNU General Public License
33 along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
34*/
35
36#ifndef OPENRS_RESERVOIRPROPERTYTRACERFLUID_HEADER
37#define OPENRS_RESERVOIRPROPERTYTRACERFLUID_HEADER
38
39namespace Opm {
41 public:
42 enum { NumberOfPhases = 2 };
43
44 template<class Vector>
45 void phaseMobilities(int /*cell_index*/, double saturation, Vector& mobility) const
46 {
47 mobility[0] = saturation;
48 mobility[1] = 1.0 - saturation;
49 }
50
51 // This one is so far only used for tensorial mobs, so we cheat a little.
52 template <class ActualMobType>
53 void phaseMobility(int phase, int cell_index, double saturation, ActualMobType& mobility) const
54 {
55 double m = phase == 0 ? saturation : 1.0 - saturation;
56 eye(mobility);
57 mobility *= m;
58 }
59
60 template<class Vector>
61 void phaseDensities(int /*cell_index*/, Vector& rho) const
62 {
63 rho[0] = 1.0;
64 rho[1] = 1.0;
65 }
66 };
67}
68
69#endif /* OPENRS_RESERVOIRPROPERTYTRACERFLUID_HEADER */
Definition: ReservoirPropertyTracerFluid.hpp:40
@ NumberOfPhases
Definition: ReservoirPropertyTracerFluid.hpp:42
void phaseMobilities(int, double saturation, Vector &mobility) const
Definition: ReservoirPropertyTracerFluid.hpp:45
void phaseMobility(int phase, int cell_index, double saturation, ActualMobType &mobility) const
Definition: ReservoirPropertyTracerFluid.hpp:53
void phaseDensities(int, Vector &rho) const
Definition: ReservoirPropertyTracerFluid.hpp:61
Definition: BlackoilFluid.hpp:32
void eye(Matrix &A)
Make an identity.
Definition: Matrix.hpp:618