24#ifndef DUMUX_TEST_TRANSPORT_PROBLEM_HH
25#define DUMUX_TEST_TRANSPORT_PROBLEM_HH
27#include <dune/grid/yaspgrid.hh>
28#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
44template<
class TypeTag>
45class TestTransportProblem;
61template<
class TypeTag>
89template<
class TypeTag>
94 using Grid =
typename GridView::Grid;
96 using Indices =
typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices;
98 using TimeManager =
typename GET_PROP_TYPE(TypeTag, TimeManager);
99 using BoundaryTypes =
typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
100 using SolutionTypes =
typename GET_PROP(TypeTag, SolutionTypes);
101 using PrimaryVariables =
typename SolutionTypes::PrimaryVariables;
107 dimWorld = GridView::dimensionworld
112 wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx
117 using Element =
typename GridView::template Codim<0>::Entity;
118 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
119 using VelocityVector = Dune::FieldVector<Scalar, dimWorld>;
131 VelocityVector vel(0);
135 for (
const auto& element : elements(this->
gridView()))
140 CellData& cellData = this->
variables().cellData(eIdxGlobal);
146 int indexInInside = intersection.indexInInside();
148 cellData.fluxData().setVelocity(wPhaseIdx, indexInInside, vel);
150 const GlobalPosition& unitOuterNormal = intersection.centerUnitOuterNormal();
152 Scalar pot = vel * unitOuterNormal;
154 cellData.fluxData().setUpwindPotential(wPhaseIdx, indexInInside, pot);
155 cellData.fluxData().setUpwindPotential(nPhaseIdx, indexInInside, pot);
172 return "test_transport";
199 void sourceAtPos(PrimaryVariables &values,
const GlobalPosition& globalPos)
const
212 if (globalPos[0] < eps_)
214 bcTypes.setAllDirichlet();
216 else if (globalPos[0] > this->
bBoxMax()[0] - eps_)
218 bcTypes.setAllOutflow();
223 bcTypes.setAllNeumann();
228 void dirichletAtPos(PrimaryVariables &values,
const GlobalPosition& globalPos)
const
231 if (globalPos[0] < eps_)
238 void neumannAtPos(PrimaryVariables &values,
const GlobalPosition& globalPos)
const
245 const GlobalPosition &globalPos)
const
251 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
Setting constant fluid properties via the input file.
A liquid phase consisting of a single component.
spatial parameters for the explicit transport test
Dune::IteratorRange< typename MultiDomainGlue< DomainGridView, TargetGridView, DomainMapper, TargetMapper >::Intersections::const_iterator > intersections(const MultiDomainGlue< DomainGridView, TargetGridView, DomainMapper, TargetMapper > &glue)
Range generator to iterate with range-based for loops over all intersections as follows: for (const a...
Definition: glue.hh:62
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
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.
Type tag FVPressureOneP INHERITS_FROM(PressureOneP))
The type tag for the one-phase problems using a standard finite volume model.
Property tag VelocityFormulation
The type of velocity reconstructed for the transport model.
Definition: porousmediumflow/2p/sequential/properties.hh:54
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
static const int velocityTotal
Indicates total velocity.
Definition: porousmediumflow/2p/sequential/indices.hh:63
Base class for a sequential two-phase transport problem.
Definition: dumux/porousmediumflow/2p/sequential/transport/problem.hh:51
Base class for definition of an sequential diffusion (pressure) or transport problem.
Definition: onemodelproblem.hh:46
const ElementMapper & elementMapper() const
Returns the mapper for elements to indices.
Definition: onemodelproblem.hh:531
TimeManager & timeManager()
Returns TimeManager object used by the simulation.
Definition: onemodelproblem.hh:551
void init()
Called by the TimeManager in order to initialize the problem.
Definition: onemodelproblem.hh:327
const GlobalPosition & bBoxMax() const
The coordinate of the corner of the GridView's bounding box with the largest values.
Definition: onemodelproblem.hh:545
const GridView & gridView() const
The GridView which used by the problem.
Definition: onemodelproblem.hh:519
Variables & variables()
Returns variables object.
Definition: onemodelproblem.hh:563
test problem for the explicit transport model
Definition: test_transportproblem.hh:91
void neumannAtPos(PrimaryVariables &values, const GlobalPosition &globalPos) const
set neumann condition for phases (flux, [kg/(m^2 s)])
Definition: test_transportproblem.hh:238
bool shouldWriteRestartFile() const
Definition: test_transportproblem.hh:175
void boundaryTypesAtPos(BoundaryTypes &bcTypes, const GlobalPosition &globalPos) const
Returns the type of boundary condition.
Definition: test_transportproblem.hh:210
std::string name() const
The problem name.
Definition: test_transportproblem.hh:170
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
Returns the temperature within the domain.
Definition: test_transportproblem.hh:185
Scalar referencePressureAtPos(const GlobalPosition &globalPos) const
Returns the reference pressure for evaluation of constitutive relations.
Definition: test_transportproblem.hh:194
void sourceAtPos(PrimaryVariables &values, const GlobalPosition &globalPos) const
Definition: test_transportproblem.hh:199
void dirichletAtPos(PrimaryVariables &values, const GlobalPosition &globalPos) const
set dirichlet condition (saturation [-])
Definition: test_transportproblem.hh:228
TestTransportProblem(TimeManager &timeManager, Grid &grid)
Definition: test_transportproblem.hh:121
void init()
set initial velocity field -> v_total is assumed to be constant in this test!
Definition: test_transportproblem.hh:127
void initialAtPos(PrimaryVariables &values, const GlobalPosition &globalPos) const
return initial solution
Definition: test_transportproblem.hh:244
typename GET_PROP_TYPE(TypeTag, Scalar) Scalar
Definition: test_transportproblem.hh:64
spatial parameters for the explicit transport test
Definition: test_transportspatialparams.hh:68
Specifies the properties for immiscible 2p transport.
Base class for two-phase transport problems.