diff --git a/dumux/io/vtkoutputmodule.hh b/dumux/io/vtkoutputmodule.hh index 5c3a1d87c2e9ede91d4e3c7967ae7b001fb54151..259e6b69dad2fd07caf1cdfefd6d397cddeb0432 100644 --- a/dumux/io/vtkoutputmodule.hh +++ b/dumux/io/vtkoutputmodule.hh @@ -291,16 +291,16 @@ public: { using NestedFunction = VtkNestedFunction<GridView, VertexMapper, std::vector<GlobalPosition>>; for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) - sequenceWriter_.addVertexData(std::make_shared<NestedFunction>("velocity_" + std::string(FluidSystem::phaseName(phaseIdx)), - problem_.gridView(), problem_.vertexMapper(), - velocity[phaseIdx], dim, dimWorld)); + sequenceWriter_.addVertexData(std::make_shared<NestedFunction>("velocity_" + std::string(FluidSystem::phaseName(phaseIdx)) + " (m/s)", + problem_.gridView(), problem_.vertexMapper(), + velocity[phaseIdx], dim, dimWorld)); } // cell-centered models else { using NestedFunction = VtkNestedFunction<GridView, ElementMapper, std::vector<GlobalPosition>>; for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) - sequenceWriter_.addCellData(std::make_shared<NestedFunction>("velocity_" + std::string(FluidSystem::phaseName(phaseIdx)), + sequenceWriter_.addCellData(std::make_shared<NestedFunction>("velocity_" + std::string(FluidSystem::phaseName(phaseIdx)) + " (m/s)", problem_.gridView(), problem_.elementMapper(), velocity[phaseIdx], 0, dimWorld)); } diff --git a/dumux/porousmediumflow/implicit/velocityoutput.hh b/dumux/porousmediumflow/implicit/velocityoutput.hh index 3e75f61866e4e0e0bf4eee0fa58f56c0c0c4867c..5980213d44122d7061960440da626cd118ec850a 100644 --- a/dumux/porousmediumflow/implicit/velocityoutput.hh +++ b/dumux/porousmediumflow/implicit/velocityoutput.hh @@ -34,7 +34,6 @@ namespace Dumux { -//At the moment this property is defined in the individual models -> should be changed namespace Properties { NEW_PROP_TAG(VtkAddVelocity); //!< Returns whether velocity vectors are written into the vtk output @@ -52,6 +51,7 @@ class ImplicitVelocityOutput using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace); using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); + using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector); using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); using FluxVariables = typename GET_PROP_TYPE(TypeTag, FluxVariables); using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); @@ -246,6 +246,9 @@ public: FluxVariables fluxVars; fluxVars.initAndComputeFluxes(problem_, element, fvGeometry, elemVolVars, scvf, elemFluxVarsCache); scvfFluxes[scvfIndexInInside[localScvfIdx]] = fluxVars.advectiveFlux(phaseIdx, upwindTerm); + scvfFluxes[scvfIndexInInside[localScvfIdx]] /= problem_.extrusionFactor(element, + fvGeometry.scv(scvf.insideScvIdx()), + problem_.model().elementSolution(element, problem_.model().curSol())); } else { @@ -255,6 +258,9 @@ public: FluxVariables fluxVars; fluxVars.initAndComputeFluxes(problem_, element, fvGeometry, elemVolVars, scvf, elemFluxVarsCache); scvfFluxes[scvfIndexInInside[localScvfIdx]] = fluxVars.advectiveFlux(phaseIdx, upwindTerm); + scvfFluxes[scvfIndexInInside[localScvfIdx]] /= problem_.extrusionFactor(element, + fvGeometry.scv(scvf.insideScvIdx()), + problem_.model().elementSolution(element, problem_.model().curSol())); } }