12#ifndef DUMUX_SOLIDMECHANICS_ELASTIC_VOLUME_VARIABLES_HH 
   13#define DUMUX_SOLIDMECHANICS_ELASTIC_VOLUME_VARIABLES_HH 
   17#include <dune/common/exceptions.hh> 
   33    using Scalar = 
typename Traits::PrimaryVariables::value_type;
 
   34    using ModelTraits = 
typename Traits::ModelTraits;
 
   37    static_assert(Traits::SolidSystem::isInert(), 
"Elastic model can only be used with inert solid systems");
 
   44    using Indices = 
typename ModelTraits::Indices;
 
   59    template<
class ElemSol, 
class Problem, 
class Element, 
class Scv>
 
   61                const Problem& problem,
 
   62                const Element& element,
 
   65        priVars_ = elemSol[scv.localDofIndex()];
 
   66        extrusionFactor_ = problem.spatialParams().extrusionFactor(element, scv, elemSol);
 
   71        setSolidTemperature_(problem, element, scv, elemSol);
 
   73        solidState_.setDensity(SolidSystem::density(solidState_));
 
 
   78    { 
return solidState_.density(); }
 
 
   82    { 
return priVars_[ Indices::momentum(dir) ]; }
 
 
   88        for (
int dir = 0; dir < d.size(); ++dir)
 
 
   95    { 
return priVars_[pvIdx]; }
 
 
  107    static constexpr bool enableEnergyBalance = ModelTraits::enableEnergyBalance();
 
  108    template< 
class Problem, 
class Element, 
class Scv, 
class ElemSol,
 
  109              bool enableEB = enableEnergyBalance, 
typename std::enable_if_t<enableEB, bool> = 0 >
 
  110    void setSolidTemperature_(
const Problem& problem, 
const Element& element, 
const Scv& scv, 
const ElemSol& elemSol)
 
  111    { DUNE_THROW(Dune::NotImplemented, 
"Non-isothermal elastic model."); }
 
  114    template< 
class Problem, 
class Element, 
class Scv, 
class ElemSol,
 
  115              bool enableEB = enableEnergyBalance, 
typename std::enable_if_t<!enableEB, bool> = 0 >
 
  116    void setSolidTemperature_(
const Problem& problem, 
const Element& element, 
const Scv& scv, 
const ElemSol& elemSol)
 
  117    { solidState_.setTemperature(problem.spatialParams().temperature(element, scv, elemSol)); }
 
  120    Scalar extrusionFactor_;
 
 
Contains the quantities which are constant within a finite volume in the elastic model.
Definition solidmechanics/elastic/volumevariables.hh:32
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Update all quantities for a given control volume.
Definition solidmechanics/elastic/volumevariables.hh:60
typename Traits::DisplacementVector DisplacementVector
export the type used for displacement vectors
Definition solidmechanics/elastic/volumevariables.hh:42
DisplacementVector displacement() const
Returns the displacement vector within the scv in .
Definition solidmechanics/elastic/volumevariables.hh:85
Scalar displacement(unsigned int dir) const
Returns the permeability within the control volume in .
Definition solidmechanics/elastic/volumevariables.hh:81
Scalar solidDensity() const
Return the average porosity  within the control volume.
Definition solidmechanics/elastic/volumevariables.hh:77
typename Traits::SolidSystem SolidSystem
export the solid system used
Definition solidmechanics/elastic/volumevariables.hh:48
static constexpr Scalar extrusionFactor()
TODO We don't know yet how to interpret extrusion for mechanics.
Definition solidmechanics/elastic/volumevariables.hh:102
Scalar priVar(const int pvIdx) const
Return a component of primary variable vector for a given index.
Definition solidmechanics/elastic/volumevariables.hh:94
typename ModelTraits::Indices Indices
export the type encapsulating primary variable indices
Definition solidmechanics/elastic/volumevariables.hh:44
typename Traits::PrimaryVariables PrimaryVariables
The elastic model only makes sense with inert solid systems.
Definition solidmechanics/elastic/volumevariables.hh:40
typename Traits::SolidState SolidState
export type of solid state
Definition solidmechanics/elastic/volumevariables.hh:46
const PrimaryVariables & priVars() const
Return the vector of primary variables.
Definition solidmechanics/elastic/volumevariables.hh:98
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
Update the solid volume fractions (inert and reacitve) and set them in the solidstate.