version 3.8
freeflow/rans/twoeq/lowrekepsilon/iofields.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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_LOWREKEPSILON_IO_FIELDS_HH
13#define DUMUX_LOWREKEPSILON_IO_FIELDS_HH
14
16
17namespace Dumux {
18
24{
26 template <class OutputModule>
27 static void initOutputModule(OutputModule& out)
28 {
30 out.addVolumeVariable([](const auto& v){ return v.turbulentKineticEnergy(); }, "k");
31 out.addVolumeVariable([](const auto& v){ return v.dissipationTilde(); }, "epsilon");
32 }
33
35 template <class ModelTraits, class FluidSystem>
36 static std::string primaryVariableName(int pvIdx = 0, int state = 0)
37 {
38 if (pvIdx < ModelTraits::dim() + ModelTraits::numFluidComponents())
39 return RANSIOFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
40 else if (pvIdx == ModelTraits::dim() + ModelTraits::numFluidComponents())
41 return "k";
42 else
43 return "epsilon";
44 }
45};
46
47} // end namespace Dumux
48
49#endif
Definition: adapt.hh:17
Adds I/O fields for the low-Re k-epsilon turbulence model.
Definition: freeflow/rans/twoeq/lowrekepsilon/iofields.hh:24
static std::string primaryVariableName(int pvIdx=0, int state=0)
return the names of the primary variables
Definition: freeflow/rans/twoeq/lowrekepsilon/iofields.hh:36
static void initOutputModule(OutputModule &out)
Initialize the LowReKEpsilon specific output fields.
Definition: freeflow/rans/twoeq/lowrekepsilon/iofields.hh:27
static void initOutputModule(OutputModule &out)
Initialize the RANS specific output fields.
Definition: freeflow/rans/iofields.hh:27