Commit f1b9f520 authored by Ned Coltman's avatar Ned Coltman
Browse files

[mm][fracture] adapt to new material laws

parent cdbfcec5
......@@ -18,28 +18,33 @@ InjectionLength = 10 # [m] The x-extent of the injection well
[Matrix]
Problem.Name = matrix
SpatialParams.Permeability = 1e-14
SpatialParams.Porosity = 0.1
SpatialParams.VGAlpha = 1e-3
SpatialParams.VGN = 2
SpatialParams.Snr = 0.0
SpatialParams.Swr = 0.0
SpatialParams.OverburdenPermeability = 5e-10
SpatialParams.OverburdenPorosity = 0.3
SpatialParams.OverburdenVGAlpha = 5e-3
SpatialParams.OverburdenVGN = 2
SpatialParams.OverburdenSnr = 0.0
SpatialParams.OverburdenSwr = 0.0
[Fracture]
Problem.Name = fractures
SpatialParams.Aperture = 1e-1
SpatialParams.Permeability = 1e-7
SpatialParams.Porosity = 0.85
SpatialParams.VGAlpha = 1e-2
SpatialParams.VGN = 2
SpatialParams.Snr = 0.0
SpatialParams.Swr = 0.0
[SpatialParams]
Aperture = 1e-1
Permeability = 1e-14
Porosity = 0.1
VanGenuchtenAlpha = 1e-3
VanGenuchtenN = 2
Snr = 0.0
Swr = 0.0
[SpatialParams.Overburden]
Permeability = 5e-10
Porosity = 0.3
VanGenuchtenAlpha = 5e-3
VanGenuchtenN = 2
Snr = 0.0
Swr = 0.0
[SpatialParams.Fracture]
Permeability = 1e-7
Porosity = 0.85
VanGenuchtenAlpha = 1e-2
VanGenuchtenN = 2
Snr = 0.0
Swr = 0.0
[Newton]
MaxRelativeShift = 1e-6
......
......@@ -25,8 +25,7 @@
#define DUMUX_COURSE_FRACTURESEXERCISE_FRACTURE_SPATIALPARAMS_HH
#include <dumux/material/spatialparams/fv.hh>
#include <dumux/material/fluidmatrixinteractions/2p/regularizedvangenuchten.hh>
#include <dumux/material/fluidmatrixinteractions/2p/efftoabslaw.hh>
#include <dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh>
namespace Dumux {
......@@ -47,7 +46,7 @@ class FractureSpatialParams
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
// use a regularized van-genuchten material law
using EffectiveLaw = RegularizedVanGenuchten<Scalar>;
using PcKrSw = FluidMatrix::VanGenuchtenDefault<Scalar>;
// we identify those fractures as barriers, that have a domain marker
// of 2. This is what is set in the grid file (see grids/complex.geo)
......@@ -57,23 +56,14 @@ public:
//! export the type used for permeabilities
using PermeabilityType = Scalar;
//! export the material law and parameters used
using MaterialLaw = EffToAbsLaw< EffectiveLaw >;
using MaterialLawParams = typename MaterialLaw::Params;
//! the constructor
FractureSpatialParams(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
const std::string& paramGroup)
: ParentType(fvGridGeometry)
, pcKrSwFracture_("SpatialParams.Fracture")
{
porosity_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Porosity");
permeability_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Permeability");
// set the material law parameters
materialLawParams_.setSnr(getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Snr"));
materialLawParams_.setSnr(getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Swr"));
materialLawParams_.setVgAlpha(getParamFromGroup<Scalar>(paramGroup, "SpatialParams.VGAlpha"));
materialLawParams_.setVgn(getParamFromGroup<Scalar>(paramGroup, "SpatialParams.VGN"));
porosity_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Fracture.Porosity");
permeability_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Fracture.Permeability");
}
//! Function for defining the (intrinsic) permeability \f$[m^2]\f$.
......@@ -91,8 +81,8 @@ public:
{ return porosity_; }
//! Return the material law parameters
const MaterialLawParams& materialLawParamsAtPos(const GlobalPosition& globalPos) const
{ return materialLawParams_; }
auto fluidMatrixInteractionAtPos(const GlobalPosition& globalPos) const
{ return pcKrSwFracture_; }
//! Water is the wetting phase
template< class FluidSystem >
......@@ -106,7 +96,7 @@ public:
private:
Scalar porosity_;
PermeabilityType permeability_;
MaterialLawParams materialLawParams_;
const PcKrSw pcKrSwFracture_;
};
} // end namespace Dumux
......
......@@ -25,8 +25,7 @@
#define DUMUX_COURSE_FRACTURESEXERCISE_MATRIX_SPATIALPARAMS_HH
#include <dumux/material/spatialparams/fv.hh>
#include <dumux/material/fluidmatrixinteractions/2p/regularizedvangenuchten.hh>
#include <dumux/material/fluidmatrixinteractions/2p/efftoabslaw.hh>
#include <dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh>
namespace Dumux {
......@@ -46,61 +45,48 @@ class MatrixSpatialParams
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
// use a regularized van-genuchten material law
using EffectiveLaw = RegularizedVanGenuchten<Scalar>;
using PcKrSw = FluidMatrix::VanGenuchtenDefault<Scalar>;
public:
//! export the type used for permeabilities
using PermeabilityType = Scalar;
//! export the material law and parameters used
using MaterialLaw = EffToAbsLaw< EffectiveLaw >;
using MaterialLawParams = typename MaterialLaw::Params;
//! the constructor
MatrixSpatialParams(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
const std::string& paramGroup)
: ParentType(fvGridGeometry)
, pcKrSw_("SpatialParams")
, pcKrSwOverburden_("SpatialParams.Overburden")
{
porosity_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Porosity");
porosityOverburden_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.OverburdenPorosity");
permeability_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Permeability");
permeabilityOverburden_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.OverburdenPermeability");
// set the material law parameters
materialLawParams_.setSnr(getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Snr"));
materialLawParams_.setSwr(getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Swr"));
materialLawParams_.setVgAlpha(getParamFromGroup<Scalar>(paramGroup, "SpatialParams.VGAlpha"));
materialLawParams_.setVgn(getParamFromGroup<Scalar>(paramGroup, "SpatialParams.VGN"));
materialLawParamsOverburden_.setSnr(getParamFromGroup<Scalar>(paramGroup, "SpatialParams.OverburdenSnr"));
materialLawParamsOverburden_.setSwr(getParamFromGroup<Scalar>(paramGroup, "SpatialParams.OverburdenSwr"));
materialLawParamsOverburden_.setVgAlpha(getParamFromGroup<Scalar>(paramGroup, "SpatialParams.OverburdenVGAlpha"));
materialLawParamsOverburden_.setVgn(getParamFromGroup<Scalar>(paramGroup, "SpatialParams.OverburdenVGN"));
porosityOverburden_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Overburden.Porosity");
permeabilityOverburden_ = getParamFromGroup<Scalar>(paramGroup, "SpatialParams.Overburden.Permeability");
}
//! Function for defining the (intrinsic) permeability \f$[m^2]\f$.
PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const
{
if (globalPos[1] > 35.0)
return permeabilityOverburden_;
else if ((globalPos[1] > 32)||(globalPos[1] < 30))
return permeability_;
else return permeability_/10000.;
if (globalPos[1] > 35.0)
return permeabilityOverburden_;
else if ((globalPos[1] > 32)||(globalPos[1] < 30))
return permeability_;
else return permeability_/10000.;
}
//! Return the porosity
Scalar porosityAtPos(const GlobalPosition& globalPos) const
{
if (globalPos[1] > 35.0)
return porosityOverburden_;
else if ((globalPos[1] > 32)||(globalPos[1] < 30))
return porosity_;
else return 0.05;
if (globalPos[1] > 35.0)
return porosityOverburden_;
else if ((globalPos[1] > 32)||(globalPos[1] < 30))
return porosity_;
else return 0.05;
}
//! Return the material law parameters
const MaterialLawParams& materialLawParamsAtPos(const GlobalPosition& globalPos) const
{ return globalPos[1] > 35.0 ? materialLawParamsOverburden_ : materialLawParams_; }
auto fluidMatrixInteractionAtPos(const GlobalPosition& globalPos) const
{ return globalPos[1] > 35.0 ? pcKrSwOverburden_ : pcKrSw_; }
//! Water is the wetting phase
template< class FluidSystem >
......@@ -116,8 +102,8 @@ private:
Scalar porosityOverburden_;
PermeabilityType permeability_;
PermeabilityType permeabilityOverburden_;
MaterialLawParams materialLawParams_;
MaterialLawParams materialLawParamsOverburden_;
const PcKrSw pcKrSw_;
const PcKrSw pcKrSwOverburden_;
};
} // end namespace Dumux
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment