25#ifndef DUMUX_POROUSMEDIUMFLOW_FLUXVARIABLES_HH
26#define DUMUX_POROUSMEDIUMFLOW_FLUXVARIABLES_HH
46template<
class TypeTag,
47 class UpwindScheme = UpwindScheme<GetPropType<TypeTag, Properties::GridGeometry>> >
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()
76 advFluxIsCached_.reset();
77 advFluxBeforeUpwinding_.fill(0.0);
83 template<
typename FunctionType>
84 Scalar
advectiveFlux([[maybe_unused]]
const int phaseIdx, [[maybe_unused]]
const FunctionType& upwindTerm)
const
88 if (!advFluxIsCached_[phaseIdx])
91 advFluxBeforeUpwinding_[phaseIdx] = AdvectionType::flux(this->
problem(),
98 advFluxIsCached_.set(phaseIdx,
true);
102 return UpwindScheme::apply(*
this, upwindTerm, advFluxBeforeUpwinding_[phaseIdx], phaseIdx);
114 return MolecularDiffusionType::flux(this->
problem(),
122 return Dune::FieldVector<Scalar, numComponents>(0.0);
133 return HeatConductionType::flux(this->
problem(),
150 return HeatConductionType::flux(this->
problem(),
163 mutable std::bitset<numPhases> advFluxIsCached_;
164 mutable std::array<Scalar, numPhases> advFluxBeforeUpwinding_;
Base class for the flux variables living on a sub control volume face.
UpwindSchemeImpl< GridGeometry, GridGeometry::discMethod > UpwindScheme
The upwind scheme used for the advective fluxes. This depends on the chosen discretization method.
Definition: flux/upwindscheme.hh:42
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:149
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 GetPropType< TypeTag, Properties::Problem > & problem() const
Definition: fluxvariablesbase.hh:69
The porous medium flux variables class that computes advective / convective, molecular diffusive and ...
Definition: porousmediumflow/fluxvariables.hh:53
Scalar heatConductionFlux(const int phaseIdx) const
Returns the conductive flux computed by the respective law.
Definition: porousmediumflow/fluxvariables.hh:147
GetPropType< TypeTag, Properties::AdvectionType > AdvectionType
Definition: porousmediumflow/fluxvariables.hh:64
static constexpr bool enableAdvection
Definition: porousmediumflow/fluxvariables.hh:68
Scalar advectiveFlux(const int phaseIdx, const FunctionType &upwindTerm) const
Returns the advective flux computed by the respective law.
Definition: porousmediumflow/fluxvariables.hh:84
GetPropType< TypeTag, Properties::MolecularDiffusionType > MolecularDiffusionType
Definition: porousmediumflow/fluxvariables.hh:65
Scalar heatConductionFlux() const
Returns the conductive flux computed by the respective law.
Definition: porousmediumflow/fluxvariables.hh:129
static constexpr bool enableEnergyBalance
Definition: porousmediumflow/fluxvariables.hh:70
Dune::FieldVector< Scalar, numComponents > molecularDiffusionFlux(const int phaseIdx) const
Returns the diffusive fluxes computed by the respective law.
Definition: porousmediumflow/fluxvariables.hh:111
PorousMediumFluxVariables()
The constructor.
Definition: porousmediumflow/fluxvariables.hh:74
static constexpr bool enableThermalNonEquilibrium
Definition: porousmediumflow/fluxvariables.hh:71
static constexpr bool enableMolecularDiffusion
Definition: porousmediumflow/fluxvariables.hh:69
GetPropType< TypeTag, Properties::HeatConductionType > HeatConductionType
Definition: porousmediumflow/fluxvariables.hh:66
Declares all properties used in Dumux.
Base class for the upwind scheme.