Line | Branch | Exec | Source |
---|---|---|---|
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 | // SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder | ||
5 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
6 | // | ||
7 | |||
8 | #ifndef DUMUX_TRACER_FLUID_SYSTEM_HH | ||
9 | #define DUMUX_TRACER_FLUID_SYSTEM_HH | ||
10 | |||
11 | #include <dumux/common/parameters.hh> | ||
12 | #include <dumux/material/fluidsystems/base.hh> | ||
13 | |||
14 | namespace Dumux { | ||
15 | |||
16 | // A simple fluid system with one tracer component | ||
17 | template<class Scalar> | ||
18 | class TracerFluidSystem | ||
19 | : public FluidSystems::Base<Scalar, TracerFluidSystem<Scalar>> | ||
20 | { | ||
21 | public: | ||
22 | // If the fluid system only contains tracer components | ||
23 | static constexpr bool isTracerFluidSystem() { return true; } | ||
24 | |||
25 | // The number of components | ||
26 | static constexpr int numComponents = 1; | ||
27 | |||
28 | // Human readable phase name (liquid) | ||
29 | static std::string phaseName(int phaseIdx = 0) { return "l"; } | ||
30 | |||
31 | // Human readable component name | ||
32 | 4 | static std::string componentName(int compIdx = 0) | |
33 | { | ||
34 |
4/6✓ Branch 0 taken 1 times.
✓ Branch 1 taken 3 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
|
4 | static const std::string name = getParam<std::string>("Tracer.Name", "tracer"); |
35 | 4 | return name; | |
36 | } | ||
37 | |||
38 | // Molar mass in kg/mol of the component with index compIdx | ||
39 | ✗ | static Scalar molarMass(int compIdx) | |
40 | { | ||
41 | ✗ | static const Scalar molarMass = getParam<Scalar>("Tracer.MolarMass", 0.018); | |
42 | ✗ | return molarMass; | |
43 | } | ||
44 | |||
45 | // binary diffusion coefficient | ||
46 | template<class Problem, class Element, class SubControlVolume> | ||
47 | ✗ | static Scalar binaryDiffusionCoefficient(int compIdx, | |
48 | const Problem& problem, | ||
49 | const Element& element, | ||
50 | const SubControlVolume& scv) | ||
51 | { | ||
52 | ✗ | static const Scalar D = getParam<Scalar>("Tracer.DiffusionCoefficient"); | |
53 | ✗ | return D; | |
54 | } | ||
55 | }; | ||
56 | |||
57 | } // end namespace Dumux | ||
58 | |||
59 | #endif | ||
60 |