version 3.8
1csolid.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//
12#ifndef DUMUX_SOLIDSYSTEMS_SOLID_PHASE_HH
13#define DUMUX_SOLIDSYSTEMS_SOLID_PHASE_HH
14
15#include <string>
16#include <dune/common/exceptions.hh>
17
18namespace Dumux {
19namespace SolidSystems {
20
27template <class Scalar, class ComponentT, bool isInertComp = true>
29{
30public:
31 using Component = ComponentT;
32
33 /****************************************
34 * Solid phase related static parameters
35 ****************************************/
36 static constexpr int numComponents = 1;
37 static constexpr int numInertComponents = isInertComp ? 1 : 0;
38
44 static std::string componentName(int compIdx = 0)
45 { return Component::name(); }
46
50 static std::string name()
51 { return "s"; }
52
56 static constexpr bool isCompressible(int compIdx = 0)
57 { return false; }
58
62 static constexpr bool isInert()
63 { return isInertComp; }
64
68 static Scalar molarMass(int compIdx = 0)
69 { return Component::molarMass(); }
70
74 static Scalar density(Scalar temperature, int compIdx = 0)
75 { return Component::solidDensity(temperature); }
76
80 template <class SolidState>
81 static Scalar density(const SolidState& solidState, int compIdx = 0)
82 { return density(solidState.temperature(), compIdx); }
83
87 template <class SolidState>
88 static Scalar molarDensity(const SolidState& solidState, int compIdx = 0)
89 { return density(solidState.temperature(), compIdx)/molarMass(compIdx); }
90
94 static Scalar thermalConductivity(Scalar temperature, int compIdx = 0)
95 { return Component::solidThermalConductivity(temperature); }
96
100 template <class SolidState>
101 static Scalar thermalConductivity(const SolidState &solidState, int compIdx = 0)
102 { return thermalConductivity(solidState.temperature(), compIdx); }
103
107 static Scalar heatCapacity(Scalar temperature, int compIdx = 0)
108 { return Component::solidHeatCapacity(temperature); }
109
113 template <class SolidState>
114 static Scalar heatCapacity(const SolidState &solidState, int compIdx = 0)
115 { return heatCapacity(solidState.temperature(), compIdx); }
116};
117
124template <class Scalar, class ComponentT>
125using InertSolidPhase = OneCSolid<Scalar, ComponentT, /*isInert=*/true>;
126
127} // end namespace SolidSystems
128} // end namespace Dumux
129
130#endif
The simplest solid phase consisting of a single solid component.
Definition: 1csolid.hh:29
static Scalar heatCapacity(const SolidState &solidState, int compIdx=0)
Specific isobaric heat capacity of the solid .
Definition: 1csolid.hh:114
static constexpr bool isInert()
Returns whether the component is inert (doesn't react)
Definition: 1csolid.hh:62
static Scalar heatCapacity(Scalar temperature, int compIdx=0)
Specific isobaric heat capacity of the solid .
Definition: 1csolid.hh:107
static Scalar molarDensity(const SolidState &solidState, int compIdx=0)
The molar density of the solid phase at a given pressure and temperature.
Definition: 1csolid.hh:88
ComponentT Component
Definition: 1csolid.hh:31
static Scalar thermalConductivity(const SolidState &solidState, int compIdx=0)
Thermal conductivity of the solid .
Definition: 1csolid.hh:101
static std::string name()
A human readable name for the solid system.
Definition: 1csolid.hh:50
static Scalar density(const SolidState &solidState, int compIdx=0)
The density of the solid phase at a given pressure and temperature.
Definition: 1csolid.hh:81
static Scalar molarMass(int compIdx=0)
The molar mass in of the component.
Definition: 1csolid.hh:68
static Scalar thermalConductivity(Scalar temperature, int compIdx=0)
Thermal conductivity of the solid .
Definition: 1csolid.hh:94
static constexpr int numInertComponents
Definition: 1csolid.hh:37
static constexpr bool isCompressible(int compIdx=0)
Returns whether the phase is incompressible.
Definition: 1csolid.hh:56
static constexpr int numComponents
Definition: 1csolid.hh:36
static Scalar density(Scalar temperature, int compIdx=0)
The density of the solid phase at a given pressure and temperature.
Definition: 1csolid.hh:74
static std::string componentName(int compIdx=0)
A human readable name for the component.
Definition: 1csolid.hh:44
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:39
Definition: adapt.hh:17