24#ifndef DUMUX_ELASTIC_VOLUME_VARIABLES_HH
25#define DUMUX_ELASTIC_VOLUME_VARIABLES_HH
29#include <dune/common/exceptions.hh>
46 using Scalar =
typename Traits::PrimaryVariables::value_type;
47 using ModelTraits =
typename Traits::ModelTraits;
50 static_assert(Traits::SolidSystem::isInert(),
"Elastic model can only be used with inert solid systems");
57 using Indices =
typename ModelTraits::Indices;
72 template<
class ElemSol,
class Problem,
class Element,
class Scv>
74 const Problem& problem,
75 const Element& element,
78 priVars_ = elemSol[scv.localDofIndex()];
79 extrusionFactor_ = Deprecated::extrusionFactor(problem, element, scv, elemSol);
84 setSolidTemperature_(problem, element, scv, elemSol);
91 {
return solidState_.density(); }
95 {
return priVars_[ Indices::momentum(dir) ]; }
101 for (
int dir = 0; dir < d.size(); ++dir)
108 {
return priVars_[pvIdx]; }
120 static constexpr bool enableEnergyBalance = ModelTraits::enableEnergyBalance();
121 template<
class Problem,
class Element,
class Scv,
class ElemSol,
122 bool enableEB = enableEnergyBalance,
typename std::enable_if_t<enableEB, bool> = 0 >
123 void setSolidTemperature_(
const Problem& problem,
const Element& element,
const Scv& scv,
const ElemSol& elemSol)
124 { DUNE_THROW(Dune::NotImplemented,
"Non-isothermal elastic model."); }
127 template<
class Problem,
class Element,
class Scv,
class ElemSol,
128 bool enableEB = enableEnergyBalance,
typename std::enable_if_t<!enableEB, bool> = 0 >
129 void setSolidTemperature_(
const Problem& problem,
const Element& element,
const Scv& scv,
const ElemSol& elemSol)
133 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 temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:51
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:45
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:73
typename Traits::DisplacementVector DisplacementVector
export the type used for displacement vectors
Definition: geomechanics/elastic/volumevariables.hh:55
DisplacementVector displacement() const
Returns the displacement vector within the scv in .
Definition: geomechanics/elastic/volumevariables.hh:98
Scalar displacement(unsigned int dir) const
Returns the permeability within the control volume in .
Definition: geomechanics/elastic/volumevariables.hh:94
Scalar solidDensity() const
Return the average porosity within the control volume.
Definition: geomechanics/elastic/volumevariables.hh:90
typename Traits::SolidSystem SolidSystem
export the solid system used
Definition: geomechanics/elastic/volumevariables.hh:61
static constexpr Scalar extrusionFactor()
TODO We don't know yet how to interpret extrusion for mechanics.
Definition: geomechanics/elastic/volumevariables.hh:115
Scalar priVar(const int pvIdx) const
Return a component of primary variable vector for a given index.
Definition: geomechanics/elastic/volumevariables.hh:107
typename ModelTraits::Indices Indices
export the type encapsulating primary variable indices
Definition: geomechanics/elastic/volumevariables.hh:57
typename Traits::PrimaryVariables PrimaryVariables
The elastic model only makes sense with inert solid systems.
Definition: geomechanics/elastic/volumevariables.hh:53
typename Traits::SolidState SolidState
export type of solid state
Definition: geomechanics/elastic/volumevariables.hh:59
const PrimaryVariables & priVars() const
Return the vector of primary variables.
Definition: geomechanics/elastic/volumevariables.hh:111