My Project
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  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_STONE1_MATERIAL_PARAMS_HPP
28 #define OPM_ECL_STONE1_MATERIAL_PARAMS_HPP
29 
31 
32 #include <type_traits>
33 #include <cassert>
34 #include <memory>
35 
36 namespace Opm {
37 
46 template<class Traits, class GasOilLawT, class OilWaterLawT>
48 {
49  typedef typename Traits::Scalar Scalar;
50  enum { numPhases = 3 };
51 
52 public:
53  typedef typename GasOilLawT::Params GasOilParams;
54  typedef typename OilWaterLawT::Params OilWaterParams;
55 
60  {
61  }
62 
66  void finalize()
67  {
68  krocw_ = OilWaterLawT::twoPhaseSatKrn(*oilWaterParams_, Swl_);
69 
71  }
72 
76  const GasOilParams& gasOilParams() const
77  { EnsureFinalized::check(); return *gasOilParams_; }
78 
82  GasOilParams& gasOilParams()
83  { EnsureFinalized::check(); return *gasOilParams_; }
84 
88  void setGasOilParams(std::shared_ptr<GasOilParams> val)
89  { gasOilParams_ = val; }
90 
94  const OilWaterParams& oilWaterParams() const
95  { EnsureFinalized::check(); return *oilWaterParams_; }
96 
100  OilWaterParams& oilWaterParams()
101  { EnsureFinalized::check(); return *oilWaterParams_; }
102 
106  void setOilWaterParams(std::shared_ptr<OilWaterParams> val)
107  { oilWaterParams_ = val; }
108 
120  void setSwl(Scalar val)
121  { Swl_ = val; }
122 
126  Scalar Swl() const
127  { EnsureFinalized::check(); return Swl_; }
128 
133  Scalar krocw() const
134  { EnsureFinalized::check(); return krocw_; }
135 
139  void setEta(Scalar val)
140  { eta_ = val; }
141 
145  Scalar eta() const
146  { EnsureFinalized::check(); return eta_; }
147 
148 private:
149  std::shared_ptr<GasOilParams> gasOilParams_;
150  std::shared_ptr<OilWaterParams> oilWaterParams_;
151 
152  Scalar Swl_;
153  Scalar eta_;
154  Scalar krocw_;
155 };
156 } // namespace Opm
157 
158 #endif
Default implementation for asserting finalization of parameter objects.
Default implementation for the parameters required by the three-phase capillary pressure/relperm Ston...
Definition: EclStone1MaterialParams.hpp:48
const OilWaterParams & oilWaterParams() const
The parameter object for the oil-water twophase law.
Definition: EclStone1MaterialParams.hpp:94
void setGasOilParams(std::shared_ptr< GasOilParams > val)
Set the parameter object for the gas-oil twophase law.
Definition: EclStone1MaterialParams.hpp:88
void finalize()
Finish the initialization of the parameter object.
Definition: EclStone1MaterialParams.hpp:66
OilWaterParams & oilWaterParams()
The parameter object for the oil-water twophase law.
Definition: EclStone1MaterialParams.hpp:100
void setEta(Scalar val)
Set the exponent of the extended Stone 1 model.
Definition: EclStone1MaterialParams.hpp:139
Scalar Swl() const
Return the saturation of "connate" water.
Definition: EclStone1MaterialParams.hpp:126
Scalar eta() const
Return the exponent of the extended Stone 1 model.
Definition: EclStone1MaterialParams.hpp:145
void setOilWaterParams(std::shared_ptr< OilWaterParams > val)
Set the parameter object for the oil-water twophase law.
Definition: EclStone1MaterialParams.hpp:106
GasOilParams & gasOilParams()
The parameter object for the gas-oil twophase law.
Definition: EclStone1MaterialParams.hpp:82
void setSwl(Scalar val)
Set the saturation of "connate" water.
Definition: EclStone1MaterialParams.hpp:120
Scalar krocw() const
Return the oil relperm for the oil-water system at the connate water saturation.
Definition: EclStone1MaterialParams.hpp:133
EclStone1MaterialParams()
The default constructor.
Definition: EclStone1MaterialParams.hpp:59
const GasOilParams & gasOilParams() const
The parameter object for the gas-oil twophase law.
Definition: EclStone1MaterialParams.hpp:76
Default implementation for asserting finalization of parameter objects.
Definition: EnsureFinalized.hpp:47
void finalize()
Mark the object as finalized.
Definition: EnsureFinalized.hpp:75