3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
liquid.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 *****************************************************************************/
19
25#ifndef DUMUX_COMPONENT_LIQUID_HH
26#define DUMUX_COMPONENT_LIQUID_HH
27
28#include <dune/common/exceptions.hh>
29
31
32namespace Dumux {
33namespace Components {
34
39template<class Scalar, class Component>
40class Liquid
41{
42public:
46 template<class C = Component>
47 static constexpr bool liquidIsCompressible()
48 {
49 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidIsCompressible()");
50 return 0; // iso c++ requires a return statement for constexpr functions
51 }
52
56 template<class C = Component>
57 static constexpr bool liquidViscosityIsConstant()
58 {
59 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidViscosityIsConstant()");
60 return 0; // iso c++ requires a return statement for constexpr functions
61 }
62
70 template<class C = Component>
71 static Scalar liquidDensity(Scalar temperature, Scalar pressure)
72 {
73 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidDensity(t,p)");
74 DUNE_THROW(Dune::NotImplemented, "liquidDensity(t,p)");
75 }
76
84 template<class C = Component>
85 static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure)
86 {
87 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidMolarDensity(t,p)");
88 DUNE_THROW(Dune::NotImplemented, "Component::liquidMolarDensity(t,p)");
89 }
90
97 template<class C = Component>
98 static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
99 {
100 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidViscosity(t,p)");
101 DUNE_THROW(Dune::NotImplemented, "liquidViscosity(t,p)");
102 }
103
110 template<class C = Component>
111 static const Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
112 {
113 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidEnthalpy(t,p)");
114 DUNE_THROW(Dune::NotImplemented, "liquidEnthalpy(t,p)");
115 }
116
123 template<class C = Component>
124 static const Scalar liquidInternalEnergy(Scalar temperature, Scalar pressure)
125 {
126 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidInternalEnergy(t,p)");
127 DUNE_THROW(Dune::NotImplemented, "liquidInternalEnergy(t,p)");
128 }
129
135 template<class C = Component>
136 static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
137 {
138 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidThermalConductivity(t,p)");
139 DUNE_THROW(Dune::NotImplemented, "liquidThermalConductivity(t,p)");
140 }
141
147 template<class C = Component>
148 static Scalar liquidHeatCapacity(Scalar temperature, Scalar pressure)
149 {
150 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidHeatCapacity(t,p)");
151 DUNE_THROW(Dune::NotImplemented, "liquidHeatCapacity(t,p)");
152 }
153};
154
155} // end namespace Components
156} // end namespace Dumux
157
158#endif
Type traits.
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
Template which always yields a false value.
Definition: typetraits.hh:35
Interface for components that have a liquid state.
Definition: liquid.hh:41
static constexpr bool liquidViscosityIsConstant()
Returns true if the liquid phase viscostiy is constant.
Definition: liquid.hh:57
static const Scalar liquidInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of pure the pure component in liquid.
Definition: liquid.hh:124
static constexpr bool liquidIsCompressible()
Returns true if the liquid phase is assumed to be compressible.
Definition: liquid.hh:47
static Scalar liquidHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of the component as a liquid.
Definition: liquid.hh:148
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
The dynamic liquid viscosity of the pure component.
Definition: liquid.hh:98
static const Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of the pure component in liquid.
Definition: liquid.hh:111
static Scalar liquidDensity(Scalar temperature, Scalar pressure)
The density of the liquid component at a given pressure in and temperature in .
Definition: liquid.hh:71
static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of the component as a liquid.
Definition: liquid.hh:136
static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure)
The molar density of the liquid component at a given pressure in and temperature in .
Definition: liquid.hh:85