SaturationPropsFromDeck.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_SATURATIONPROPSFROMDECK_HEADER_INCLUDED
21 #define OPM_SATURATIONPROPSFROMDECK_HEADER_INCLUDED
22 
27 #include <opm/core/grid.h>
28 
29 #include <opm/parser/eclipse/Deck/Deck.hpp>
30 #include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
31 
32 #include <vector>
33 
34 struct UnstructuredGrid;
35 
36 namespace Opm
37 {
38 
39  // Forward declaring the EclMaterialLawManager template.
40  template <class ScalarT, int wettingPhaseIdxV, int nonWettingasPhaseIdxV, int gasPhaseIdxV>
42  template <class Traits>
44 
45 
48  {
49  public:
50  typedef Opm::ThreePhaseMaterialTraits<double,
51  /*wettingPhaseIdx=*/BlackoilPhases::Aqua,
52  /*nonWettingPhaseIdx=*/BlackoilPhases::Liquid,
55 
58 
62  void init(const PhaseUsage& phaseUsage,
63  std::shared_ptr<MaterialLawManager> materialLawManager);
64 
65 
69  void init(Opm::DeckConstPtr deck,
70  std::shared_ptr<MaterialLawManager> materialLawManager)
71  {
72  init(Opm::phaseUsageFromDeck(deck), materialLawManager);
73  }
74 
76  int numPhases() const;
77 
87  void relperm(const int n,
88  const double* s,
89  const int* cells,
90  double* kr,
91  double* dkrds) const;
92 
102  void capPress(const int n,
103  const double* s,
104  const int* cells,
105  double* pc,
106  double* dpcds) const;
107 
112  void satRange(const int n,
113  const int* cells,
114  double* smin,
115  double* smax) const;
116 
120  void updateSatHyst(const int n,
121  const int* cells,
122  const double* s);
123 
128  void swatInitScaling(const int cell,
129  const double pcow,
130  double & swat);
131 
132  private:
133  std::shared_ptr<MaterialLawManager> materialLawManager_;
134  PhaseUsage phaseUsage_;
135  };
136 
137 
138 
139 } // namespace Opm
140 
141 #endif // OPM_SATURATIONPROPSFROMDECK_HEADER_INCLUDED
void capPress(const int n, const double *s, const int *cells, double *pc, double *dpcds) const
void swatInitScaling(const int cell, const double pcow, double &swat)
Definition: grid.h:98
Definition: AnisotropicEikonal.hpp:43
Definition: BlackoilPhases.hpp:32
SaturationPropsFromDeck()
Default constructor.
void updateSatHyst(const int n, const int *cells, const double *s)
void init(Opm::DeckConstPtr deck, std::shared_ptr< MaterialLawManager > materialLawManager)
Definition: SaturationPropsFromDeck.hpp:69
Opm::EclMaterialLawManager< MaterialTraits > MaterialLawManager
Definition: SaturationPropsFromDeck.hpp:54
Definition: SaturationPropsInterface.hpp:29
Definition: SaturationPropsFromDeck.hpp:43
Interface to saturation functions from deck.
Definition: SaturationPropsFromDeck.hpp:47
Definition: BlackoilPhases.hpp:32
Opm::ThreePhaseMaterialTraits< double, BlackoilPhases::Aqua, BlackoilPhases::Liquid, BlackoilPhases::Vapour > MaterialTraits
Definition: SaturationPropsFromDeck.hpp:53
void init(const PhaseUsage &phaseUsage, std::shared_ptr< MaterialLawManager > materialLawManager)
void satRange(const int n, const int *cells, double *smin, double *smax) const
PhaseUsage phaseUsageFromDeck(Opm::EclipseStateConstPtr eclipseState)
Definition: phaseUsageFromDeck.hpp:35
void relperm(const int n, const double *s, const int *cells, double *kr, double *dkrds) const
Definition: BlackoilPhases.hpp:32
Definition: SaturationPropsFromDeck.hpp:41
Definition: BlackoilPhases.hpp:36