Loading...
Searching...
No Matches
EclStone1MaterialParams.hpp
Go to the documentation of this file.
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
Consult the COPYING file in the top-level source directory of this
module for the precise wording of the license and the list of
copyright holders.
*/
#ifndef OPM_ECL_STONE1_MATERIAL_PARAMS_HPP
#define OPM_ECL_STONE1_MATERIAL_PARAMS_HPP
#include <opm/material/common/EnsureFinalized.hpp>
#include <memory>
namespace Opm {
template<class Traits, class GasOilLawT, class OilWaterLawT>
class EclStone1MaterialParams : public EnsureFinalized
{
using Scalar = typename Traits::Scalar;
enum { numPhases = 3 };
public:
using GasOilParams = typename GasOilLawT::Params;
using OilWaterParams = typename OilWaterLawT::Params;
EclStone1MaterialParams()
{
}
void finalize()
{
krocw_ = OilWaterLawT::twoPhaseSatKrn(*oilWaterParams_, Swl_);
EnsureFinalized :: finalize();
}
const GasOilParams& gasOilParams() const
{ EnsureFinalized::check(); return *gasOilParams_; }
GasOilParams& gasOilParams()
{ EnsureFinalized::check(); return *gasOilParams_; }
void setGasOilParams(std::shared_ptr<GasOilParams> val)
{ gasOilParams_ = val; }
const OilWaterParams& oilWaterParams() const
{ EnsureFinalized::check(); return *oilWaterParams_; }
OilWaterParams& oilWaterParams()
{ EnsureFinalized::check(); return *oilWaterParams_; }
void setOilWaterParams(std::shared_ptr<OilWaterParams> val)
{ oilWaterParams_ = val; }
void setSwl(Scalar val)
{ Swl_ = val; }
Scalar Swl() const
{ EnsureFinalized::check(); return Swl_; }
Scalar krocw() const
{ EnsureFinalized::check(); return krocw_; }
void setEta(Scalar val)
{ eta_ = val; }
Scalar eta() const
{ EnsureFinalized::check(); return eta_; }
template<class Serializer>
void serializeOp(Serializer& serializer)
{
serializer(*gasOilParams_);
serializer(*oilWaterParams_);
}
private:
std::shared_ptr<GasOilParams> gasOilParams_;
std::shared_ptr<OilWaterParams> oilWaterParams_;
Scalar Swl_;
Scalar eta_;
Scalar krocw_;
};
} // namespace Opm
#endif
EnsureFinalized.hpp
Default implementation for asserting finalization of parameter objects.
Opm::EclStone1MaterialParams
Default implementation for the parameters required by the three-phase capillary pressure/relperm Ston...
Definition EclStone1MaterialParams.hpp:46
Opm::EclStone1MaterialParams::gasOilParams
const GasOilParams & gasOilParams() const
The parameter object for the gas-oil twophase law.
Definition EclStone1MaterialParams.hpp:74
Opm::EclStone1MaterialParams::oilWaterParams
OilWaterParams & oilWaterParams()
The parameter object for the oil-water twophase law.
Definition EclStone1MaterialParams.hpp:98
Opm::EclStone1MaterialParams::setGasOilParams
void setGasOilParams(std::shared_ptr< GasOilParams > val)
Set the parameter object for the gas-oil twophase law.
Definition EclStone1MaterialParams.hpp:86
Opm::EclStone1MaterialParams::finalize
void finalize()
Finish the initialization of the parameter object.
Definition EclStone1MaterialParams.hpp:64
Opm::EclStone1MaterialParams::setEta
void setEta(Scalar val)
Set the exponent of the extended Stone 1 model.
Definition EclStone1MaterialParams.hpp:137
Opm::EclStone1MaterialParams::Swl
Scalar Swl() const
Return the saturation of "connate" water.
Definition EclStone1MaterialParams.hpp:124
Opm::EclStone1MaterialParams::eta
Scalar eta() const
Return the exponent of the extended Stone 1 model.
Definition EclStone1MaterialParams.hpp:143
Opm::EclStone1MaterialParams::setOilWaterParams
void setOilWaterParams(std::shared_ptr< OilWaterParams > val)
Set the parameter object for the oil-water twophase law.
Definition EclStone1MaterialParams.hpp:104
Opm::EclStone1MaterialParams::setSwl
void setSwl(Scalar val)
Set the saturation of "connate" water.
Definition EclStone1MaterialParams.hpp:118
Opm::EclStone1MaterialParams::krocw
Scalar krocw() const
Return the oil relperm for the oil-water system at the connate water saturation.
Definition EclStone1MaterialParams.hpp:131
Opm::EclStone1MaterialParams::gasOilParams
GasOilParams & gasOilParams()
The parameter object for the gas-oil twophase law.
Definition EclStone1MaterialParams.hpp:80
Opm::EclStone1MaterialParams::EclStone1MaterialParams
EclStone1MaterialParams()
The default constructor.
Definition EclStone1MaterialParams.hpp:57
Opm::EclStone1MaterialParams::oilWaterParams
const OilWaterParams & oilWaterParams() const
The parameter object for the oil-water twophase law.
Definition EclStone1MaterialParams.hpp:92
Opm::EnsureFinalized
Default implementation for asserting finalization of parameter objects.
Definition EnsureFinalized.hpp:49
Opm::Serializer
Class for (de-)serializing.
Definition Serializer.hpp:91
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30