12#ifndef DUMUX_NAVIERSTOKES_MOMENTUM_CVFE_LOCAL_RESIDUAL_HH 
   13#define DUMUX_NAVIERSTOKES_MOMENTUM_CVFE_LOCAL_RESIDUAL_HH 
   15#include <dune/common/hybridutilities.hh> 
   32template<
class TypeTag>
 
   40    using GridVolumeVariables = 
typename GridVariables::GridVolumeVariables;
 
   41    using ElementVolumeVariables = 
typename GridVolumeVariables::LocalView;
 
   42    using VolumeVariables = 
typename GridVolumeVariables::VolumeVariables;
 
   44    using GridFluxVariablesCache = 
typename GridVariables::GridFluxVariablesCache;
 
   45    using ElementFluxVariablesCache = 
typename GridFluxVariablesCache::LocalView;
 
   50    using FVElementGeometry = 
typename GridGeometry::LocalView;
 
   51    using SubControlVolume = 
typename FVElementGeometry::SubControlVolume;
 
   52    using SubControlVolumeFace = 
typename FVElementGeometry::SubControlVolumeFace;
 
   53    using GridView = 
typename GridGeometry::GridView;
 
   54    using Element = 
typename GridView::template Codim<0>::Entity;
 
   64    static constexpr auto dim = GridView::dimension;
 
   71    using ParentType::ParentType;
 
   84                               const FVElementGeometry& fvGeometry,
 
   85                               const SubControlVolume& scv,
 
   86                               const VolumeVariables& volVars,
 
   87                               const bool isPreviousStorage)
 const 
   89        return problem.density(fvGeometry.element(), fvGeometry, scv, isPreviousStorage) * volVars.velocity();
 
 
  104                              const Element& element,
 
  105                              const FVElementGeometry& fvGeometry,
 
  106                              const ElementVolumeVariables& elemVolVars,
 
  107                              const SubControlVolume& scv)
 const 
  112        source +=  
problem.density(element, fvGeometry, scv) * 
problem.gravity();
 
  121            const auto r = scv.center()[Extrusion::radialAxis] - fvGeometry.gridGeometry().bBoxMin()[Extrusion::radialAxis];
 
  125            source[Extrusion::radialAxis] += -2.0*
problem.effectiveViscosity(element, fvGeometry, scv)
 
  126                * elemVolVars[scv].velocity(Extrusion::radialAxis) / (r*r);
 
  131            source[Extrusion::radialAxis] += 
problem.pressure(element, fvGeometry, scv)/r;
 
 
  148                            const Element& element,
 
  149                            const FVElementGeometry& fvGeometry,
 
  150                            const ElementVolumeVariables& elemVolVars,
 
  151                            const SubControlVolumeFace& scvf,
 
  152                            const ElementFluxVariablesCache& elemFluxVarsCache)
 const 
  154        FluxContext context(
problem, fvGeometry, elemVolVars, elemFluxVarsCache, scvf);
 
  155        FluxHelper fluxHelper;
 
  157        NumEqVector flux(0.0);
 
 
 
The element-wise residual for control-volume finite element schemes.
Definition cvfelocalresidual.hh:60
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 fvlocalresidual.hh:208
const Problem & problem() const
the problem
Definition fvlocalresidual.hh:473
Element-wise calculation of the Navier-Stokes residual for models using CVFE discretizations.
Definition freeflow/navierstokes/momentum/cvfe/localresidual.hh:35
NumEqVector computeStorage(const Problem &problem, const FVElementGeometry &fvGeometry, const SubControlVolume &scv, const VolumeVariables &volVars, const bool isPreviousStorage) const
Calculate the storage term of the equation.
Definition freeflow/navierstokes/momentum/cvfe/localresidual.hh:83
NumEqVector computeFlux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, const ElementFluxVariablesCache &elemFluxVarsCache) const
Evaluates the mass flux over a face of a sub control volume.
Definition freeflow/navierstokes/momentum/cvfe/localresidual.hh:147
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 freeflow/navierstokes/momentum/cvfe/localresidual.hh:103
The flux variables class for the Navier-Stokes model using control-volume finite element schemes.
Definition flux.hh:91
NumEqVector advectiveMomentumFlux(const Context &context) const
Returns the diffusive momentum flux due to viscous forces.
Definition flux.hh:109
NumEqVector diffusiveMomentumFlux(const Context &context) const
Returns the diffusive momentum flux due to viscous forces.
Definition flux.hh:143
NumEqVector pressureContribution(const Context &context) const
Definition flux.hh:182
Context for computing fluxes.
Definition flux.hh:39
Defines all properties used in Dumux.
Calculates the element-wise residual for control-volume finite element schemes.
Helper classes to compute the integration elements.
The flux variables class for the Navier-Stokes model using the staggered grid discretization.
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
The available discretization methods in Dumux.
constexpr bool isRotationalExtrusion
Convenience trait to check whether the extrusion is rotational.
Definition extrusion.hh:172
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition extrusion.hh:166
A helper to deduce a vector with the same size as numbers of equations.