12#ifndef DUMUX_DISCRETIZATION_STAGGERED_FOURIERS_LAW_HH
13#define DUMUX_DISCRETIZATION_STAGGERED_FOURIERS_LAW_HH
25template<
class TypeTag,
class DiscretizationMethod>
26class FouriersLawImplementation;
32template <
class TypeTag>
37 using FVElementGeometry =
typename GridGeometry::LocalView;
38 using SubControlVolumeFace =
typename GridGeometry::SubControlVolumeFace;
41 using Element =
typename GridGeometry::GridView::template Codim<0>::Entity;
60 template<
class Problem>
61 static Scalar
flux(
const Problem& problem,
62 const Element& element,
63 const FVElementGeometry& fvGeometry,
64 const ElementVolumeVariables& elemVolVars,
65 const SubControlVolumeFace &scvf)
70 if (scvf.boundary() && problem.boundaryTypes(element, scvf).isOutflow(Indices::energyEqIdx))
73 const auto& insideScv = fvGeometry.scv(scvf.insideScvIdx());
74 const auto& insideVolVars = elemVolVars[scvf.insideScvIdx()];
75 const auto& outsideVolVars = elemVolVars[scvf.outsideScvIdx()];
77 const Scalar insideTemperature = insideVolVars.temperature();
78 const Scalar outsideTemperature = outsideVolVars.temperature();
80 const Scalar insideLambda = insideVolVars.effectiveThermalConductivity() * insideVolVars.extrusionFactor();
81 const Scalar insideDistance = (insideScv.dofPosition() - scvf.ipGlobal()).two_norm();
85 flux = insideLambda * (insideTemperature - outsideTemperature) / insideDistance;
89 const auto& outsideScv = fvGeometry.scv(scvf.outsideScvIdx());
90 const Scalar outsideLambda = outsideVolVars.effectiveThermalConductivity() * outsideVolVars.extrusionFactor();
91 const Scalar outsideDistance = (outsideScv.dofPosition() - scvf.ipGlobal()).two_norm();
92 const Scalar avgLambda =
harmonicMean(insideLambda, outsideLambda, insideDistance, outsideDistance);
94 flux = avgLambda * (insideTemperature - outsideTemperature) / (insideDistance + outsideDistance);
97 flux *= Extrusion::area(fvGeometry, scvf);
static Scalar flux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf)
Returns the heat flux within the porous medium (in J/s) across the given sub-control volume face.
Definition: flux/staggered/freeflow/fourierslaw.hh:61
forward declaration of the method-specific implementation
Definition: flux/box/fourierslaw.hh:26
Defines all properties used in Dumux.
Helper classes to compute the integration elements.
Classes related to flux variables caching.
constexpr Scalar harmonicMean(Scalar x, Scalar y, Scalar wx=1.0, Scalar wy=1.0) noexcept
Calculate the (weighted) harmonic mean of two scalar values.
Definition: math.hh:57
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
Define some often used mathematical functions.
The available discretization methods in Dumux.
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:166
Definition: method.hh:114
Definition: fluxvariablescaching.hh:55