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
24#include <opm/core/utility/parameters/ParameterGroup.hpp>
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
34struct UnstructuredGrid;
35
36namespace 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(const Opm::Deck& deck,
70 std::shared_ptr<MaterialLawManager> materialLawManager)
71 {
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 setGasOilHystParams(const int n,
129 const int* cells,
130 const double* pcswmdc,
131 const double* krnswdc);
132
137 void getGasOilHystParams(const int n,
138 const int* cells,
139 double* pcswmdc,
140 double* krnswdc) const;
141
146 void setOilWaterHystParams(const int n,
147 const int* cells,
148 const double* pcswmdc,
149 const double* krnswdc);
150
155 void getOilWaterHystParams(const int n,
156 const int* cells,
157 double* pcswmdc,
158 double* krnswdc) const;
159
164 void swatInitScaling(const int cell,
165 const double pcow,
166 double & swat);
167
169 const MaterialLawManager& materialLawManager() const { return *materialLawManager_; }
170
171
172 private:
173 std::shared_ptr<MaterialLawManager> materialLawManager_;
174 PhaseUsage phaseUsage_;
175 };
176
177
178
179} // namespace Opm
180
181#endif // OPM_SATURATIONPROPSFROMDECK_HEADER_INCLUDED
@ Liquid
Definition: BlackoilPhases.hpp:40
@ Aqua
Definition: BlackoilPhases.hpp:40
@ Vapour
Definition: BlackoilPhases.hpp:40
Definition: SaturationPropsFromDeck.hpp:43
Interface to saturation functions from deck.
Definition: SaturationPropsFromDeck.hpp:48
void satRange(const int n, const int *cells, double *smin, double *smax) const
void getGasOilHystParams(const int n, const int *cells, double *pcswmdc, double *krnswdc) const
void relperm(const int n, const double *s, const int *cells, double *kr, double *dkrds) const
SaturationPropsFromDeck()
Default constructor.
const MaterialLawManager & materialLawManager() const
Returns a reference to the MaterialLawManager.
Definition: SaturationPropsFromDeck.hpp:169
Opm::ThreePhaseMaterialTraits< double, BlackoilPhases::Aqua, BlackoilPhases::Liquid, BlackoilPhases::Vapour > MaterialTraits
Definition: SaturationPropsFromDeck.hpp:53
void getOilWaterHystParams(const int n, const int *cells, double *pcswmdc, double *krnswdc) const
void capPress(const int n, const double *s, const int *cells, double *pc, double *dpcds) const
void updateSatHyst(const int n, const int *cells, const double *s)
void swatInitScaling(const int cell, const double pcow, double &swat)
void setGasOilHystParams(const int n, const int *cells, const double *pcswmdc, const double *krnswdc)
void init(const Opm::Deck &deck, std::shared_ptr< MaterialLawManager > materialLawManager)
Definition: SaturationPropsFromDeck.hpp:69
void init(const PhaseUsage &phaseUsage, std::shared_ptr< MaterialLawManager > materialLawManager)
Opm::EclMaterialLawManager< MaterialTraits > MaterialLawManager
Definition: SaturationPropsFromDeck.hpp:54
void setOilWaterHystParams(const int n, const int *cells, const double *pcswmdc, const double *krnswdc)
Definition: SaturationPropsInterface.hpp:30
Definition: SaturationPropsFromDeck.hpp:41
Definition: AnisotropicEikonal.hpp:44
PhaseUsage phaseUsageFromDeck(const Opm::EclipseState &eclipseState)
Definition: phaseUsageFromDeck.hpp:37
Definition: BlackoilPhases.hpp:44