13#ifndef DUMUX_NAVIERSTOKES_MASS_1PNC_VOLUME_VARIABLES_HH 
   14#define DUMUX_NAVIERSTOKES_MASS_1PNC_VOLUME_VARIABLES_HH 
   25template <
class Traits>
 
   33    using Scalar = 
typename Traits::PrimaryVariables::value_type;
 
   35    static constexpr bool useMoles = Traits::ModelTraits::useMoles();
 
   36    using DiffusionCoefficients = 
typename Traits::DiffusionType::DiffusionCoefficientsContainer;
 
   47    using Indices = 
typename Traits::ModelTraits::Indices;
 
   58    template<
class ElementSolution, 
class Problem, 
class Element, 
class SubControlVolume>
 
   59    void update(
const ElementSolution &elemSol,
 
   60                const Problem &problem,
 
   61                const Element &element,
 
   62                const SubControlVolume& scv)
 
   68        typename FluidSystem::ParameterCache paramCache;
 
   71        auto getDiffusionCoefficient = [&](
int phaseIdx, 
int compIIdx, 
int compJIdx)
 
   73            return FluidSystem::binaryDiffusionCoefficient(this->
fluidState_,
 
 
   87    template<
class ElementSolution, 
class Problem, 
class Element, 
class SubControlVolume>
 
   89                                   const Problem& problem,
 
   90                                   const Element& element,
 
   91                                   const SubControlVolume& scv,
 
   95        fluidState.setPressure(0, elemSol[0][Indices::pressureIdx]);
 
  102        Scalar sumFracMinorComp = 0.0;
 
  108            Scalar moleOrMassFraction = elemSol[0][Indices::conti0EqIdx+compIdx] + 1.0;
 
  109            moleOrMassFraction = moleOrMassFraction - 1.0;
 
  111                fluidState.setMoleFraction(0, compIdx, moleOrMassFraction);
 
  113                fluidState.setMassFraction(0, compIdx, moleOrMassFraction);
 
  114            sumFracMinorComp += moleOrMassFraction;
 
  117            fluidState.setMoleFraction(0, 0, 1.0 - sumFracMinorComp);
 
  119            fluidState.setMassFraction(0, 0, 1.0 - sumFracMinorComp);
 
  121        typename FluidSystem::ParameterCache paramCache;
 
  124        Scalar value = FluidSystem::density(
fluidState, paramCache, 0);
 
  127        value = FluidSystem::molarDensity(
fluidState, paramCache, 0);
 
  130        value = FluidSystem::viscosity(
fluidState, paramCache, 0);
 
 
  236        return FluidSystem::molarMass(compIdx);
 
 
 
The isothermal base class.
Definition freeflow/navierstokes/energy/volumevariables.hh:47
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
void updateEffectiveThermalConductivity()
Definition freeflow/navierstokes/energy/volumevariables.hh:79
Scalar enthalpy(const int phaseIdx=0) const
Definition freeflow/navierstokes/energy/volumevariables.hh:105
Volume variables for the single-phase Navier-Stokes model.
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:29
Scalar effectiveViscosity() const
Return the effective dynamic viscosity  of the fluid within the control volume.
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:169
DiffusionCoefficients diffCoefficient_
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:268
Scalar viscosity(int phaseIdx=0) const
Return the dynamic viscosity  of the fluid within the control volume.
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:176
Scalar massFraction(int phaseIdx, int compIdx) const
Returns the mass fraction of a component in the phase .
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:185
typename NCTraits< BaseTraits, DT, EDM >::DiffusionType MolecularDiffusionType
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:45
typename NCTraits< BaseTraits, DT, EDM >::FluidState FluidState
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:43
Scalar moleFraction(int compIdx) const
Returns the mole fraction of a component in the phase .
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:216
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/mass/1pnc/volumevariables.hh:59
const FluidState & fluidState() const
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:262
FluidState fluidState_
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:266
typename NCTraits< BaseTraits, DT, EDM >::ModelTraits::Indices Indices
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:47
Scalar moleFraction(int phaseIdx, int compIdx) const
Returns the mole fraction of a component in the phase .
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:206
Scalar molarMass(int compIdx) const
Returns the molar mass of a given component.
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:234
Scalar pressure(int phaseIdx=0) const
Return the effective pressure  of a given phase within the control volume.
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:142
Scalar molarDensity(int phaseIdx=0) const
Returns the mass density of a given phase .
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:224
Scalar saturation(int phaseIdx=0) const
Returns the saturation.
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:148
Scalar averageMolarMass(const int phaseIdx=0) const
Returns the average molar mass  of the fluid phase.
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:244
void completeFluidState(const ElementSolution &elemSol, const Problem &problem, const Element &element, const SubControlVolume &scv, FluidState &fluidState) const
Update the fluid state.
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:88
Scalar effectiveDiffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Returns the effective diffusion coefficients for a phase in .
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:256
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Returns the binary diffusion coefficients for a phase in .
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:250
typename NCTraits< BaseTraits, DT, EDM >::FluidSystem FluidSystem
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:41
Scalar temperature() const
Return temperature  inside the sub-control volume.
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:162
Scalar massFraction(int compIdx) const
Returns the mass fraction of a component in the phase .
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:195
Scalar density(int phaseIdx=0) const
Return the mass density  of a given phase within the control volume.
Definition freeflow/navierstokes/mass/1pnc/volumevariables.hh:155
Volume variables for the single-phase Navier-Stokes model.
Definition scalarvolumevariables.hh:24
static constexpr int numFluidComponents()
Return number of components considered by the model.
Definition scalarvolumevariables.hh:40
void update(const ElementSolution &elemSol, const Problem &problem, const Element &element, const SubControlVolume &scv)
Update all quantities for a given control volume.
Definition scalarvolumevariables.hh:52
Base class for the model specific class which provides access to all volume averaged quantities.
Volume variables for the single-phase Navier-Stokes model.