opm-simulators
blackoilpolymerparams.hpp
Go to the documentation of this file.
1 // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 // vi: set et ts=4 sw=4 sts=4:
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 2 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  Consult the COPYING file in the top-level source directory of this
20  module for the precise wording of the license and the list of
21  copyright holders.
22 */
28 #ifndef OPM_BLACK_OIL_POLYMER_PARAMS_HPP
29 #define OPM_BLACK_OIL_POLYMER_PARAMS_HPP
30 
31 #include <opm/material/common/Tabulated1DFunction.hpp>
32 #include <opm/material/common/IntervalTabulated2DFunction.hpp>
33 
34 #include <map>
35 #include <vector>
36 
37 namespace Opm {
38 
39 class EclipseState;
40 
42 template<class Scalar>
44  using TabulatedFunction = Tabulated1DFunction<Scalar>;
45  using TabulatedTwoDFunction = IntervalTabulated2DFunction<Scalar>;
46 
47  enum AdsorptionBehaviour { Desorption = 1, NoDesorption = 2 };
48 
49  template<bool enablePolymer, bool enablePolymerMolarWeight>
50  void initFromState(const EclipseState& eclState);
51 
57  void setNumSatRegions(unsigned numRegions);
58 
64  void setNumMixRegions(unsigned numRegions, bool enablePolymerMolarWeight);
65 
71  void setPlyrock(unsigned satRegionIdx,
72  const Scalar& plyrockDeadPoreVolume,
73  const Scalar& plyrockResidualResistanceFactor,
74  const Scalar& plyrockRockDensityFactor,
75  const Scalar& plyrockAdsorbtionIndex,
76  const Scalar& plyrockMaxAdsorbtion);
77 
78  // a struct containing the constants to calculate polymer viscosity
79  // based on Mark-Houwink equation and Huggins equation, the constants are provided
80  // by the keyword PLYVMH
82  Scalar k_mh;
83  Scalar a_mh;
84  Scalar gamma;
85  Scalar kappa;
86  };
87 
88  struct SkprpolyTable {
89  double refConcentration;
90  TabulatedTwoDFunction table_func;
91  };
92 
93  std::vector<Scalar> plyrockDeadPoreVolume_{};
94  std::vector<Scalar> plyrockResidualResistanceFactor_{};
95  std::vector<Scalar> plyrockRockDensityFactor_{};
96  std::vector<Scalar> plyrockAdsorbtionIndex_{};
97  std::vector<Scalar> plyrockMaxAdsorbtion_{};
98  std::vector<TabulatedFunction> plyadsAdsorbedPolymer_{};
99  std::vector<TabulatedFunction> plyviscViscosityMultiplierTable_{};
100  std::vector<Scalar> plymaxMaxConcentration_{};
101  std::vector<Scalar> plymixparToddLongstaff_{};
102  std::vector<std::vector<Scalar>> plyshlogShearEffectRefMultiplier_{};
103  std::vector<std::vector<Scalar>> plyshlogShearEffectRefLogVelocity_{};
104  std::vector<Scalar> shrate_{};
105  bool hasShrate_ = false;
106  bool hasPlyshlog_ = false;
107 
108  std::vector<PlyvmhCoefficients> plyvmhCoefficients_{};
109  std::map<int, TabulatedTwoDFunction> plymwinjTables_{};
110  std::map<int, TabulatedTwoDFunction> skprwatTables_{};
111 
112  std::map<int, SkprpolyTable> skprpolyTables_{};
113 };
114 
115 } // namespace Opm
116 
117 #endif // OPM_BLACK_OIL_POLYMER_PARAMS_HPP
void setPlyrock(unsigned satRegionIdx, const Scalar &plyrockDeadPoreVolume, const Scalar &plyrockResidualResistanceFactor, const Scalar &plyrockRockDensityFactor, const Scalar &plyrockAdsorbtionIndex, const Scalar &plyrockMaxAdsorbtion)
Specify the polymer rock properties a single region.
Definition: blackoilpolymerparams.cpp:371
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
Struct holding the parameters for the BlackOilPolymerModule class.
Definition: blackoilpolymerparams.hpp:43
Definition: blackoilpolymerparams.hpp:81
Definition: blackoilpolymerparams.hpp:88
void setNumMixRegions(unsigned numRegions, bool enablePolymerMolarWeight)
Specify the number of mix regions.
Definition: blackoilpolymerparams.cpp:359
void setNumSatRegions(unsigned numRegions)
Specify the number of satuation regions.
Definition: blackoilpolymerparams.cpp:347