version 3.8
freeflow/nonisothermal/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_FREEFLOW_NI_IO_FIELDS_HH
13#define DUMUX_FREEFLOW_NI_IO_FIELDS_HH
14
15
16#include <dumux/io/name.hh>
17
18namespace Dumux {
19
24template<class IsothermalIOFields, bool turbulenceModel = false>
26{
27
29 template <class OutputModule>
30 static void initOutputModule(OutputModule& out)
31 {
32 IsothermalIOFields::initOutputModule(out);
33
34 out.addVolumeVariable([](const auto& v){ return v.temperature(); }, IOName::temperature());
35 out.addVolumeVariable([](const auto& v){ return v.thermalConductivity(); }, "lambda");
36 if (turbulenceModel)
37 out.addVolumeVariable([](const auto& v){ return v.effectiveThermalConductivity() - v.thermalConductivity(); }, "lambda_t");
38 }
39
41 template<class ModelTraits, class FluidSystem = void>
42 static std::string primaryVariableName(int pvIdx, int state = 0)
43 {
44 if (pvIdx < ModelTraits::numEq() - 1)
45 return IsothermalIOFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
46 else
47 return IOName::temperature();
48 }
49};
50
51} // end namespace Dumux
52
53#endif
A collection of input/output field names for common physical quantities.
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:39
Definition: adapt.hh:17
Adds I/O fields specific to non-isothermal free-flow models.
Definition: freeflow/nonisothermal/iofields.hh:26
static std::string primaryVariableName(int pvIdx, int state=0)
return the names of the primary variables
Definition: freeflow/nonisothermal/iofields.hh:42
static void initOutputModule(OutputModule &out)
Add the non-isothermal specific output fields.
Definition: freeflow/nonisothermal/iofields.hh:30