Commit 4ea21259 authored by Philipp Nuske's avatar Philipp Nuske
Browse files

add a parametrization of the vanGenuchten relation, which scales according to temperature change.

add different possibilities to parametrize the interfacial area between fluid phases as well as fluid and solid phases.

reviewed by Bernd

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11062 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent caaf8634
/*****************************************************************************
* Copyright (C) 2008 by Andreas Lauser, Bernd Flemisch *
* Institute for Modelling Hydraulic and Environmental Systems *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program 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. *
* *
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
*
* \brief Implementation of the regularized version of the van Genuchten's
* capillary pressure / relative permeability <-> saturation relation
* *as function of temperature*.
*/
#ifndef REGULARIZED_VAN_GENUCHTEN_OF_TEMPERATURE_HH
#define REGULARIZED_VAN_GENUCHTEN_OF_TEMPERATURE_HH
#include <dumux/material/fluidmatrixinteractions/2p/regularizedvangenuchten.hh>
#include <dumux/material/fluidmatrixinteractions/2p/regularizedvangenuchtenparams.hh>
namespace Dumux
{
/*!\ingroup fluidmatrixinteractionslaws
*
* \brief Implementation of the regularized van Genuchten's
* capillary pressure / relative permeability <-> saturation relation
* *as a function of temperature*.
*
* Everything except the capillary pressure is taken from the parent, i.e. Regularized VanGenuchten.
*/
template <class ScalarT, class ParamsT = RegularizedVanGenuchtenParams<ScalarT> >
class RegularizedVanGenuchtenOfTemperature : public Dumux::RegularizedVanGenuchten<ScalarT, ParamsT>
{
typedef Dumux::RegularizedVanGenuchten<ScalarT, ParamsT> RegularizedVanGenuchten;
public:
typedef ParamsT Params;
typedef typename Params::Scalar Scalar;
/*!
* \brief A regularized van Genuchten capillary pressure-saturation
* curve *as a function of temperature*.
*
* The standard regularized version of the van Genuchten law is used and subsequantially scaled
* by some more or less empirical fit: WRR, Grant(2003)
* --> see range of validity (==fit range) in the paper ! <--
*/
static Scalar pc(const Params &params, const Scalar & Swe, const Scalar & temperature)
{
Scalar beta0 = -413.4 ;
Scalar TRef = 298.15 ;
Scalar pcTemp = RegularizedVanGenuchten::pc(params,Swe);
Scalar pc = pcTemp * ((beta0+temperature) / (beta0+TRef));
return pc;
}
}; // class RegularizedVanGenuchtenOfTemperature
} // namespace Dumux
#endif // REGULARIZED_VAN_GENUCHTEN_OF_TEMPERATURE_HH
/*****************************************************************************
* Copyright (C) 2008 by Philipp Nuske *
* Institute for Modelling Hydraulic and Environmental Systems *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program 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. *
* *
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file awnSurfaceExpFct.hh Specification of the material params
* specific interfacial area surface as a function of wetting phase Saturation
* and capillary pressure.
*/
#ifndef AWN_SURFACE_EXP_FCT_HH
#define AWN_SURFACE_EXP_FCT_HH
#include "awnsurfaceexpfctparams.hh"
#include <dune/common/exceptions.hh>
#include <algorithm>
#include <math.h>
#include <assert.h>
namespace Dumux
{
/*!
* \ingroup material
*
* \brief Implementation of the exponential function relating
* specific interfacial area to wetting phase saturation and capillary pressure as suggested by Nuske(2009) (Diploma thesis).
*/
template <class ParamsT>
class AwnSurfaceExpFct
{
public:
typedef ParamsT Params;
typedef typename Params::Scalar Scalar;
/*!
* \brief The interfacial area surface
*
* the suggested (as estimated from pore network models) awn surface:
* \f[
a_{wn} = a_1 * (S_{wr}-S_w) .* (1-S_w) + a_2 * (S_{wr}-S_w) * (1-S_w) * \exp( a_3 * p_c) ;
\f]
* \param params parameter container for the coefficients of the surface
* \param Sw Effective saturation of the wetting phase
* \param pc Capillary pressure
*/
static Scalar interfacialArea(const Params & params, const Scalar Sw, const Scalar pc)
{
const Scalar a1 = params.a1();
const Scalar a2 = params.a2();
const Scalar a3 = params.a3();
const Scalar Swr = params.Swr();
const Scalar aAlphaBeta = a1 * (Swr-Sw) * (1-Sw) + a2 * (Swr-Sw) * (1-Sw) * std::exp( a3 * pc) ;
return aAlphaBeta;
}
/*! \brief the derivative of specific interfacial area function w.r.t. capillary pressure
*
* \param params parameter container for the coefficients of the surface
* \param Sw Effective saturation of the wetting phase
* \param pc Capillary pressure
*/
static Scalar dawn_dpc (const Params & params, const Scalar Sw, const Scalar pc)
{
const Scalar a2 = params.a2();
const Scalar a3 = params.a3();
const Scalar Swr = params.Swr();
const Scalar value = a2 * a3 * (Swr-Sw) * (1-Sw) * std::exp(a3*pc);
return value;
}
/*! \brief the derivative of specific interfacial area function w.r.t. saturation
*
* \param params parameter container for the coefficients of the surface
* \param Sw Effective saturation of the wetting phase
* \param pc Capillary pressure
*/
static Scalar dawn_dsw (const Params & params, const Scalar Sw, const Scalar pc)
{
Scalar value;
Scalar a1 = params.a1();
Scalar a2 = params.a2();
Scalar a3 = params.a3();
Scalar Swr = params.Swr();
value = - a1 *( 1+Swr-2*Sw ) - a2 * std::exp(a3*pc) * ( 1+Swr-2*Sw );
return value;
}
};
} // namespace Dumux
#endif
/*****************************************************************************
* Copyright (C) 2010 by Philipp Nuske *
* Institute for Modelling Hydraulic and Environmental Systems *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program 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. *
* *
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file awnSurfaceExpFctParams.hh Specification of the material params
* for the interfacial area surface parameters
*/
#ifndef AWN_SURFACE_EXP_FCT_PARAMS_HH
#define AWN_SURFACE_EXP_FCT_PARAMS_HH
namespace Dumux
{
/*!
* \brief implementation of interfacial area surface params
*/
template<class ScalarT>
class AwnSurfaceExpFctParams
{
public:
typedef ScalarT Scalar;
AwnSurfaceExpFctParams()
{}
AwnSurfaceExpFctParams(const Scalar a1, const Scalar a2, const Scalar a3)
{
setA1(a1);
setA2(a2);
setA3(a3);
}
/*!
* \brief Return the \f$a_{1}\f$ shape parameter of awn surface.
*/
const Scalar a1() const
{ return a1_; }
/*!
* \brief Return the \f$a_{2}\f$ shape parameter of awn surface.
*/
const Scalar a2() const
{ return a2_; }
/*!
* \brief Return the \f$a_{3}\f$ shape parameter of awn surface.
*/
const Scalar a3() const
{ return a3_; }
/*!
* \brief Return the \f$a_{3}\f$ shape parameter of awn surface.
*/
const Scalar Swr() const
{ return Swr_; }
/*!
* \brief Set the \f$a_{1}\f$ shape parameter.
*/
void setA1(const Scalar v)
{ a1_ = v; }
/*!
* \brief Set the \f$a_{2}\f$ shape parameter.
*/
void setA2(const Scalar v)
{ a2_ = v; }
/*!
* \brief Set the \f$a_{3}\f$ shape parameter.
*/
void setA3(const Scalar v)
{ a3_ = v; }
/*!
* \brief Set the \f$S_{wr}\f$ for the surface.
*/
void setSwr(const Scalar v)
{ Swr_ = v; }
private:
Scalar a1_;
Scalar a2_;
Scalar a3_;
Scalar Swr_;
};
} // namespace Dumux
#endif
/*****************************************************************************
* Copyright (C) 2008 by Philipp Nuske *
* Institute for Modelling Hydraulic and Environmental Systems *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program 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. *
* *
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file awnSurfaceExpFct.hh Specification of the material params
* specific interfacial area surface as a function of wetting phase Saturation
* and capillary pressure.
*/
#ifndef AWN_SURFACE_EXP_SW_PC_TO_3
#define AWN_SURFACE_EXP_SW_PC_TO_3
#include "awnsurfaceexpswpcto3params.hh"
#include <dune/common/exceptions.hh>
#include <algorithm>
#include <math.h>
#include <assert.h>
namespace Dumux
{
/*!
* \ingroup material
*
* \brief Implementation of a exponential function relating
* specific interfacial area to wetting phase saturation and capillary pressure.
*/
template <class ParamsT>
class AwnSurfaceExpSwPcTo3
{
public:
typedef ParamsT Params;
typedef typename Params::Scalar Scalar;
/*!
* \brief The awn surface
*
* the suggested (as estimated from pore network models) interfacial area surface:
* \f[
a_{wn} = a_1 e^{a_2 * S_w } + a_3 * p_c^3 ;
\f]
* \param params parameter container for the coefficients of the surface
* \param Sw Effective saturation of the wetting phase
* \param pc Capillary pressure
*/
static Scalar interfacialArea(const Params & params, const Scalar Sw, const Scalar pc)
{
// TODO think about awn surface for relative saturation
const Scalar a1 = params.a1();
const Scalar a2 = params.a2();
const Scalar a3 = params.a3();
const Scalar aAlphaBeta = a1 * std::exp( a2 * Sw) + a3 * pc * pc * pc ;
return aAlphaBeta;
}
/*! \brief the derivative of specific interfacial area function w.r.t. capillary pressure
*
* \param params parameter container for the coefficients of the surface
* \param Sw Effective saturation of the wetting phase
* \param pc Capillary pressure
*/
static Scalar dawn_dpc (const Params &params, const Scalar Sw, const Scalar pc)
{
DUNE_THROW(Dune::NotImplemented, __FILE__ << " dawndpc()");
}
/*! \brief the derivative of specific interfacial area function w.r.t. saturation
*
* \param params parameter container for the coefficients of the surface
* \param Sw Effective saturation of the wetting phase
* \param pc Capillary pressure
*/
static Scalar dawn_dsw (const Params &params, const Scalar Sw, const Scalar pc)
{
DUNE_THROW(Dune::NotImplemented, __FILE__ << " dawndSw()");
}
};
}
#endif
/*****************************************************************************
* Copyright (C) 2010 by Philipp Nuske *
* Institute for Modelling Hydraulic and Environmental Systems *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program 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. *
* *
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file awnSurfacePolynomialEdgeZero2ndOrderParams.hh Specification of the material params
* for the interfacial area surface parameters
*/
#ifndef AWN_SURFACE_EXP_SW_PC_TO_3_PARAMS
#define AWN_SURFACE_EXP_SW_PC_TO_3_PARAMS
namespace Dumux
{
/*!
* \brief implementation of interfacial area surface params
*/
template<class ScalarT>
class AwnSurfaceExpSwPcTo3Params
{
public:
typedef ScalarT Scalar;
AwnSurfaceExpSwPcTo3Params()
{}
AwnSurfaceExpSwPcTo3Params(const Scalar a1,
const Scalar a2,
const Scalar a3)
{
setA1(a1);
setA2(a2);
setA3(a3);
}
/*!
* \brief Return the \f$a_{1}\f$ shape parameter of awn surface.
*/
const Scalar a1() const
{ return a1_; }
/*!
* \brief Return the \f$a_{2}\f$ shape parameter of awn surface.
*/
const Scalar a2() const
{ return a2_; }
/*!
* \brief Return the \f$a_{3}\f$ shape parameter of awn surface.
*/
const Scalar a3() const
{ return a3_; }
/*!
* \brief Set the \f$a_{1}\f$ shape parameter.
*/
void setA1(const Scalar v)
{ a1_ = v; }
/*!
* \brief Set the \f$a_{2}\f$ shape parameter.
*/
void setA2(const Scalar v)
{ a2_ = v; }
/*!
* \brief Set the \f$a_{3}\f$ shape parameter.
*/
void setA3(const Scalar v)
{ a3_ = v; }
private:
Scalar Swr_;
Scalar Snr_;
Scalar a1_;
Scalar a2_;
Scalar a3_;
};
} // namespace Dumux
#endif //AWN_SURFACE_EXP_SW_PC_TO_3_PARAMS
/*****************************************************************************
* Copyright (C) 2012 by Philipp Nuske *
* Institute for Modelling Hydraulic and Environmental Systems *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program 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. *
* *
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
#ifndef AWN_SURFACE_PCMAX_FCT_HH
#define AWN_SURFACE_PCMAX_FCT_HH
#include "awnsurfacepcmaxfctparams.hh"
namespace Dumux
{
/*!
* \ingroup material
*
* \brief Implementation of an interfacial area surface.
*
* The idea here is to make sure that interfacial area be zero for Sw=1 and pc=pcmax.
* Because imbibition may have bigger awn than drainage demanding that awn be zero for the whole range of Sw=0 does not fit.
* However, as we are in primary drainage, demanding that awn=0 for Sw=0 is the same as demanding that awn=0 for pc=pcmax,
* because Sw=0 cannnot be reached on different ways. We only need to define pcmax ...
*
*/
template <class ParamsT>
class AwnSurfacePcMaxFct
{
public:
typedef ParamsT Params;
typedef typename Params::Scalar Scalar;
/*!
* \brief The awn surface
*
* the suggested (as estimated from pore network models) awn surface:
* \f[
a_{wn} = a_1 (p_{c { \sf max} } - p_c) (1-S_w) + a_2 (p_{c {\sf max} } -p_c)^2 (1-S_w) + a_3 (p_{c {\sf max} }- p_c) (1-S_w)^2
\f]
* \param params parameter container for the coefficients of the surface
* \param Sw Effective saturation of the wetting phase
* \param pc Capillary pressure
*/
static Scalar interfacialArea(const Params & params, const Scalar Sw, const Scalar pc)
{
// TODO think about awn surface for relative saturation
const Scalar a1 = params.a1();
const Scalar a2 = params.a2();
const Scalar a3 = params.a3();
const Scalar pcMax = params.pcMax() ;
const Scalar aAlphaBeta = a1 * (pcMax-pc) * (1.-Sw) + a2*(pcMax-pc)*(pcMax-pc) * (1.-Sw) + a3 * (pcMax-pc)*(1-Sw)*(1-Sw);
return aAlphaBeta;
}
/*! \brief the derivative of specific interfacial area function w.r.t. capillary pressure
*
* \param params parameter container for the coefficients of the surface
* \param Sw Effective saturation of the wetting phase
* \param pc Capillary pressure
*/
static Scalar dawn_dpc (const Params &params, const Scalar Sw, const Scalar pc)
{
DUNE_THROW(Dune::NotImplemented, __FILE__ << " dawndpc()");
}
/*! \brief the derivative of specific interfacial area function w.r.t. saturation
*
* \param params parameter container for the coefficients of the surface
* \param Sw Effective saturation of the wetting phase
* \param pc Capillary pressure
*/
static Scalar dawn_dsw (const Params &params, const Scalar Sw, const Scalar pc)
{
DUNE_THROW(Dune::NotImplemented, __FILE__ << " dawndSw()");
}
};
}
#endif
/*****************************************************************************