25#ifndef DUMUX_PRORELASTIC_LOCAL_RESIDUAL_HH
26#define DUMUX_PRORELASTIC_LOCAL_RESIDUAL_HH
39template<
class TypeTag>
45 using Element =
typename GridView::template Codim<0>::Entity;
50 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
51 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
55 using VolumeVariables =
typename ElementVolumeVariables::VolumeVariables;
58 using ParentType::ParentType;
74 const Element& element,
75 const FVElementGeometry& fvGeometry,
76 const ElementVolumeVariables& elemVolVars,
77 const SubControlVolume &scv)
const
79 NumEqVector source(0.0);
82 source += problem.source(element, fvGeometry, elemVolVars, scv);
85 source += problem.scvPointSources(element, fvGeometry, elemVolVars, scv);
88 static const bool gravity = getParamFromGroup<bool>(problem.paramGroup(),
"Problem.EnableGravity");
92 const auto& vv = elemVolVars[scv];
93 const auto phi = vv.porosity();
94 const auto rhoFluid = problem.spatialParams().effectiveFluidDensity(element, scv);
95 const auto rhoAverage = phi*rhoFluid + (1.0 - phi*vv.solidDensity());
98 const auto& g = problem.spatialParams().gravity(scv.center());
99 for (
int dir = 0; dir < GridView::dimensionworld; ++dir)
100 source[ Indices::momentum(dir) ] += rhoAverage*g[dir];
A helper to deduce a vector with the same size as numbers of equations.
typename NumEqVectorTraits< PrimaryVariables >::type NumEqVector
A vector with the same size as numbers of equations This is the default implementation and has to be ...
Definition: numeqvector.hh:46
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:180
Element-wise calculation of the local residual for problems using the elastic model considering linea...
Definition: geomechanics/elastic/localresidual.hh:42
Element-wise calculation of the local residual for problems using the poroelastic model.
Definition: geomechanics/poroelastic/localresidual.hh:41
NumEqVector computeSource(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolume &scv) const
Calculate the source term of the equation.
Definition: geomechanics/poroelastic/localresidual.hh:73
Declares all properties used in Dumux.
Element-wise calculation of the local residual for problems using the elastic model considering linea...