25#ifndef DUMUX_DISCRETIZATION_BOX_FOURIERS_LAW_HH
26#define DUMUX_DISCRETIZATION_BOX_FOURIERS_LAW_HH
37template<
class TypeTag,
class DiscretizationMethod>
44template <
class TypeTag>
50 using FVElementGeometry =
typename GridGeometry::LocalView;
51 using SubControlVolumeFace =
typename GridGeometry::SubControlVolumeFace;
56 using Element =
typename GridView::template Codim<0>::Entity;
66 static Scalar
flux(
const Problem& problem,
67 const Element& element,
68 const FVElementGeometry& fvGeometry,
69 const ElementVolumeVariables& elemVolVars,
70 const SubControlVolumeFace& scvf,
71 const ElementFluxVariablesCache& elemFluxVarsCache)
74 const auto& insideScv = fvGeometry.scv(scvf.insideScvIdx());
75 const auto& outsideScv = fvGeometry.scv(scvf.outsideScvIdx());
76 const auto& insideVolVars = elemVolVars[insideScv];
77 const auto& outsideVolVars = elemVolVars[outsideScv];
80 auto insideLambda = insideVolVars.effectiveThermalConductivity();
81 auto outsideLambda = outsideVolVars.effectiveThermalConductivity();
84 insideLambda *= insideVolVars.extrusionFactor();
85 outsideLambda *= outsideVolVars.extrusionFactor();
88 const auto lambda =
faceTensorAverage(insideLambda, outsideLambda, scvf.unitOuterNormal());
91 const auto& fluxVarsCache = elemFluxVarsCache[scvf];
94 Dune::FieldVector<Scalar, GridView::dimensionworld> gradTemp(0.0);
95 for (
auto&& scv : scvs(fvGeometry))
96 gradTemp.axpy(elemVolVars[scv].
temperature(), fluxVarsCache.gradN(scv.indexInElement()));
99 return -1.0*
vtmv(scvf.unitOuterNormal(), lambda, gradTemp)*Extrusion::area(fvGeometry, scvf);
Define some often used mathematical functions.
Helper classes to compute the integration elements.
The available discretization methods in Dumux.
A free function to average a Tensor at an interface.
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
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
Scalar faceTensorAverage(const Scalar T1, const Scalar T2, const Dune::FieldVector< Scalar, dim > &normal)
Average of a discontinuous scalar field at discontinuity interface (for compatibility reasons with th...
Definition: facetensoraverage.hh:41
CVFE< CVFEMethods::PQ1 > Box
Definition: method.hh:83
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/box/fourierslaw.hh:38
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:66
Declares all properties used in Dumux.