3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
h2o_constant.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_BINARY_COEFF_H2O_CONSTANT_HH
25#define DUMUX_BINARY_COEFF_H2O_CONSTANT_HH
26
27#include <dune/common/exceptions.hh>
28
32
33namespace Dumux {
34namespace BinaryCoeff {
35
41template<class Scalar, class Component>
43{
45 {
46 DUNE_THROW(Dune::NotImplemented, "The binary coefficients for H2O and your "
47 << "component are not implemented! Please implement the needed specialization.");
48 }
49};
50
55template<class Scalar, int id>
56class H2O_Component<Scalar, Components::Constant<id, Scalar>>
57{
58public:
64 static Scalar henryCompInWater(Scalar temperature)
65 {
66 static const Scalar h = getParamFromGroup<Scalar>(std::to_string(id), "Component.HenryComponentInWater", 1.0);
67 return h;
68 }
69
75 static Scalar henryWaterInComp(Scalar temperature)
76 {
77 static const Scalar h = getParamFromGroup<Scalar>(std::to_string(id), "Component.HenryWaterInComponent", 1.0);
78 return h;
79 }
80
81
87 static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
88 {
89 static const Scalar D = getParamFromGroup<Scalar>(std::to_string(id), "Component.GasDiffusionCoefficient", 1.0);
90 return D;
91 }
92
98 static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
99 {
100 static const Scalar D = getParamFromGroup<Scalar>(std::to_string(id), "Component.LiquidDiffusionCoefficient", 1.0);
101 return D;
102 }
103};
104
105} // end namespace BinaryCoeff
106} // end namespace Dumux
107
108#endif
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Material properties of pure water .
Setting constant fluid properties via the input file.
Definition: adapt.hh:29
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:51
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:34
Binary coefficients for water and another component.
Definition: h2o_constant.hh:43
static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
Diffusion coefficient for the constant component in liquid water.
Definition: h2o_constant.hh:98
static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
Binary diffusion coefficient for molecular water and the constant component.
Definition: h2o_constant.hh:87
static Scalar henryWaterInComp(Scalar temperature)
Henry coefficient for water in the constant component.
Definition: h2o_constant.hh:75
static Scalar henryCompInWater(Scalar temperature)
Henry coefficient for the constant component in liquid water.
Definition: h2o_constant.hh:64