26#ifndef DUMUX_FREEFLOW_NAVIER_STOKES_ENERGY_VOLUME_VARIABLES_HH
27#define DUMUX_FREEFLOW_NAVIER_STOKES_ENERGY_VOLUME_VARIABLES_HH
30#include <dune/common/std/type_traits.hh>
39template<
bool enableEnergyBalance,
class Traits>
48 using type =
typename Traits::HeatConductionType;
57template<
class Traits,
class Impl>
60 using Scalar =
typename Traits::PrimaryVariables::value_type;
61 static constexpr bool enableEnergyBalance = Traits::ModelTraits::enableEnergyBalance();
77 template<
class ElementSolution,
class Problem,
class Element,
class SubControlVolume>
79 const Problem& problem,
80 const Element& element,
81 const SubControlVolume& scv)
const
83 if constexpr (enableEnergyBalance)
84 return elemSol[scv.localDofIndex()][Traits::ModelTraits::Indices::temperatureIdx];
86 return problem.spatialParams().temperature(element, scv, elemSol);
93 if constexpr (enableEnergyBalance)
94 lambdaEff_ = Traits::EffectiveThermalConductivityModel::effectiveThermalConductivity(
asImp_());
105 if constexpr (enableEnergyBalance)
106 return asImp_().fluidState().internalEnergy(0);
119 if constexpr (enableEnergyBalance)
120 return asImp_().fluidState().enthalpy(0);
131 {
return asImp_().fluidState().temperature(0); }
139 {
return FluidSystem::thermalConductivity(
asImp_().fluidState(), 0); }
151 template<
class ParameterCache>
153 const ParameterCache& paramCache)
155 if constexpr (enableEnergyBalance)
156 return FluidSystem::enthalpy(fluidState, paramCache, 0);
163 const Impl &
asImp_()
const {
return *
static_cast<const Impl*
>(
this); }
164 Impl &
asImp_() {
return *
static_cast<Impl*
>(
this); }
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
Definition: freeflow/navierstokes/energy/volumevariables.hh:37
Definition: freeflow/navierstokes/energy/volumevariables.hh:41
typename Traits::HeatConductionType type
Definition: freeflow/navierstokes/energy/volumevariables.hh:48
The isothermal base class.
Definition: freeflow/navierstokes/energy/volumevariables.hh:59
Scalar lambdaEff_
Definition: freeflow/navierstokes/energy/volumevariables.hh:162
Scalar internalEnergy(const int phaseIdx=0) const
Returns the total internal energy of a phase in the sub-control volume.
Definition: freeflow/navierstokes/energy/volumevariables.hh:103
Scalar getTemperature(const ElementSolution &elemSol, const Problem &problem, const Element &element, const SubControlVolume &scv) const
Returns the temperature at a given sub-control volume.
Definition: freeflow/navierstokes/energy/volumevariables.hh:78
const Impl & asImp_() const
Definition: freeflow/navierstokes/energy/volumevariables.hh:163
static Scalar enthalpy(const FluidState &fluidState, const ParameterCache ¶mCache)
Definition: freeflow/navierstokes/energy/volumevariables.hh:152
void updateEffectiveThermalConductivity()
The effective thermal conductivity is zero for isothermal models.
Definition: freeflow/navierstokes/energy/volumevariables.hh:91
typename Detail::FreeFlowHeatCondType< enableEnergyBalance, Traits >::type HeatConductionType
Definition: freeflow/navierstokes/energy/volumevariables.hh:66
Scalar temperatureFluid(const int phaseIdx=0) const
Returns the temperature of a fluid phase assuming thermal nonequilibrium the sub-control volume.
Definition: freeflow/navierstokes/energy/volumevariables.hh:130
typename Traits::FluidState FluidState
Definition: freeflow/navierstokes/energy/volumevariables.hh:64
Scalar fluidThermalConductivity(const int phaseIdx=0) const
Returns the thermal conductivity of a fluid phase in the sub-control volume.
Definition: freeflow/navierstokes/energy/volumevariables.hh:138
Scalar effectiveThermalConductivity(const int phaseIdx=0) const
Returns the effective thermal conductivity in the sub-control volume. Specific to equilibirum models...
Definition: freeflow/navierstokes/energy/volumevariables.hh:145
typename Traits::FluidSystem FluidSystem
Definition: freeflow/navierstokes/energy/volumevariables.hh:65
Scalar enthalpy(const int phaseIdx=0) const
Returns the total enthalpy of a phase in the sub-control volume.
Definition: freeflow/navierstokes/energy/volumevariables.hh:117