24#ifndef DUMUX_SOLID_ENERGY_VOLUME_VARIABLES_HH
25#define DUMUX_SOLID_ENERGY_VOLUME_VARIABLES_HH
43 using Scalar =
typename Traits::PrimaryVariables::value_type;
44 static constexpr int temperatureIdx = Traits::ModelTraits::Indices::temperatureIdx;
61 template<
class ElemSol,
class Problem,
class Element,
class Scv>
63 const Problem& problem,
64 const Element& element,
74 template<
class ElemSol,
class Problem,
class Element,
class Scv>
76 const Problem& problem,
77 const Element& element,
81 const Scalar T = elemSol[scv.localDofIndex()][temperatureIdx];
82 solidState.setTemperature(T);
86 template<
class ElemSol,
class Problem,
class Element,
class Scv>
88 const Problem& problem,
89 const Element &element,
93 Scalar cs = solidHeatCapacity_(elemSol, problem, element, scv, solidState);
94 solidState.setHeatCapacity(cs);
96 Scalar rhos = solidDensity_(elemSol, problem, element, scv, solidState);
97 solidState.setDensity(rhos);
99 Scalar lambdas = solidThermalConductivity_(elemSol, problem, element, scv, solidState);
100 solidState.setThermalConductivity(lambdas);
107 {
return solidState_.temperature(); }
113 {
return solidState_.temperature(); }
120 {
return solidState_.heatCapacity(); }
127 {
return solidState_.density(); }
133 {
return solidState_.thermalConductivity(); }
139 {
return solidState_.porosity(); }
169 template<
class ElemSol,
class Problem,
class Element,
class Scv,
170 std::enable_if_t<!Detail::hasSolidHeatCapacity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(),
int> = 0>
171 Scalar solidHeatCapacity_(
const ElemSol& elemSol,
172 const Problem& problem,
173 const Element& element,
177 return SolidSystem::heatCapacity(solidState);
189 template<
class ElemSol,
class Problem,
class Element,
class Scv,
190 std::enable_if_t<!Detail::hasSolidDensity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(),
int> = 0>
191 Scalar solidDensity_(
const ElemSol& elemSol,
192 const Problem& problem,
193 const Element& element,
209 template<
class ElemSol,
class Problem,
class Element,
class Scv,
210 std::enable_if_t<!Detail::hasSolidThermalConductivity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(),
int> = 0>
211 Scalar solidThermalConductivity_(
const ElemSol& elemSol,
212 const Problem& problem,
213 const Element& element,
217 return SolidSystem::thermalConductivity(solidState);
238 template<
class ElemSol,
class Problem,
class Element,
class Scv,
239 std::enable_if_t<Detail::hasSolidHeatCapacity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(),
int> = 0>
240 Scalar solidHeatCapacity_(
const ElemSol& elemSol,
241 const Problem& problem,
242 const Element& element,
246 static_assert(Detail::isInertSolidPhase<SolidSystem>::value,
247 "solidHeatCapacity can only be overwritten in the spatial params when the solid system is a simple InertSolidPhase\n"
248 "If you select a proper solid system, the solid heat capacity will be computed as stated in the solid system!");
249 return problem.spatialParams().solidHeatCapacity(element, scv, elemSol, solidState);
262 template<
class ElemSol,
class Problem,
class Element,
class Scv,
263 std::enable_if_t<Detail::hasSolidDensity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(),
int> = 0>
264 Scalar solidDensity_(
const ElemSol& elemSol,
265 const Problem& problem,
266 const Element& element,
270 static_assert(Detail::isInertSolidPhase<SolidSystem>::value,
271 "solidDensity can only be overwritten in the spatial params when the solid system is a simple InertSolidPhase\n"
272 "If you select a proper solid system, the solid density will be computed as stated in the solid system!");
273 return problem.spatialParams().solidDensity(element, scv, elemSol, solidState);
286 template<
class ElemSol,
class Problem,
class Element,
class Scv,
287 std::enable_if_t<Detail::hasSolidThermalConductivity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(),
int> = 0>
288 Scalar solidThermalConductivity_(
const ElemSol& elemSol,
289 const Problem& problem,
290 const Element& element,
294 static_assert(Detail::isInertSolidPhase<SolidSystem>::value,
295 "solidThermalConductivity can only be overwritten in the spatial params when the solid system is a simple InertSolidPhase\n"
296 "If you select a proper solid system, the solid thermal conductivity will be computed as stated in the solid system!");
297 return problem.spatialParams().solidThermalConductivity(element, scv, elemSol, solidState);
Update the solid volume fractions (inert and reacitve) and set them in the solidstate.
void updateSolidVolumeFractions(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv, SolidState &solidState, const int solidVolFracOffset)
update the solid volume fractions (inert and reacitve) and set them in the solidstate
Definition: updatesolidvolumefractions.hh:36
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:65
Class for computation of all volume averaged quantities.
Definition: porousmediumflow/solidenergy/volumevariables.hh:41
Scalar temperature() const
Returns the temperature in the sub-control volume.
Definition: porousmediumflow/solidenergy/volumevariables.hh:112
Scalar solidDensity() const
Returns the mass density of the rock matrix in the sub-control volume.
Definition: porousmediumflow/solidenergy/volumevariables.hh:126
Scalar solidHeatCapacity() const
Returns the total heat capacity of the rock matrix in the sub-control volume.
Definition: porousmediumflow/solidenergy/volumevariables.hh:119
void updateSolidEnergyParams(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv, SolidState &solidState)
Fill solid matrix parameters in the solid state.
Definition: porousmediumflow/solidenergy/volumevariables.hh:87
Scalar porosity() const
Return the average porosity within the control volume.
Definition: porousmediumflow/solidenergy/volumevariables.hh:138
typename Traits::SolidSystem SolidSystem
export the type used for the solid system
Definition: porousmediumflow/solidenergy/volumevariables.hh:50
Scalar temperatureSolid() const
Returns the temperature in the sub-control volume.
Definition: porousmediumflow/solidenergy/volumevariables.hh:106
Scalar solidThermalConductivity() const
Returns the thermal conductivity of the solid phase in the sub-control volume.
Definition: porousmediumflow/solidenergy/volumevariables.hh:132
typename Traits::SolidState SolidState
export the type used for the solid state
Definition: porousmediumflow/solidenergy/volumevariables.hh:48
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Update all quantities for a given control volume.
Definition: porousmediumflow/solidenergy/volumevariables.hh:62
void updateTemperature(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv, SolidState &solidState)
Fill temperature in the solid state.
Definition: porousmediumflow/solidenergy/volumevariables.hh:75
The isothermal base class.
Definition: porousmediumflow/volumevariables.hh:40
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porousmediumflow/volumevariables.hh:64
Base class for the model specific class which provides access to all volume averaged quantities.
Base class for the model specific class which provides access to all volume averaged quantities.