14#ifndef DUMUX_FREEFLOW_NAVIER_STOKES_ENERGY_VOLUME_VARIABLES_HH 
   15#define DUMUX_FREEFLOW_NAVIER_STOKES_ENERGY_VOLUME_VARIABLES_HH 
   18#include <dune/common/std/type_traits.hh> 
   27template<
bool enableEnergyBalance, 
class Traits>
 
   36    using type = 
typename Traits::HeatConductionType;
 
 
   45template<
class Traits, 
class Impl>
 
   48    using Scalar = 
typename Traits::PrimaryVariables::value_type;
 
   49    static constexpr bool enableEnergyBalance = Traits::ModelTraits::enableEnergyBalance();
 
   65    template<
class ElementSolution, 
class Problem, 
class Element, 
class SubControlVolume>
 
   67                          const Problem& problem,
 
   68                          const Element& element,
 
   69                          const SubControlVolume& scv)
 const 
   71        if constexpr (enableEnergyBalance)
 
   72            return elemSol[scv.localDofIndex()][Traits::ModelTraits::Indices::temperatureIdx];
 
   74            return problem.spatialParams().temperature(element, scv, elemSol);
 
 
   81        if constexpr (enableEnergyBalance)
 
   82            lambdaEff_ = Traits::EffectiveThermalConductivityModel::effectiveThermalConductivity(
asImp_());
 
 
   93        if constexpr (enableEnergyBalance)
 
   94            return asImp_().fluidState().internalEnergy(0);
 
 
  107        if constexpr (enableEnergyBalance)
 
  108            return asImp_().fluidState().enthalpy(0);
 
 
  119    { 
return asImp_().fluidState().temperature(0); }
 
 
  127    { 
return FluidSystem::thermalConductivity(
asImp_().fluidState(), 0); }
 
 
  139    template<
class ParameterCache>
 
  141                           const ParameterCache& paramCache)
 
  143        if constexpr (enableEnergyBalance)
 
  144            return FluidSystem::enthalpy(fluidState, paramCache, 0);
 
 
  151    const Impl &
asImp_()
 const { 
return *
static_cast<const Impl*
>(
this); }
 
  152    Impl &
asImp_() { 
return *
static_cast<Impl*
>(
this); }
 
 
The isothermal base class.
Definition freeflow/navierstokes/energy/volumevariables.hh:47
Scalar lambdaEff_
Definition freeflow/navierstokes/energy/volumevariables.hh:150
Impl & asImp_()
Definition freeflow/navierstokes/energy/volumevariables.hh:152
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:91
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:66
const Impl & asImp_() const
Definition freeflow/navierstokes/energy/volumevariables.hh:151
static Scalar enthalpy(const FluidState &fluidState, const ParameterCache ¶mCache)
Definition freeflow/navierstokes/energy/volumevariables.hh:140
void updateEffectiveThermalConductivity()
The effective thermal conductivity is zero for isothermal models.
Definition freeflow/navierstokes/energy/volumevariables.hh:79
typename Detail::FreeFlowHeatCondType< enableEnergyBalance, Traits >::type HeatConductionType
Definition freeflow/navierstokes/energy/volumevariables.hh:54
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:118
typename Traits::FluidState FluidState
Definition freeflow/navierstokes/energy/volumevariables.hh:52
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:126
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:133
typename Traits::FluidSystem FluidSystem
Definition freeflow/navierstokes/energy/volumevariables.hh:53
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:105
Distance implementation details.
Definition cvfelocalresidual.hh:25
Definition freeflow/navierstokes/energy/volumevariables.hh:25
typename Traits::HeatConductionType type
Definition freeflow/navierstokes/energy/volumevariables.hh:36
Definition freeflow/navierstokes/energy/volumevariables.hh:29
EmptyFreeFlowHeatCondType type
Definition freeflow/navierstokes/energy/volumevariables.hh:30