Commit cb8b5fe4 authored by Martin Schneider's avatar Martin Schneider
Browse files

[impes][bl] Setup buckley-leverett test case

parent 75891010
......@@ -24,6 +24,7 @@
#define DUMUX_IMPES_PRESSURE_TEST_PROBLEM_HH
#include <dune/grid/yaspgrid.hh>
#include <dune/grid/uggrid.hh>
#include <dumux/discretization/box/properties.hh>
#include <dumux/discretization/cellcentered/tpfa/properties.hh>
......@@ -44,10 +45,10 @@ namespace Dumux {
template<class TypeTag> class TwoPTestProblem;
namespace Properties {
NEW_TYPE_TAG(TwoPImpes, INHERITS_FROM(CCTpfaModel,Pressure));
NEW_TYPE_TAG(TwoPImpes, INHERITS_FROM(CCMpfaModel,Pressure));
// Set the grid type
SET_TYPE_PROP(TwoPImpes, Grid, Dune::YaspGrid<2>);
SET_TYPE_PROP(TwoPImpes, Grid, Dune::UGGrid<2>);
// Set the problem type
SET_TYPE_PROP(TwoPImpes, Problem, TwoPTestProblem<TypeTag>);
......@@ -73,8 +74,8 @@ public:
// Enable caching
SET_BOOL_PROP(TwoPImpes, EnableGridVolumeVariablesCache, false);
SET_BOOL_PROP(TwoPImpes, EnableGridFluxVariablesCache, false);
SET_BOOL_PROP(TwoPImpes, EnableFVGridGeometryCache, false);
SET_BOOL_PROP(TwoPImpes, EnableGridFluxVariablesCache, true);
SET_BOOL_PROP(TwoPImpes, EnableFVGridGeometryCache, true);
} // end namespace Properties
/*!
......@@ -114,7 +115,7 @@ public:
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
{
BoundaryTypes values;
if (onLeftBoundary_(globalPos) || onRightBoundary_(globalPos))
if (onLeftBoundary_(globalPos))
values.setAllDirichlet();
else
values.setAllNeumann();
......@@ -133,7 +134,7 @@ public:
{
PrimaryVariables values(1.0e5);
if (onLeftBoundary_(globalPos))
values[pressureIdx] = 2.0e5;
values[pressureIdx] = 1.0e5;
return values;
}
......@@ -152,6 +153,8 @@ public:
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
{
NumEqVector values(0.0);
if(onRightBoundary_(globalPos))
values[pressureEqIdx] = 3e-3;
return values;
}
......
......@@ -76,8 +76,8 @@ public:
outerMaterialParams_.setLambda(2.0);
outerMaterialParams_.setPe(0);
lensK_ = 9.05e-12;
outerK_ = 4.6e-10;
lensK_ = 1.0e-7;
outerK_ = 1.0e-7;
wettingSaturation_.resize(fvGridGeometry->numDofs(),0.0);
}
......@@ -109,7 +109,7 @@ public:
* \param globalPos The global position
*/
Scalar porosityAtPos(const GlobalPosition& globalPos) const
{ return 0.4; }
{ return 0.2; }
/*!
* \brief Returns the parameter object for the Brooks-Corey material law.
......
[TimeLoop]
DtInitial = 1# [s]
MaxTimeStepSize = 10
TEnd = 400 # [s]
DtInitial = 1e2# [s]
MaxTimeStepSize = 1e2
TEnd = 7e5 # [s]
[Grid]
LowerLeft = 0 0
UpperRight = 100 10
Cells = 100 1
File = ../grids/test_mpfa2p.dgf #grid for buckley-leverett or mcwhorter problem
Refinement = 2
#LowerLeft = 0 0
#UpperRight = 30 3
#Cells = 100 3
[SpatialParams]
LensLowerLeft = 20.0 0.0 # [m] coordinates of the lower left lens corner
LensUpperRight = 40.0 1.0 # [m] coordinates of the upper right lens corner
[Problem]
Name = test_impes
Name = test_buckleyleverett
EnableGravity = false
[Component]
LiquidDensity = 1000
LiquidKinematicViscosity = 1e-5
LiquidKinematicViscosity = 1e-6
......@@ -199,7 +199,7 @@ int main(int argc, char** argv) try
auto linearSolver = std::make_shared<LinearSolver>(leafGridView, twoPImpesFvGridGeometry->dofMapper());
//! set some check points for the time loop
timeLoop->setPeriodicCheckPoint(tEnd/100.0);
timeLoop->setPeriodicCheckPoint(1.0e4);
//! start the time loop
timeLoop->start();
......@@ -250,7 +250,7 @@ int main(int argc, char** argv) try
std::vector<Scalar> volumeFlux(twoPImpesFvGridGeometry->numScvf(), 0.0);
using FluxVariables = typename GET_PROP_TYPE(TwoPImpesTT, FluxVariables);
auto upwindTerm = [](const auto& volVars) { return volVars.mobility(0)*volVars.density(0); };
auto upwindTerm = [](const auto& volVars) { return volVars.mobility(0); };
for (const auto& element : elements(leafGridView))
{
auto fvGeometry = localView(*twoPImpesFvGridGeometry);
......
......@@ -24,6 +24,7 @@
#define DUMUX_IMPES_TRANSPORT_TEST_PROBLEM_HH
#include <dune/grid/yaspgrid.hh>
#include <dune/grid/uggrid.hh>
#include <dumux/discretization/box/properties.hh>
#include <dumux/discretization/cellcentered/tpfa/properties.hh>
......@@ -46,7 +47,7 @@ template<class TypeTag> class TwoPTransport;
namespace Properties {
NEW_TYPE_TAG(TwoPTransport, INHERITS_FROM(CCTpfaModel, Transport));
// Set the grid type
SET_TYPE_PROP(TwoPTransport, Grid, Dune::YaspGrid<2>);
SET_TYPE_PROP(TwoPTransport, Grid, Dune::UGGrid<2>);
// Set the problem type
SET_TYPE_PROP(TwoPTransport, Problem, TwoPTransport<TypeTag>);
......@@ -72,8 +73,8 @@ public:
// Enable caching
SET_BOOL_PROP(TwoPTransport, EnableGridVolumeVariablesCache, false);
SET_BOOL_PROP(TwoPTransport, EnableGridFluxVariablesCache, false);
SET_BOOL_PROP(TwoPTransport, EnableFVGridGeometryCache, false);
SET_BOOL_PROP(TwoPTransport, EnableGridFluxVariablesCache, true);
SET_BOOL_PROP(TwoPTransport, EnableFVGridGeometryCache, true);
} // end namespace Properties
/*!
......@@ -113,7 +114,7 @@ public:
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
{
BoundaryTypes values;
if (onLeftBoundary_(globalPos) || onRightBoundary_(globalPos))
if (onLeftBoundary_(globalPos))
values.setAllDirichlet();
else
values.setAllNeumann();
......
......@@ -76,8 +76,8 @@ public:
outerMaterialParams_.setLambda(2.0);
outerMaterialParams_.setPe(0);
lensK_ = 9.05e-12;
outerK_ = 4.6e-10;
lensK_ = 1.0e-7;
outerK_ = 1.0e-7;
}
/*!
......@@ -107,7 +107,7 @@ public:
* \param globalPos The global position
*/
Scalar porosityAtPos(const GlobalPosition& globalPos) const
{ return 0.4; }
{ return 0.2; }
/*!
* \brief Returns the parameter object for the Brooks-Corey material law.
......
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