3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
dumux/freeflow/rans/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 *****************************************************************************/
24#ifndef DUMUX_RANS_IO_FIELDS_HH
25#define DUMUX_RANS_IO_FIELDS_HH
26
28
29namespace Dumux {
30
36{
38 template <class OutputModule>
39 static void initOutputModule(OutputModule& out)
40 {
42
43 static constexpr auto dim = decltype(std::declval<typename OutputModule::VolumeVariables>().velocity())::dimension;
44
45 out.addVolumeVariable([](const auto& v){ return v.velocity()[0] / v.velocityMaximum()[0]; }, "v_x/v_x,max");
46 out.addVolumeVariable([](const auto& v){ return v.velocityGradients()[0]; }, "dv_x/dx_");
47 if (dim > 1)
48 out.addVolumeVariable([](const auto& v){ return v.velocityGradients()[1]; }, "dv_y/dx_");
49 if (dim > 2)
50 out.addVolumeVariable([](const auto& v){ return v.velocityGradients()[2]; }, "dv_z/dx_");
51 out.addVolumeVariable([](const auto& v){ return v.pressure() - 1e5; }, "p_rel");
52 out.addVolumeVariable([](const auto& v){ return v.viscosity() / v.density(); }, "nu");
53 out.addVolumeVariable([](const auto& v){ return v.kinematicEddyViscosity(); }, "nu_t");
54 out.addVolumeVariable([](const auto& v){ return v.wallDistance(); }, "l_w");
55 out.addVolumeVariable([](const auto& v){ return v.yPlus(); }, "y^+");
56 out.addVolumeVariable([](const auto& v){ return v.uPlus(); }, "u^+");
57 }
58
60 template <class ModelTraits, class FluidSystem>
61 static std::string primaryVariableName(int pvIdx = 0, int state = 0)
62 {
63 return NavierStokesIOFields::template primaryVariableName<ModelTraits, FluidSystem>(pvIdx, state);
64 }
65};
66
67} // end namespace Dumux
68
69#endif
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
static void initOutputModule(OutputModule &out)
Initialize the Navier-Stokes specific output fields.
Definition: dumux/freeflow/navierstokes/iofields.hh:91
Adds I/O fields for the Reynolds-Averaged Navier-Stokes model.
Definition: dumux/freeflow/rans/iofields.hh:36
static std::string primaryVariableName(int pvIdx=0, int state=0)
return the names of the primary variables
Definition: dumux/freeflow/rans/iofields.hh:61
static void initOutputModule(OutputModule &out)
Initialize the RANS specific output fields.
Definition: dumux/freeflow/rans/iofields.hh:39