24#ifndef DUMUX_DISCRETIZATION_CC_TPFA_FOURIERS_LAW_NONEQUILIBRIUM_HH
25#define DUMUX_DISCRETIZATION_CC_TPFA_FOURIERS_LAW_NONEQUILIBRIUM_HH
36template<
class TypeTag, DiscretizationMethod discMethod>
37class FouriersLawNonEquilibriumImplementation;
43template <
class TypeTag>
50 using FVElementGeometry =
typename GridGeometry::LocalView;
51 using SubControlVolumeFace =
typename GridGeometry::SubControlVolumeFace;
53 using GridView =
typename GridGeometry::GridView;
55 using Element =
typename GridView::template Codim<0>::Entity;
58 static constexpr int dim = GridView::dimension;
59 static constexpr int dimWorld = GridView::dimensionworld;
63 static constexpr auto numEnergyEqSolid = getPropValue<TypeTag, Properties::NumEnergyEqSolid>();
64 static constexpr auto numEnergyEqFluid = getPropValue<TypeTag, Properties::NumEnergyEqFluid>();
65 static constexpr auto numEnergyEq = numEnergyEqSolid + numEnergyEqFluid;
66 static constexpr auto sPhaseIdx = ModelTraits::numFluidPhases();
78 static Scalar
flux(
const Problem& problem,
79 const Element& element,
80 const FVElementGeometry& fvGeometry,
81 const ElementVolumeVariables& elemVolVars,
82 const SubControlVolumeFace& scvf,
84 const ElementFluxVarsCache& elemFluxVarsCache)
87 Scalar tOutside = 0.0;
89 if (phaseIdx < numEnergyEqFluid)
91 tInside += elemVolVars[scvf.insideScvIdx()].temperatureFluid(phaseIdx);
92 tOutside += elemVolVars[scvf.outsideScvIdx()].temperatureFluid(phaseIdx);
96 tInside += elemVolVars[scvf.insideScvIdx()].temperatureSolid();
97 tOutside += elemVolVars[scvf.outsideScvIdx()].temperatureSolid();
100 Scalar tij = calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf, phaseIdx);
101 return tij*(tInside - tOutside);
106 const Element& element,
107 const FVElementGeometry& fvGeometry,
108 const ElementVolumeVariables& elemVolVars,
109 const SubControlVolumeFace& scvf,
112 const auto insideScvIdx = scvf.insideScvIdx();
113 const auto& insideScv = fvGeometry.scv(insideScvIdx);
114 const auto& insideVolVars = elemVolVars[insideScvIdx];
115 const auto computeLambda = [&](
const auto& v){
116 if constexpr (numEnergyEq == 1)
117 return v.effectiveThermalConductivity();
118 else if constexpr (numEnergyEqFluid == 1)
119 return (phaseIdx != sPhaseIdx)
120 ? v.effectiveFluidThermalConductivity()
121 : v.effectiveSolidThermalConductivity();
123 return v.effectivePhaseThermalConductivity(phaseIdx);
126 const auto insideLambda = computeLambda(insideVolVars);
130 if (scvf.boundary() || scvf.numOutsideScvs() > 1)
131 return Extrusion::area(scvf)*ti;
134 const auto outsideScvIdx = scvf.outsideScvIdx();
135 const auto& outsideScv = fvGeometry.scv(outsideScvIdx);
136 const auto& outsideVolVars = elemVolVars[outsideScvIdx];
137 const auto outsideLambda = computeLambda(outsideVolVars);
150 return Extrusion::area(scvf)*(ti * tj)/(ti + tj);
The available discretization methods in Dumux.
Helper classes to compute the integration elements.
Classes related to flux variables caching.
DiscretizationMethod
The available discretization methods in Dumux.
Definition: method.hh:37
Tensor::field_type computeTpfaTransmissibility(const SubControlVolumeFace &scvf, const SubControlVolume &scv, const Tensor &T, typename SubControlVolume::Traits::Scalar extrusionFactor)
Free function to evaluate the Tpfa transmissibility associated with the flux (in the form of flux = T...
Definition: tpfa/computetransmissibility.hh:47
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 (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Definition: fourierslawnonequilibrium.hh:36
Fourier's law for cell-centered finite volume schemes with two-point flux approximation.
Definition: cctpfa/fourierslawnonequilibrium.hh:45
static Scalar calculateTransmissibility(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, const int phaseIdx)
Compute transmissibilities.
Definition: cctpfa/fourierslawnonequilibrium.hh:105
static Scalar flux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, const int phaseIdx, const ElementFluxVarsCache &elemFluxVarsCache)
Returns the heat flux within a fluid or solid phase (in J/s) across the given sub-control volume face...
Definition: cctpfa/fourierslawnonequilibrium.hh:78
Definition: fluxvariablescaching.hh:65
Declares all properties used in Dumux.
Free functions to evaluate the transmissibilities associated with flux evaluations across sub-control...