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-FileCopyrightText: 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 LowReKEpsilonModel | ||
10 | * \copydoc Dumux::LowReKEpsilonIOFields | ||
11 | */ | ||
12 | #ifndef DUMUX_LOWREKEPSILON_IO_FIELDS_HH | ||
13 | #define DUMUX_LOWREKEPSILON_IO_FIELDS_HH | ||
14 | |||
15 | #include <dumux/freeflow/rans/iofields.hh> | ||
16 | |||
17 | namespace Dumux { | ||
18 | |||
19 | /*! | ||
20 | * \ingroup LowReKEpsilonModel | ||
21 | * \brief Adds I/O fields for the low-Re k-epsilon turbulence model | ||
22 | */ | ||
23 | struct LowReKEpsilonIOFields | ||
24 | { | ||
25 | //! Initialize the LowReKEpsilon specific output fields. | ||
26 | template <class OutputModule> | ||
27 | 12 | static void initOutputModule(OutputModule& out) | |
28 | { | ||
29 | 12 | RANSIOFields::initOutputModule(out); | |
30 |
1/2✓ Branch 2 taken 8 times.
✗ Branch 3 not taken.
|
124 | out.addVolumeVariable([](const auto& v){ return v.turbulentKineticEnergy(); }, "k"); |
31 |
1/2✓ Branch 2 taken 8 times.
✗ Branch 3 not taken.
|
124 | out.addVolumeVariable([](const auto& v){ return v.dissipationTilde(); }, "epsilon"); |
32 | 12 | } | |
33 | |||
34 | //! return the names of the primary variables | ||
35 | template <class ModelTraits, class FluidSystem> | ||
36 | 32 | static std::string primaryVariableName(int pvIdx = 0, int state = 0) | |
37 | { | ||
38 |
0/2✗ Branch 0 not taken.
✗ Branch 1 not taken.
|
32 | if (pvIdx < ModelTraits::dim() + ModelTraits::numFluidComponents()) |
39 | 16 | return RANSIOFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state); | |
40 |
0/2✗ Branch 0 not taken.
✗ Branch 1 not taken.
|
16 | else if (pvIdx == ModelTraits::dim() + ModelTraits::numFluidComponents()) |
41 | 8 | return "k"; | |
42 | else | ||
43 | 8 | return "epsilon"; | |
44 | } | ||
45 | }; | ||
46 | |||
47 | } // end namespace Dumux | ||
48 | |||
49 | #endif | ||
50 |