3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
tracerfluidsystem.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*****************************************************************************
4 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
25#ifndef DUMUX_TEST_TPFAFACETCOUPLING_TRACER_FLUIDSYSTEM_HH
26#define DUMUX_TEST_TPFAFACETCOUPLING_TRACER_FLUIDSYSTEM_HH
27
30
31namespace Dumux {
32
34template<class TypeTag>
35class TracerFluidSystem : public FluidSystems::Base<GetPropType<TypeTag, Properties::Scalar>,
36 TracerFluidSystem<TypeTag>>
37{
41 using Element = typename GridView::template Codim<0>::Entity;
42 using FVElementGeometry = typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView;
43 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
44
45public:
47 static constexpr bool isTracerFluidSystem()
48 { return true; }
49
51 static constexpr int getMainComponent(int phaseIdx)
52 { return -1; }
53
55 static constexpr int numComponents = 1;
56
58 static std::string componentName(int compIdx)
59 { return "tracer_" + std::to_string(compIdx); }
60
62 static std::string phaseName(int phaseIdx = 0)
63 { return "Groundwater"; }
64
66 static Scalar molarMass(unsigned int compIdx)
67 { return 0.300; }
68
71 static Scalar binaryDiffusionCoefficient(unsigned int compIdx,
72 const Problem& problem,
73 const Element& element,
74 const SubControlVolume& scv)
75 { return 0.0; }
76};
77
78} // end namespace Dumux
79
80#endif
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
Fluid system base class.
Definition: fluidsystems/base.hh:45
A simple fluid system with one tracer component.
Definition: tracerfluidsystem.hh:37
static constexpr int numComponents
The number of components.
Definition: tracerfluidsystem.hh:55
static Scalar binaryDiffusionCoefficient(unsigned int compIdx, const Problem &problem, const Element &element, const SubControlVolume &scv)
Definition: tracerfluidsystem.hh:71
static std::string componentName(int compIdx)
Human readable component name (index compIdx) (for vtk output)
Definition: tracerfluidsystem.hh:58
static Scalar molarMass(unsigned int compIdx)
Molar mass in kg/mol of the component with index compIdx.
Definition: tracerfluidsystem.hh:66
static constexpr int getMainComponent(int phaseIdx)
No component is the main component.
Definition: tracerfluidsystem.hh:51
static constexpr bool isTracerFluidSystem()
If the fluid system only contains tracer components.
Definition: tracerfluidsystem.hh:47
static std::string phaseName(int phaseIdx=0)
Human readable phase name (index phaseIdx) (for velocity vtk output)
Definition: tracerfluidsystem.hh:62
Declares all properties used in Dumux.
Fluid system base class.