24#ifndef DUMUX_TEST_2P2C_PROBLEM_HH
25#define DUMUX_TEST_2P2C_PROBLEM_HH
27#include <dune/grid/yaspgrid.hh>
44template<
class TypeTag>
45class TestDecTwoPTwoCProblem;
67template<
class TypeTag>
90template<
class TypeTag>
95using Grid =
typename GridView::Grid;
96using TimeManager =
typename GET_PROP_TYPE(TypeTag, TimeManager);
97using Indices =
typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices;
99using FluidSystem =
typename GET_PROP_TYPE(TypeTag, FluidSystem);
101using BoundaryTypes =
typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
102using PrimaryVariables =
typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
106 dim = GridView::dimension, dimWorld = GridView::dimensionworld
111using Element =
typename GridView::Traits::template Codim<0>::Entity;
112using Intersection =
typename GridView::Intersection;
113using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
130 return "test_dec2p2c";
171 if (globalPos[0] > this->
bBoxMax()[0] - eps_ || globalPos[0] < eps_)
172 bcTypes.setAllDirichlet();
175 bcTypes.setAllNeumann();
186void boundaryFormulation(
typename Indices::BoundaryFormulation &bcFormulation,
const Intersection& intersection)
const
188 bcFormulation = Indices::concentration;
199void dirichletAtPos(PrimaryVariables &bcValues ,
const GlobalPosition& globalPos)
const
205 bcValues[Indices::pressureEqIdx] = (globalPos[0] < eps_) ? (2.5e5 - FluidSystem::H2O::liquidDensity(temp, pRef) * this->
gravity()[dim-1])
206 : (2e5 - FluidSystem::H2O::liquidDensity(temp, pRef) * this->
gravity()[dim-1]);
209 bcValues[Indices::contiWEqIdx] = 1.;
210 bcValues[Indices::contiNEqIdx] = 1.- bcValues[Indices::contiWEqIdx];
224void neumannAtPos(PrimaryVariables &neumannValues,
const GlobalPosition& globalPos)
const
239void sourceAtPos(PrimaryVariables &sourceValues,
const GlobalPosition& globalPos)
const
243 if (abs(globalPos[0] - 4.8) < 0.5 + eps_ && abs(globalPos[1] - 4.8) < 0.5 + eps_)
244 sourceValues[Indices::contiNEqIdx] = 0.0001;
263GlobalPosition lowerLeft_;
264GlobalPosition upperRight_;
266static constexpr Scalar eps_ = 1e-6;
267const Scalar depthBOR_;
#define GET_PROP_TYPE(TypeTag, PropTagName)
Definition: propertysystemmacros.hh:283
#define NEW_TYPE_TAG(...)
Definition: propertysystemmacros.hh:130
Finite volume 2p2c pressure model.
Finite volume discretization of the component transport equation.
A compositional two-phase fluid system with water and air as components in both, the liquid and the g...
spatial parameters for the sequential 2p2c test
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
Property tag EnableCapillarity
Returns whether capillarity is regarded.
Definition: porousmediumflow/2p2c/sequential/properties.hh:60
Property tag BoundaryMobility
Definition: porousmediumflow/2p2c/sequential/properties.hh:61
SET_INT_PROP(SequentialOneP, NumEq, 1)
Set number of equations to 1 for isothermal one-phase models.
SET_TYPE_PROP(FVPressureOneP, Velocity, FVVelocity1P< TypeTag >)
Set velocity reconstruction implementation standard cell centered finite volume schemes as default.
Property tag TransportModel
The type of the discretization of a transport model.
Definition: porousmediumflow/sequential/properties.hh:66
Type tag FVPressureOneP INHERITS_FROM(PressureOneP))
The type tag for the one-phase problems using a standard finite volume model.
Property tag Indices
Definition: porousmediumflow/sequential/properties.hh:59
SET_BOOL_PROP(FVPressureOneP, VisitFacesOnlyOnce, true)
Allow assembling algorithm for the pressure matrix to assemble only from one side of a cell-cell inte...
Property tag PressureModel
The type of the discretization of a pressure model.
Definition: porousmediumflow/sequential/properties.hh:65
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 fluid system to use.
Definition: common/properties.hh:223
Definition: common/properties.hh:312
A compositional two-phase fluid system with water and air as components in both, the liquid and the g...
Definition: h2oair.hh:75
const GravityVector & gravity() const
Returns the acceleration due to gravity.
Definition: dumux/porousmediumflow/2p/sequential/impes/problem.hh:167
The finite volume model for the solution of the compositional pressure equation.
Definition: fvpressure.hh:73
Compositional transport step in a Finite Volume discretization.
Definition: fvtransport.hh:60
Base class for all compositional 2-phase problems which use an impet algorithm.
Definition: dumux/porousmediumflow/2p2c/sequential/problem.hh:43
void setZero(typename GET_PROP_TYPE(TypeTag, PrimaryVariables) &values, const int equation=-1) const
Sets entries of the primary variable vector to zero.
Definition: dumux/porousmediumflow/2p2c/sequential/problem.hh:199
base class for problems using a sequential implicit-explicit strategy
Definition: impetproblem.hh:46
TimeManager & timeManager()
Returns TimeManager object used by the simulation.
Definition: impetproblem.hh:663
const GlobalPosition & bBoxMax() const
The coordinate of the corner of the GridView's bounding box with the largest values.
Definition: impetproblem.hh:655
Grid & grid()
Returns the current grid which used by the problem.
Definition: impetproblem.hh:581
spatial parameters for the sequential 2p2c test
Definition: test_dec2p2c_spatialparams.hh:64
test problem for the sequential 2p2c model
Definition: test_dec2p2cproblem.hh:92
void boundaryFormulation(typename Indices::BoundaryFormulation &bcFormulation, const Intersection &intersection) const
Flag for the type of Dirichlet conditions.
Definition: test_dec2p2cproblem.hh:186
Scalar referencePressureAtPos(const GlobalPosition &globalPos) const
Returns the reference pressure.
Definition: test_dec2p2cproblem.hh:156
void neumannAtPos(PrimaryVariables &neumannValues, const GlobalPosition &globalPos) const
Value for neumann boundary condition .
Definition: test_dec2p2cproblem.hh:224
bool shouldWriteRestartFile() const
Returns true if a restart file should be written.
Definition: test_dec2p2cproblem.hh:135
Scalar initConcentrationAtPos(const GlobalPosition &globalPos) const
Concentration initial condition (dimensionless)
Definition: test_dec2p2cproblem.hh:258
TestDecTwoPTwoCProblem(TimeManager &timeManager, Grid &grid)
Definition: test_dec2p2cproblem.hh:116
std::string name() const
The problem name.
Definition: test_dec2p2cproblem.hh:128
void dirichletAtPos(PrimaryVariables &bcValues, const GlobalPosition &globalPos) const
Values for dirichlet boundary condition for pressure and or for transport.
Definition: test_dec2p2cproblem.hh:199
void initialFormulation(typename Indices::BoundaryFormulation &initialFormulation, const Element &element) const
Flag for the type of initial conditions.
Definition: test_dec2p2cproblem.hh:251
void sourceAtPos(PrimaryVariables &sourceValues, const GlobalPosition &globalPos) const
Source of mass .
Definition: test_dec2p2cproblem.hh:239
void boundaryTypesAtPos(BoundaryTypes &bcTypes, const GlobalPosition &globalPos) const
Type of boundary condition.
Definition: test_dec2p2cproblem.hh:169
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
Returns the temperature within the domain.
Definition: test_dec2p2cproblem.hh:144
typename GET_PROP_TYPE(TypeTag, Scalar) Scalar
Definition: test_dec2p2cproblem.hh:70
Base class for sequential 2p2c compositional problems.