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 
52  // a struct containing the constants to calculate polymer viscosity
53  // based on Mark-Houwink equation and Huggins equation, the constants are provided
54  // by the keyword PLYVMH
56  Scalar k_mh;
57  Scalar a_mh;
58  Scalar gamma;
59  Scalar kappa;
60  };
61 
62  struct SkprpolyTable {
63  double refConcentration;
64  TabulatedTwoDFunction table_func;
65  };
66 
67  std::vector<Scalar> plyrockDeadPoreVolume_{};
68  std::vector<Scalar> plyrockResidualResistanceFactor_{};
69  std::vector<Scalar> plyrockRockDensityFactor_{};
70  std::vector<Scalar> plyrockAdsorbtionIndex_{};
71  std::vector<Scalar> plyrockMaxAdsorbtion_{};
72  std::vector<TabulatedFunction> plyadsAdsorbedPolymer_{};
73  std::vector<TabulatedFunction> plyviscViscosityMultiplierTable_{};
74  std::vector<Scalar> plymaxMaxConcentration_{};
75  std::vector<Scalar> plymixparToddLongstaff_{};
76  std::vector<std::vector<Scalar>> plyshlogShearEffectRefMultiplier_{};
77  std::vector<std::vector<Scalar>> plyshlogShearEffectRefLogVelocity_{};
78  std::vector<Scalar> shrate_{};
79  bool hasShrate_ = false;
80  bool hasPlyshlog_ = false;
81 
82  std::vector<PlyvmhCoefficients> plyvmhCoefficients_{};
83  std::map<int, TabulatedTwoDFunction> plymwinjTables_{};
84  std::map<int, TabulatedTwoDFunction> skprwatTables_{};
85 
86  std::map<int, SkprpolyTable> skprpolyTables_{};
87 
88 private:
94  void setNumSatRegions(unsigned numRegions);
95 
101  void setNumMixRegions(unsigned numRegions, bool enablePolymerMolarWeight);
102 
108  void setPlyrock(unsigned satRegionIdx,
109  const Scalar& plyrockDeadPoreVolume,
110  const Scalar& plyrockResidualResistanceFactor,
111  const Scalar& plyrockRockDensityFactor,
112  const Scalar& plyrockAdsorbtionIndex,
113  const Scalar& plyrockMaxAdsorbtion);
114 
118  void processPlyrock(const EclipseState& eclState);
119 
123  void processPlyads(const EclipseState& eclState);
124 
128  template<bool enablePolymerMolarWeight>
129  void processPlyvisc(const EclipseState& eclState);
130 
134  template<bool enablePolymerMolarWeight>
135  void processPlymax(const EclipseState& eclState);
136 
140  template<bool enablePolymerMolarWeight>
141  void processPlmixpar(const EclipseState& eclState);
142 
146  void processPlyshlog(const EclipseState& eclState);
147 
151  void processShrate(const EclipseState& eclState);
152 
156  void processPlyvmh(const EclipseState& eclState);
157 
161  void processPlymwinj(const EclipseState& eclState);
162 
166  void processSkprwat(const EclipseState& eclState);
167 
171  void processSkprpoly(const EclipseState& eclState);
172 };
173 
174 } // namespace Opm
175 
176 #endif // OPM_BLACK_OIL_POLYMER_PARAMS_HPP
Structs needed for tpfalinearizer and its gpuparams struct extracted to be defined in one place that ...
Definition: blackoilbioeffectsmodules.hh:45
Struct holding the parameters for the BlackOilPolymerModule class.
Definition: blackoilpolymerparams.hpp:43
Definition: blackoilpolymerparams.hpp:55
Definition: blackoilpolymerparams.hpp:62