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 SubControlVolume =
typename FVElementGeometry::SubControlVolume;
51 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
54 using Element =
typename GridView::template Codim<0>::Entity;
57 static constexpr int dim = GridView::dimension;
58 static constexpr int dimWorld = GridView::dimensionworld;
63 static constexpr auto numEnergyEqFluid = getPropValue<TypeTag, Properties::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,
109 const auto insideScvIdx = scvf.insideScvIdx();
110 const auto& insideScv = fvGeometry.scv(insideScvIdx);
111 const auto& insideVolVars = elemVolVars[insideScvIdx];
112 Scalar insideLambda = 0.0;
113 Scalar outsideLambda = 0.0;
116 if (phaseIdx != sPhaseIdx)
119 if (numEnergyEqFluid < ModelTraits::numFluidPhases())
121 insideLambda += Deprecated::template effectiveThermalConductivity<ThermalConductivityModel>(
122 insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv);
126 insideLambda += insideVolVars.fluidThermalConductivity(phaseIdx)*insideVolVars.saturation(phaseIdx)*insideVolVars.porosity();
132 insideLambda += insideVolVars.solidThermalConductivity()*(1.0-insideVolVars.porosity());
138 if (scvf.boundary() || scvf.numOutsideScvs() > 1)
140 tij = scvf.area()*ti;
145 const auto outsideScvIdx = scvf.outsideScvIdx();
146 const auto& outsideScv = fvGeometry.scv(outsideScvIdx);
147 const auto& outsideVolVars = elemVolVars[outsideScvIdx];
150 if (phaseIdx != sPhaseIdx)
153 if (numEnergyEqFluid < ModelTraits::numFluidPhases())
155 outsideLambda += Deprecated::template effectiveThermalConductivity<ThermalConductivityModel>(
156 outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv);
160 outsideLambda += outsideVolVars.fluidThermalConductivity(phaseIdx)*outsideVolVars.saturation(phaseIdx)*outsideVolVars.porosity();
166 outsideLambda +=outsideVolVars.solidThermalConductivity()*(1.0-outsideVolVars.porosity());
179 tij = 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
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
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...