My Project
Loading...
Searching...
No Matches
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 <memory>
33
34namespace Opm {
35
44template<class Traits, class GasOilLawT, class OilWaterLawT>
46{
47 using Scalar = typename Traits::Scalar;
48 enum { numPhases = 3 };
49
50public:
51 using GasOilParams = typename GasOilLawT::Params;
52 using OilWaterParams = typename OilWaterLawT::Params;
53
60
64 void finalize()
65 {
66 krocw_ = OilWaterLawT::twoPhaseSatKrn(*oilWaterParams_, Swl_);
67
68 EnsureFinalized :: finalize();
69 }
70
74 const GasOilParams& gasOilParams() const
75 { EnsureFinalized::check(); return *gasOilParams_; }
76
80 GasOilParams& gasOilParams()
81 { EnsureFinalized::check(); return *gasOilParams_; }
82
86 void setGasOilParams(std::shared_ptr<GasOilParams> val)
87 { gasOilParams_ = val; }
88
92 const OilWaterParams& oilWaterParams() const
93 { EnsureFinalized::check(); return *oilWaterParams_; }
94
98 OilWaterParams& oilWaterParams()
99 { EnsureFinalized::check(); return *oilWaterParams_; }
100
104 void setOilWaterParams(std::shared_ptr<OilWaterParams> val)
105 { oilWaterParams_ = val; }
106
118 void setSwl(Scalar val)
119 { Swl_ = val; }
120
124 Scalar Swl() const
125 { EnsureFinalized::check(); return Swl_; }
126
131 Scalar krocw() const
132 { EnsureFinalized::check(); return krocw_; }
133
137 void setEta(Scalar val)
138 { eta_ = val; }
139
143 Scalar eta() const
144 { EnsureFinalized::check(); return eta_; }
145
146 template<class Serializer>
147 void serializeOp(Serializer& serializer)
148 {
149 serializer(*gasOilParams_);
150 serializer(*oilWaterParams_);
151 }
152
153private:
154 std::shared_ptr<GasOilParams> gasOilParams_;
155 std::shared_ptr<OilWaterParams> oilWaterParams_;
156
157 Scalar Swl_;
158 Scalar eta_;
159 Scalar krocw_;
160};
161
162} // namespace Opm
163
164#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:46
const GasOilParams & gasOilParams() const
The parameter object for the gas-oil twophase law.
Definition EclStone1MaterialParams.hpp:74
OilWaterParams & oilWaterParams()
The parameter object for the oil-water twophase law.
Definition EclStone1MaterialParams.hpp:98
void setGasOilParams(std::shared_ptr< GasOilParams > val)
Set the parameter object for the gas-oil twophase law.
Definition EclStone1MaterialParams.hpp:86
void finalize()
Finish the initialization of the parameter object.
Definition EclStone1MaterialParams.hpp:64
void setEta(Scalar val)
Set the exponent of the extended Stone 1 model.
Definition EclStone1MaterialParams.hpp:137
Scalar Swl() const
Return the saturation of "connate" water.
Definition EclStone1MaterialParams.hpp:124
Scalar eta() const
Return the exponent of the extended Stone 1 model.
Definition EclStone1MaterialParams.hpp:143
void setOilWaterParams(std::shared_ptr< OilWaterParams > val)
Set the parameter object for the oil-water twophase law.
Definition EclStone1MaterialParams.hpp:104
void setSwl(Scalar val)
Set the saturation of "connate" water.
Definition EclStone1MaterialParams.hpp:118
Scalar krocw() const
Return the oil relperm for the oil-water system at the connate water saturation.
Definition EclStone1MaterialParams.hpp:131
GasOilParams & gasOilParams()
The parameter object for the gas-oil twophase law.
Definition EclStone1MaterialParams.hpp:80
EclStone1MaterialParams()
The default constructor.
Definition EclStone1MaterialParams.hpp:57
const OilWaterParams & oilWaterParams() const
The parameter object for the oil-water twophase law.
Definition EclStone1MaterialParams.hpp:92
Default implementation for asserting finalization of parameter objects.
Definition EnsureFinalized.hpp:47
Class for (de-)serializing.
Definition Serializer.hpp:84
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30