Skip to content
Snippets Groups Projects
Commit 16d51024 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[test][richardsnc] New material law

parent 2c97131c
No related branches found
No related tags found
1 merge request!1607Feature/new materiallaw 2p
...@@ -25,3 +25,13 @@ AddVelocity = true ...@@ -25,3 +25,13 @@ AddVelocity = true
[Newton] [Newton]
EnableChop = false EnableChop = false
[SpatialParams]
Lens.Swr = 0.18
Lens.Snr = 0.0
Lens.VanGenuchtenAlpha = 0.00045
Lens.VanGenuchtenN = 7.3
OuterDomain.Swr = 0.05
OuterDomain.Snr = 0.0
OuterDomain.VanGenuchtenAlpha = 0.0037
OuterDomain.VanGenuchtenN = 4.7
...@@ -144,9 +144,8 @@ public: ...@@ -144,9 +144,8 @@ public:
pumpRate_ = getParam<Scalar>("Problem.PumpRate"); // in kg/s pumpRate_ = getParam<Scalar>("Problem.PumpRate"); // in kg/s
// for initial conditions // for initial conditions
const Scalar sw = 0.4; // start with 80% saturation on top const Scalar sw = 0.4; // start with 40% saturation on top
using MaterialLaw = typename ParentType::SpatialParams::MaterialLaw; pcTop_ = this->spatialParams().fluidMatrixInteractionAtPos(this->gridGeometry().bBoxMax()).pc(sw);
pcTop_ = MaterialLaw::pc(this->spatialParams().materialLawParamsAtPos(this->gridGeometry().bBoxMax()), sw);
// for post time step mass balance // for post time step mass balance
accumulatedSource_ = 0.0; accumulatedSource_ = 0.0;
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include <dumux/material/spatialparams/fv.hh> #include <dumux/material/spatialparams/fv.hh>
#include <dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh> #include <dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh>
#include <dumux/material/fluidmatrixinteractions/2p/efftoabslaw.hh>
#include <dumux/porousmediumflow/richards/model.hh> #include <dumux/porousmediumflow/richards/model.hh>
...@@ -51,37 +50,20 @@ class RichardsWellTracerSpatialParams ...@@ -51,37 +50,20 @@ class RichardsWellTracerSpatialParams
using Element = typename GridView::template Codim<0>::Entity; using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate; using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using EffectiveLaw = VanGenuchten<Scalar>; using PcKrSwCurve = FluidMatrix::VanGenuchtenNoReg<Scalar>;
public: public:
using MaterialLaw = EffToAbsLaw<EffectiveLaw>;
using MaterialLawParams = typename MaterialLaw::Params;
// export permeability type // export permeability type
using PermeabilityType = Scalar; using PermeabilityType = Scalar;
RichardsWellTracerSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry) RichardsWellTracerSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
: ParentType(gridGeometry) : ParentType(gridGeometry)
, lensPcKrSwCurve_("SpatialParams.Lens")
, outerPcKrSwCurve_("SpatialParams.OuterDomain")
{ {
lensLowerLeft_ = getParam<GlobalPosition>("Problem.LensLowerLeft"); lensLowerLeft_ = getParam<GlobalPosition>("Problem.LensLowerLeft");
lensUpperRight_ = getParam<GlobalPosition>("Problem.LensUpperRight"); lensUpperRight_ = getParam<GlobalPosition>("Problem.LensUpperRight");
// residual saturations
lensMaterialParams_.setSwr(0.18);
lensMaterialParams_.setSnr(0.0);
outerMaterialParams_.setSwr(0.05);
outerMaterialParams_.setSnr(0.0);
// parameters for the Van Genuchten law
// alpha and n
lensMaterialParams_.setVgAlpha(0.00045);
lensMaterialParams_.setVgn(7.3);
outerMaterialParams_.setVgAlpha(0.0037);
outerMaterialParams_.setVgn(4.7);
lensMaterialParams_.setVgn(7.3);
outerMaterialParams_.setVgAlpha(0.0037);
lensK_ = 1e-14; lensK_ = 1e-14;
outerK_ = 5e-12; outerK_ = 5e-12;
} }
...@@ -113,13 +95,14 @@ public: ...@@ -113,13 +95,14 @@ public:
/*! /*!
* \brief Returns the parameters for the material law at a given location * \brief Returns the parameters for the material law at a given location
* *
* \param globalPos A global coordinate vector * \param globalPos The global coordinates for the given location
*/ */
const MaterialLawParams& materialLawParamsAtPos(const GlobalPosition &globalPos) const auto fluidMatrixInteractionAtPos(const GlobalPosition& globalPos) const
{ {
if (isInLens_(globalPos)) if (isInLens_(globalPos))
return lensMaterialParams_; return makeFluidMatrixInteraction(lensPcKrSwCurve_);
return outerMaterialParams_; else
return makeFluidMatrixInteraction(outerPcKrSwCurve_);
} }
private: private:
...@@ -139,8 +122,9 @@ private: ...@@ -139,8 +122,9 @@ private:
Scalar lensK_; Scalar lensK_;
Scalar outerK_; Scalar outerK_;
MaterialLawParams lensMaterialParams_;
MaterialLawParams outerMaterialParams_; const PcKrSwCurve lensPcKrSwCurve_;
const PcKrSwCurve outerPcKrSwCurve_;
}; };
} // end namespace Dumux } // end namespace Dumux
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment