Loading...
Searching...
No Matches
ParkerLenhardParams.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_PARKER_LENHARD_PARAMS_HPP
#define OPM_PARKER_LENHARD_PARAMS_HPP
#include <opm/material/fluidmatrixinteractions/RegularizedVanGenuchten.hpp>
#include <opm/material/common/EnsureFinalized.hpp>
#include <cassert>
namespace Opm
{
// forward declaration
template <class ScalarT>
class PLScanningCurve;
template <class TraitsT>
class ParkerLenhardParams : public EnsureFinalized
{
public:
using EnsureFinalized :: finalize;
typedef typename TraitsT::Scalar Scalar;
typedef Opm::RegularizedVanGenuchten<TraitsT> VanGenuchten;
typedef typename VanGenuchten::Params VanGenuchtenParams;
typedef PLScanningCurve<Scalar> ScanningCurve;
ParkerLenhardParams()
{
currentSnr_ = 0;
mdc_ = new ScanningCurve(/*Swr=*/0);
pisc_ = csc_ = nullptr;
}
ParkerLenhardParams(const ParkerLenhardParams& p)
: EnsureFinalized( p )
{
currentSnr_ = 0;
SwrPc_ = p.SwrPc_;
mdc_ = new ScanningCurve(SwrPc_);
pisc_ = csc_ = nullptr;
}
~ParkerLenhardParams()
{ delete mdc_; }
const VanGenuchtenParams& micParams() const
{ EnsureFinalized::check(); return *micParams_; }
void setMicParams(const VanGenuchtenParams* val)
{ micParams_ = val; }
const VanGenuchtenParams& mdcParams() const
{ EnsureFinalized::check(); return *mdcParams_; }
void setMdcParams(const VanGenuchtenParams* val)
{ mdcParams_ = val; }
Scalar Snr() const
{ EnsureFinalized::check(); return Snr_; }
void setSnr(Scalar val)
{ Snr_ = val; }
Scalar SwrPc() const
{ EnsureFinalized::check(); return SwrPc_; }
Scalar SwrKr() const
{ EnsureFinalized::check(); return SwrKr_; }
void setSwr(Scalar pcSwr, Scalar krSwr = -1)
{
SwrPc_ = pcSwr;
if (krSwr < 0)
SwrKr_ = pcSwr;
else
SwrKr_ = krSwr;
}
Scalar currentSnr() const
{ EnsureFinalized::check(); return currentSnr_; }
void setCurrentSnr(Scalar val)
{ currentSnr_ = val; }
ScanningCurve* mdc() const
{ EnsureFinalized::check(); return mdc_; }
void setMdc(ScanningCurve* val)
{ mdc_ = val; }
ScanningCurve* pisc() const
{ EnsureFinalized::check(); return pisc_; }
void setPisc(ScanningCurve* val)
{ pisc_ = val; }
ScanningCurve* csc() const
{ EnsureFinalized::check(); return csc_; }
void setCsc(ScanningCurve* val)
{ csc_ = val; }
private:
const VanGenuchtenParams* micParams_;
const VanGenuchtenParams* mdcParams_;
Scalar SwrPc_;
Scalar SwrKr_;
Scalar Snr_;
Scalar currentSnr_;
mutable ScanningCurve* mdc_;
mutable ScanningCurve* pisc_;
mutable ScanningCurve* csc_;
};
} // namespace Opm
#endif
EnsureFinalized.hpp
Default implementation for asserting finalization of parameter objects.
RegularizedVanGenuchten.hpp
Implementation of the regularized van Genuchten's capillary pressure / relative permeability <-> satu...
Opm::EnsureFinalized
Default implementation for asserting finalization of parameter objects.
Definition EnsureFinalized.hpp:49
Opm::EnsureFinalized::EnsureFinalized
OPM_HOST_DEVICE EnsureFinalized()
The default constructor.
Definition EnsureFinalized.hpp:58
Opm::EnsureFinalized::finalize
OPM_HOST_DEVICE void finalize()
Mark the object as finalized.
Definition EnsureFinalized.hpp:82
Opm::PLScanningCurve
Represents a scanning curve in the Parker-Lenhard hysteresis model.
Definition ParkerLenhard.hpp:48
Opm::ParkerLenhardParams
Default parameter class for the Parker-Lenhard hysteresis model.
Definition ParkerLenhardParams.hpp:47
Opm::ParkerLenhardParams::SwrPc
Scalar SwrPc() const
Returns wetting phase residual saturation for the capillary pressure curve.
Definition ParkerLenhardParams.hpp:118
Opm::ParkerLenhardParams::setSwr
void setSwr(Scalar pcSwr, Scalar krSwr=-1)
Set the wetting phase residual saturation for the capillary pressure and the relative permeabilities.
Definition ParkerLenhardParams.hpp:131
Opm::ParkerLenhardParams::setSnr
void setSnr(Scalar val)
Set the non-wetting phase residual saturation.
Definition ParkerLenhardParams.hpp:112
Opm::ParkerLenhardParams::setPisc
void setPisc(ScanningCurve *val)
Set the primary imbibition scanning curve.
Definition ParkerLenhardParams.hpp:173
Opm::ParkerLenhardParams::mdc
ScanningCurve * mdc() const
Returns the main drainage curve.
Definition ParkerLenhardParams.hpp:155
Opm::ParkerLenhardParams::setMicParams
void setMicParams(const VanGenuchtenParams *val)
Sets the parameters of the main imbibition curve (which uses the van Genuchten capillary pressure mod...
Definition ParkerLenhardParams.hpp:86
Opm::ParkerLenhardParams::pisc
ScanningCurve * pisc() const
Returns the primary imbibition scanning curve.
Definition ParkerLenhardParams.hpp:167
Opm::ParkerLenhardParams::setCsc
void setCsc(ScanningCurve *val)
Set the current scanning curve.
Definition ParkerLenhardParams.hpp:185
Opm::ParkerLenhardParams::currentSnr
Scalar currentSnr() const
Returns the current effective residual saturation.
Definition ParkerLenhardParams.hpp:143
Opm::ParkerLenhardParams::Snr
Scalar Snr() const
Returns non-wetting phase residual saturation.
Definition ParkerLenhardParams.hpp:106
Opm::ParkerLenhardParams::mdcParams
const VanGenuchtenParams & mdcParams() const
Returns the parameters of the main drainage curve (which uses the van Genuchten capillary pressure mo...
Definition ParkerLenhardParams.hpp:93
Opm::ParkerLenhardParams::setMdcParams
void setMdcParams(const VanGenuchtenParams *val)
Sets the parameters of the main drainage curve (which uses the van Genuchten capillary pressure model...
Definition ParkerLenhardParams.hpp:100
Opm::ParkerLenhardParams::SwrKr
Scalar SwrKr() const
Returns wetting phase residual saturation for the residual saturation curves.
Definition ParkerLenhardParams.hpp:124
Opm::ParkerLenhardParams::setCurrentSnr
void setCurrentSnr(Scalar val)
Set the current effective residual saturation.
Definition ParkerLenhardParams.hpp:149
Opm::ParkerLenhardParams::micParams
const VanGenuchtenParams & micParams() const
Returns the parameters of the main imbibition curve (which uses the van Genuchten capillary pressure ...
Definition ParkerLenhardParams.hpp:79
Opm::ParkerLenhardParams::csc
ScanningCurve * csc() const
Returns the current scanning curve.
Definition ParkerLenhardParams.hpp:179
Opm::ParkerLenhardParams::setMdc
void setMdc(ScanningCurve *val)
Set the main drainage curve.
Definition ParkerLenhardParams.hpp:161
Opm::RegularizedVanGenuchten
Implementation of the regularized van Genuchten's capillary pressure / relative permeability <-> satu...
Definition RegularizedVanGenuchten.hpp:72
Opm::VanGenuchtenParams
Specification of the material parameters for the van Genuchten constitutive relations.
Definition VanGenuchtenParams.hpp:45
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30