version 3.10-dev
porousmediumflow/nonequilibrium/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//
13#ifndef DUMUX_NONEQUILBRIUM_OUTPUT_FIELDS_HH
14#define DUMUX_NONEQUILBRIUM_OUTPUT_FIELDS_HH
15
16#include <dumux/io/name.hh>
17
18namespace Dumux {
19
20template<class ModelTraits, class EquilibriumIOFields, bool enableThermalNonEquilibrium>
22
23template<class ModelTraits, class EquilibriumIOFields>
24using NonEquilibriumIOFields = NonEquilibriumIOFieldsImplementation<ModelTraits, EquilibriumIOFields, ModelTraits::enableThermalNonEquilibrium()>;
29template<class ModelTraits, class EquilibriumIOFields>
30class NonEquilibriumIOFieldsImplementation<ModelTraits, EquilibriumIOFields, true>
31{
32public:
33 template <class OutputModule>
34 static void initOutputModule(OutputModule& out)
35 {
36 using FluidSystem = typename OutputModule::VolumeVariables::FluidSystem;
37
38 EquilibriumIOFields::initOutputModule(out);
39 for (int i = 0; i < ModelTraits::numEnergyEqFluid(); ++i)
40 {
41 out.addVolumeVariable([i](const auto& v){ return v.temperatureFluid(i); },
42 IOName::fluidTemperature<FluidSystem>(i));
43 }
44
45 out.addVolumeVariable([](const auto& v){ return v.temperatureSolid(); },
47
48 for (int i = 0; i < ModelTraits::numFluidPhases(); ++i)
49 {
50 out.addVolumeVariable( [i](const auto& v){ return v.reynoldsNumber(i); }, "reynoldsNumber_" + FluidSystem::phaseName(i) );
51 out.addVolumeVariable( [i](const auto& v){ return v.nusseltNumber(i); }, "nusseltNumber_" + FluidSystem::phaseName(i) );
52 out.addVolumeVariable( [i](const auto& v){ return v.prandtlNumber(i); }, "prandtlNumber_" + FluidSystem::phaseName(i) );
53 }
54 }
55};
56
57template<class ModelTraits, class EquilibriumIOFields>
58class NonEquilibriumIOFieldsImplementation<ModelTraits, EquilibriumIOFields, false>
59{
60public:
61 template <class OutputModule>
62 static void initOutputModule(OutputModule& out)
63 {
64 using FluidSystem = typename OutputModule::VolumeVariables::FluidSystem;
65
66 EquilibriumIOFields::initOutputModule(out);
67
68 for (int i = 0; i < ModelTraits::numFluidPhases(); ++i)
69 {
70 out.addVolumeVariable( [i](const auto& v){ return v.reynoldsNumber(i); }, "reynoldsNumber_" + FluidSystem::phaseName(i) );
71 }
72 }
73};
74
75} // end namespace Dumux
76
77#endif
static void initOutputModule(OutputModule &out)
Definition: porousmediumflow/nonequilibrium/iofields.hh:62
static void initOutputModule(OutputModule &out)
Definition: porousmediumflow/nonequilibrium/iofields.hh:34
Definition: porousmediumflow/nonequilibrium/iofields.hh:21
A collection of input/output field names for common physical quantities.
std::string solidTemperature() noexcept
I/O name of solid temperature for non-equilibrium models.
Definition: name.hh:48
Definition: adapt.hh:17