26#ifndef DUMUX_RICHARDS_EVAPORATION_PROBLEM_HH
27#define DUMUX_RICHARDS_EVAPORATION_PROBLEM_HH
30#include <dune/grid/yaspgrid.hh>
40#include "../spatialparams.hh"
48template <
class TypeTag>
49class RichardsNIEvaporationProblem;
60template<
class TypeTag>
61struct Grid<TypeTag, TTag::RichardsNIEvaporation> {
using type = Dune::YaspGrid<2>; };
64template<
class TypeTag>
68template<
class TypeTag>
72template<
class TypeTag>
80template<
class TypeTag>
96template <
class TypeTag>
104 using FVElementGeometry =
typename GridGeometry::LocalView;
105 using SubControlVolumeFace =
typename GridGeometry::SubControlVolumeFace;
112 using ElementVolumeVariables =
typename GridVariables::GridVolumeVariables::LocalView;
113 using ElementFluxVariablesCache =
typename GridVariables::GridFluxVariablesCache::LocalView;
114 using VolumeVariables =
typename GridVariables::GridVolumeVariables::VolumeVariables;
120 enum { dimWorld = GridView::dimensionworld };
123 pressureIdx = Indices::pressureIdx,
124 conti0EqIdx = Indices::conti0EqIdx,
125 temperatureIdx = Indices::temperatureIdx,
126 energyEqIdx = Indices::energyEqIdx
129 using Element =
typename GridView::template Codim<0>::Entity;
130 using GlobalPosition =
typename SubControlVolumeFace::GlobalPosition;
139 name_ = getParam<std::string>(
"Problem.Name");
141 temperatureInitial_ = 291;
154 const std::string&
name()
const
174 BoundaryTypes values;
175 if(globalPos[1] < eps_)
177 values.setAllDirichlet();
181 values.setAllNeumann();
195 return initial_(globalPos);
209 const FVElementGeometry& fvGeometry,
210 const ElementVolumeVariables& elemVolVars,
211 const ElementFluxVariablesCache& elemFluxVarsCache,
212 const SubControlVolumeFace& scvf)
const
214 NumEqVector values(0.0);
215 const auto globalPos = scvf.ipGlobal();
216 const auto& volVars = elemVolVars[scvf.insideScvIdx()];
217 Scalar boundaryLayerThickness = 0.0016;
219 if(globalPos[1] > this->
gridGeometry().bBoxMax()[1] - eps_)
221 values[conti0EqIdx] = 1e-3;
222 values[energyEqIdx] = FluidSystem::enthalpy( volVars.fluidState(), FluidSystem::gasPhaseIdx) * values[conti0EqIdx];
223 values[energyEqIdx] += FluidSystem::thermalConductivity(volVars.fluidState(), FluidSystem::gasPhaseIdx)
224 * (volVars.temperature() - temperatureInitial_)/boundaryLayerThickness;
256 return initial_(globalPos);
262 PrimaryVariables initial_(
const GlobalPosition &globalPos)
const
264 PrimaryVariables priVars(0.0);
265 priVars.setState(Indices::bothPhases);
266 priVars[pressureIdx] = pressure_;
267 priVars[temperatureIdx] = temperatureInitial_;
271 Scalar temperatureInitial_;
273 static constexpr Scalar eps_ = 1e-6;
Element solution classes and factory functions.
Defines a type tag and some properties for models using the box scheme.
Properties for all models using cell-centered finite volume scheme with TPFA.
Relation for the saturation-dependent effective thermal conductivity.
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
Base class for all finite-volume problems.
Definition: common/fvproblem.hh:50
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvproblem.hh:588
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 spatial parameters object.
Definition: common/properties.hh:221
The type of the fluid system to use.
Definition: common/properties.hh:223
Property for turning Richards into extended Richards.
Definition: common/properties.hh:258
Material properties of pure water .
Definition: h2o.hh:61
Policy for the H2O-N2 fluid system.
Definition: h2on2.hh:52
A two-phase fluid system with two components water Nitrogen for non-equilibrium models.
Definition: h2on2.hh:69
Base class for all fully implicit porous media problems.
Definition: dumux/porousmediumflow/problem.hh:39
Test for the RichardsModel in combination with the NI model for evaporation.
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:98
const std::string & name() const
The problem name.
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:154
NumEqVector neumann(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVariablesCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
Evaluates the boundary conditions for a Neumann boundary segment.
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:208
PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Dirichlet boundary segment.
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:193
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
Specifies which kind of boundary condition should be used for which equation on a given boundary segm...
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:172
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluates the initial value for a control volume.
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:254
Scalar nonWettingReferencePressure() const
Returns the reference pressure [Pa] of the non-wetting fluid phase within a finite volume.
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:243
RichardsNIEvaporationProblem(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:133
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:54
std::tuple< RichardsNI > InheritsFrom
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:54
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:55
std::tuple< RichardsNIEvaporation, BoxModel > InheritsFrom
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:55
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:56
std::tuple< RichardsNIEvaporation, CCTpfaModel > InheritsFrom
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:56
Dune::YaspGrid< 2 > type
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:61
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:75
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh:76
Definition: porousmediumflow/richards/implicit/nonisothermal/spatialparams.hh:40
This model implements a variant of the Richards' equation for quasi-twophase flow.
Base class for all porous media problems.