24#ifndef DUMUX_FREEFLOW_NAVIERSTOKES_VELOCITYOUTPUT_HH
25#define DUMUX_FREEFLOW_NAVIERSTOKES_VELOCITYOUTPUT_HH
38template<
class Gr
idVariables>
42 using GridGeometry =
typename GridVariables::GridGeometry;
43 using FVElementGeometry =
typename GridGeometry::LocalView;
44 using GridVolumeVariables =
typename GridVariables::GridVolumeVariables;
45 using ElementVolumeVariables =
typename GridVolumeVariables::LocalView;
46 using ElementFluxVarsCache =
typename GridVariables::GridFluxVariablesCache::LocalView;
47 using VolumeVariables =
typename GridVariables::VolumeVariables;
48 using FluidSystem =
typename VolumeVariables::FluidSystem;
49 using GridView =
typename GridGeometry::GridView;
50 using Element =
typename GridView::template Codim<0>::Entity;
57 enableOutput_ = getParamFromGroup<bool>(paramGroup,
"Vtk.AddVelocity",
true);
64 std::string
phaseName(
int phaseIdx)
const override {
return FluidSystem::phaseName(phaseIdx); }
67 int numFluidPhases()
const override {
return VolumeVariables::numFluidPhases(); }
72 const Element& element,
73 const FVElementGeometry& fvGeometry,
74 const ElementVolumeVariables& elemVolVars,
75 const ElementFluxVarsCache& elemFluxVarsCache,
76 int phaseIdx)
const override
78 using CouplingManager = std::decay_t<
decltype(elemVolVars.gridVolVars().problem().couplingManager())>;
81 calculateVelocityForStaggeredGrid_(velocity, element, fvGeometry, elemVolVars);
86 const Element& element,
87 const FVElementGeometry& fvGeometry,
88 const ElementVolumeVariables& elemVolVars)
const
90 const auto eIdx = fvGeometry.gridGeometry().elementMapper().index(element);
91 const auto getFaceVelocity = [&](
const FVElementGeometry& fvG,
const auto& scvf)
93 return elemVolVars.gridVolVars().problem().faceVelocity(element, fvGeometry, scvf);
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
The available discretization methods in Dumux.
constexpr FCStaggered fcstaggered
Definition: method.hh:142
static constexpr auto freeFlowMomentumIndex
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:46
static auto cellCenterVelocity(const VelocityHelper &getFaceVelocity, const FVElementGeometry &fvGeometry)
Return the velocity vector at the center of the primal grid.
Definition: velocityreconstruction.hh:39
Velocity output for staggered free-flow models.
Definition: freeflow/navierstokes/velocityoutput.hh:40
NavierStokesVelocityOutput(const std::string ¶mGroup="")
Definition: freeflow/navierstokes/velocityoutput.hh:55
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:71
std::string phaseName(int phaseIdx) const override
returns the phase name of a given phase index
Definition: freeflow/navierstokes/velocityoutput.hh:64
typename ParentType::VelocityVector VelocityVector
Definition: freeflow/navierstokes/velocityoutput.hh:53
bool enableOutput() const override
Returns whether to enable the velocity output or not.
Definition: freeflow/navierstokes/velocityoutput.hh:61
int numFluidPhases() const override
returns the number of phases
Definition: freeflow/navierstokes/velocityoutput.hh:67
Velocity output for implicit (porous media) models.
Definition: io/velocityoutput.hh:41
std::vector< Dune::FieldVector< Scalar, dimWorld > > VelocityVector
Definition: io/velocityoutput.hh:50
The interface of the coupling manager for multi domain problems.
Definition: multidomain/couplingmanager.hh:60
const Problem< i > & problem(Dune::index_constant< i > domainIdx) const
Return a reference to the sub problem.
Definition: multidomain/couplingmanager.hh:321
Default velocity output policy for porous media models.