24#ifndef DUMUX_FREEFLOW_NAVIERSTOKES_MASS_1P_LOCAL_RESIDUAL_HH
25#define DUMUX_FREEFLOW_NAVIERSTOKES_MASS_1P_LOCAL_RESIDUAL_HH
36template<
class TypeTag>
41 using GridVolumeVariables =
typename GridVariables::GridVolumeVariables;
42 using ElementVolumeVariables =
typename GridVolumeVariables::LocalView;
43 using VolumeVariables =
typename GridVolumeVariables::VolumeVariables;
45 using GridFluxVariablesCache =
typename GridVariables::GridFluxVariablesCache;
46 using ElementFluxVariablesCache =
typename GridFluxVariablesCache::LocalView;
51 using FVElementGeometry =
typename GridGeometry::LocalView;
52 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
53 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
54 using GridView =
typename GridGeometry::GridView;
55 using Element =
typename GridView::template Codim<0>::Entity;
62 using ParentType::ParentType;
68 const SubControlVolume& scv,
69 const VolumeVariables& volVars)
const
71 NumEqVector storage(0.0);
72 storage[ModelTraits::Indices::conti0EqIdx] = volVars.density();
75 if constexpr (ModelTraits::enableEnergyBalance())
76 storage[ModelTraits::Indices::energyEqIdx] = volVars.density() * volVars.internalEnergy();
92 const Element& element,
93 const FVElementGeometry& fvGeometry,
94 const ElementVolumeVariables& elemVolVars,
95 const SubControlVolumeFace& scvf,
96 const ElementFluxVariablesCache& elemFluxVarsCache)
const
98 FluxVariables fluxVars;
99 fluxVars.init(problem, element, fvGeometry, elemVolVars, scvf, elemFluxVarsCache);
100 return fluxVars.flux(0);
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 Navier-Stokes residual for single-phase flow.
Definition: freeflow/navierstokes/mass/1p/localresidual.hh:38
NumEqVector computeFlux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, const ElementFluxVariablesCache &elemFluxVarsCache) const
Evaluatex the mass flux over a face of a sub control volume.
Definition: freeflow/navierstokes/mass/1p/localresidual.hh:91
NumEqVector computeStorage(const Problem &problem, const SubControlVolume &scv, const VolumeVariables &volVars) const
Calculate the storage term of the equation.
Definition: freeflow/navierstokes/mass/1p/localresidual.hh:67
Declares all properties used in Dumux.