62 const SubControlVolume& scv,
63 const VolumeVariables& volVars)
const
65 NumEqVector storage(0.0);
67 for (
int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
69 storage[Indices::conti0EqIdx] +=
71 * volVars.saturation(phaseIdx) * volVars.density(phaseIdx);
73 EnergyLocalResidual::fluidPhaseStorage(storage, scv, volVars, phaseIdx);
77 EnergyLocalResidual::solidPhaseStorage(storage, scv, volVars);
84 const Element& element,
85 const FVElementGeometry& fvGeometry,
86 const ElementVolumeVariables& elemVolVars,
87 const SubControlVolumeFace& scvf,
88 const ElementFluxVariablesCache& elemFluxVarsCache)
const
90 FluxVariables fluxVars;
91 fluxVars.init(problem, element, fvGeometry, elemVolVars, scvf, elemFluxVarsCache);
94 for (
int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
97 auto upwindTerm = [phaseIdx](
const auto& volVars)
98 {
return volVars.density(phaseIdx)*volVars.mobility(phaseIdx); };
100 flux[Indices::conti0EqIdx] += fluxVars.advectiveFlux(phaseIdx, upwindTerm);
103 EnergyLocalResidual::heatConvectionFlux(flux, fluxVars, phaseIdx);
107 EnergyLocalResidual::heatConductionFlux(flux, fluxVars);