version 3.8
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_BINARY_COEFF_H2O_CONSTANT_HH
13#define DUMUX_BINARY_COEFF_H2O_CONSTANT_HH
14
15#include <dune/common/exceptions.hh>
16
20
21namespace Dumux {
22namespace BinaryCoeff {
23
29template<class Scalar, class Component>
31{
33 {
34 DUNE_THROW(Dune::NotImplemented, "The binary coefficients for H2O and your "
35 << "component are not implemented! Please implement the needed specialization.");
36 }
37};
38
43template<class Scalar, int id>
44class H2O_Component<Scalar, Components::Constant<id, Scalar>>
45{
46public:
52 static Scalar henryCompInWater(Scalar temperature)
53 {
54 static const Scalar h = getParamFromGroup<Scalar>(std::to_string(id), "Component.HenryComponentInWater", 1.0);
55 return h;
56 }
57
63 static Scalar henryWaterInComp(Scalar temperature)
64 {
65 static const Scalar h = getParamFromGroup<Scalar>(std::to_string(id), "Component.HenryWaterInComponent", 1.0);
66 return h;
67 }
68
69
75 static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
76 {
77 static const Scalar D = getParamFromGroup<Scalar>(std::to_string(id), "Component.GasDiffusionCoefficient", 1.0);
78 return D;
79 }
80
86 static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
87 {
88 static const Scalar D = getParamFromGroup<Scalar>(std::to_string(id), "Component.LiquidDiffusionCoefficient", 1.0);
89 return D;
90 }
91};
92
93} // end namespace BinaryCoeff
94} // end namespace Dumux
95
96#endif
static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
Diffusion coefficient for the constant component in liquid water.
Definition: h2o_constant.hh:86
static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
Binary diffusion coefficient for molecular water and the constant component.
Definition: h2o_constant.hh:75
static Scalar henryWaterInComp(Scalar temperature)
Henry coefficient for water in the constant component.
Definition: h2o_constant.hh:63
static Scalar henryCompInWater(Scalar temperature)
Henry coefficient for the constant component in liquid water.
Definition: h2o_constant.hh:52
Binary coefficients for water and another component.
Definition: h2o_constant.hh:31
Setting constant fluid properties via the input file.
Material properties of pure water .
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:39
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:22
Definition: adapt.hh:17
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.