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 SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
54 using Element =
typename GridView::template Codim<0>::Entity;
57 static Scalar
flux(
const Problem& problem,
58 const Element& element,
59 const FVElementGeometry& fvGeometry,
60 const ElementVolumeVariables& elemVolVars,
61 const SubControlVolumeFace& scvf,
62 const ElementFluxVariablesCache& elemFluxVarsCache)
65 const auto& insideScv = fvGeometry.scv(scvf.insideScvIdx());
66 const auto& outsideScv = fvGeometry.scv(scvf.outsideScvIdx());
67 const auto& insideVolVars = elemVolVars[insideScv];
68 const auto& outsideVolVars = elemVolVars[outsideScv];
71 auto insideLambda = Deprecated::template effectiveThermalConductivity<ThermalConductivityModel>(
72 insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv);
73 auto outsideLambda = Deprecated::template effectiveThermalConductivity<ThermalConductivityModel>(
74 outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv);
77 insideLambda *= insideVolVars.extrusionFactor();
78 outsideLambda *= outsideVolVars.extrusionFactor();
81 const auto lambda = problem.spatialParams().harmonicMean(insideLambda, outsideLambda, scvf.unitOuterNormal());
84 const auto& fluxVarsCache = elemFluxVarsCache[scvf];
87 Dune::FieldVector<Scalar, GridView::dimensionworld> gradTemp(0.0);
88 for (
auto&& scv : scvs(fvGeometry))
89 gradTemp.axpy(elemVolVars[scv].
temperature(), fluxVarsCache.gradN(scv.indexInElement()));
92 return -1.0*
vtmv(scvf.unitOuterNormal(), lambda, gradTemp)*scvf.area();
Define some often used mathematical functions.
The available discretization methods in Dumux.
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:840
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
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
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:51
forward declaration of the method-specific implementation
Definition: fourierslaw.hh:37
static Scalar flux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, const ElementFluxVariablesCache &elemFluxVarsCache)
Definition: box/fourierslaw.hh:57
Declares all properties used in Dumux.