EclDefaultMaterialParams.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_DEFAULT_MATERIAL_PARAMS_HPP
28 #define OPM_ECL_DEFAULT_MATERIAL_PARAMS_HPP
29 
30 #include <type_traits>
31 #include <cassert>
32 #include <memory>
33 
35 
36 namespace Opm {
37 
46 template<class Traits, class GasOilParamsT, class OilWaterParamsT>
48 {
49  typedef typename Traits::Scalar Scalar;
50  enum { numPhases = 3 };
51 public:
53 
54  typedef GasOilParamsT GasOilParams;
55  typedef OilWaterParamsT OilWaterParams;
56 
61  {
62  }
63 
67  const GasOilParams& gasOilParams() const
68  { EnsureFinalized::check(); return *gasOilParams_; }
69 
73  GasOilParams& gasOilParams()
74  { EnsureFinalized::check(); return *gasOilParams_; }
75 
79  void setGasOilParams(std::shared_ptr<GasOilParams> val)
80  { gasOilParams_ = val; }
81 
85  const OilWaterParams& oilWaterParams() const
86  { EnsureFinalized::check(); return *oilWaterParams_; }
87 
91  OilWaterParams& oilWaterParams()
92  { EnsureFinalized::check(); return *oilWaterParams_; }
93 
97  void setOilWaterParams(std::shared_ptr<OilWaterParams> val)
98  { oilWaterParams_ = val; }
99 
111  void setSwl(Scalar val)
112  { Swl_ = val; }
113 
117  Scalar Swl() const
118  { EnsureFinalized::check(); return Swl_; }
119 
130  { return true; }
131 
132 private:
133  std::shared_ptr<GasOilParams> gasOilParams_;
134  std::shared_ptr<OilWaterParams> oilWaterParams_;
135 
136  Scalar Swl_;
137 };
138 } // namespace Opm
139 
140 #endif
EclDefaultMaterialParams()
The default constructor.
Definition: EclDefaultMaterialParams.hpp:60
Scalar Swl() const
Return the saturation of "connate" water.
Definition: EclDefaultMaterialParams.hpp:117
OilWaterParams & oilWaterParams()
The parameter object for the oil-water twophase law.
Definition: EclDefaultMaterialParams.hpp:91
GasOilParams & gasOilParams()
The parameter object for the gas-oil twophase law.
Definition: EclDefaultMaterialParams.hpp:73
bool inconsistentHysteresisUpdate() const
Specify whether inconsistent saturations should be used to update the hysteresis parameters.
Definition: EclDefaultMaterialParams.hpp:129
Default implementation for the parameters required by the default three-phase capillary pressure mode...
Definition: EclDefaultMaterialParams.hpp:47
Definition: Air_Mesitylene.hpp:33
const GasOilParams & gasOilParams() const
The parameter object for the gas-oil twophase law.
Definition: EclDefaultMaterialParams.hpp:67
Default implementation for asserting finalization of parameter objects.
void setGasOilParams(std::shared_ptr< GasOilParams > val)
Set the parameter object for the gas-oil twophase law.
Definition: EclDefaultMaterialParams.hpp:79
void finalize()
Mark the object as finalized.
Definition: EnsureFinalized.hpp:77
void setSwl(Scalar val)
Set the saturation of "connate" water.
Definition: EclDefaultMaterialParams.hpp:111
Default implementation for asserting finalization of parameter objects.
Definition: EnsureFinalized.hpp:46
void setOilWaterParams(std::shared_ptr< OilWaterParams > val)
Set the parameter object for the oil-water twophase law.
Definition: EclDefaultMaterialParams.hpp:97
const OilWaterParams & oilWaterParams() const
The parameter object for the oil-water twophase law.
Definition: EclDefaultMaterialParams.hpp:85