24#ifndef DUMUX_DISCRETIZATION_STAGGERED_FOURIERS_LAW_HH
25#define DUMUX_DISCRETIZATION_STAGGERED_FOURIERS_LAW_HH
37template<
class TypeTag,
class DiscretizationMethod>
38class FouriersLawImplementation;
44template <
class TypeTag>
49 using FVElementGeometry =
typename GridGeometry::LocalView;
50 using SubControlVolumeFace =
typename GridGeometry::SubControlVolumeFace;
53 using Element =
typename GridGeometry::GridView::template Codim<0>::Entity;
72 template<
class Problem>
73 static Scalar
flux(
const Problem& problem,
74 const Element& element,
75 const FVElementGeometry& fvGeometry,
76 const ElementVolumeVariables& elemVolVars,
77 const SubControlVolumeFace &scvf)
82 if (scvf.boundary() && problem.boundaryTypes(element, scvf).isOutflow(Indices::energyEqIdx))
85 const auto& insideScv = fvGeometry.scv(scvf.insideScvIdx());
86 const auto& insideVolVars = elemVolVars[scvf.insideScvIdx()];
87 const auto& outsideVolVars = elemVolVars[scvf.outsideScvIdx()];
89 const Scalar insideTemperature = insideVolVars.temperature();
90 const Scalar outsideTemperature = outsideVolVars.temperature();
92 const Scalar insideLambda = insideVolVars.effectiveThermalConductivity() * insideVolVars.extrusionFactor();
93 const Scalar insideDistance = (insideScv.dofPosition() - scvf.ipGlobal()).two_norm();
97 flux = insideLambda * (insideTemperature - outsideTemperature) / insideDistance;
101 const auto& outsideScv = fvGeometry.scv(scvf.outsideScvIdx());
102 const Scalar outsideLambda = outsideVolVars.effectiveThermalConductivity() * outsideVolVars.extrusionFactor();
103 const Scalar outsideDistance = (outsideScv.dofPosition() - scvf.ipGlobal()).two_norm();
104 const Scalar avgLambda =
harmonicMean(insideLambda, outsideLambda, insideDistance, outsideDistance);
106 flux = avgLambda * (insideTemperature - outsideTemperature) / (insideDistance + outsideDistance);
109 flux *= Extrusion::area(fvGeometry, scvf);
Define some often used mathematical functions.
Helper classes to compute the integration elements.
The available discretization methods in Dumux.
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:69
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:251
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:180
Definition: method.hh:103
forward declaration of the method-specific implementation
Definition: flux/box/fourierslaw.hh:38
Definition: fluxvariablescaching.hh:67
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:73
Declares all properties used in Dumux.