version 3.11-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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-FileCopyrightText: 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::BinaryCoeff {
22
28template<class Scalar, class Component>
30{
32 {
33 DUNE_THROW(Dune::NotImplemented, "The binary coefficients for H2O and your "
34 << "component are not implemented! Please implement the needed specialization.");
35 }
36};
37
42template<class Scalar, int id>
43class H2O_Component<Scalar, Components::Constant<id, Scalar>>
44{
45public:
51 static Scalar henryCompInWater(Scalar temperature)
52 {
53 static const Scalar h = getParamFromGroup<Scalar>(std::to_string(id), "Component.HenryComponentInWater", 1.0);
54 return h;
55 }
56
62 static Scalar henryWaterInComp(Scalar temperature)
63 {
64 static const Scalar h = getParamFromGroup<Scalar>(std::to_string(id), "Component.HenryWaterInComponent", 1.0);
65 return h;
66 }
67
68
74 static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
75 {
76 static const Scalar D = getParamFromGroup<Scalar>(std::to_string(id), "Component.GasDiffusionCoefficient", 1.0);
77 return D;
78 }
79
85 static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
86 {
87 static const Scalar D = getParamFromGroup<Scalar>(std::to_string(id), "Component.LiquidDiffusionCoefficient", 1.0);
88 return D;
89 }
90};
91
92} // end namespace Dumux::BinaryCoeff
93
94#endif
static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
Diffusion coefficient for the constant component in liquid water.
Definition: h2o_constant.hh:85
static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
Binary diffusion coefficient for molecular water and the constant component.
Definition: h2o_constant.hh:74
static Scalar henryWaterInComp(Scalar temperature)
Henry coefficient for water in the constant component.
Definition: h2o_constant.hh:62
static Scalar henryCompInWater(Scalar temperature)
Henry coefficient for the constant component in liquid water.
Definition: h2o_constant.hh:51
Binary coefficients for water and another component.
Definition: h2o_constant.hh:30
Setting constant fluid properties via the input file.
Material properties of pure water .
Definition: air_mesitylene.hh:18
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
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.