25#ifndef DUMUX_INFILTRATION_THREEP_PROBLEM_HH
26#define DUMUX_INFILTRATION_THREEP_PROBLEM_HH
28#include <dune/grid/yaspgrid.hh>
48template <
class TypeTag>
49class InfiltrationThreePProblem;
61template<
class TypeTag>
62struct Grid<TypeTag, TTag::InfiltrationThreeP> {
using type = Dune::YaspGrid<2>; };
65template<
class TypeTag>
69template<
class TypeTag>
83template<
class TypeTag>
122template <
class TypeTag >
132 pressureIdx = Indices::pressureIdx,
133 swIdx = Indices::swIdx,
134 snIdx = Indices::snIdx,
137 dimWorld = GridView::dimensionworld
146 using Element =
typename GridView::template Codim<0>::Entity;
147 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
153 temperature_ = 273.15 + 10.0;
154 FluidSystem::init(282.15, 284.15, 3, 8e4, 3e5, 200);
156 name_ = getParam<std::string>(
"Problem.Name");
174 const std::string&
name()
const
204 BoundaryTypes values;
206 if(globalPos[0] > this->
gridGeometry().bBoxMax()[0] - eps_
207 || globalPos[0] < this->
gridGeometry().bBoxMin()[0] + eps_)
208 values.setAllDirichlet();
210 values.setAllNeumann();
224 PrimaryVariables values(0.0);
225 initial_(values, globalPos);
238 NumEqVector values(0.0);
241 if (time_ < 2592000.0 - eps_)
243 if ((globalPos[0] < 175.0 + eps_) && (globalPos[0] > 155.0 - eps_)
244 && (globalPos[1] > this->
gridGeometry().bBoxMax()[1] - eps_))
247 values[Indices::conti0EqIdx + FluidSystem::nCompIdx] = -0.001;
271 PrimaryVariables values(0.0);
272 initial_(values, globalPos);
282 {
return temperature_; }
289 void initial_(PrimaryVariables &values,
290 const GlobalPosition &globalPos)
const
292 Scalar y = globalPos[1];
293 Scalar x = globalPos[0];
294 Scalar sw, swr=0.12, sgr=0.03;
296 if(y > (-1.E-3*x+5) - eps_)
298 Scalar pc = 9.81 * 1000.0 * (y - (-5E-4*x+5));
299 if (pc < 0.0) pc = 0.0;
303 if (sw < swr) sw = swr;
304 if (sw > 1.-sgr) sw = 1.-sgr;
306 values[pressureIdx] = 1e5 ;
310 values[pressureIdx] = 1e5 + 9.81 * 1000.0 * ((-5E-4*x+5) - y);
311 values[swIdx] = 1.-sgr;
317 template<
class MaterialLawParams>
318 static Scalar invertPcgw_(Scalar pcIn,
const MaterialLawParams &pcParams)
320 using MaterialLaw =
typename ParentType::SpatialParams::MaterialLaw;
324 Scalar bisLimit = 1.;
326 lower=0.0; upper=1.0;
327 for (k=1; k<=25; k++)
329 sw = 0.5*(upper+lower);
330 pcgw = MaterialLaw::pcgw(pcParams, sw);
331 Scalar delta = pcgw-pcIn;
332 if (delta<0.) delta*=-1.;
340 if (pcgw>pcIn) lower=sw;
347 static constexpr Scalar eps_ = 1e-6;
Defines a type tag and some properties for models using the box scheme.
Properties for all models using cell-centered finite volume scheme with TPFA.
The available discretization methods in Dumux.
A simple class for the air fluid properties.
Material properties of pure water .
Properties of mesitylene.
Tabulates all thermodynamic properties of a given untabulated chemical species.
A gaseous phase consisting of a single component.
A liquid phase consisting of a single component.
A fluid system for three-phase models assuming immiscibility and thermodynamic equilibrium.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Base class for all finite-volume problems.
Definition: common/fvproblem.hh:50
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvproblem.hh:588
The DUNE grid type.
Definition: common/properties.hh:57
Property to specify the type of a problem which has to be solved.
Definition: common/properties.hh:69
The type of the spatial parameters object.
Definition: common/properties.hh:221
The type of the fluid system to use.
Definition: common/properties.hh:223
Tabulates all thermodynamic properties of a given untabulated chemical species.
Definition: tabulatedcomponent.hh:82
A gaseous phase consisting of a single component.
Definition: 1pgas.hh:46
A liquid phase consisting of a single component.
Definition: 1pliquid.hh:46
A fluid system for three-phase models assuming immiscibility and thermodynamic equilibrium.
Definition: 3pimmiscible.hh:62
Base class for all fully implicit porous media problems.
Definition: dumux/porousmediumflow/problem.hh:39
SpatialParams & spatialParams()
Returns the spatial parameters object.
Definition: dumux/porousmediumflow/problem.hh:146
Isothermal NAPL infiltration problem: LNAPL contaminates the unsaturated and the saturated groundwate...
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:124
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
Returns the temperature within the domain.
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:184
const std::string & name() const
The problem name.
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:174
void setTime(Scalar time)
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:166
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluates the initial value for a control volume.
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:269
PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Dirichlet boundary segment.
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:222
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Neumann boundary segment.
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:236
Scalar temperature() const
Returns the temperature within the domain.
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:281
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
Specifies which kind of boundary condition should be used for which equation on a given boundary segm...
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:202
InfiltrationThreePProblem(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:150
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:55
std::tuple< ThreeP > InheritsFrom
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:55
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:56
std::tuple< InfiltrationThreeP, BoxModel > InheritsFrom
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:56
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:57
std::tuple< InfiltrationThreeP, CCTpfaModel > InheritsFrom
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:57
Dune::YaspGrid< 2 > type
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:62
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:86
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: test/porousmediumflow/3p/implicit/infiltration/problem.hh:87
Definition of the spatial parameters for the infiltration problem.
Definition: porousmediumflow/3p/implicit/infiltration/spatialparams.hh:46
Adaption of the fully implicit scheme to the three-phase flow model.
Base class for all porous media problems.
Definition of the spatial parameters for the MaxwellStefan problem.