EclStone1MaterialParams.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  Copyright (C) 2015 by Andreas Lauser
5 
6  This file is part of the Open Porous Media project (OPM).
7 
8  OPM is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 2 of the License, or
11  (at your option) any later version.
12 
13  OPM is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with OPM. If not, see <http://www.gnu.org/licenses/>.
20 */
25 #ifndef OPM_ECL_STONE1_MATERIAL_PARAMS_HPP
26 #define OPM_ECL_STONE1_MATERIAL_PARAMS_HPP
27 
28 #include <type_traits>
29 #include <cassert>
30 #include <memory>
31 
32 namespace Opm {
33 
42 template<class Traits, class GasOilParamsT, class OilWaterParamsT>
44 {
45  typedef typename Traits::Scalar Scalar;
46  enum { numPhases = 3 };
47 
48 public:
49  typedef GasOilParamsT GasOilParams;
50  typedef OilWaterParamsT OilWaterParams;
51 
56  {
57 #ifndef NDEBUG
58  finalized_ = false;
59 #endif
60  }
61 
65  void finalize()
66  {
67 #ifndef NDEBUG
68  finalized_ = true;
69 #endif
70  }
71 
75  const GasOilParams& gasOilParams() const
76  { assertFinalized_(); return *gasOilParams_; }
77 
81  GasOilParams& gasOilParams()
82  { assertFinalized_(); return *gasOilParams_; }
83 
87  void setGasOilParams(std::shared_ptr<GasOilParams> val)
88  { gasOilParams_ = val; }
89 
93  const OilWaterParams& oilWaterParams() const
94  { assertFinalized_(); return *oilWaterParams_; }
95 
99  OilWaterParams& oilWaterParams()
100  { assertFinalized_(); return *oilWaterParams_; }
101 
105  void setOilWaterParams(std::shared_ptr<OilWaterParams> val)
106  { oilWaterParams_ = val; }
107 
119  void setSwl(Scalar val)
120  { Swl_ = val; }
121 
125  Scalar Swl() const
126  { assertFinalized_(); return Swl_; }
127 
131  void setSowcr(Scalar val)
132  { Sowcr_ = val; }
133 
137  Scalar Sowcr() const
138  { assertFinalized_(); return Sowcr_; }
139 
143  void setSogcr(Scalar val)
144  { Sogcr_ = val; }
145 
149  Scalar Sogcr() const
150  { assertFinalized_(); return Sogcr_; }
151 
155  void setEta(Scalar val)
156  { eta_ = val; }
157 
161  Scalar eta() const
162  { assertFinalized_(); return eta_; }
163 
164 private:
165 #ifndef NDEBUG
166  void assertFinalized_() const
167  { assert(finalized_); }
168 
169  bool finalized_;
170 #else
171  void assertFinalized_() const
172  { }
173 #endif
174 
175  std::shared_ptr<GasOilParams> gasOilParams_;
176  std::shared_ptr<OilWaterParams> oilWaterParams_;
177 
178  Scalar Swl_;
179  Scalar Sowcr_;
180  Scalar Sogcr_;
181  Scalar eta_;
182 };
183 } // namespace Opm
184 
185 #endif
Scalar Sogcr() const
Return the critical saturation of oil in the oil-gas system.
Definition: EclStone1MaterialParams.hpp:149
Definition: Air_Mesitylene.hpp:31
const OilWaterParams & oilWaterParams() const
The parameter object for the oil-water twophase law.
Definition: EclStone1MaterialParams.hpp:93
void setGasOilParams(std::shared_ptr< GasOilParams > val)
Set the parameter object for the gas-oil twophase law.
Definition: EclStone1MaterialParams.hpp:87
Scalar Swl() const
Return the saturation of "connate" water.
Definition: EclStone1MaterialParams.hpp:125
GasOilParamsT GasOilParams
Definition: EclStone1MaterialParams.hpp:49
void setSwl(Scalar val)
Set the saturation of "connate" water.
Definition: EclStone1MaterialParams.hpp:119
void setOilWaterParams(std::shared_ptr< OilWaterParams > val)
Set the parameter object for the oil-water twophase law.
Definition: EclStone1MaterialParams.hpp:105
GasOilParams & gasOilParams()
The parameter object for the gas-oil twophase law.
Definition: EclStone1MaterialParams.hpp:81
Default implementation for the parameters required by the three-phase capillary pressure/relperm Ston...
Definition: EclStone1MaterialParams.hpp:43
OilWaterParamsT OilWaterParams
Definition: EclStone1MaterialParams.hpp:50
void setEta(Scalar val)
Set the exponent of the extended Stone 1 model.
Definition: EclStone1MaterialParams.hpp:155
void finalize()
Finish the initialization of the parameter object.
Definition: EclStone1MaterialParams.hpp:65
void setSogcr(Scalar val)
Set the critical saturation of oil in the oil-gas system.
Definition: EclStone1MaterialParams.hpp:143
Scalar eta() const
Return the exponent of the extended Stone 1 model.
Definition: EclStone1MaterialParams.hpp:161
EclStone1MaterialParams()
The default constructor.
Definition: EclStone1MaterialParams.hpp:55
void setSowcr(Scalar val)
Set the critical saturation of oil in the water-oil system.
Definition: EclStone1MaterialParams.hpp:131
Scalar Sowcr() const
Return the critical saturation of oil in the water-oil system.
Definition: EclStone1MaterialParams.hpp:137
OilWaterParams & oilWaterParams()
The parameter object for the oil-water twophase law.
Definition: EclStone1MaterialParams.hpp:99
const GasOilParams & gasOilParams() const
The parameter object for the gas-oil twophase law.
Definition: EclStone1MaterialParams.hpp:75