24#ifndef DUMUX_DISCRETIZATION_CC_TPFA_FOURIERS_LAW_NONEQUILIBRIUM_HH
25#define DUMUX_DISCRETIZATION_CC_TPFA_FOURIERS_LAW_NONEQUILIBRIUM_HH
36template<
class TypeTag,
class DiscretizationMethod>
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();
79 static Scalar
flux(
const Problem& problem,
80 const Element& element,
81 const FVElementGeometry& fvGeometry,
82 const ElementVolumeVariables& elemVolVars,
83 const SubControlVolumeFace& scvf,
85 const ElementFluxVarsCache& elemFluxVarsCache)
88 Scalar tOutside = 0.0;
90 if (phaseIdx < numEnergyEqFluid)
92 tInside += elemVolVars[scvf.insideScvIdx()].temperatureFluid(phaseIdx);
93 tOutside += elemVolVars[scvf.outsideScvIdx()].temperatureFluid(phaseIdx);
97 tInside += elemVolVars[scvf.insideScvIdx()].temperatureSolid();
98 tOutside += elemVolVars[scvf.outsideScvIdx()].temperatureSolid();
101 Scalar tij = calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf, phaseIdx);
102 return tij*(tInside - tOutside);
107 const Element& element,
108 const FVElementGeometry& fvGeometry,
109 const ElementVolumeVariables& elemVolVars,
110 const SubControlVolumeFace& scvf,
113 const auto insideScvIdx = scvf.insideScvIdx();
114 const auto& insideScv = fvGeometry.scv(insideScvIdx);
115 const auto& insideVolVars = elemVolVars[insideScvIdx];
116 const auto computeLambda = [&](
const auto& v){
117 if constexpr (numEnergyEq == 1)
118 return v.effectiveThermalConductivity();
119 else if constexpr (numEnergyEqFluid == 1)
120 return (phaseIdx != sPhaseIdx)
121 ? v.effectiveFluidThermalConductivity()
122 : v.effectiveSolidThermalConductivity();
124 return v.effectivePhaseThermalConductivity(phaseIdx);
127 const auto insideLambda = computeLambda(insideVolVars);
131 if (scvf.boundary() || scvf.numOutsideScvs() > 1)
132 return Extrusion::area(fvGeometry, scvf)*ti;
135 const auto outsideScvIdx = scvf.outsideScvIdx();
136 const auto& outsideScv = fvGeometry.scv(outsideScvIdx);
137 const auto& outsideVolVars = elemVolVars[outsideScvIdx];
138 const auto outsideLambda = computeLambda(outsideVolVars);
145 tj =
computeTpfaTransmissibility(fvGeometry, fvGeometry.flipScvf(scvf.index()), outsideScv, outsideLambda, outsideVolVars.extrusionFactor());
151 return Extrusion::area(fvGeometry, scvf)*(ti * tj)/(ti + tj);
Helper classes to compute the integration elements.
The available discretization methods in Dumux.
Classes related to flux variables caching.
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:48
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
Definition: box/fourierslawnonequilibrium.hh:42
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:106
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:79
Definition: fluxvariablescaching.hh:68
Declares all properties used in Dumux.
Free functions to evaluate the transmissibilities associated with flux evaluations across sub-control...