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;
58 enableOutput_ = getParamFromGroup<bool>(paramGroup,
"Vtk.AddVelocity",
true);
65 std::string
phaseName(
int phaseIdx)
const override {
return FluidSystem::phaseName(phaseIdx); }
68 int numFluidPhases()
const override {
return VolumeVariables::numFluidPhases(); }
76 const Element& element,
77 const FVElementGeometry& fvGeometry,
78 const ElementVolumeVariables& elemVolVars,
79 const ElementFluxVarsCache& elemFluxVarsCache,
80 int phaseIdx)
const override
82 using CouplingManager = std::decay_t<
decltype(elemVolVars.gridVolVars().problem().couplingManager())>;
85 calculateVelocityForStaggeredGrid_(velocity, element, fvGeometry, elemVolVars);
91 calculateVelocityForCVFESchemes_(velocity, element, fvGeometry, elemVolVars);
96 const Element& element,
97 const FVElementGeometry& fvGeometry,
98 const ElementVolumeVariables& elemVolVars)
const
100 const auto eIdx = fvGeometry.gridGeometry().elementMapper().index(element);
101 const auto getFaceVelocity = [&](
const FVElementGeometry& fvG,
const auto& scvf)
103 return elemVolVars.gridVolVars().problem().faceVelocity(element, fvGeometry, scvf);
110 const Element& element,
111 const FVElementGeometry& fvGeometry,
112 const ElementVolumeVariables& elemVolVars)
const
114 const auto eIdx = fvGeometry.gridGeometry().elementMapper().index(element);
115 velocity[eIdx] = elemVolVars.gridVolVars().problem().elementVelocity(fvGeometry);
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
The available discretization methods in Dumux.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
constexpr FCDiamond fcdiamond
Definition: method.hh:141
constexpr Box box
Definition: method.hh:136
constexpr PQ1Bubble pq1bubble
Definition: method.hh:137
constexpr FCStaggered fcstaggered
Definition: method.hh:140
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:56
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:75
std::string phaseName(int phaseIdx) const override
returns the phase name of a given phase index
Definition: freeflow/navierstokes/velocityoutput.hh:65
typename ParentType::VelocityVector VelocityVector
Definition: freeflow/navierstokes/velocityoutput.hh:54
bool enableOutput() const override
Returns whether to enable the velocity output or not.
Definition: freeflow/navierstokes/velocityoutput.hh:62
FieldType fieldType() const override
returns the field type
Definition: freeflow/navierstokes/velocityoutput.hh:71
int numFluidPhases() const override
returns the number of phases
Definition: freeflow/navierstokes/velocityoutput.hh:68
Velocity output for implicit (porous media) models.
Definition: io/velocityoutput.hh:41
std::vector< Dune::FieldVector< Scalar, dimWorld > > VelocityVector
Definition: io/velocityoutput.hh:50
FieldType
A container for possible velocity data types.
Definition: io/velocityoutput.hh:56
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.