version 3.10-dev
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
7
13#ifndef DUMUX_COMPONENT_LIQUID_HH
14#define DUMUX_COMPONENT_LIQUID_HH
15
16#include <dune/common/exceptions.hh>
17
19
20namespace Dumux {
21namespace Components {
22
27template<class Scalar, class Component>
28class Liquid
29{
30public:
34 template<class C = Component>
35 static constexpr bool liquidIsCompressible()
36 {
37 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidIsCompressible()");
38 return 0; // iso c++ requires a return statement for constexpr functions
39 }
40
44 template<class C = Component>
45 static constexpr bool liquidViscosityIsConstant()
46 {
47 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidViscosityIsConstant()");
48 return 0; // iso c++ requires a return statement for constexpr functions
49 }
50
58 template<class C = Component>
59 static Scalar liquidDensity(Scalar temperature, Scalar pressure)
60 {
61 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidDensity(t,p)");
62 DUNE_THROW(Dune::NotImplemented, "liquidDensity(t,p)");
63 }
64
72 template<class C = Component>
73 static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure)
74 {
75 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidMolarDensity(t,p)");
76 DUNE_THROW(Dune::NotImplemented, "Component::liquidMolarDensity(t,p)");
77 }
78
85 template<class C = Component>
86 static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
87 {
88 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidViscosity(t,p)");
89 DUNE_THROW(Dune::NotImplemented, "liquidViscosity(t,p)");
90 }
91
98 template<class C = Component>
99 static const Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
100 {
101 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidEnthalpy(t,p)");
102 DUNE_THROW(Dune::NotImplemented, "liquidEnthalpy(t,p)");
103 }
104
111 template<class C = Component>
112 static const Scalar liquidInternalEnergy(Scalar temperature, Scalar pressure)
113 {
114 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidInternalEnergy(t,p)");
115 DUNE_THROW(Dune::NotImplemented, "liquidInternalEnergy(t,p)");
116 }
117
123 template<class C = Component>
124 static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
125 {
126 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidThermalConductivity(t,p)");
127 DUNE_THROW(Dune::NotImplemented, "liquidThermalConductivity(t,p)");
128 }
129
135 template<class C = Component>
136 static Scalar liquidHeatCapacity(Scalar temperature, Scalar pressure)
137 {
138 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidHeatCapacity(t,p)");
139 DUNE_THROW(Dune::NotImplemented, "liquidHeatCapacity(t,p)");
140 }
141};
142
143} // end namespace Components
144} // end namespace Dumux
145
146#endif
Interface for components that have a liquid state.
Definition: liquid.hh:29
static constexpr bool liquidViscosityIsConstant()
Returns true if the liquid phase viscostiy is constant.
Definition: liquid.hh:45
static const Scalar liquidInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of pure the pure component in liquid.
Definition: liquid.hh:112
static constexpr bool liquidIsCompressible()
Returns true if the liquid phase is assumed to be compressible.
Definition: liquid.hh:35
static Scalar liquidHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of the component as a liquid.
Definition: liquid.hh:136
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
The dynamic liquid viscosity of the pure component.
Definition: liquid.hh:86
static const Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of the pure component in liquid.
Definition: liquid.hh:99
static Scalar liquidDensity(Scalar temperature, Scalar pressure)
The density of the liquid component at a given pressure in and temperature in .
Definition: liquid.hh:59
static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of the component as a liquid.
Definition: liquid.hh:124
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:73
Type traits.
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
Template which always yields a false value.
Definition: common/typetraits/typetraits.hh:24