12#ifndef DUMUX_SOLID_ENERGY_VOLUME_VARIABLES_HH 
   13#define DUMUX_SOLID_ENERGY_VOLUME_VARIABLES_HH 
   31    using Scalar = 
typename Traits::PrimaryVariables::value_type;
 
   32    static constexpr int temperatureIdx = Traits::ModelTraits::Indices::temperatureIdx;
 
   49    template<
class ElemSol, 
class Problem, 
class Element, 
class Scv>
 
   51                const Problem& problem,
 
   52                const Element& element,
 
 
   62    template<
class ElemSol, 
class Problem, 
class Element, 
class Scv>
 
   64                           const Problem& problem,
 
   65                           const Element& element,
 
   69        const Scalar T = elemSol[scv.localDofIndex()][temperatureIdx];
 
   70        solidState.setTemperature(T);
 
 
   74    template<
class ElemSol, 
class Problem, 
class Element, 
class Scv>
 
   76                                 const Problem& problem,
 
   77                                 const Element &element,
 
   81        Scalar cs = solidHeatCapacity_(elemSol, problem, element, scv, solidState);
 
   82        solidState.setHeatCapacity(cs);
 
   84        Scalar rhos = solidDensity_(elemSol, problem, element, scv, solidState);
 
   85        solidState.setDensity(rhos);
 
   87        Scalar lambdas = solidThermalConductivity_(elemSol, problem, element, scv, solidState);
 
   88        solidState.setThermalConductivity(lambdas);
 
 
   95    { 
return solidState_.temperature(); }
 
 
  101    { 
return solidState_.temperature(); }
 
 
  108    { 
return solidState_.heatCapacity(); }
 
 
  115    {  
return  solidState_.density(); }
 
 
  121    { 
return solidState_.thermalConductivity(); }
 
 
  134    { 
return solidState_.porosity(); }
 
 
  164    template<
class ElemSol, 
class Problem, 
class Element, 
class Scv,
 
  165             std::enable_if_t<!Detail::hasSolidHeatCapacity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(), 
int> = 0>
 
  166    Scalar solidHeatCapacity_(
const ElemSol& elemSol,
 
  167                              const Problem& problem,
 
  168                              const Element& element,
 
  172        return SolidSystem::heatCapacity(solidState);
 
  184    template<
class ElemSol, 
class Problem, 
class Element, 
class Scv,
 
  185             std::enable_if_t<!Detail::hasSolidDensity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(), 
int> = 0>
 
  186    Scalar solidDensity_(
const ElemSol& elemSol,
 
  187                         const Problem& problem,
 
  188                         const Element& element,
 
  192        return SolidSystem::density(solidState);
 
  204    template<
class ElemSol, 
class Problem, 
class Element, 
class Scv,
 
  205             std::enable_if_t<!Detail::hasSolidThermalConductivity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(), 
int> = 0>
 
  206    Scalar solidThermalConductivity_(
const ElemSol& elemSol,
 
  207                                     const Problem& problem,
 
  208                                     const Element& element,
 
  212        return SolidSystem::thermalConductivity(solidState);
 
  233    template<
class ElemSol, 
class Problem, 
class Element, 
class Scv,
 
  234             std::enable_if_t<Detail::hasSolidHeatCapacity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(), 
int> = 0>
 
  235    Scalar solidHeatCapacity_(
const ElemSol& elemSol,
 
  236                              const Problem& problem,
 
  237                              const Element& element,
 
  241        static_assert(Detail::isInertSolidPhase<SolidSystem>::value,
 
  242            "solidHeatCapacity can only be overwritten in the spatial params when the solid system is a simple InertSolidPhase\n" 
  243            "If you select a proper solid system, the solid heat capacity will be computed as stated in the solid system!");
 
  244        return problem.spatialParams().solidHeatCapacity(element, scv, elemSol, solidState);
 
  257    template<
class ElemSol, 
class Problem, 
class Element, 
class Scv,
 
  258             std::enable_if_t<Detail::hasSolidDensity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(), 
int> = 0>
 
  259    Scalar solidDensity_(
const ElemSol& elemSol,
 
  260                         const Problem& problem,
 
  261                         const Element& element,
 
  265        static_assert(Detail::isInertSolidPhase<SolidSystem>::value,
 
  266            "solidDensity can only be overwritten in the spatial params when the solid system is a simple InertSolidPhase\n" 
  267            "If you select a proper solid system, the solid density will be computed as stated in the solid system!");
 
  268        return problem.spatialParams().solidDensity(element, scv, elemSol, solidState);
 
  281    template<
class ElemSol, 
class Problem, 
class Element, 
class Scv,
 
  282             std::enable_if_t<Detail::hasSolidThermalConductivity<typename Problem::SpatialParams, Element, Scv, ElemSol, SolidState>(), 
int> = 0>
 
  283    Scalar solidThermalConductivity_(
const ElemSol& elemSol,
 
  284                                     const Problem& problem,
 
  285                                     const Element& element,
 
  289        static_assert(Detail::isInertSolidPhase<SolidSystem>::value,
 
  290            "solidThermalConductivity can only be overwritten in the spatial params when the solid system is a simple InertSolidPhase\n" 
  291            "If you select a proper solid system, the solid thermal conductivity will be computed as stated in the solid system!");
 
  292        return problem.spatialParams().solidThermalConductivity(element, scv, elemSol, solidState);
 
 
The isothermal base class.
Definition porousmediumflow/volumevariables.hh:28
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:52
Class for computation of all volume averaged quantities.
Definition porousmediumflow/solidenergy/volumevariables.hh:29
Scalar temperature() const
Returns the temperature in the sub-control volume.
Definition porousmediumflow/solidenergy/volumevariables.hh:100
Scalar solidDensity() const
Returns the mass density  of the rock matrix in the sub-control volume.
Definition porousmediumflow/solidenergy/volumevariables.hh:114
Scalar solidHeatCapacity() const
Returns the total heat capacity  of the rock matrix in the sub-control volume.
Definition porousmediumflow/solidenergy/volumevariables.hh:107
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:75
Scalar porosity() const
Return the average porosity  within the control volume.
Definition porousmediumflow/solidenergy/volumevariables.hh:133
Scalar effectiveThermalConductivity() const
Returns the effective thermal conductivity  of the solid phase in the sub-control volume....
Definition porousmediumflow/solidenergy/volumevariables.hh:127
typename Traits::SolidSystem SolidSystem
export the type used for the solid system
Definition porousmediumflow/solidenergy/volumevariables.hh:38
Scalar temperatureSolid() const
Returns the temperature in the sub-control volume.
Definition porousmediumflow/solidenergy/volumevariables.hh:94
Scalar solidThermalConductivity() const
Returns the thermal conductivity  of the solid phase in the sub-control volume.
Definition porousmediumflow/solidenergy/volumevariables.hh:120
typename Traits::SolidState SolidState
export the type used for the solid state
Definition porousmediumflow/solidenergy/volumevariables.hh:36
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:50
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:63
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:24
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.
Update the solid volume fractions (inert and reacitve) and set them in the solidstate.