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>
57 using FVElementGeometry =
typename GridGeometry::LocalView;
58 using GridView =
typename GridGeometry::GridView;
59 using Element =
typename GridView::template Codim<0>::Entity;
60 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
68 numPhases = ModelTraits::numFluidPhases(),
69 numComponents = ModelTraits::numFluidComponents()
85 advFluxIsCached_.reset();
86 advFluxBeforeUpwinding_.fill(0.0);
92 template<
typename FunctionType>
93 Scalar
advectiveFlux([[maybe_unused]]
const int phaseIdx, [[maybe_unused]]
const FunctionType& upwindTerm)
const
97 if (!advFluxIsCached_[phaseIdx])
100 advFluxBeforeUpwinding_[phaseIdx] = AdvectionType::flux(this->
problem(),
107 advFluxIsCached_.set(phaseIdx,
true);
111 return UpwindScheme::apply(*
this, upwindTerm, advFluxBeforeUpwinding_[phaseIdx], phaseIdx);
123 return MolecularDiffusionType::flux(this->
problem(),
142 return HeatConductionType::flux(this->
problem(),
159 return HeatConductionType::flux(this->
problem(),
172 mutable std::bitset<numPhases> advFluxIsCached_;
173 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:156
GetPropType< TypeTag, Properties::AdvectionType > AdvectionType
Definition: porousmediumflow/fluxvariables.hh:73
static constexpr bool enableAdvection
Definition: porousmediumflow/fluxvariables.hh:77
Scalar advectiveFlux(const int phaseIdx, const FunctionType &upwindTerm) const
Returns the advective flux computed by the respective law.
Definition: porousmediumflow/fluxvariables.hh:93
GetPropType< TypeTag, Properties::MolecularDiffusionType > MolecularDiffusionType
Definition: porousmediumflow/fluxvariables.hh:74
Scalar heatConductionFlux() const
Returns the conductive flux computed by the respective law.
Definition: porousmediumflow/fluxvariables.hh:138
static constexpr bool enableEnergyBalance
Definition: porousmediumflow/fluxvariables.hh:79
Dune::FieldVector< Scalar, numComponents > molecularDiffusionFlux(const int phaseIdx) const
Returns the diffusive fluxes computed by the respective law.
Definition: porousmediumflow/fluxvariables.hh:120
PorousMediumFluxVariables()
The constructor.
Definition: porousmediumflow/fluxvariables.hh:83
static constexpr bool enableThermalNonEquilibrium
Definition: porousmediumflow/fluxvariables.hh:80
static constexpr bool enableMolecularDiffusion
Definition: porousmediumflow/fluxvariables.hh:78
GetPropType< TypeTag, Properties::HeatConductionType > HeatConductionType
Definition: porousmediumflow/fluxvariables.hh:75
Declares all properties used in Dumux.
Base class for the upwind scheme.