24#ifndef DUMUX_ELASTIC_VOLUME_VARIABLES_HH
25#define DUMUX_ELASTIC_VOLUME_VARIABLES_HH
29#include <dune/common/exceptions.hh>
45 using Scalar =
typename Traits::PrimaryVariables::value_type;
46 using ModelTraits =
typename Traits::ModelTraits;
49 static_assert(Traits::SolidSystem::isInert(),
"Elastic model can only be used with inert solid systems");
56 using Indices =
typename ModelTraits::Indices;
71 template<
class ElemSol,
class Problem,
class Element,
class Scv>
73 const Problem& problem,
74 const Element& element,
77 priVars_ = elemSol[scv.localDofIndex()];
78 extrusionFactor_ = problem.extrusionFactor(element, scv, elemSol);
83 setSolidTemperature_(problem, elemSol);
90 {
return solidState_.density(); }
94 {
return priVars_[ Indices::momentum(dir) ]; }
100 for (
int dir = 0; dir < d.size(); ++dir)
107 {
return priVars_[pvIdx]; }
119 static constexpr bool enableEnergyBalance = ModelTraits::enableEnergyBalance();
120 template<
class Problem,
class ElemSol,
121 bool enableEB = enableEnergyBalance,
typename std::enable_if_t<enableEB, bool> = 0 >
122 void setSolidTemperature_(
const Problem& problem,
const ElemSol& elemSol)
123 { DUNE_THROW(Dune::InvalidStateException,
"Non-isothermal elastic model."); }
126 template<
class Problem,
class ElemSol,
127 bool enableEB = enableEnergyBalance,
typename std::enable_if_t<!enableEB, bool> = 0 >
128 void setSolidTemperature_(
const Problem& problem,
const ElemSol& elemSol)
129 { solidState_.setTemperature(problem.temperature()); }
132 Scalar extrusionFactor_;
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
Contains the quantities which are constant within a finite volume in the elastic model.
Definition: geomechanics/elastic/volumevariables.hh:44
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Update all quantities for a given control volume.
Definition: geomechanics/elastic/volumevariables.hh:72
typename Traits::DisplacementVector DisplacementVector
export the type used for displacement vectors
Definition: geomechanics/elastic/volumevariables.hh:54
DisplacementVector displacement() const
Returns the displacement vector within the scv in .
Definition: geomechanics/elastic/volumevariables.hh:97
Scalar displacement(unsigned int dir) const
Returns the permeability within the control volume in .
Definition: geomechanics/elastic/volumevariables.hh:93
Scalar solidDensity() const
Return the average porosity within the control volume.
Definition: geomechanics/elastic/volumevariables.hh:89
typename Traits::SolidSystem SolidSystem
export the solid system used
Definition: geomechanics/elastic/volumevariables.hh:60
static constexpr Scalar extrusionFactor()
TODO We don't know yet how to interpret extrusion for mechanics.
Definition: geomechanics/elastic/volumevariables.hh:114
Scalar priVar(const int pvIdx) const
Return a component of primary variable vector for a given index.
Definition: geomechanics/elastic/volumevariables.hh:106
typename ModelTraits::Indices Indices
export the type encapsulating primary variable indices
Definition: geomechanics/elastic/volumevariables.hh:56
typename Traits::PrimaryVariables PrimaryVariables
The elastic model only makes sense with inert solid systems.
Definition: geomechanics/elastic/volumevariables.hh:52
typename Traits::SolidState SolidState
export type of solid state
Definition: geomechanics/elastic/volumevariables.hh:58
const PrimaryVariables & priVars() const
Return the vector of primary variables.
Definition: geomechanics/elastic/volumevariables.hh:110