12#ifndef DUMUX_FREEFLOW_NAVIERSTOKES_MASS_1P_LOCAL_RESIDUAL_HH
13#define DUMUX_FREEFLOW_NAVIERSTOKES_MASS_1P_LOCAL_RESIDUAL_HH
28template<
class Problem>
30:
public std::false_type
37template<
class TypeTag>
43 using GridVolumeVariables =
typename GridVariables::GridVolumeVariables;
44 using ElementVolumeVariables =
typename GridVolumeVariables::LocalView;
45 using VolumeVariables =
typename GridVolumeVariables::VolumeVariables;
47 using GridFluxVariablesCache =
typename GridVariables::GridFluxVariablesCache;
48 using ElementFluxVariablesCache =
typename GridFluxVariablesCache::LocalView;
53 using FVElementGeometry =
typename GridGeometry::LocalView;
54 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
55 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
56 using GridView =
typename GridGeometry::GridView;
57 using Element =
typename GridView::template Codim<0>::Entity;
64 using ParentType::ParentType;
70 const SubControlVolume& scv,
71 const VolumeVariables& volVars)
const
73 NumEqVector storage(0.0);
74 storage[ModelTraits::Indices::conti0EqIdx] = volVars.density();
77 if constexpr (ModelTraits::enableEnergyBalance())
78 storage[ModelTraits::Indices::energyEqIdx] = volVars.density() * volVars.internalEnergy();
94 const Element& element,
95 const FVElementGeometry& fvGeometry,
96 const ElementVolumeVariables& elemVolVars,
97 const SubControlVolumeFace& scvf,
98 const ElementFluxVariablesCache& elemFluxVarsCache)
const
100 FluxVariables fluxVars;
101 fluxVars.init(problem, element, fvGeometry, elemVolVars, scvf, elemFluxVarsCache);
102 auto flux = fluxVars.flux(0);
107 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:40
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:93
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:69
Defines all properties used in Dumux.
The default local operator than can be specialized for each discretization scheme.
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
typename Detail::DiscretizationDefaultLocalOperator< TypeTag >::type DiscretizationDefaultLocalOperator
Definition: defaultlocaloperator.hh:27
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:31