3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
dumux/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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
25#ifndef DUMUX_NONEQUILBRIUM_OUTPUT_FIELDS_HH
26#define DUMUX_NONEQUILBRIUM_OUTPUT_FIELDS_HH
27
28#include <dumux/io/name.hh>
29
30namespace Dumux {
31
32template<class ModelTraits, class EquilibriumIOFields, bool enableThermalNonEquilibrium>
34
35template<class ModelTraits, class EquilibriumIOFields>
36using NonEquilibriumIOFields = NonEquilibriumIOFieldsImplementation<ModelTraits, EquilibriumIOFields, ModelTraits::enableThermalNonEquilibrium()>;
41template<class ModelTraits, class EquilibriumIOFields>
42class NonEquilibriumIOFieldsImplementation<ModelTraits, EquilibriumIOFields, true>
43{
44public:
45 template <class OutputModule>
46 static void initOutputModule(OutputModule& out)
47 {
48 using FluidSystem = typename OutputModule::VolumeVariables::FluidSystem;
49
50 EquilibriumIOFields::initOutputModule(out);
51 for (int i = 0; i < ModelTraits::numEnergyEqFluid(); ++i)
52 {
53 out.addVolumeVariable([i](const auto& v){ return v.temperatureFluid(i); },
54 IOName::fluidTemperature<FluidSystem>(i));
55 }
56
57 out.addVolumeVariable([](const auto& v){ return v.temperatureSolid(); },
59
60 for (int i = 0; i < ModelTraits::numFluidPhases(); ++i)
61 {
62 out.addVolumeVariable( [i](const auto& v){ return v.reynoldsNumber(i); }, "reynoldsNumber_" + FluidSystem::phaseName(i) );
63 out.addVolumeVariable( [i](const auto& v){ return v.nusseltNumber(i); }, "nusseltNumber_" + FluidSystem::phaseName(i) );
64 out.addVolumeVariable( [i](const auto& v){ return v.prandtlNumber(i); }, "prandtlNumber_" + FluidSystem::phaseName(i) );
65 }
66 }
67};
68
69template<class ModelTraits, class EquilibriumIOFields>
70class NonEquilibriumIOFieldsImplementation<ModelTraits, EquilibriumIOFields, false>
71{
72public:
73 template <class OutputModule>
74 static void initOutputModule(OutputModule& out)
75 {
76 using FluidSystem = typename OutputModule::VolumeVariables::FluidSystem;
77
78 EquilibriumIOFields::initOutputModule(out);
79
80 for (int i = 0; i < ModelTraits::numFluidPhases(); ++i)
81 {
82 out.addVolumeVariable( [i](const auto& v){ return v.reynoldsNumber(i); }, "reynoldsNumber_" + FluidSystem::phaseName(i) );
83 }
84 }
85};
86
87} // end namespace Dumux
88
89#endif
A collection of input/output field names for common physical quantities.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
std::string solidTemperature() noexcept
I/O name of solid temperature for non-equilibrium models.
Definition: name.hh:60
Definition: dumux/porousmediumflow/nonequilibrium/iofields.hh:33
static void initOutputModule(OutputModule &out)
Definition: dumux/porousmediumflow/nonequilibrium/iofields.hh:46
static void initOutputModule(OutputModule &out)
Definition: dumux/porousmediumflow/nonequilibrium/iofields.hh:74