27#ifndef DUMUX_KUEVETTE3P3CNIPROBLEM_HH
28#define DUMUX_KUEVETTE3P3CNIPROBLEM_HH
30#include <dune/common/float_cmp.hh>
31#include <dune/grid/yaspgrid.hh>
52template <
class TypeTag>
64template<
class TypeTag>
65struct Grid<TypeTag,
TTag::Kuevette> {
using type = Dune::YaspGrid<2>; };
68template<
class TypeTag>
72template<
class TypeTag>
81template<
class TypeTag>
115template <
class TypeTag >
127 pressureIdx = Indices::pressureIdx,
128 switch1Idx = Indices::switch1Idx,
129 switch2Idx = Indices::switch2Idx,
130 temperatureIdx = Indices::temperatureIdx,
131 contiWEqIdx = Indices::conti0EqIdx + FluidSystem::wCompIdx,
132 contiGEqIdx = Indices::conti0EqIdx + FluidSystem::gCompIdx,
133 contiNEqIdx = Indices::conti0EqIdx + FluidSystem::nCompIdx,
134 energyEqIdx = Indices::energyEqIdx,
137 threePhases = Indices::threePhases,
138 wgPhaseOnly = Indices::wgPhaseOnly,
141 dimWorld = GridView::dimensionworld
147 using Element =
typename GridView::template Codim<0>::Entity;
151 using ElementVolumeVariables =
typename GridVariables::GridVolumeVariables::LocalView;
152 using ElementFluxVariablesCache =
typename GridVariables::GridFluxVariablesCache::LocalView;
153 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
155 using GlobalPosition =
typename SubControlVolumeFace::GlobalPosition;
193 BoundaryTypes bcTypes;
194 if(globalPos[0] > this->
gridGeometry().bBoxMax()[0] - eps_)
195 bcTypes.setAllDirichlet();
197 bcTypes.setAllNeumann();
210 return initial_(globalPos);
226 const FVElementGeometry& fvGeometry,
227 const ElementVolumeVariables& elemVolVars,
228 const ElementFluxVariablesCache& elemFluxVarsCache,
229 const SubControlVolumeFace& scvf)
const
231 NumEqVector values(0.0);
232 const auto& globalPos = scvf.ipGlobal();
235 if (globalPos[0] < eps_)
237 values[contiWEqIdx] = -0.1435;
238 values[contiGEqIdx] = -0.2;
239 values[contiNEqIdx] = 0.0;
240 values[energyEqIdx] = -6929.;
262 return initial_(globalPos);
272 template<
class VTKWriter>
276 Kxx_.resize(gg.numDofs());
277 vtk.addField(Kxx_,
"permeability");
279 for (
const auto& element : elements(this->gridView()))
282 fvGeometry.bindElement(element);
284 for (
const auto& scv : scvs(fvGeometry))
285 Kxx_[scv.dofIndex()] = this->
spatialParams().intrinsicPermeabilityAtPos(scv.dofPosition());
291 bool isInContaminationZone(
const GlobalPosition &globalPos)
const
293 return (Dune::FloatCmp::ge<Scalar>(globalPos[0], 0.2)
294 && Dune::FloatCmp::le<Scalar>(globalPos[0], 0.8)
295 && Dune::FloatCmp::ge<Scalar>(globalPos[1], 0.4)
296 && Dune::FloatCmp::le<Scalar>(globalPos[1], 0.65));
301 PrimaryVariables initial_(
const GlobalPosition &globalPos)
const
303 PrimaryVariables values;
304 if (isInContaminationZone(globalPos))
305 values.setState(threePhases);
307 values.setState(wgPhaseOnly);
309 values[pressureIdx] = 1e5 ;
310 values[switch1Idx] = 0.12;
311 values[switch2Idx] = 1.e-6;
312 values[temperatureIdx] = 293.0;
314 if (isInContaminationZone(globalPos))
316 values[switch2Idx] = 0.07;
321 static constexpr Scalar eps_ = 1e-6;
323 std::vector<Scalar> Kxx_;
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.
Setting constant fluid properties via the input file.
A three-phase fluid system featuring gas, NAPL and water as phases and distilled water and air (Pseu...
GridCache::LocalView localView(const GridCache &gridCache)
Free function to get the local view of a grid cache object.
Definition localview.hh:38
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
Type tag for numeric models.
Definition grid.hh:35
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
A three-phase fluid system featuring gas, NAPL and water as phases and distilled water and air (Pseu...
Definition h2oairmesitylene.hh:57
SpatialParams & spatialParams()
Returns the spatial parameters object.
Definition dumux/porousmediumflow/problem.hh:146
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
Non-isothermal gas injection problem where a gas (e.g. steam/air) is injected into a unsaturated poro...
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:117
const std::string name() const
The problem name.
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:175
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluates the initial value for a control volume.
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:260
KuevetteProblem(std::shared_ptr< const GridGeometry > gridGeometry)
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:158
PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const
Evaluates the boundary conditions for a Dirichlet boundary segment.
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:208
void addVtkFields(VTKWriter &vtk)
Appends all quantities of interest which can be derived from the solution of the current time step to...
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:273
NumEqVector neumann(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVariablesCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
Evaluates the boundary conditions for a N eumann boundary segment.
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:225
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/3p3c/implicit/kuevette/problem.hh:191
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:58
std::tuple< ThreePThreeCNI > InheritsFrom
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:58
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:59
std::tuple< Kuevette, BoxModel > InheritsFrom
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:59
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:60
std::tuple< Kuevette, CCTpfaModel > InheritsFrom
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:60
Dune::YaspGrid< 2 > type
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:65
KuevetteProblem< TypeTag > type
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:69
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:75
KuevetteSpatialParams< GridGeometry, Scalar > type
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:77
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:76
FluidSystems::H2OAirMesitylene< GetPropType< TypeTag, Properties::Scalar > > type
Definition test/porousmediumflow/3p3c/implicit/kuevette/problem.hh:83
Definition of the spatial parameters for the kuevette problem.
Definition porousmediumflow/3p3c/implicit/kuevette/spatialparams.hh:46
Adaption of the fully implicit scheme to the three-phase three-component flow model.
Base class for all porous media problems.
Definition of the spatial parameters for the kuevette problem.