23#ifndef DUMUX_INCOMPRESSIBLE_TWOP_TEST_PROBLEM_HH
24#define DUMUX_INCOMPRESSIBLE_TWOP_TEST_PROBLEM_HH
26#include <dune/grid/yaspgrid.hh>
43#ifndef ENABLEINTERFACESOLVER
44#define ENABLEINTERFACESOLVER 0
49template<
class TypeTag>
class TwoPTestProblem;
61template<
class TypeTag>
62struct Grid<TypeTag, TTag::TwoPIncompressible> {
using type = Dune::YaspGrid<2>; };
65template<
class TypeTag>
69template<
class TypeTag>
73template<
class TypeTag>
83template<
class TypeTag>
94template<
class TypeTag>
96template<
class TypeTag>
98template<
class TypeTag>
102template<
class TypeTag>
110template<
class TypeTag>
115 using Element =
typename GridView::template Codim<0>::Entity;
121 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
125 pressureH2OIdx = Indices::pressureIdx,
126 saturationDNAPLIdx = Indices::saturationIdx,
127 contiDNAPLEqIdx = Indices::conti0EqIdx + FluidSystem::comp1Idx,
128 waterPhaseIdx = FluidSystem::phase0Idx,
129 dnaplPhaseIdx = FluidSystem::phase1Idx
144 BoundaryTypes values;
145 if (onLeftBoundary_(globalPos) || onRightBoundary_(globalPos))
146 values.setAllDirichlet();
148 values.setAllNeumann();
159 PrimaryVariables values;
162 fluidState.setPressure(waterPhaseIdx, 1e5);
163 fluidState.setPressure(dnaplPhaseIdx, 1e5);
168 Scalar depth = this->
gridGeometry().bBoxMax()[1] - globalPos[1];
169 Scalar alpha = 1 + 1.5/height;
171 Scalar factor = (width*alpha + (1.0 - alpha)*globalPos[0])/width;
174 values[pressureH2OIdx] = 1e5 - factor*densityW*this->
spatialParams().gravity(globalPos)[1]*depth;
175 values[saturationDNAPLIdx] = 0.0;
190 NumEqVector values(0.0);
191 if (onInlet_(globalPos))
192 values[contiDNAPLEqIdx] = -0.04;
196 values[contiDNAPLEqIdx] *= 10;
208 PrimaryVariables values;
211 fluidState.setPressure(waterPhaseIdx, 1e5);
212 fluidState.setPressure(dnaplPhaseIdx, 1e5);
216 Scalar depth = this->
gridGeometry().bBoxMax()[1] - globalPos[1];
219 values[pressureH2OIdx] = 1e5 - densityW*this->
spatialParams().gravity(globalPos)[1]*depth;
220 values[saturationDNAPLIdx] = 0;
237 bool onLeftBoundary_(
const GlobalPosition &globalPos)
const
239 return globalPos[0] < this->
gridGeometry().bBoxMin()[0] + eps_;
242 bool onRightBoundary_(
const GlobalPosition &globalPos)
const
244 return globalPos[0] > this->
gridGeometry().bBoxMax()[0] - eps_;
247 bool onLowerBoundary_(
const GlobalPosition &globalPos)
const
249 return globalPos[1] < this->
gridGeometry().bBoxMin()[1] + eps_;
252 bool onUpperBoundary_(
const GlobalPosition &globalPos)
const
254 return globalPos[1] > this->
gridGeometry().bBoxMax()[1] - eps_;
257 bool onInlet_(
const GlobalPosition &globalPos)
const
260 Scalar lambda = (this->
gridGeometry().bBoxMax()[0] - globalPos[0])/width;
261 return onUpperBoundary_(globalPos) && 0.5 < lambda && lambda < 2.0/3.0;
264 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 mpfa.
Properties for all models using cell-centered finite volume scheme with TPFA.
A much simpler (and thus potentially less buggy) version of pure water.
A simple implementation of Trichloroethene (TCE), a DNAPL.
A liquid phase consisting of a single component.
A fluid system for two-phase models assuming immiscibility and thermodynamic equilibrium.
#define ENABLEINTERFACESOLVER
The properties for the incompressible 2p test.
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:44
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
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:65
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
Definition: common/properties.hh:91
Definition: common/properties.hh:169
If disabled, the volume variables are not stored (reduces memory, but is slower)
Definition: common/properties.hh:178
specifies if data on flux vars should be saved (faster, but more memory consuming)
Definition: common/properties.hh:188
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
Definition: common/properties.hh:244
A liquid phase consisting of a single component.
Definition: 1pliquid.hh:46
A fluid system for two-phase models assuming immiscibility and thermodynamic equilibrium.
Definition: 2pimmiscible.hh:59
Element-wise calculation of the residual and its derivatives for a two-phase, incompressible test pro...
Definition: 2p/incompressiblelocalresidual.hh:49
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
The incompressible 2p-boxdfm test problem.
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:112
TwoPTestProblem(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:133
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/2p/implicit/incompressible/problem.hh:142
Scalar temperature() const
Returns the temperature for an isothermal problem.
Definition: test/porousmediumflow/2p/implicit/boxdfm/problem.hh:226
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Neumann boundary segment.
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:188
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluates the initial values for a control volume.
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:206
PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Dirichlet boundary segment.
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:157
The spatial params for the incompressible 2p test.
Definition: porousmediumflow/2p/implicit/boxdfm/spatialparams.hh:44
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:54
std::tuple< TwoP > InheritsFrom
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:54
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:55
std::tuple< TwoPIncompressible, CCTpfaModel > InheritsFrom
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:55
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:56
std::tuple< TwoPIncompressible, CCMpfaModel > InheritsFrom
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:56
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:57
std::tuple< TwoPIncompressible, BoxModel > InheritsFrom
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:57
Dune::YaspGrid< 2 > type
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:62
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: test/porousmediumflow/2p/implicit/incompressible/problem.hh:76
Adaption of the fully implicit scheme to the two-phase flow model.
Base class for all porous media problems.
Element-wise calculation of the residual and its derivatives for a two-phase, incompressible test pro...
Definition of the spatial parameters for the MaxwellStefan problem.