25#ifndef DUMUX_POROUSMEDIUMFLOW_FLUXVARIABLES_HH
26#define DUMUX_POROUSMEDIUMFLOW_FLUXVARIABLES_HH
46template<
class TypeTag,
50 typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView,
51 typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView,
52 typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView>
59 numPhases = ModelTraits::numFluidPhases(),
60 numComponents = ModelTraits::numFluidComponents()
80 advFluxIsCached_.reset();
81 advFluxBeforeUpwinding_.fill(0.0);
87 template<
typename FunctionType>
88 Scalar
advectiveFlux([[maybe_unused]]
const int phaseIdx, [[maybe_unused]]
const FunctionType& upwindTerm)
const
92 if (!advFluxIsCached_[phaseIdx])
95 advFluxBeforeUpwinding_[phaseIdx] = AdvectionType::flux(this->
problem(),
102 advFluxIsCached_.set(phaseIdx,
true);
106 return UpwindScheme::apply(*
this, upwindTerm, advFluxBeforeUpwinding_[phaseIdx], phaseIdx);
118 return MolecularDiffusionType::flux(this->
problem(),
126 return Dune::FieldVector<Scalar, numComponents>(0.0);
136 return DispersionFluxType::compositionalDispersionFlux(this->
problem(),
145 return Dune::FieldVector<Scalar, numComponents>(0.0);
155 return DispersionFluxType::thermalDispersionFlux(this->
problem(),
164 return Dune::FieldVector<Scalar, 1>(0.0);
175 return HeatConductionType::flux(this->
problem(),
192 return HeatConductionType::flux(this->
problem(),
205 mutable std::bitset<numPhases> advFluxIsCached_;
206 mutable std::array<Scalar, numPhases> advFluxBeforeUpwinding_;
Base class for the flux variables living on a sub control volume face.
UpwindSchemeImpl< GridGeometry, typename GridGeometry::DiscretizationMethod > UpwindScheme
The upwind scheme used for the advective fluxes. This depends on the chosen discretization method.
Definition flux/upwindscheme.hh:42
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:154
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property
Definition propertysystem.hh:150
Base class for the flux variables living on a sub control volume face.
Definition fluxvariablesbase.hh:45
const GetPropType< TypeTag, Properties::GridVolumeVariables >::LocalView & elemVolVars() const
Definition fluxvariablesbase.hh:81
const SubControlVolumeFace & scvFace() const
Definition fluxvariablesbase.hh:75
const GetPropType< TypeTag, Properties::GridFluxVariablesCache >::LocalView & elemFluxVarsCache() const
Definition fluxvariablesbase.hh:84
const GetPropType< TypeTag, Properties::GridGeometry >::LocalView & fvGeometry() const
Definition fluxvariablesbase.hh:78
const Element & element() const
Definition fluxvariablesbase.hh:72
const Problem & problem() const
Definition fluxvariablesbase.hh:69
static Scalar apply(const FluxVariables &fluxVars, const UpwindTermFunction &upwindTerm, Scalar flux, int phaseIdx)
Definition multidomain/facet/box/upwindscheme.hh:45
Scalar advectiveFlux(const int phaseIdx, const FunctionType &upwindTerm) const
Returns the advective flux computed by the respective law.
Definition porousmediumflow/fluxvariables.hh:88
Dune::FieldVector< Scalar, numComponents > compositionalDispersionFlux(const int phaseIdx) const
Returns the compositional dispersion flux computed by the respective law.
Definition porousmediumflow/fluxvariables.hh:132
Dune::FieldVector< Scalar, numComponents > molecularDiffusionFlux(const int phaseIdx) const
Returns the diffusive fluxes computed by the respective law.
Definition porousmediumflow/fluxvariables.hh:115
static constexpr bool enableAdvection
Definition porousmediumflow/fluxvariables.hh:70
GetPropType< TypeTag, Properties::HeatConductionType > HeatConductionType
Definition porousmediumflow/fluxvariables.hh:68
static constexpr bool enableThermalNonEquilibrium
Definition porousmediumflow/fluxvariables.hh:75
static constexpr bool enableEnergyBalance
Definition porousmediumflow/fluxvariables.hh:74
PorousMediumFluxVariables()
The constructor.
Definition porousmediumflow/fluxvariables.hh:78
GetPropType< TypeTag, Properties::MolecularDiffusionType > MolecularDiffusionType
Definition porousmediumflow/fluxvariables.hh:67
GetPropType< TypeTag, Properties::DispersionFluxType > DispersionFluxType
Definition porousmediumflow/fluxvariables.hh:66
Dune::FieldVector< Scalar, 1 > thermalDispersionFlux(const int phaseIdx=0) const
Returns the thermal dispersion flux computed by the respective law.
Definition porousmediumflow/fluxvariables.hh:151
static constexpr bool enableThermalDispersion
Definition porousmediumflow/fluxvariables.hh:73
BoxFacetCouplingUpwindScheme< GetPropType< TypeTag, Properties::GridGeometry > > UpwindScheme
Definition porousmediumflow/fluxvariables.hh:64
Scalar heatConductionFlux(const int phaseIdx) const
Returns the conductive flux computed by the respective law.
Definition porousmediumflow/fluxvariables.hh:189
Scalar heatConductionFlux() const
Returns the conductive flux computed by the respective law.
Definition porousmediumflow/fluxvariables.hh:171
GetPropType< TypeTag, Properties::AdvectionType > AdvectionType
Definition porousmediumflow/fluxvariables.hh:65
static constexpr bool enableMolecularDiffusion
Definition porousmediumflow/fluxvariables.hh:71
static constexpr bool enableCompositionalDispersion
Definition porousmediumflow/fluxvariables.hh:72
Base class for the upwind scheme.
Declares all properties used in Dumux.