version 3.8
solid.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_SOLID_HH
14#define DUMUX_COMPONENT_SOLID_HH
15
16#include <dune/common/exceptions.hh>
17
19
20namespace Dumux {
21namespace Components {
22
27template<class Scalar, class Component>
28class Solid
29{
30public:
34 template<class C = Component>
35 static constexpr bool solidIsCompressible()
36 {
37 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: solidIsCompressible()");
38 return 0; // iso c++ requires a return statement for constexpr functions
39 }
40
47 template<class C = Component>
48 static Scalar solidDensity(Scalar temperature)
49 {
50 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: solidDensity(t)");
51 DUNE_THROW(Dune::NotImplemented, "solidDensity(t)");
52 }
53
58 template<class C = Component>
60 {
61 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: solidThermalConductivity(t)");
62 DUNE_THROW(Dune::NotImplemented, "solidThermalConductivity(t)");
63 }
64
69 template<class C = Component>
70 static Scalar solidHeatCapacity(Scalar temperature)
71 {
72 static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: solidHeatCapacity(t)");
73 DUNE_THROW(Dune::NotImplemented, "solidHeatCapacity(t)");
74 }
75
76};
77
78} // end namespace Components
79} // end namespace Dumux
80
81#endif
Interface for components that have a solid state.
Definition: solid.hh:29
static Scalar solidDensity(Scalar temperature)
The density in of the component at a given pressure in and temperature in .
Definition: solid.hh:48
static Scalar solidHeatCapacity(Scalar temperature)
Specific isobaric heat capacity of the component as a solid.
Definition: solid.hh:70
static Scalar solidThermalConductivity(Scalar temperature)
Thermal conductivity of the component as a solid.
Definition: solid.hh:59
static constexpr bool solidIsCompressible()
Returns true if the solid phase is assumed to be compressible.
Definition: solid.hh:35
Type traits.
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:39
Definition: adapt.hh:17
Template which always yields a false value.
Definition: common/typetraits/typetraits.hh:24