26#ifndef DUMUX_ENERGY_LOCAL_RESIDUAL_HH
27#define DUMUX_ENERGY_LOCAL_RESIDUAL_HH
34template<
class TypeTag,
bool enableEneryBalance>
37template<
class TypeTag>
44template<
class TypeTag>
51 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
64 const SubControlVolume& scv,
65 const VolumeVariables& volVars,
77 const SubControlVolume& scv,
78 const VolumeVariables& volVars)
89 FluxVariables& fluxVars,
100 FluxVariables& fluxVars)
108template<
class TypeTag>
115 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
118 using Element =
typename GridView::template Codim<0>::Entity;
122 enum { energyEqIdx = Indices::energyEqIdx };
135 const SubControlVolume& scv,
136 const VolumeVariables& volVars,
139 storage[energyEqIdx] += volVars.porosity()
140 * volVars.density(phaseIdx)
141 * volVars.internalEnergy(phaseIdx)
142 * volVars.saturation(phaseIdx);
153 const SubControlVolume& scv,
154 const VolumeVariables& volVars)
156 storage[energyEqIdx] += volVars.temperature()
157 * volVars.solidHeatCapacity()
158 * volVars.solidDensity()
159 * (1.0 - volVars.porosity());
170 FluxVariables& fluxVars,
173 auto upwindTerm = [phaseIdx](
const auto& volVars)
174 {
return volVars.density(phaseIdx)*volVars.mobility(phaseIdx)*volVars.enthalpy(phaseIdx); };
176 flux[energyEqIdx] += fluxVars.advectiveFlux(phaseIdx, upwindTerm);
186 FluxVariables& fluxVars)
188 flux[energyEqIdx] += fluxVars.heatConductionFlux();
201 const Element& element,
202 const FVElementGeometry& fvGeometry,
203 const ElementVolumeVariables& elemVolVars,
204 const SubControlVolume &scv)
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: porousmediumflow/nonisothermal/localresidual.hh:35
static void heatConductionFlux(NumEqVector &flux, FluxVariables &fluxVars)
The diffusive energy fluxes.
Definition: porousmediumflow/nonisothermal/localresidual.hh:99
static void fluidPhaseStorage(NumEqVector &storage, const SubControlVolume &scv, const VolumeVariables &volVars, int phaseIdx)
The energy storage in the fluid phase with index phaseIdx.
Definition: porousmediumflow/nonisothermal/localresidual.hh:63
static void heatConvectionFlux(NumEqVector &flux, FluxVariables &fluxVars, int phaseIdx)
The advective phase energy fluxes.
Definition: porousmediumflow/nonisothermal/localresidual.hh:88
static void solidPhaseStorage(NumEqVector &storage, const SubControlVolume &scv, const VolumeVariables &volVars)
The energy storage in the solid matrix.
Definition: porousmediumflow/nonisothermal/localresidual.hh:76
static void solidPhaseStorage(NumEqVector &storage, const SubControlVolume &scv, const VolumeVariables &volVars)
The energy storage in the solid matrix.
Definition: porousmediumflow/nonisothermal/localresidual.hh:152
static void fluidPhaseStorage(NumEqVector &storage, const SubControlVolume &scv, const VolumeVariables &volVars, int phaseIdx)
The energy storage in the fluid phase with index phaseIdx.
Definition: porousmediumflow/nonisothermal/localresidual.hh:134
static void heatConductionFlux(NumEqVector &flux, FluxVariables &fluxVars)
The diffusive energy fluxes.
Definition: porousmediumflow/nonisothermal/localresidual.hh:185
static void computeSourceEnergy(NumEqVector &source, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolume &scv)
heat transfer between the phases for nonequilibrium models
Definition: porousmediumflow/nonisothermal/localresidual.hh:200
static void heatConvectionFlux(NumEqVector &flux, FluxVariables &fluxVars, int phaseIdx)
The advective phase energy fluxes.
Definition: porousmediumflow/nonisothermal/localresidual.hh:169
Declares all properties used in Dumux.