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 | * \file | ||
9 | * \ingroup TracerTests | ||
10 | * \brief A simple fluid system with two independent tracer components | ||
11 | */ | ||
12 | |||
13 | #ifndef DUMUX_TRACER_MULTIPHASE_TEST_FLUIDSYSTEM_HH | ||
14 | #define DUMUX_TRACER_MULTIPHASE_TEST_FLUIDSYSTEM_HH | ||
15 | |||
16 | #include <dumux/common/parameters.hh> | ||
17 | #include <dumux/material/fluidsystems/base.hh> | ||
18 | |||
19 | namespace Dumux::FluidSystems { | ||
20 | |||
21 | //! A simple fluid system with two independent tracer components | ||
22 | template<class Scalar> | ||
23 | class TracerTest : public Base<Scalar, TracerTest<Scalar>> | ||
24 | { | ||
25 | public: | ||
26 | static constexpr bool isTracerFluidSystem() | ||
27 | { return true; } | ||
28 | |||
29 | //! The number of components | ||
30 | static constexpr int numComponents = 2; | ||
31 | |||
32 | //! Human readable component name (index compIdx) (for vtk output) | ||
33 | 8 | static std::string componentName(int compIdx) | |
34 |
2/6✓ Branch 2 taken 8 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✓ Branch 5 taken 8 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
|
8 | { return "tracer_" + std::to_string(compIdx); } |
35 | |||
36 | //! Human readable phase name (index phaseIdx) (for velocity vtk output) | ||
37 | ✗ | static std::string phaseName(int phaseIdx = 0) | |
38 |
0/4✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
|
44 | { return "aq"; } |
39 | |||
40 | //! Molar mass in kg/mol of the component with index compIdx | ||
41 | ✗ | static Scalar molarMass(unsigned int compIdx) | |
42 | ✗ | { return 0.300; } | |
43 | |||
44 | //! Binary diffusion coefficient | ||
45 | //! (might depend on spatial parameters like pressure / temperature) | ||
46 | template<class Problem, class Element, class SubControlVolume> | ||
47 | 30853360 | static Scalar binaryDiffusionCoefficient(unsigned int compIdx, | |
48 | const Problem& problem, | ||
49 | const Element& element, | ||
50 | const SubControlVolume& scv) | ||
51 | { | ||
52 |
5/6✓ Branch 0 taken 24 times.
✓ Branch 1 taken 30853336 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 22 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
30853360 | static const Scalar D = getParam<Scalar>("Problem.D"); |
53 |
5/6✓ Branch 0 taken 26 times.
✓ Branch 1 taken 30853334 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 24 times.
✓ Branch 6 taken 2 times.
✗ Branch 7 not taken.
|
30853360 | static const Scalar D2 = getParam<Scalar>("Problem.D2"); |
54 |
2/2✓ Branch 0 taken 15426680 times.
✓ Branch 1 taken 15426680 times.
|
30853360 | if (compIdx == 0) |
55 | 15426680 | return D; | |
56 | else | ||
57 | 15426680 | return D2; | |
58 | } | ||
59 | |||
60 | /*! | ||
61 | * \copydoc Dumux::FluidSystems::Base::isCompressible | ||
62 | */ | ||
63 | static constexpr bool isCompressible(int phaseIdx) | ||
64 | { return false; } | ||
65 | |||
66 | /*! | ||
67 | * \copydoc Dumux::FluidSystems::Base::viscosityIsConstant | ||
68 | */ | ||
69 | static constexpr bool viscosityIsConstant(int phaseIdx) | ||
70 | { return true; } | ||
71 | }; | ||
72 | |||
73 | } // end namespace Dumux::FluidSystems | ||
74 | |||
75 | #endif | ||
76 |