13#ifndef DUMUX_NAVIERSTOKES_VOLUME_VARIABLES_HH
14#define DUMUX_NAVIERSTOKES_VOLUME_VARIABLES_HH
24template <
class Traits>
30 using Scalar =
typename Traits::PrimaryVariables::value_type;
38 using Indices =
typename Traits::ModelTraits::Indices;
49 template<
class ElementSolution,
class Problem,
class Element,
class SubControlVolume>
50 void update(
const ElementSolution& elemSol,
51 const Problem& problem,
52 const Element& element,
53 const SubControlVolume& scv)
55 ParentType::update(elemSol, problem, element, scv);
62 template<
class ElementSolution,
class Problem,
class Element,
class SubControlVolume>
64 const Problem& problem,
65 const Element& element,
66 const SubControlVolume& scv,
69 const Scalar t = ParentType::temperature(elemSol, problem, element, scv);
72 fluidState.setPressure(0, elemSol[0][Indices::pressureIdx]);
79 typename FluidSystem::ParameterCache paramCache;
82 Scalar value = FluidSystem::density(
fluidState, paramCache, 0);
85 value = FluidSystem::viscosity(
fluidState, paramCache, 0);
89 value = ParentType::enthalpy(
fluidState, paramCache);
Definition freeflow/volumevariables.hh:22
Volume variables for the single-phase Navier-Stokes model.
Definition freeflow/navierstokes/volumevariables.hh:26
typename Traits::ModelTraits::Indices Indices
export the indices type
Definition freeflow/navierstokes/volumevariables.hh:38
FluidState fluidState_
Definition freeflow/navierstokes/volumevariables.hh:144
Scalar pressure(int phaseIdx=0) const
Return the effective pressure of a given phase within the control volume.
Definition freeflow/navierstokes/volumevariables.hh:97
Scalar molarMass(int phaseIdx=0) const
Returns the molar mass of a given phase within the control volume.
Definition freeflow/navierstokes/volumevariables.hh:118
Scalar density(int phaseIdx=0) const
Return the mass density of a given phase within the control volume.
Definition freeflow/navierstokes/volumevariables.hh:104
Scalar effectiveViscosity() const
Return the effective dynamic viscosity of the fluid within the control volume.
Definition freeflow/navierstokes/volumevariables.hh:134
void update(const ElementSolution &elemSol, const Problem &problem, const Element &element, const SubControlVolume &scv)
Update all quantities for a given control volume.
Definition freeflow/navierstokes/volumevariables.hh:50
static void completeFluidState(const ElementSolution &elemSol, const Problem &problem, const Element &element, const SubControlVolume &scv, FluidState &fluidState)
Update the fluid state.
Definition freeflow/navierstokes/volumevariables.hh:63
typename Traits::FluidState FluidState
export the fluid state type
Definition freeflow/navierstokes/volumevariables.hh:36
const FluidState & fluidState() const
Return the fluid state of the control volume.
Definition freeflow/navierstokes/volumevariables.hh:140
Scalar temperature() const
Return temperature inside the sub-control volume.
Definition freeflow/navierstokes/volumevariables.hh:111
Scalar viscosity(int phaseIdx=0) const
Return the dynamic viscosity of the fluid within the control volume.
Definition freeflow/navierstokes/volumevariables.hh:127
typename Traits::FluidSystem FluidSystem
export the underlying fluid system
Definition freeflow/navierstokes/volumevariables.hh:34
Volume variables for free-flow models. The class is specialized for isothermal and non-isothermal mod...