opm-common
EclHysteresisConfig.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 */
27 #ifndef OPM_ECL_HYSTERESIS_CONFIG_HPP
28 #define OPM_ECL_HYSTERESIS_CONFIG_HPP
29 
30 namespace Opm {
31 
32 class Runspec;
33 
40 {
41 public:
45  void setEnableHysteresis(bool yesno)
46  { enableHysteresis_ = yesno; }
47 
51  bool enableHysteresis() const
52  { return enableHysteresis_; }
53 
61  { pcHysteresisModel_ = value; }
62 
69  int pcHysteresisModel() const
70  { return pcHysteresisModel_; }
71 
72  bool enablePCHysteresis() const
73  { return enableHysteresis() && pcHysteresisModel_ >= 0; }
74 
89  { krHysteresisModel_ = value; }
90 
91  bool enableWettingHysteresis() const
92  { return enableHysteresis() && krHysteresisModel_ >= 4; }
93 
94  bool enableNonWettingHysteresis() const
95  { return enableHysteresis() && krHysteresisModel_ >= 0; }
96 
104  int krHysteresisModel() const
105  { return krHysteresisModel_; }
106 
112  double modParamTrapped() const
113  { return modParamTrapped_; }
114 
120  double curvatureCapPrs() const
121  { return curvatureCapPrs_; }
122 
126  bool enableWagHysteresis() const
127  { return enableWagHyst_; }
128 
132  bool enablePcScalingHyst() const
133  { return enablePcScalingHyst_; }
134 
139  { return enableWettingPhaseKilloughFix_; }
140 
146  void initFromState(const Runspec& runspec);
147 
148 private:
149  // enable hysteresis at all
150  bool enableHysteresis_{false};
151 
152  // the capillary pressure and the relperm hysteresis models to be used
153  int pcHysteresisModel_{-1};
154  int krHysteresisModel_{-1};
155  double modParamTrapped_{};
156  double curvatureCapPrs_{};
157 
158  // WAG hysteresis
159  bool enableWagHyst_{false};
160 
161  // Enable bug fix for capillary pressure scaling
162  bool enablePcScalingHyst_{false};
163 
164  // Enable bug fix for wetting phase killough hysteresis
165  bool enableWettingPhaseKilloughFix_{false};
166 };
167 
168 } // namespace Opm
169 
170 #endif
double curvatureCapPrs() const
Curvature parameter used for capillary pressure hysteresis.
Definition: EclHysteresisConfig.hpp:120
bool enableWagHysteresis() const
Returns whether hysteresis is enabled.
Definition: EclHysteresisConfig.hpp:126
void setKrHysteresisModel(int value)
Set the type of the hysteresis model which is used for relative permeability.
Definition: EclHysteresisConfig.hpp:88
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: Runspec.hpp:608
void initFromState(const Runspec &runspec)
Reads all relevant material parameters form a cell of a parsed ECL deck.
Definition: EclHysteresisConfig.cpp:31
void setPcHysteresisModel(int value)
Set the type of the hysteresis model which is used for capillary pressure.
Definition: EclHysteresisConfig.hpp:60
bool enablePcScalingHyst() const
Returns whether Pc scaling is enabled.
Definition: EclHysteresisConfig.hpp:132
Specifies the configuration used by the ECL kr/pC hysteresis code.
Definition: EclHysteresisConfig.hpp:39
bool enableHysteresis() const
Returns whether hysteresis is enabled.
Definition: EclHysteresisConfig.hpp:51
bool enableWettingPhaseKilloughFix() const
Returns whether fix for wetting phase killough is enabled.
Definition: EclHysteresisConfig.hpp:138
void setEnableHysteresis(bool yesno)
Specify whether hysteresis is enabled or not.
Definition: EclHysteresisConfig.hpp:45
double modParamTrapped() const
Regularisation parameter used for Killough model.
Definition: EclHysteresisConfig.hpp:112
int pcHysteresisModel() const
Return the type of the hysteresis model which is used for capillary pressure.
Definition: EclHysteresisConfig.hpp:69
int krHysteresisModel() const
Return the type of the hysteresis model which is used for relative permeability.
Definition: EclHysteresisConfig.hpp:104