Loading...
Searching...
No Matches
ThreePhaseParkerVanGenuchtenParams.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_THREE_PHASE_PARKER_VAN_GENUCHTEN_PARAMS_HPP
#define OPM_THREE_PHASE_PARKER_VAN_GENUCHTEN_PARAMS_HPP
#include <opm/material/common/EnsureFinalized.hpp>
#include <opm/material/common/Valgrind.hpp>
#include <cassert>
namespace Opm {
template<class TraitsT>
class ThreePhaseParkerVanGenuchtenParams : public EnsureFinalized
{
public:
using EnsureFinalized :: finalize;
typedef TraitsT Traits;
typedef typename Traits::Scalar Scalar;
ThreePhaseParkerVanGenuchtenParams()
{
betaNW_ = 1.0;
betaGN_ = 1.0;
}
Scalar vgAlpha() const
{ EnsureFinalized::check(); return vgAlpha_; }
void setVgAlpha(Scalar v)
{ vgAlpha_ = v; }
Scalar vgM() const
{ EnsureFinalized::check(); return vgM_; }
void setVgM(Scalar m)
{ vgM_ = m; vgN_ = 1/(1 - vgM_); }
Scalar vgN() const
{ EnsureFinalized::check(); return vgN_; }
void setVgN(Scalar n)
{ vgN_ = n; vgM_ = 1 - 1/vgN_; }
Scalar Swr() const
{ EnsureFinalized::check(); return Swr_; }
void setSwr(Scalar input)
{ Swr_ = input; }
Scalar Snr() const
{ EnsureFinalized::check(); return Snr_; }
void setSnr(Scalar input)
{ Snr_ = input; }
Scalar Sgr() const
{ EnsureFinalized::check(); return Sgr_; }
void setSgr(Scalar input)
{ Sgr_ = input; }
Scalar Swrx() const
{ EnsureFinalized::check(); return Swrx_; }
void setSwrx(Scalar input)
{ Swrx_ = input; }
void setBetaNW(Scalar input)
{ betaNW_ = input; }
void setBetaGN(Scalar input)
{ betaGN_ = input; }
Scalar betaNW() const
{ EnsureFinalized::check(); return betaNW_; }
Scalar betaGN() const
{ EnsureFinalized::check(); return betaGN_; }
void setkrRegardsSnr(bool input)
{ krRegardsSnr_ = input; }
bool krRegardsSnr() const
{ EnsureFinalized::check(); return krRegardsSnr_; }
void checkDefined() const
{
Valgrind::CheckDefined(vgAlpha_);
Valgrind::CheckDefined(vgM_);
Valgrind::CheckDefined(vgN_);
Valgrind::CheckDefined(Swr_);
Valgrind::CheckDefined(Snr_);
Valgrind::CheckDefined(Sgr_);
Valgrind::CheckDefined(Swrx_);
Valgrind::CheckDefined(betaNW_);
Valgrind::CheckDefined(betaGN_);
Valgrind::CheckDefined(krRegardsSnr_);
}
private:
Scalar vgAlpha_;
Scalar vgM_;
Scalar vgN_;
Scalar Swr_;
Scalar Snr_;
Scalar Sgr_;
Scalar Swrx_; // Swr + Snr
Scalar betaNW_;
Scalar betaGN_;
bool krRegardsSnr_ ;
};
} // namespace Opm
#endif
EnsureFinalized.hpp
Default implementation for asserting finalization of parameter objects.
Valgrind.hpp
Some templates to wrap the valgrind client request macros.
Opm::EnsureFinalized
Default implementation for asserting finalization of parameter objects.
Definition EnsureFinalized.hpp:49
Opm::EnsureFinalized::finalize
OPM_HOST_DEVICE void finalize()
Mark the object as finalized.
Definition EnsureFinalized.hpp:82
Opm::ThreePhaseParkerVanGenuchtenParams
Specification of the material params for the three-phase van Genuchten capillary pressure model.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:48
Opm::ThreePhaseParkerVanGenuchtenParams::setVgN
void setVgN(Scalar n)
Set the shape parameter of van Genuchten's curve.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:104
Opm::ThreePhaseParkerVanGenuchtenParams::setVgM
void setVgM(Scalar m)
Set the shape parameter of van Genuchten's curve.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:88
Opm::ThreePhaseParkerVanGenuchtenParams::Snr
Scalar Snr() const
Return the residual non-wetting saturation.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:122
Opm::ThreePhaseParkerVanGenuchtenParams::vgAlpha
Scalar vgAlpha() const
Return the shape parameter of van Genuchten's curve.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:65
Opm::ThreePhaseParkerVanGenuchtenParams::setSwrx
void setSwrx(Scalar input)
Set the residual gas saturation.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:149
Opm::ThreePhaseParkerVanGenuchtenParams::setkrRegardsSnr
void setkrRegardsSnr(bool input)
defines if residual n-phase saturation should be regarded in its relative permeability.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:173
Opm::ThreePhaseParkerVanGenuchtenParams::Sgr
Scalar Sgr() const
Return the residual gas saturation.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:134
Opm::ThreePhaseParkerVanGenuchtenParams::Swr
Scalar Swr() const
Return the residual wetting saturation.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:110
Opm::ThreePhaseParkerVanGenuchtenParams::setSnr
void setSnr(Scalar input)
Set the residual non-wetting saturation.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:128
Opm::ThreePhaseParkerVanGenuchtenParams::vgM
Scalar vgM() const
Return the shape parameter of van Genuchten's curve.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:79
Opm::ThreePhaseParkerVanGenuchtenParams::vgN
Scalar vgN() const
Return the shape parameter of van Genuchten's curve.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:95
Opm::ThreePhaseParkerVanGenuchtenParams::setBetaNW
void setBetaNW(Scalar input)
defines the scaling parameters of capillary pressure between the phases (=1 for Gas-Water)
Definition ThreePhaseParkerVanGenuchtenParams.hpp:155
Opm::ThreePhaseParkerVanGenuchtenParams::setSgr
void setSgr(Scalar input)
Set the residual gas saturation.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:140
Opm::ThreePhaseParkerVanGenuchtenParams::setVgAlpha
void setVgAlpha(Scalar v)
Set the shape parameter of van Genuchten's curve.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:72
Opm::ThreePhaseParkerVanGenuchtenParams::krRegardsSnr
bool krRegardsSnr() const
Calls if residual n-phase saturation should be regarded in its relative permeability.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:178
Opm::ThreePhaseParkerVanGenuchtenParams::setSwr
void setSwr(Scalar input)
Set the residual wetting saturation.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:116
Opm::ThreePhaseParkerVanGenuchtenParams::betaNW
Scalar betaNW() const
Return the values for the beta scaling parameters of capillary pressure between the phases.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:164
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30