version 3.11-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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-FileCopyrightText: 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::Components {
21
26template<class Scalar, class Component>
27class Liquid
28{
29public:
33 template<class C = Component>
34 static constexpr bool liquidIsCompressible()
35 {
36 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidIsCompressible()");
37 return 0; // iso c++ requires a return statement for constexpr functions
38 }
39
43 template<class C = Component>
44 static constexpr bool liquidViscosityIsConstant()
45 {
46 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidViscosityIsConstant()");
47 return 0; // iso c++ requires a return statement for constexpr functions
48 }
49
57 template<class C = Component>
58 static Scalar liquidDensity(Scalar temperature, Scalar pressure)
59 {
60 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidDensity(t,p)");
61 DUNE_THROW(Dune::NotImplemented, "liquidDensity(t,p)");
62 }
63
71 template<class C = Component>
72 static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure)
73 {
74 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidMolarDensity(t,p)");
75 DUNE_THROW(Dune::NotImplemented, "Component::liquidMolarDensity(t,p)");
76 }
77
84 template<class C = Component>
85 static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
86 {
87 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidViscosity(t,p)");
88 DUNE_THROW(Dune::NotImplemented, "liquidViscosity(t,p)");
89 }
90
97 template<class C = Component>
98 static const Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
99 {
100 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidEnthalpy(t,p)");
101 DUNE_THROW(Dune::NotImplemented, "liquidEnthalpy(t,p)");
102 }
103
110 template<class C = Component>
111 static const Scalar liquidInternalEnergy(Scalar temperature, Scalar pressure)
112 {
113 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidInternalEnergy(t,p)");
114 DUNE_THROW(Dune::NotImplemented, "liquidInternalEnergy(t,p)");
115 }
116
122 template<class C = Component>
123 static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
124 {
125 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidThermalConductivity(t,p)");
126 DUNE_THROW(Dune::NotImplemented, "liquidThermalConductivity(t,p)");
127 }
128
134 template<class C = Component>
135 static Scalar liquidHeatCapacity(Scalar temperature, Scalar pressure)
136 {
137 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: liquidHeatCapacity(t,p)");
138 DUNE_THROW(Dune::NotImplemented, "liquidHeatCapacity(t,p)");
139 }
140};
141
142} // end namespace Dumux::Components
143
144#endif
Interface for components that have a liquid state.
Definition: liquid.hh:28
static constexpr bool liquidViscosityIsConstant()
Returns true if the liquid phase viscostiy is constant.
Definition: liquid.hh:44
static const Scalar liquidInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of pure the pure component in liquid.
Definition: liquid.hh:111
static constexpr bool liquidIsCompressible()
Returns true if the liquid phase is assumed to be compressible.
Definition: liquid.hh:34
static Scalar liquidHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of the component as a liquid.
Definition: liquid.hh:135
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
The dynamic liquid viscosity of the pure component.
Definition: liquid.hh:85
static const Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of the pure component in liquid.
Definition: liquid.hh:98
static Scalar liquidDensity(Scalar temperature, Scalar pressure)
The density of the liquid component at a given pressure in and temperature in .
Definition: liquid.hh:58
static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of the component as a liquid.
Definition: liquid.hh:123
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:72
Type traits.
Definition: air.hh:22
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
Template which always yields a false value.
Definition: common/typetraits/typetraits.hh:24