27#ifndef DUMUX_TWOPTWOC_MPNC_PROBLEM_HH
28#define DUMUX_TWOPTWOC_MPNC_PROBLEM_HH
30#include <dune/grid/yaspgrid.hh>
32#include <dune/common/parametertreeparser.hh>
48template <
class TypeTag>
60template<
class TypeTag>
61struct Grid<TypeTag,
TTag::TwoPTwoCComparison> {
using type = Dune::YaspGrid<2>; };
64template<
class TypeTag>
68template<
class TypeTag>
76template<
class TypeTag>
85template<
class TypeTag>
87template<
class TypeTag>
94template<
class TypeTag>
97template<
class TypeTag>
107template <
class TypeTag>
117 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
119 using Element =
typename GridView::template Codim<0>::Entity;
120 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
124 using Indices =
typename ModelTraits::Indices;
130 temperature_ = 273.15 + 25;
133 Scalar Tmin = temperature_ - 1.0;
134 Scalar Tmax = temperature_ + 1.0;
137 Scalar pmin = 1.0e5 * 0.75;
138 Scalar pmax = 2.0e5 * 1.25;
141 FluidSystem::init(Tmin, Tmax, nT, pmin, pmax, np);
163 {
return temperature_; }
174 BoundaryTypes bcTypes;
175 if (onOutlet_(globalPos))
176 bcTypes.setAllDirichlet();
178 bcTypes.setAllNeumann();
189 return initial_(globalPos);
198 NeumannFluxes values(0.0);
199 Scalar injectedAirMass = -1e-3;
200 Scalar injectedAirMolarMass = injectedAirMass/FluidSystem::molarMass(FluidSystem::N2Idx);
201 if (onInlet_(globalPos))
202 values[Indices::conti0EqIdx + FluidSystem::N2Idx] = injectedAirMolarMass;
218 return initial_(globalPos);
225 PrimaryVariables initial_(
const GlobalPosition &globalPos)
const
227 PrimaryVariables values(0.0);
228 values[Indices::pressureIdx] = 1e5;
229 values[Indices::switchIdx] = 0.8;
230 values.setState(Indices::bothPhases);
235 bool onInlet_(
const GlobalPosition &globalPos)
const
237 Scalar x = globalPos[0];
238 Scalar y = globalPos[1];
239 return x >= 60 - eps_ && y <= 10 + eps_;
242 bool onOutlet_(
const GlobalPosition &globalPos)
const
244 Scalar x = globalPos[0];
245 Scalar y = globalPos[1];
246 return x < eps_ && y <= 10 + eps_;
250 static constexpr Scalar eps_ = 1e-6;
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.
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
A two-phase fluid system with two components water Nitrogen for non-equilibrium models.
TwoPFormulation
Enumerates the formulations which the two-phase model accepts.
Definition formulation.hh:35
@ p1s0
first phase saturation and second phase pressure as primary variables
Definition formulation.hh:37
T getParam(Args &&... args)
A free function to get a parameter from the parameter tree singleton.
Definition parameters.hh:428
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
Definition common/properties.hh:47
Type tag for numeric models.
Definition grid.hh:35
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition common/fvproblem.hh:588
Property to specify the type of scalar values.
Definition common/properties.hh:53
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
A class helping models to define input and output fields.
Definition common/properties.hh:78
Property whether to use moles or kg as amount unit for balance equations.
Definition common/properties.hh:102
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
PorousMediumFlowProblem(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< SpatialParams > spatialParams, const std::string ¶mGroup="")
Constructor, passing the spatial parameters.
Definition dumux/porousmediumflow/problem.hh:67
Adds I/O fields specific to the two-phase two-component model.
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/iofields.hh:36
Problem where air is injected in a unsaturated porous medium.
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:109
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:172
NeumannFluxes neumannAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Neumann boundary segment.
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:196
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluates the initial value for a control volume.
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:216
TwoPTwoCComparisonProblem(std::shared_ptr< const GridGeometry > gridGeometry)
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:127
Scalar temperature() const
Returns the temperature .
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:162
PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Dirichlet oundary segment.
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:187
const std::string name() const
Returns the problem name.
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:155
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:54
std::tuple< TwoPTwoC > InheritsFrom
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:54
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:55
std::tuple< TwoPTwoCComparison, BoxModel > InheritsFrom
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:55
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:56
std::tuple< TwoPTwoCComparison, CCTpfaModel > InheritsFrom
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:56
Dune::YaspGrid< 2 > type
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:61
TwoPTwoCComparisonProblem< TypeTag > type
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:65
FluidSystems::H2ON2< GetPropType< TypeTag, Properties::Scalar >, FluidSystems::H2ON2DefaultPolicy< true > > type
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:71
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:79
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:80
TwoPTwoCComparisonSpatialParams< GridGeometry, Scalar > type
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:81
double type
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:86
static const TwoPFormulation value
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:91
static constexpr bool value
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:95
TwoPTwoCMPNCIOFields type
Definition test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh:98
The spatial parameters for the 2p2c mpnc comparison problem.
Definition porousmediumflow/2p2c/implicit/mpnccomparison/spatialparams.hh:45
Adaption of the fully implicit scheme to the two-phase two-component fully implicit model.
Adds I/O fields specific to the twop model.
Base class for all porous media problems.
The spatial parameters for the 2p2c mpnc comparison problem.