3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Loading...
Searching...
No Matches
porousmediumflow/richardsnc/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
25#ifndef DUMUX_RICHARDSNC_IO_FIELDS_HH
26#define DUMUX_RICHARDSNC_IO_FIELDS_HH
27
29#include <dumux/io/name.hh>
30
31namespace Dumux {
32
38{
39public:
40 template <class OutputModule>
41 static void initOutputModule(OutputModule& out)
42 {
43 using VolumeVariables = typename OutputModule::VolumeVariables;
44 using FS = typename VolumeVariables::FluidSystem;
45
46 out.addVolumeVariable([](const auto& v){ return v.saturation(VolumeVariables::liquidPhaseIdx); },
48 out.addVolumeVariable([](const auto& v){ return v.saturation(VolumeVariables::gasPhaseIdx); },
50 out.addVolumeVariable([](const auto& v){ return v.pressure(VolumeVariables::liquidPhaseIdx); },
52 out.addVolumeVariable([](const auto& v){ return v.pressure(VolumeVariables::gasPhaseIdx); },
54 out.addVolumeVariable([](const auto& v){ return v.capillaryPressure(); },
56 out.addVolumeVariable([](const auto& v){ return v.density(FS::liquidPhaseIdx); },
58 out.addVolumeVariable([](const auto& v){ return v.mobility(FS::liquidPhaseIdx); },
60 out.addVolumeVariable([](const auto& v){ return v.relativePermeability(VolumeVariables::liquidPhaseIdx); },
62 out.addVolumeVariable([](const auto& v){ return v.porosity(); },
64 out.addVolumeVariable([](const auto& v){ return v.temperature(); },
66
67 static const bool gravity = getParamFromGroup<bool>(out.paramGroup(), "Problem.EnableGravity");
68 if (gravity)
69 out.addVolumeVariable([](const auto& v){ return v.pressureHead(VolumeVariables::liquidPhaseIdx); },
71 out.addVolumeVariable([](const auto& v){ return v.waterContent(VolumeVariables::liquidPhaseIdx); },
73
74 for (int compIdx = 0; compIdx < VolumeVariables::numFluidComponents(); ++compIdx)
75 out.addVolumeVariable([compIdx](const auto& v){ return v.moleFraction(VolumeVariables::liquidPhaseIdx, compIdx); },
76 IOName::moleFraction<FS>(VolumeVariables::liquidPhaseIdx, compIdx));
77
78 }
79
80 template <class ModelTraits, class FluidSystem, class SolidSystem = void>
81 static std::string primaryVariableName(int pvIdx, int state = 0)
82 {
83 if (pvIdx == 0)
85 else
86 return ModelTraits::useMoles() ? IOName::moleFraction<FluidSystem>(0, pvIdx)
88 }
89};
90
91} // end namespace Dumux
92
93#endif
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
A collection of input/output field names for common physical quantities.
T getParamFromGroup(Args &&... args)
A free function to get a parameter from the parameter tree singleton with a model group.
Definition parameters.hh:375
Definition adapt.hh:29
std::string waterContent() noexcept
I/O name of water content.
Definition name.hh:155
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition name.hh:51
std::string capillaryPressure() noexcept
I/O name of capillary pressure.
Definition name.hh:135
std::string gaseousPhase() noexcept
I/O name of gaseous phase.
Definition name.hh:123
std::string pressure() noexcept
I/O name of pressure for singlephase systems.
Definition name.hh:38
std::string moleFraction(int phaseIdx, int compIdx) noexcept
I/O name of mole fraction.
Definition name.hh:110
std::string relativePermeability() noexcept
I/O name of relative permeability for singlephase systems.
Definition name.hh:96
std::string density() noexcept
I/O name of density for singlephase systems.
Definition name.hh:69
std::string pressureHead() noexcept
I/O name of pressure head.
Definition name.hh:151
std::string liquidPhase() noexcept
I/O name of liquid phase.
Definition name.hh:119
std::string saturation() noexcept
I/O name of saturation for singlephase systems.
Definition name.hh:47
std::string mobility() noexcept
I/O name of mobility for singlephase systems.
Definition name.hh:105
std::string massFraction(int phaseIdx, int compIdx) noexcept
I/O name of mass fraction.
Definition name.hh:115
std::string porosity() noexcept
I/O name of porosity.
Definition name.hh:139
Adds I/O fields specific to the Richards model.
Definition porousmediumflow/richardsnc/iofields.hh:38
static std::string primaryVariableName(int pvIdx, int state=0)
Definition porousmediumflow/richardsnc/iofields.hh:81
static void initOutputModule(OutputModule &out)
Definition porousmediumflow/richardsnc/iofields.hh:41