All Classes Namespaces Files Functions Variables Typedefs Enumerator Pages
PolymerPropsAd.hpp
1 /*
2  Copyright 2014 SINTEF ICT, Applied Mathematics.
3  Copyright 2014 STATOIL ASA.
4 
5  This file is part of the Open Porous Media project (OPM).
6 
7  OPM is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  OPM is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with OPM. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef OPM_POLYMERPROPSAD_HEADED_INLCUDED
22 #define OPM_POLYMERPROPSAD_HEADED_INLCUDED
23 
24 #include <cmath>
25 #include <vector>
26 #include <opm/autodiff/AutoDiffBlock.hpp>
27 #include <opm/autodiff/AutoDiffHelpers.hpp>
28 #include <opm/polymer/PolymerProperties.hpp>
29 
30 namespace Opm {
31 
33  {
34  public:
36  double rockDensity() const;
37 
39  double deadPoreVol() const;
40 
42  double cMax() const;
43 
45  const std::vector<double>& shearWaterVelocity() const;
46 
48  const std::vector<double>& shearViscosityReductionFactor() const;
49 
51  double plyshlogRefConc() const;
52 
54  bool hasPlyshlogRefSalinity() const;
55 
57  bool hasPlyshlogRefTemp() const;
58 
60  double plyshlogRefSalinity() const;
61 
63  double plyshlogRefTemp() const;
64 
66  double shrate() const;
67 
68  double viscMult(double c) const; // multipler interpolated from PLYVISC table
69 
70  typedef AutoDiffBlock<double> ADB;
71  typedef ADB::V V;
72 
73  V viscMult(const V& c) const;
76 
77 
78  ADB viscMult(const ADB& c) const;
79 
81  PolymerPropsAd(const PolymerProperties& polymer_props);
82 
85 
89  V
90  effectiveInvWaterVisc(const V& c, const V& mu_w) const;
91 
95  ADB
96  effectiveInvWaterVisc(const ADB& c,const V& mu_w) const;
97 
101  ADB
102  effectiveInvPolymerVisc(const ADB& c, const V& mu_w) const;
103 
106  V
107  polymerWaterVelocityRatio(const V& c) const;
108 
111  ADB
112  polymerWaterVelocityRatio(const ADB& c) const;
113 
118  V
119  adsorption(const V& c, const V& cmax_cells) const;
120 
125  ADB
126  adsorption(const ADB& c, const ADB& cmax_cells) const;
127 
133  V
134  effectiveRelPerm(const V& c, const V& cmax_cells, const V& relperm) const;
135 
136 
142  ADB
143  effectiveRelPerm(const ADB& c, const ADB& cmax_cells, const ADB& krw) const;
144 
150  bool computeShearMultLog(std::vector<double>& water_vel, std::vector<double>& visc_mult, std::vector<double>& shear_mult) const;
151 
152 
153  private:
154  const PolymerProperties& polymer_props_;
155  };
156 
157 } //namespace Opm
158 
159 #endif// OPM_POLYMERPROPSAD_HEADED_INLCUDED
const std::vector< double > & shearWaterVelocity() const
\ return The water velcoity or shear rate in the PLYSHLOG table
Definition: PolymerPropsAd.cpp:64
Definition: PolymerPropsAd.hpp:32
const std::vector< double > & shearViscosityReductionFactor() const
\ return The viscosity reducation factor in the PLYSHLOG table
Definition: PolymerPropsAd.cpp:70
PolymerPropsAd(const PolymerProperties &polymer_props)
Constructor wrapping a polymer props.
Definition: PolymerPropsAd.cpp:158
V polymerWaterVelocityRatio(const V &c) const
Definition: PolymerPropsAd.cpp:248
double plyshlogRefConc() const
\ return The reference polymer concentration for PLYSHLOG table
Definition: PolymerPropsAd.cpp:76
bool computeShearMultLog(std::vector< double > &water_vel, std::vector< double > &visc_mult, std::vector< double > &shear_mult) const
Definition: PolymerPropsAd.cpp:385
V effectiveInvWaterVisc(const V &c, const V &mu_w) const
Definition: PolymerPropsAd.cpp:175
~PolymerPropsAd()
Destructor.
Definition: PolymerPropsAd.cpp:167
Definition: PolymerProperties.hpp:43
double plyshlogRefSalinity() const
\ return The reference salinity in PLYSHLOG keyword
Definition: PolymerPropsAd.cpp:94
double rockDensity() const
Definition: PolymerPropsAd.cpp:38
double cMax() const
Definition: PolymerPropsAd.cpp:58
double shrate() const
\ return the value of SHRATE
Definition: PolymerPropsAd.cpp:105
double deadPoreVol() const
Definition: PolymerPropsAd.cpp:48
V effectiveRelPerm(const V &c, const V &cmax_cells, const V &relperm) const
Definition: PolymerPropsAd.cpp:345
double plyshlogRefTemp() const
\ return The reference temperature in PLYSHLOG keyword
Definition: PolymerPropsAd.cpp:100
bool hasPlyshlogRefSalinity() const
\ return The flag indicating if reference salinity is specified in PLYSHLOG keyword ...
Definition: PolymerPropsAd.cpp:82
bool hasPlyshlogRefTemp() const
\ return The flag indicating if reference temperature is specified in PLYSHLOG keyword ...
Definition: PolymerPropsAd.cpp:88
ADB effectiveInvPolymerVisc(const ADB &c, const V &mu_w) const
Definition: PolymerPropsAd.cpp:220
V adsorption(const V &c, const V &cmax_cells) const
Definition: PolymerPropsAd.cpp:296
Eigen::Array< double, Eigen::Dynamic, 1 > V
Underlying type for values.
Definition: AutoDiffBlock.hpp:99