25#ifndef DUMUX_CLOSEDSYSTEM_TEST_PROBLEM_HH
26#define DUMUX_CLOSEDSYSTEM_TEST_PROBLEM_HH
28#include <dune/grid/yaspgrid.hh>
38template <
class TypeTag>
39class ClosedSystemTestProblem;
48template<
class TypeTag>
56template<
class TypeTag>
57struct Grid<TypeTag, TTag::ClosedSystemTest> {
using type = Dune::YaspGrid<2>; };
60template<
class TypeTag>
63template<
class TypeTag>
66template<
class TypeTag>
68template<
class TypeTag>
81template <
class TypeTag>
88 using FVElementGeometry =
typename GridGeometry::LocalView;
89 using SubControlVolume =
typename GridGeometry::SubControlVolume;
96 using Element =
typename GridGeometry::GridView::template Codim<0>::Entity;
97 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
101 : ParentType(gridGeometry), eps_(1e-6)
103 lidVelocity_ = getParam<Scalar>(
"Problem.LidVelocity");
123 {
return 273.15 + 10; }
132 return NumEqVector(0.0);
148 BoundaryTypes values;
151 values.setDirichlet(Indices::velocityXIdx);
152 values.setDirichlet(Indices::velocityYIdx);
166 const FVElementGeometry& fvGeometry,
167 const SubControlVolume& scv,
170 auto isLowerLeftCell = [&](
const SubControlVolume& scv)
171 {
return scv.dofIndex() == 0; };
174 return (isLowerLeftCell(scv) && pvIdx == Indices::pressureIdx);
184 PrimaryVariables values;
185 values[Indices::pressureIdx] = 1.1e+5;
186 values[Indices::velocityXIdx] = 0.0;
187 values[Indices::velocityYIdx] = 0.0;
189 if(globalPos[1] > this->gridGeometry().bBoxMax()[1] - eps_)
190 values[Indices::velocityXIdx] = lidVelocity_;
202 PrimaryVariables values;
203 values[Indices::pressureIdx] = 1.0e+5;
204 values[Indices::velocityXIdx] = 0.0;
205 values[Indices::velocityYIdx] = 0.0;
Setting constant fluid properties via the input file.
A liquid phase consisting of a single component.
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
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: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 fluid system to use.
Definition: common/properties.hh:223
Navier-Stokes problem base class.
Definition: dumux/freeflow/navierstokes/problem.hh:63
A liquid phase consisting of a single component.
Definition: 1pliquid.hh:46
Test problem for the one-phase (Navier-) Stokes model.
Definition: test/freeflow/navierstokes/closedsystem/problem.hh:83
NumEqVector sourceAtPos(const GlobalPosition &globalPos) const
Returns the sources within the domain.
Definition: test/freeflow/navierstokes/closedsystem/problem.hh:130
bool isDirichletCell(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolume &scv, int pvIdx) const
Returns whether a fixed Dirichlet value shall be used at a given cell.
Definition: test/freeflow/navierstokes/closedsystem/problem.hh:165
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
Specifies which kind of boundary condition should be used for which equation on a given boundary cont...
Definition: test/freeflow/navierstokes/closedsystem/problem.hh:146
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluates the initial value for a control volume.
Definition: test/freeflow/navierstokes/closedsystem/problem.hh:200
PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const
Returns Dirichlet boundary values at a given position.
Definition: test/freeflow/navierstokes/closedsystem/problem.hh:182
Scalar temperature() const
Returns the temperature within the domain in [K].
Definition: test/freeflow/navierstokes/closedsystem/problem.hh:122
ClosedSystemTestProblem(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: test/freeflow/navierstokes/closedsystem/problem.hh:100
bool shouldWriteRestartFile() const
Definition: test/freeflow/navierstokes/closedsystem/problem.hh:112
Definition: test/freeflow/navierstokes/closedsystem/problem.hh:44
std::tuple< NavierStokes, StaggeredFreeFlowModel > InheritsFrom
Definition: test/freeflow/navierstokes/closedsystem/problem.hh:44
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: test/freeflow/navierstokes/closedsystem/problem.hh:51
Dune::YaspGrid< 2 > type
Definition: test/freeflow/navierstokes/closedsystem/problem.hh:57
Defines a type tag and some properties for ree-flow models using the staggered scheme....
A single-phase, isothermal Navier-Stokes model.