25#ifndef DUMUX_POROUSMEDIUMFLOW_FLUXVARIABLES_HH
26#define DUMUX_POROUSMEDIUMFLOW_FLUXVARIABLES_HH
46template<
class TypeTag,
47 class UpScheme = 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()
77 advFluxIsCached_.reset();
78 advFluxBeforeUpwinding_.fill(0.0);
84 template<
typename FunctionType>
85 Scalar
advectiveFlux([[maybe_unused]]
const int phaseIdx, [[maybe_unused]]
const FunctionType& upwindTerm)
const
89 if (!advFluxIsCached_[phaseIdx])
92 advFluxBeforeUpwinding_[phaseIdx] = AdvectionType::flux(this->
problem(),
99 advFluxIsCached_.set(phaseIdx,
true);
103 return UpwindScheme::apply(*
this, upwindTerm, advFluxBeforeUpwinding_[phaseIdx], phaseIdx);
115 return MolecularDiffusionType::flux(this->
problem(),
123 return Dune::FieldVector<Scalar, numComponents>(0.0);
134 return HeatConductionType::flux(this->
problem(),
151 return HeatConductionType::flux(this->
problem(),
164 mutable std::bitset<numPhases> advFluxIsCached_;
165 mutable std::array<Scalar, numPhases> advFluxBeforeUpwinding_;
Base class for the flux variables living on a sub control volume face.
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 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 advectiveFlux(const int phaseIdx, const FunctionType &upwindTerm) const
Returns the advective flux computed by the respective law.
Definition: porousmediumflow/fluxvariables.hh:85
Dune::FieldVector< Scalar, numComponents > molecularDiffusionFlux(const int phaseIdx) const
Returns the diffusive fluxes computed by the respective law.
Definition: porousmediumflow/fluxvariables.hh:112
static constexpr bool enableAdvection
Definition: porousmediumflow/fluxvariables.hh:69
GetPropType< TypeTag, Properties::HeatConductionType > HeatConductionType
Definition: porousmediumflow/fluxvariables.hh:67
static constexpr bool enableThermalNonEquilibrium
Definition: porousmediumflow/fluxvariables.hh:72
static constexpr bool enableEnergyBalance
Definition: porousmediumflow/fluxvariables.hh:71
PorousMediumFluxVariables()
The constructor.
Definition: porousmediumflow/fluxvariables.hh:75
GetPropType< TypeTag, Properties::MolecularDiffusionType > MolecularDiffusionType
Definition: porousmediumflow/fluxvariables.hh:66
UpScheme 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:148
Scalar heatConductionFlux() const
Returns the conductive flux computed by the respective law.
Definition: porousmediumflow/fluxvariables.hh:130
GetPropType< TypeTag, Properties::AdvectionType > AdvectionType
Definition: porousmediumflow/fluxvariables.hh:65
static constexpr bool enableMolecularDiffusion
Definition: porousmediumflow/fluxvariables.hh:70
Declares all properties used in Dumux.
Base class for the upwind scheme.