25#ifndef DUMUX_DISCRETIZATION_BOX_FOURIERS_LAW_HH
26#define DUMUX_DISCRETIZATION_BOX_FOURIERS_LAW_HH
36template<
class TypeTag, DiscretizationMethod discMethod>
37class FouriersLawImplementation;
43template <
class TypeTag>
49 using FVElementGeometry =
typename GridGeometry::LocalView;
50 using SubControlVolumeFace =
typename GridGeometry::SubControlVolumeFace;
55 using Element =
typename GridView::template Codim<0>::Entity;
65 static Scalar
flux(
const Problem& problem,
66 const Element& element,
67 const FVElementGeometry& fvGeometry,
68 const ElementVolumeVariables& elemVolVars,
69 const SubControlVolumeFace& scvf,
70 const ElementFluxVariablesCache& elemFluxVarsCache)
73 const auto& insideScv = fvGeometry.scv(scvf.insideScvIdx());
74 const auto& outsideScv = fvGeometry.scv(scvf.outsideScvIdx());
75 const auto& insideVolVars = elemVolVars[insideScv];
76 const auto& outsideVolVars = elemVolVars[outsideScv];
79 auto insideLambda = insideVolVars.effectiveThermalConductivity();
80 auto outsideLambda = outsideVolVars.effectiveThermalConductivity();
83 insideLambda *= insideVolVars.extrusionFactor();
84 outsideLambda *= outsideVolVars.extrusionFactor();
87 const auto lambda = problem.spatialParams().harmonicMean(insideLambda, outsideLambda, scvf.unitOuterNormal());
90 const auto& fluxVarsCache = elemFluxVarsCache[scvf];
93 Dune::FieldVector<Scalar, GridView::dimensionworld> gradTemp(0.0);
94 for (
auto&& scv : scvs(fvGeometry))
95 gradTemp.axpy(elemVolVars[scv].
temperature(), fluxVarsCache.gradN(scv.indexInElement()));
98 return -1.0*
vtmv(scvf.unitOuterNormal(), lambda, gradTemp)*Extrusion::area(scvf);
Define some often used mathematical functions.
The available discretization methods in Dumux.
Helper classes to compute the integration elements.
DiscretizationMethod
The available discretization methods in Dumux.
Definition: method.hh:37
Dune::DenseMatrix< MAT >::value_type vtmv(const Dune::DenseVector< V1 > &v1, const Dune::DenseMatrix< MAT > &M, const Dune::DenseVector< V2 > &v2)
Evaluates the scalar product of a vector v2, projected by a matrix M, with a vector v1.
Definition: math.hh:863
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:177
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:150
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:51
forward declaration of the method-specific implementation
Definition: flux/fourierslaw.hh:37
static Scalar flux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, const ElementFluxVariablesCache &elemFluxVarsCache)
Returns the heat flux within the porous medium (in J/s) across the given sub-control volume face.
Definition: flux/box/fourierslaw.hh:65
Declares all properties used in Dumux.