12#ifndef DUMUX_FREEFLOW_NAVIERSTOKES_VELOCITYOUTPUT_HH 
   13#define DUMUX_FREEFLOW_NAVIERSTOKES_VELOCITYOUTPUT_HH 
   16#include <dune/common/exceptions.hh> 
   28template<
class Gr
idVariables>
 
   32    using GridGeometry = 
typename GridVariables::GridGeometry;
 
   33    using FVElementGeometry = 
typename GridGeometry::LocalView;
 
   34    using GridVolumeVariables = 
typename GridVariables::GridVolumeVariables;
 
   35    using ElementVolumeVariables = 
typename GridVolumeVariables::LocalView;
 
   36    using ElementFluxVarsCache = 
typename GridVariables::GridFluxVariablesCache::LocalView;
 
   37    using VolumeVariables = 
typename GridVariables::VolumeVariables;
 
   38    using FluidSystem = 
typename VolumeVariables::FluidSystem;
 
   39    using GridView = 
typename GridGeometry::GridView;
 
   40    using Element = 
typename GridView::template Codim<0>::Entity;
 
   55    std::string 
phaseName(
int phaseIdx)
 const override { 
return FluidSystem::phaseName(phaseIdx); }
 
   58    int numFluidPhases()
 const override { 
return VolumeVariables::numFluidPhases(); }
 
   61    FieldType 
fieldType()
 const override { 
return FieldType::element; }
 
   67                           const FVElementGeometry& fvGeometry,
 
   68                           const ElementVolumeVariables& elemVolVars,
 
   69                           const ElementFluxVarsCache& elemFluxVarsCache,
 
   70                           int phaseIdx)
 const override 
   72        using CouplingManager = std::decay_t<
decltype(elemVolVars.gridVolVars().problem().couplingManager())>;
 
   73        using MomGG = std::decay_t<decltype(std::declval<CouplingManager>().
problem(CouplingManager::freeFlowMomentumIndex).gridGeometry())>;
 
   75            calculateVelocityForStaggeredGrid_(velocity, 
element, fvGeometry, elemVolVars);
 
   77            calculateVelocityForCVFESchemes_(velocity, 
element, fvGeometry, elemVolVars);
 
   79            DUNE_THROW(Dune::NotImplemented, 
"Navier-Stokes velocity output for scheme " << MomGG::discMethod);
 
 
   85                                            const FVElementGeometry& fvGeometry,
 
   86                                            const ElementVolumeVariables& elemVolVars)
 const 
   88        const auto eIdx = fvGeometry.gridGeometry().elementMapper().index(
element);
 
   89        const auto getFaceVelocity = [&](
const FVElementGeometry& fvG, 
const auto& scvf)
 
   91            return elemVolVars.gridVolVars().problem().faceVelocity(
element, fvGeometry, scvf);
 
   99                                          const FVElementGeometry& fvGeometry,
 
  100                                          const ElementVolumeVariables& elemVolVars)
 const 
  102        const auto eIdx = fvGeometry.gridGeometry().elementMapper().index(
element);
 
  103        velocity[eIdx] = elemVolVars.gridVolVars().problem().elementVelocity(fvGeometry);
 
 
The interface of the coupling manager for multi domain problems.
Definition multidomain/couplingmanager.hh:37
const Problem< i > & problem(Dune::index_constant< i > domainIdx) const
Return a reference to the sub problem.
Definition multidomain/couplingmanager.hh:297
NavierStokesVelocityOutput(const std::string ¶mGroup="")
Definition freeflow/navierstokes/velocityoutput.hh:46
void calculateVelocity(VelocityVector &velocity, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVarsCache &elemFluxVarsCache, int phaseIdx) const override
Definition freeflow/navierstokes/velocityoutput.hh:65
std::string phaseName(int phaseIdx) const override
returns the phase name of a given phase index
Definition freeflow/navierstokes/velocityoutput.hh:55
typename ParentType::VelocityVector VelocityVector
Definition freeflow/navierstokes/velocityoutput.hh:44
bool enableOutput() const override
Returns whether to enable the velocity output or not.
Definition freeflow/navierstokes/velocityoutput.hh:52
FieldType fieldType() const override
returns the field type
Definition freeflow/navierstokes/velocityoutput.hh:61
int numFluidPhases() const override
returns the number of phases
Definition freeflow/navierstokes/velocityoutput.hh:58
FieldType
A container for possible velocity data types.
Definition io/velocityoutput.hh:44
@ element
Definition io/velocityoutput.hh:45
VelocityOutput()=default
Default constructor.
std::vector< Dune::FieldVector< Scalar, dimWorld > > VelocityVector
Definition io/velocityoutput.hh:38
T getParamFromGroup(Args &&... args)
A free function to get a parameter from the parameter tree singleton with a model group.
Definition parameters.hh:149
Default velocity output policy for porous media models.
The available discretization methods in Dumux.
constexpr bool isCVFE
Definition method.hh:67
constexpr FCStaggered fcstaggered
Definition method.hh:151
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
static auto cellCenterVelocity(const VelocityHelper &getFaceVelocity, const FVElementGeometry &fvGeometry)
Return the velocity vector at the center of the primal grid.
Definition velocityreconstruction.hh:30
Helper class for reconstructing the velocity.