28#ifndef EWOMS_MULTI_PHASE_BASE_EXTENSIVE_QUANTITIES_HH
29#define EWOMS_MULTI_PHASE_BASE_EXTENSIVE_QUANTITIES_HH
31#include <dune/common/fvector.hh>
33#include <opm/material/common/Valgrind.hpp>
49template <
class TypeTag>
51 :
public GetPropType<TypeTag, Properties::DiscExtensiveQuantities>
52 ,
public GetPropType<TypeTag, Properties::FluxModule>::FluxExtensiveQuantities
62 using FluxExtensiveQuantities =
typename FluxModule::FluxExtensiveQuantities;
70 FluxModule::registerParameters();
86 FluxExtensiveQuantities::calculateGradients_(elemCtx,
scvfIdx,
timeIdx);
91 if (!elemCtx.model().phaseIsConsidered(
phaseIdx)) {
92 Valgrind::SetUndefined(upstreamScvIdx_[
phaseIdx]);
93 Valgrind::SetUndefined(downstreamScvIdx_[
phaseIdx]);
97 upstreamScvIdx_[
phaseIdx] = FluxExtensiveQuantities::upstreamIndex_(
phaseIdx);
98 downstreamScvIdx_[
phaseIdx] = FluxExtensiveQuantities::downstreamIndex_(
phaseIdx);
101 FluxExtensiveQuantities::calculateFluxes_(elemCtx,
scvfIdx,
timeIdx);
115 template <
class Context,
class Flu
idState>
119 const FluidState& fluidState)
121 ParentType::updateBoundary(context,
bfIdx,
timeIdx, fluidState);
123 FluxExtensiveQuantities::calculateBoundaryGradients_(context.elementContext(),
127 FluxExtensiveQuantities::calculateBoundaryFluxes_(context.elementContext(),
140 {
return upstreamScvIdx_[
phaseIdx]; }
150 {
return downstreamScvIdx_[
phaseIdx]; }
171 std::array<short, numPhases> upstreamScvIdx_{};
172 std::array<short, numPhases> downstreamScvIdx_{};
This class calculates the pressure potential gradients and the filter velocities for multi-phase flow...
Definition multiphasebaseextensivequantities.hh:53
void updateBoundary(const Context &context, unsigned bfIdx, unsigned timeIdx, const FluidState &fluidState)
Update the extensive quantities for a given boundary face.
Definition multiphasebaseextensivequantities.hh:116
Scalar downstreamWeight(unsigned phaseIdx) const
Return the weight of the downstream control volume for a given phase as a function of the normal flux...
Definition multiphasebaseextensivequantities.hh:167
Scalar upstreamWeight(unsigned) const
Return the weight of the upstream control volume for a given phase as a function of the normal flux.
Definition multiphasebaseextensivequantities.hh:158
short upstreamIndex(unsigned phaseIdx) const
Return the local index of the upstream control volume for a given phase as a function of the normal f...
Definition multiphasebaseextensivequantities.hh:139
void update(const ElementContext &elemCtx, unsigned scvfIdx, unsigned timeIdx)
Update the extensive quantities for a given sub-control-volume-face.
Definition multiphasebaseextensivequantities.hh:81
short downstreamIndex(unsigned phaseIdx) const
Return the local index of the downstream control volume for a given phase as a function of the normal...
Definition multiphasebaseextensivequantities.hh:149
static void registerParameters()
Register all run-time parameters for the extensive quantities.
Definition multiphasebaseextensivequantities.hh:68
Provide the properties at a face which make sense independently of the conserved quantities.
Defines the common properties required by the porous medium multi-phase models.
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:240
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition propertysystem.hh:233
This file provides the infrastructure to retrieve run-time parameters.
This method contains all callback classes for quantities that are required by some extensive quantiti...