/*!
  * \brief The specific internal energy of a fluid phase [J/kg]
  */
 Scalar internalEnergy(unsigned phaseIdx) const
 { return enthalpy_[phaseIdx] - asImp_().pressure(phaseIdx)/asImp_().density(phaseIdx); }
 /*!
  * \brief The concentration of a component in a phase [mol/m^3]
  *
  * This quantity is often called "molar concentration" or just
  * "concentration", but there are many other (though less common)
  * measures for concentration.
  *
  * http://en.wikipedia.org/wiki/Concentration
  */
 Scalar molarity(int phaseIdx, int compIdx) const
 { return asImp_().molarDensity(phaseIdx)*moleFraction(phaseIdx, compIdx); }
示例#3
0
 void updateAllPressures(const FluidState& fluidState)
 { asImp_().updateAll(fluidState, Temperature | Composition); }
示例#4
0
 /*!
  * \brief The concentration of a component in a phase [mol/m^3]
  *
  * This quantity is often called "molar concentration" or just
  * "concentration", but there are many other (though less common)
  * measures for concentration.
  *
  * http://en.wikipedia.org/wiki/Concentration
  */
 Scalar molarity(unsigned phaseIdx, unsigned compIdx) const
 { return asImp_().molarDensity(phaseIdx)*moleFraction(phaseIdx, compIdx); }
示例#5
0
 void updateSingleMoleFraction(const FluidState& fluidState,
                               unsigned phaseIdx,
                               unsigned /*compIdx*/)
 {
     asImp_().updateComposition(fluidState, phaseIdx);
 }
示例#6
0
 void updateAll(const FluidState& fluidState, int /*exceptQuantities*/ = None)
 {
     for (unsigned phaseIdx = 0; phaseIdx < FluidState::numPhases; ++phaseIdx)
         asImp_().updatePhase(fluidState, phaseIdx);
 }
示例#7
0
 void updateComposition(const FluidState& fluidState, unsigned phaseIdx)
 {
     asImp_().updatePhase(fluidState, phaseIdx, /*except=*/Temperature | Pressure);
 }
示例#8
0
 void updatePressure(const FluidState& fluidState, unsigned phaseIdx)
 {
     asImp_().updatePhase(fluidState, phaseIdx);
 }
示例#9
0
 void updateAllTemperatures(const FluidState& fluidState)
 {
     for (unsigned phaseIdx = 0; phaseIdx < FluidState::numPhases; ++phaseIdx)
         asImp_().updatePhase(fluidState, phaseIdx);
 }
 /*!
  * \brief The fugacity of a component in a phase [Pa]
  */
 Scalar fugacity(unsigned phaseIdx, unsigned compIdx) const
 { return asImp_().pressure(phaseIdx)*fugacityCoefficient_[phaseIdx][compIdx]*asImp_().moleFraction(phaseIdx, compIdx); }
 /*!
  * \brief The molar density of a fluid phase [mol/m^3]
  */
 Scalar molarDensity(unsigned phaseIdx) const
 { return density_[phaseIdx]/asImp_().averageMolarMass(phaseIdx); }