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 <memory>
31
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
128 { return true; }
129
130private:
131 std::shared_ptr<GasOilParams> gasOilParams_;
132 std::shared_ptr<OilWaterParams> oilWaterParams_;
133
134 Scalar Swl_;
135};
136} // namespace Opm
137
138#endif
Default implementation for the parameters required by the default three-phase capillary pressure mode...
Definition: EclDefaultMaterialParams.hpp:46
Scalar Swl() const
Return the saturation of "connate" water.
Definition: EclDefaultMaterialParams.hpp:115
void setOilWaterParams(std::shared_ptr< OilWaterParams > val)
Set the parameter object for the oil-water twophase law.
Definition: EclDefaultMaterialParams.hpp:95
bool inconsistentHysteresisUpdate() const
Specify whether inconsistent saturations should be used to update the hysteresis parameters.
Definition: EclDefaultMaterialParams.hpp:127
OilWaterParams & oilWaterParams()
The parameter object for the oil-water twophase law.
Definition: EclDefaultMaterialParams.hpp:89
GasOilParams & gasOilParams()
The parameter object for the gas-oil twophase law.
Definition: EclDefaultMaterialParams.hpp:71
void setGasOilParams(std::shared_ptr< GasOilParams > val)
Set the parameter object for the gas-oil twophase law.
Definition: EclDefaultMaterialParams.hpp:77
const OilWaterParams & oilWaterParams() const
The parameter object for the oil-water twophase law.
Definition: EclDefaultMaterialParams.hpp:83
void setSwl(Scalar val)
Set the saturation of "connate" water.
Definition: EclDefaultMaterialParams.hpp:109
const GasOilParams & gasOilParams() const
The parameter object for the gas-oil twophase law.
Definition: EclDefaultMaterialParams.hpp:65
EclDefaultMaterialParams()
The default constructor.
Definition: EclDefaultMaterialParams.hpp:58
GasOilParamsT GasOilParams
Definition: EclDefaultMaterialParams.hpp:52
OilWaterParamsT OilWaterParams
Definition: EclDefaultMaterialParams.hpp:53
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