EclStone2MaterialParams.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_STONE2_MATERIAL_PARAMS_HPP
28#define OPM_ECL_STONE2_MATERIAL_PARAMS_HPP
29
31
32#include <memory>
33
34namespace Opm {
35
44template<class Traits, class GasOilParamsT, class OilWaterParamsT>
46{
47 using Scalar = typename Traits::Scalar;
48 enum { numPhases = 3 };
49public:
51
52 using GasOilParams = GasOilParamsT;
53 using OilWaterParams = OilWaterParamsT;
54
59 {
60 }
61
66 { EnsureFinalized::check(); return *gasOilParams_; }
67
72 { EnsureFinalized::check(); return *gasOilParams_; }
73
77 void setGasOilParams(std::shared_ptr<GasOilParams> val)
78 { gasOilParams_ = val; }
79
84 { EnsureFinalized::check(); return *oilWaterParams_; }
85
90 { EnsureFinalized::check(); return *oilWaterParams_; }
91
95 void setOilWaterParams(std::shared_ptr<OilWaterParams> val)
96 { oilWaterParams_ = val; }
97
109 void setSwl(Scalar val)
110 { Swl_ = val; }
111
115 Scalar Swl() const
116 { EnsureFinalized::check(); return Swl_; }
117
118private:
119 std::shared_ptr<GasOilParams> gasOilParams_;
120 std::shared_ptr<OilWaterParams> oilWaterParams_;
121
122 Scalar Swl_;
123};
124} // namespace Opm
125
126#endif
Default implementation for the parameters required by the three-phase capillary pressure/relperm Ston...
Definition: EclStone2MaterialParams.hpp:46
Scalar Swl() const
Return the saturation of "connate" water.
Definition: EclStone2MaterialParams.hpp:115
const GasOilParams & gasOilParams() const
The parameter object for the gas-oil twophase law.
Definition: EclStone2MaterialParams.hpp:65
void setSwl(Scalar val)
Set the saturation of "connate" water.
Definition: EclStone2MaterialParams.hpp:109
EclStone2MaterialParams()
The default constructor.
Definition: EclStone2MaterialParams.hpp:58
OilWaterParams & oilWaterParams()
The parameter object for the oil-water twophase law.
Definition: EclStone2MaterialParams.hpp:89
GasOilParams & gasOilParams()
The parameter object for the gas-oil twophase law.
Definition: EclStone2MaterialParams.hpp:71
GasOilParamsT GasOilParams
Definition: EclStone2MaterialParams.hpp:52
void setGasOilParams(std::shared_ptr< GasOilParams > val)
Set the parameter object for the gas-oil twophase law.
Definition: EclStone2MaterialParams.hpp:77
const OilWaterParams & oilWaterParams() const
The parameter object for the oil-water twophase law.
Definition: EclStone2MaterialParams.hpp:83
OilWaterParamsT OilWaterParams
Definition: EclStone2MaterialParams.hpp:53
void setOilWaterParams(std::shared_ptr< OilWaterParams > val)
Set the parameter object for the oil-water twophase law.
Definition: EclStone2MaterialParams.hpp:95
Default implementation for asserting finalization of parameter objects.
Definition: EnsureFinalized.hpp:47
void finalize()
Mark the object as finalized.
Definition: EnsureFinalized.hpp:75
void check() const
Definition: EnsureFinalized.hpp:63
Definition: Air_Mesitylene.hpp:34