24#ifndef DUMUX_TEST_IMPES_PROBLEM_HH
25#define DUMUX_TEST_IMPES_PROBLEM_HH
27#include <dune/grid/yaspgrid.hh>
50template<
class TypeTag>
87template<
class TypeTag>
119template<
class TypeTag>
122using ParentType = IMPESProblem2P<TypeTag>;
124using Grid =
typename GridView::Grid;
126using Indices =
typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices;
128using WettingPhase =
typename GET_PROP(TypeTag, FluidSystem)::WettingPhase;
130using TimeManager =
typename GET_PROP_TYPE(TypeTag, TimeManager);
134 dim = GridView::dimension, dimWorld = GridView::dimensionworld
139 nPhaseIdx = Indices::nPhaseIdx,
140 pwIdx = Indices::pwIdx,
141 swIdx = Indices::swIdx,
142 eqIdxPress = Indices::pressureEqIdx,
143 eqIdxSat = Indices::satEqIdx
148using Element =
typename GridView::Traits::template Codim<0>::Entity;
149using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
151using BoundaryTypes =
typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
152using SolutionTypes =
typename GET_PROP(TypeTag, SolutionTypes);
153using PrimaryVariables =
typename SolutionTypes::PrimaryVariables;
200void source(PrimaryVariables &values,
const Element& element)
const
214 if (globalPos[0] < eps_)
216 bcTypes.setAllDirichlet();
218 else if (globalPos[0] > this->
bBoxMax()[0] - eps_)
220 bcTypes.setNeumann(eqIdxPress);
221 bcTypes.setOutflow(eqIdxSat);
226 bcTypes.setAllNeumann();
231void dirichletAtPos(PrimaryVariables &values,
const GlobalPosition& globalPos)
const
234 if (globalPos[0] < eps_)
241 values[pwIdx] = (2e5 + (this->
bBoxMax()[dim-1] - globalPos[dim-1])
242 * WettingPhase::density(temp, pRef)
259void neumannAtPos(PrimaryVariables &values,
const GlobalPosition& globalPos)
const
262 if (globalPos[0] > this->
bBoxMax()[0] - eps_)
264 values[nPhaseIdx] = 3e-4;
269 const Element& element)
const
277static constexpr Scalar eps_ = 1e-6;
#define GET_PROP(TypeTag, PropTagName)
Definition propertysystemmacros.hh:281
#define GET_PROP_TYPE(TypeTag, PropTagName)
Definition propertysystemmacros.hh:283
#define NEW_TYPE_TAG(...)
Definition propertysystemmacros.hh:130
Provides a parallel linear solver based on the ISTL AMG preconditioner and the ISTL BiCGSTAB solver.
A much simpler (and thus potentially less buggy) version of pure water.
A liquid phase consisting of a single component.
Class for defining the diffusive capillary pressure term of a 2p saturation equation.
Cfl-flux-function to evaluate a Cfl-Condition after Coats 2003.
Class for defining the gravity term of a two-phase flow saturation equation.
spatial parameters for the sequential 2p test
ParallelAMGBackend< GetPropType< TypeTag, Properties::GridView >, AmgTraits< GetPropType< TypeTag, Properties::JacobianMatrix >, GetPropType< TypeTag, Properties::SolutionVector >, GetPropType< TypeTag, Properties::GridGeometry > > > AMGBackend
A linear solver based on the ISTL AMG preconditioner and the ISTL BiCGSTAB solver.
Definition amgbackend.hh:224
T getParam(Args &&... args)
A free function to get a parameter from the parameter tree singleton.
Definition parameters.hh:428
#define INHERITS_FROM(...)
Syntactic sugar for NEW_TYPE_TAG.
Definition propertysystemmacros.hh:142
#define SET_TYPE_PROP(EffTypeTagName, PropTagName,...)
Set a property which defines a type.
Definition propertysystemmacros.hh:232
make the local view function available whenever we use the grid geometry
Definition adapt.hh:29
Definition common/properties.hh:47
Type tag TestIMPESSpatialParams
Definition test_impesspatialparams.hh:42
Property tag EvalCflFluxFunction
Type of the evaluation of the CFL-condition.
Definition transportproperties.hh:50
Type tag for numeric models.
Definition grid.hh:35
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
TODO: Remove this property as soon as the decoupled models are integrated.
Definition common/properties.hh:95
The type of the fluid system to use.
Definition common/properties.hh:223
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
const GravityVector & gravity() const
Returns the acceleration due to gravity.
Definition dumux/porousmediumflow/2p/sequential/impes/problem.hh:167
Cfl-flux-function to evaluate a Cfl-Condition after Coats 2003.
Definition evalcflfluxcoats.hh:40
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
test problem for the sequential 2p model
Definition test_impesproblem.hh:121
void initial(PrimaryVariables &values, const Element &element) const
return initial solution -> only saturation values have to be given!
Definition test_impesproblem.hh:268
bool shouldWriteRestartFile() const
Definition test_impesproblem.hh:177
void neumannAtPos(PrimaryVariables &values, const GlobalPosition &globalPos) const
set neumann condition for phases (flux, [kg/(m^2 s)])
Definition test_impesproblem.hh:259
void dirichletAtPos(PrimaryVariables &values, const GlobalPosition &globalPos) const
set dirichlet condition (pressure [Pa], saturation [-])
Definition test_impesproblem.hh:231
const std::string name() const
The problem name.
Definition test_impesproblem.hh:172
void source(PrimaryVariables &values, const Element &element) const
Definition test_impesproblem.hh:200
IMPESTestProblem(TimeManager &timeManager, Grid &grid)
Definition test_impesproblem.hh:156
void boundaryTypesAtPos(BoundaryTypes &bcTypes, const GlobalPosition &globalPos) const
Returns the type of boundary condition.
Definition test_impesproblem.hh:212
Scalar referencePressureAtPos(const GlobalPosition &globalPos) const
Returns the reference pressure for evaluation of constitutive relations.
Definition test_impesproblem.hh:195
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
Returns the temperature within the domain.
Definition test_impesproblem.hh:187
typename GET_PROP_TYPE(TypeTag, Scalar) Scalar
Definition test_impesproblem.hh:90
FluidSystems::TwoPImmiscible< Scalar, WettingPhase, NonwettingPhase > type
Definition test_impesproblem.hh:93
FluidSystems::OnePLiquid< Scalar, Components::SimpleH2O< Scalar > > NonwettingPhase
Definition test_impesproblem.hh:92
FluidSystems::OnePLiquid< Scalar, Components::SimpleH2O< Scalar > > WettingPhase
Definition test_impesproblem.hh:91
Specifies the properties for immiscible 2p transport.
Base class for all 2-phase problems which use an IMPES algorithm.
Defines the properties required for finite volume pressure models in a two-phase sequential model.