24#ifndef DUMUX_TEST_IMPES_ADAPTIVE_PROBLEM_HH
25#define DUMUX_TEST_IMPES_ADAPTIVE_PROBLEM_HH
28#include <dune/alugrid/grid.hh>
45template<
class TypeTag>
46class TestIMPESAdaptiveProblem;
58SET_TYPE_PROP(TestIMPESAdaptive,
Grid, Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>);
65template<
class TypeTag>
87template<
class TypeTag>
94 using Indices =
typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices;
96 using WettingPhase =
typename GET_PROP(TypeTag, FluidSystem)::WettingPhase;
98 using TimeManager =
typename GET_PROP_TYPE(TypeTag, TimeManager);
102 dim = GridView::dimension, dimWorld = GridView::dimensionworld
107 nPhaseIdx = Indices::nPhaseIdx,
108 pwIdx = Indices::pwIdx,
109 swIdx = Indices::swIdx,
110 eqIdxPress = Indices::pressureEqIdx,
111 eqIdxSat = Indices::satEqIdx
116 using Element =
typename GridView::Traits::template Codim<0>::Entity;
117 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
119 using BoundaryTypes =
typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
120 using SolutionTypes =
typename GET_PROP(TypeTag, SolutionTypes);
121 using PrimaryVariables =
typename SolutionTypes::PrimaryVariables;
127 name_ = getParam<std::string>(
"Problem.Name");
132 grid.globalRefine(getParam<int>(
"GridAdapt.MaxLevel"));
146 const std::string&
name()
const
174 void source(PrimaryVariables &values,
const Element& element)
const
188 if (globalPos[0] < eps_)
190 bcTypes.setAllDirichlet();
192 else if (globalPos[0] > this->
bBoxMax()[0] - eps_)
194 bcTypes.setNeumann(eqIdxPress);
195 bcTypes.setOutflow(eqIdxSat);
200 bcTypes.setAllNeumann();
205 void dirichletAtPos(PrimaryVariables &values,
const GlobalPosition& globalPos)
const
208 if (globalPos[0] < eps_)
210 if (getParam<bool>(
"Problem.EnableGravity"))
231 void neumannAtPos(PrimaryVariables &values,
const GlobalPosition& globalPos)
const
234 if (globalPos[0] > this->
bBoxMax()[0] - eps_)
236 values[nPhaseIdx] = 3e-4;
240 void initial(PrimaryVariables &values,
const Element& element)
const
247 static 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
A much simpler (and thus potentially less buggy) version of pure water.
A liquid phase consisting of a single component.
Cfl-flux-function to evaluate a Cfl-Condition after Coats 2003.
spatial parameters for the sequential 2p test
bool hasParam(const std::string ¶m)
Check whether a key exists in the parameter tree.
Definition: parameters.hh:446
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
SET_TYPE_PROP(FVPressureOneP, Velocity, FVVelocity1P< TypeTag >)
Set velocity reconstruction implementation standard cell centered finite volume schemes as default.
Type tag FVPressureOneP INHERITS_FROM(PressureOneP))
The type tag for the one-phase problems using a standard finite volume model.
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.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
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
Base class for all 2-phase problems which use an IMPES algorithm.
Definition: dumux/porousmediumflow/2p/sequential/impes/problem.hh:41
const GravityVector & gravity() const
Returns the acceleration due to gravity.
Definition: dumux/porousmediumflow/2p/sequential/impes/problem.hh:167
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
void setOutputInterval(const int interval)
Sets the interval for Output.
Definition: impetproblem.hh:492
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_impesadaptiveproblem.hh:89
void neumannAtPos(PrimaryVariables &values, const GlobalPosition &globalPos) const
set neumann condition for phases (flux, [kg/(m^2 s)])
Definition: test_impesadaptiveproblem.hh:231
void source(PrimaryVariables &values, const Element &element) const
Definition: test_impesadaptiveproblem.hh:174
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
Returns the temperature within the domain.
Definition: test_impesadaptiveproblem.hh:161
void boundaryTypesAtPos(BoundaryTypes &bcTypes, const GlobalPosition &globalPos) const
Returns the type of boundary condition.
Definition: test_impesadaptiveproblem.hh:186
bool shouldWriteRestartFile() const
Definition: test_impesadaptiveproblem.hh:151
const std::string & name() const
The problem name.
Definition: test_impesadaptiveproblem.hh:146
void initial(PrimaryVariables &values, const Element &element) const
return initial solution -> only saturation values have to be given!
Definition: test_impesadaptiveproblem.hh:240
Scalar referencePressureAtPos(const GlobalPosition &globalPos) const
Returns the reference pressure for evaluation of constitutive relations.
Definition: test_impesadaptiveproblem.hh:169
TestIMPESAdaptiveProblem(TimeManager &timeManager, Grid &grid)
Definition: test_impesadaptiveproblem.hh:124
void dirichletAtPos(PrimaryVariables &values, const GlobalPosition &globalPos) const
set dirichlet condition (pressure [Pa], saturation [-])
Definition: test_impesadaptiveproblem.hh:205
typename GET_PROP_TYPE(TypeTag, Scalar) Scalar
Definition: test_impesadaptiveproblem.hh:68
spatial parameters for the sequential 2p test
Definition: test_impesadaptivespatialparams.hh:65
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.