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