24#ifndef DUMUX_TWOPNC_DIFFUSION_PROBLEM_HH
25#define DUMUX_TWOPNC_DIFFUSION_PROBLEM_HH
27#include <dune/grid/yaspgrid.hh>
39#define DIFFUSIONTYPE FicksLaw<TypeTag>
44template <
class TypeTag>
45class TwoPNCDiffusionProblem;
55template<
class TypeTag>
56struct Grid<TypeTag, TTag::TwoPNCDiffusion> {
using type = Dune::YaspGrid<2>; };
59template<
class TypeTag>
63template<
class TypeTag>
71template<
class TypeTag>
80template<
class TypeTag>
81struct UseMoles<TypeTag, TTag::TwoPNCDiffusion> {
static constexpr bool value =
true; };
84template<
class TypeTag>
88template<
class TypeTag>
99template <
class TypeTag>
109 dim = GridView::dimension,
110 dimWorld = GridView::dimensionworld
117 using Element =
typename GridView::template Codim<0>::Entity;
118 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
122 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
131 name_ = getParam<std::string>(
"Problem.Name");
136 std::cout<<
"problem uses mole-fractions"<<std::endl;
140 std::cout<<
"problem uses mass-fractions"<<std::endl;
154 const std::string&
name()
const
178 BoundaryTypes bcTypes;
179 bcTypes.setAllDirichlet();
190 PrimaryVariables priVars;
191 priVars.setState(Indices::firstPhaseOnly);
192 priVars[Indices::pressureIdx] = 1e5;
193 priVars[Indices::switchIdx] = 1e-5 ;
195 if (globalPos[0] < this->
gridGeometry().bBoxMin()[0] + eps_)
196 priVars[Indices::switchIdx] = 1e-3;
212 NumEqVector values(0.0);
230 return initial_(globalPos);
243 PrimaryVariables initial_(
const GlobalPosition &globalPos)
const
245 PrimaryVariables priVars(0.0);
246 priVars.setState(Indices::firstPhaseOnly);
249 priVars[Indices::switchIdx] = 1e-5;
250 priVars[Indices::pressureIdx] = 1e5;
255 static constexpr Scalar eps_ = 1e-6;
Properties for all models using cell-centered finite volume scheme with mpfa.
Properties for all models using cell-centered finite volume scheme with TPFA.
This file contains the data which is required to calculate diffusive mass fluxes due to molecular dif...
@ p0s1
first phase pressure and second phase saturation as primary variables
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
Property whether to use moles or kg as amount unit for balance equations.
Definition: common/properties.hh:102
The type for the calculation of the molecular diffusion fluxes.
Definition: common/properties.hh:212
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
The formulation of the model.
Definition: common/properties.hh:237
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
Problem where air is injected under a low permeable layer in a depth of 2700m.
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:101
NumEqVector neumannAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Neumann boundary segment.
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:210
Scalar temperature() const
Returns the temperature [K].
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:160
PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Dirichlet boundary segment.
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:188
TwoPNCDiffusionProblem(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:125
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/2pnc/implicit/diffusion/problem.hh:176
const std::string & name() const
Returns the problem name.
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:154
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluates the initial values for a control volume.
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:228
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:50
std::tuple< TwoPNC > InheritsFrom
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:50
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:51
std::tuple< TwoPNCDiffusion, CCTpfaModel > InheritsFrom
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:51
Dune::YaspGrid< 2 > type
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:56
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:75
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:74
DIFFUSIONTYPE type
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:85
Definition of the spatial parameters for the TwoPNCDiffusion problem which uses the isothermal 2p2c b...
Definition: porousmediumflow/2pnc/implicit/diffusion/spatialparams.hh:46
Adaption of the fully implicit scheme to the two-phase n-component fully implicit model.
Base class for all porous media problems.
#define DIFFUSIONTYPE
Definition: test/porousmediumflow/2pnc/implicit/diffusion/problem.hh:39
Definition of the spatial parameters for the MaxwellStefan problem.