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(); }
146 {
return solidState_.porosity(); }
176 template<
class ElemSol,
class Problem,
class Element,
class Scv,
177 std::enable_if_t<!Detail::hasSolidHeatCapacity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(),
int> = 0>
178 Scalar solidHeatCapacity_(
const ElemSol& elemSol,
179 const Problem& problem,
180 const Element& element,
184 return SolidSystem::heatCapacity(solidState);
196 template<
class ElemSol,
class Problem,
class Element,
class Scv,
197 std::enable_if_t<!Detail::hasSolidDensity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(),
int> = 0>
198 Scalar solidDensity_(
const ElemSol& elemSol,
199 const Problem& problem,
200 const Element& element,
216 template<
class ElemSol,
class Problem,
class Element,
class Scv,
217 std::enable_if_t<!Detail::hasSolidThermalConductivity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(),
int> = 0>
218 Scalar solidThermalConductivity_(
const ElemSol& elemSol,
219 const Problem& problem,
220 const Element& element,
224 return SolidSystem::thermalConductivity(solidState);
245 template<
class ElemSol,
class Problem,
class Element,
class Scv,
246 std::enable_if_t<Detail::hasSolidHeatCapacity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(),
int> = 0>
247 Scalar solidHeatCapacity_(
const ElemSol& elemSol,
248 const Problem& problem,
249 const Element& element,
253 static_assert(Detail::isInertSolidPhase<SolidSystem>::value,
254 "solidHeatCapacity can only be overwritten in the spatial params when the solid system is a simple InertSolidPhase\n"
255 "If you select a proper solid system, the solid heat capacity will be computed as stated in the solid system!");
256 return problem.spatialParams().solidHeatCapacity(element, scv, elemSol, solidState);
269 template<
class ElemSol,
class Problem,
class Element,
class Scv,
270 std::enable_if_t<Detail::hasSolidDensity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(),
int> = 0>
271 Scalar solidDensity_(
const ElemSol& elemSol,
272 const Problem& problem,
273 const Element& element,
277 static_assert(Detail::isInertSolidPhase<SolidSystem>::value,
278 "solidDensity can only be overwritten in the spatial params when the solid system is a simple InertSolidPhase\n"
279 "If you select a proper solid system, the solid density will be computed as stated in the solid system!");
280 return problem.spatialParams().solidDensity(element, scv, elemSol, solidState);
293 template<
class ElemSol,
class Problem,
class Element,
class Scv,
294 std::enable_if_t<Detail::hasSolidThermalConductivity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(),
int> = 0>
295 Scalar solidThermalConductivity_(
const ElemSol& elemSol,
296 const Problem& problem,
297 const Element& element,
301 static_assert(Detail::isInertSolidPhase<SolidSystem>::value,
302 "solidThermalConductivity can only be overwritten in the spatial params when the solid system is a simple InertSolidPhase\n"
303 "If you select a proper solid system, the solid thermal conductivity will be computed as stated in the solid system!");
304 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
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:145
Scalar effectiveThermalConductivity() const
Returns the effective thermal conductivity of the solid phase in the sub-control volume....
Definition: porousmediumflow/solidenergy/volumevariables.hh:139
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.