12#ifndef DUMUX_FREEFLOW_NAVIERSTOKES_MASS_1P_LOCAL_RESIDUAL_HH
13#define DUMUX_FREEFLOW_NAVIERSTOKES_MASS_1P_LOCAL_RESIDUAL_HH
27template<
class Problem>
29:
public std::false_type
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 auto flux = fluxVars.flux(0);
105 flux += problem.auxiliaryFlux(element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf);
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
Evaluate 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
Defines all properties used in Dumux.
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:34
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
A helper to deduce a vector with the same size as numbers of equations.
Traits class to be specialized for problems to add auxiliary fluxes.
Definition: freeflow/navierstokes/mass/1p/localresidual.hh:30