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 SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
53 using Element =
typename GridView::template Codim<0>::Entity;
56 static constexpr int dim = GridView::dimension;
57 static constexpr int dimWorld = GridView::dimensionworld;
61 static constexpr auto numEnergyEqSolid = getPropValue<TypeTag, Properties::NumEnergyEqSolid>();
62 static constexpr auto numEnergyEqFluid = getPropValue<TypeTag, Properties::NumEnergyEqFluid>();
63 static constexpr auto numEnergyEq = numEnergyEqSolid + numEnergyEqFluid;
64 static constexpr auto sPhaseIdx = ModelTraits::numFluidPhases();
73 static Scalar
flux(
const Problem& problem,
74 const Element& element,
75 const FVElementGeometry& fvGeometry,
76 const ElementVolumeVariables& elemVolVars,
77 const SubControlVolumeFace& scvf,
79 const ElementFluxVarsCache& elemFluxVarsCache)
82 Scalar tOutside = 0.0;
84 if (phaseIdx < numEnergyEqFluid)
86 tInside += elemVolVars[scvf.insideScvIdx()].temperatureFluid(phaseIdx);
87 tOutside += elemVolVars[scvf.outsideScvIdx()].temperatureFluid(phaseIdx);
91 tInside += elemVolVars[scvf.insideScvIdx()].temperatureSolid();
92 tOutside += elemVolVars[scvf.outsideScvIdx()].temperatureSolid();
95 Scalar tij = calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf, phaseIdx);
96 return tij*(tInside - tOutside);
101 const Element& element,
102 const FVElementGeometry& fvGeometry,
103 const ElementVolumeVariables& elemVolVars,
104 const SubControlVolumeFace& scvf,
107 const auto insideScvIdx = scvf.insideScvIdx();
108 const auto& insideScv = fvGeometry.scv(insideScvIdx);
109 const auto& insideVolVars = elemVolVars[insideScvIdx];
110 const auto computeLambda = [&](
const auto& v){
111 if constexpr (numEnergyEq == 1)
112 return v.effectiveThermalConductivity();
113 else if constexpr (numEnergyEqFluid == 1)
114 return (phaseIdx != sPhaseIdx)
115 ? v.effectiveFluidThermalConductivity()
116 : v.effectiveSolidThermalConductivity();
118 return v.effectivePhaseThermalConductivity(phaseIdx);
121 const auto insideLambda = computeLambda(insideVolVars);
125 if (scvf.boundary() || scvf.numOutsideScvs() > 1)
126 return scvf.area()*ti;
129 const auto outsideScvIdx = scvf.outsideScvIdx();
130 const auto& outsideScv = fvGeometry.scv(outsideScvIdx);
131 const auto& outsideVolVars = elemVolVars[outsideScvIdx];
132 const auto outsideLambda = computeLambda(outsideVolVars);
145 return scvf.area()*(ti * tj)/(ti + tj);
The available discretization methods in Dumux.
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 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:100
static Scalar flux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, const int phaseIdx, const ElementFluxVarsCache &elemFluxVarsCache)
Compute the heat condution flux assuming thermal equilibrium.
Definition: cctpfa/fourierslawnonequilibrium.hh:73
Definition: fluxvariablescaching.hh:65
Declares all properties used in Dumux.
Free functions to evaluate the transmissibilities associated with flux evaluations across sub-control...