2010-05-25 08:27:16 -05:00
|
|
|
// $Id: test_2p_spatialparamsinjection.hh 3456 2010-04-09 12:11:51Z mwolff $
|
|
|
|
/*****************************************************************************
|
|
|
|
* Copyright (C) 2008-2009 by Markus Wolff *
|
|
|
|
* Institute of Hydraulic Engineering *
|
|
|
|
* 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, as long as this copyright notice *
|
|
|
|
* is included in its original form. *
|
|
|
|
* *
|
|
|
|
* This program is distributed WITHOUT ANY WARRANTY. *
|
|
|
|
*****************************************************************************/
|
|
|
|
#ifndef TUTORIALSPATIALPARAMETERS_DECOUPLED_HH
|
|
|
|
#define TUTORIALSPATIALPARAMETERS_DECOUPLED_HH
|
|
|
|
|
|
|
|
|
2010-06-24 01:28:17 -05:00
|
|
|
//#include <dumux/material/fluidmatrixinteractions/2p/linearmaterial.hh>
|
|
|
|
#include <dumux/material/fluidmatrixinteractions/2p/regularizedbrookscorey.hh>
|
|
|
|
#include <dumux/material/fluidmatrixinteractions/2p/efftoabslaw.hh>
|
2010-05-25 08:27:16 -05:00
|
|
|
|
|
|
|
namespace Dumux
|
|
|
|
{
|
|
|
|
|
|
|
|
/** \todo Please doc me! */
|
|
|
|
|
|
|
|
template<class TypeTag>
|
|
|
|
class TutorialSpatialParametersDecoupled
|
|
|
|
{
|
2010-08-05 07:11:43 -05:00
|
|
|
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid;
|
2010-05-25 08:27:16 -05:00
|
|
|
typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView;
|
2010-08-05 07:11:43 -05:00
|
|
|
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
|
|
|
|
typedef typename Grid::ctype CoordScalar;
|
2010-05-25 08:27:16 -05:00
|
|
|
|
|
|
|
enum
|
|
|
|
{dim=Grid::dimension, dimWorld=Grid::dimensionworld, numEq=1};
|
2010-08-05 07:11:43 -05:00
|
|
|
typedef typename Grid::Traits::template Codim<0>::Entity Element;
|
2010-05-25 08:27:16 -05:00
|
|
|
|
|
|
|
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
|
|
|
typedef Dune::FieldVector<CoordScalar, dim> LocalPosition;
|
|
|
|
typedef Dune::FieldMatrix<Scalar,dim,dim> FieldMatrix;
|
|
|
|
|
|
|
|
typedef RegularizedBrooksCorey<Scalar> RawMaterialLaw;
|
|
|
|
// typedef LinearMaterial<Scalar> RawMaterialLaw;
|
|
|
|
public:
|
|
|
|
typedef EffToAbsLaw<RawMaterialLaw> MaterialLaw;
|
|
|
|
typedef typename MaterialLaw::Params MaterialLawParams;
|
|
|
|
|
|
|
|
void update (Scalar saturationW, const Element& element)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2010-08-05 07:11:43 -05:00
|
|
|
const FieldMatrix& intrinsicPermeability (const GlobalPosition& globalPos, const Element& element) const
|
2010-05-25 08:27:16 -05:00
|
|
|
{
|
|
|
|
return K_;
|
|
|
|
}
|
|
|
|
|
|
|
|
double porosity(const GlobalPosition& globalPos, const Element& element) const
|
|
|
|
{
|
|
|
|
return 0.2;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// return the brooks-corey context depending on the position
|
|
|
|
const MaterialLawParams& materialLawParams(const GlobalPosition& globalPos, const Element &element) const
|
|
|
|
{
|
|
|
|
return materialLawParams_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TutorialSpatialParametersDecoupled(const GridView& gridView)
|
|
|
|
: K_(0)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < dim; i++)
|
|
|
|
K_[i][i] = 1e-7;
|
|
|
|
|
|
|
|
// residual saturations
|
|
|
|
materialLawParams_.setSwr(0);
|
|
|
|
materialLawParams_.setSnr(0);
|
|
|
|
|
|
|
|
// parameters for the Brooks-Corey Law
|
|
|
|
// entry pressures
|
|
|
|
materialLawParams_.setPe(10000);
|
|
|
|
|
|
|
|
// Brooks-Corey shape parameters
|
|
|
|
materialLawParams_.setAlpha(2);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
MaterialLawParams materialLawParams_;
|
|
|
|
FieldMatrix K_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace
|
|
|
|
#endif
|