version 3.8
freeflow/rans/twoeq/kepsilon/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_KEPSILON_IO_FIELDS_HH
13#define DUMUX_KEPSILON_IO_FIELDS_HH
14
16
17namespace Dumux {
18
24{
26 template <class OutputModule>
27 static void initOutputModule(OutputModule& out)
28 {
30
31 out.addVolumeVariable([](const auto& v){ return v.turbulentKineticEnergy(); }, "k");
32 out.addVolumeVariable([](const auto& v){ return v.dissipation(); }, "epsilon");
33 out.addVolumeVariable([](const auto& v){ return v.yPlusNominal(); }, "y^+_nom");
34 out.addVolumeVariable([](const auto& v){ return v.uPlusNominal(); }, "u^+_nom");
35 out.addVolumeVariable([](const auto& v){ return v.inNearWallRegion(); }, "inNearWallRegion");
36 out.addVolumeVariable([](const auto& v){ return v.isMatchingPoint(); }, "isMatchingPoint");
37 }
38
40 template <class ModelTraits, class FluidSystem>
41 static std::string primaryVariableName(int pvIdx = 0, int state = 0)
42 {
43 if (pvIdx < ModelTraits::dim() + ModelTraits::numFluidComponents())
44 return RANSIOFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
45 else if (pvIdx == ModelTraits::dim() + ModelTraits::numFluidComponents())
46 return "k";
47 else
48 return "epsilon";
49 }
50};
51
52} // end namespace Dumux
53
54#endif
Definition: adapt.hh:17
Adds I/O fields for the k-epsilon turbulence model.
Definition: freeflow/rans/twoeq/kepsilon/iofields.hh:24
static std::string primaryVariableName(int pvIdx=0, int state=0)
return the names of the primary variables
Definition: freeflow/rans/twoeq/kepsilon/iofields.hh:41
static void initOutputModule(OutputModule &out)
Initialize the KEpsilon specific output fields.
Definition: freeflow/rans/twoeq/kepsilon/iofields.hh:27
static void initOutputModule(OutputModule &out)
Initialize the RANS specific output fields.
Definition: freeflow/rans/iofields.hh:27