Class PhaseGERG2008Eos

All Implemented Interfaces:
Serializable, Cloneable, PhaseEosInterface, PhaseInterface, ThermodynamicConstantsInterface
Direct Known Subclasses:
PhaseEOSCGEos

public class PhaseGERG2008Eos extends PhaseEos

PhaseGERG2008Eos class.

Version:
$Id: $Id
Author:
victorigi
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • IPHASE

      int IPHASE
    • okVolume

      boolean okVolume
    • enthalpy

      double enthalpy
    • entropy

      double entropy
    • gibbsEnergy

      double gibbsEnergy
    • CpGERG2008

      double CpGERG2008
    • CvGERG2008

      double CvGERG2008
    • internalEnery

      double internalEnery
    • JTcoef

      double JTcoef
    • a0

      org.netlib.util.doubleW[] a0
    • ar

      org.netlib.util.doubleW[][] ar
    • kappa

      double kappa
    • W

      double W
    • gergModelType

      private GERG2008Type gergModelType
      The GERG-2008 model variant to use. Default is STANDARD.
  • Constructor Details

    • PhaseGERG2008Eos

      public PhaseGERG2008Eos()

      Constructor for PhaseGERG2008Eos.

  • Method Details

    • clone

      public PhaseGERG2008Eos clone()

      clone.

      Specified by:
      clone in interface PhaseInterface
      Overrides:
      clone in class PhaseEos
      Returns:
      a PhaseInterface object
    • getGergModelType

      public GERG2008Type getGergModelType()
      Get the GERG-2008 model type used by this phase.
      Returns:
      the GERG model type
    • setGergModelType

      public void setGergModelType(GERG2008Type modelType)
      Set the GERG-2008 model type for this phase.
      Parameters:
      modelType - the GERG model type to use
    • addComponent

      public void addComponent(String name, double moles, double molesInPhase, int compNumber)

      Add component to component array and update moles variables.

      Parameters:
      name - Name of component.
      moles - Total number of moles of component.
      molesInPhase - Number of moles in phase.
      compNumber - Index number of component in phase object component array.
    • init

      public void init(double totalNumberOfMoles, int numberOfComponents, int initType, PhaseType pt, double beta)

      init.

      initType used in component.init()

      Calls component.init(initType)

      Specified by:
      init in interface PhaseInterface
      Overrides:
      init in class PhaseEos
      Parameters:
      totalNumberOfMoles - Total number of moles in all phases of Stream.
      numberOfComponents - Number of components in system.
      initType - a int. Use 0 to init, and 1 to reset.
      pt - Type of phase.
      beta - Mole fraction of this phase in system.
    • getGibbsEnergy

      public double getGibbsEnergy()

      getGibbsEnergy.

      Specified by:
      getGibbsEnergy in interface PhaseInterface
      Overrides:
      getGibbsEnergy in class Phase
      Returns:
      a double
    • getZ

      public double getZ()

      getZ.

      Specified by:
      getZ in interface PhaseInterface
      Overrides:
      getZ in class Phase
      Returns:
      a double
    • getJouleThomsonCoefficient

      public double getJouleThomsonCoefficient()
      Get the Joule Thomson Coefficient of a phase.
      Specified by:
      getJouleThomsonCoefficient in interface PhaseInterface
      Overrides:
      getJouleThomsonCoefficient in class PhaseEos
      Returns:
      Joule Thomson coefficient in K/bar
    • getEnthalpy

      public double getEnthalpy()
      method to return enthalpy of a phase in unit Joule.
      Specified by:
      getEnthalpy in interface PhaseInterface
      Overrides:
      getEnthalpy in class Phase
      Returns:
      a double
    • getEntropy

      public double getEntropy()
      method to return entropy of the phase.
      Specified by:
      getEntropy in interface PhaseInterface
      Overrides:
      getEntropy in class Phase
      Returns:
      a double
    • getInternalEnergy

      public double getInternalEnergy()

      getInternalEnergy.

      Specified by:
      getInternalEnergy in interface PhaseInterface
      Overrides:
      getInternalEnergy in class Phase
      Returns:
      a double
    • getCp

      public double getCp()
      method to return specific heat capacity (Cp).
      Specified by:
      getCp in interface PhaseInterface
      Overrides:
      getCp in class Phase
      Returns:
      Cp in unit J/K
    • getCv

      public double getCv()
      method to return specific heat capacity (Cv).
      Specified by:
      getCv in interface PhaseInterface
      Overrides:
      getCv in class Phase
      Returns:
      Cv in unit J/K
    • molarVolume

      public double molarVolume(double pressure, double temperature, double A, double B, PhaseType pt) throws IsNaNException, TooManyIterationsException

      molarVolume.

      Specified by:
      molarVolume in interface PhaseInterface
      Overrides:
      molarVolume in class PhaseEos
      Parameters:
      pressure - a double
      temperature - a double
      A - a double
      B - a double
      pt - the PhaseType of the phase
      Returns:
      a double
      Throws:
      IsNaNException - if any.
      TooManyIterationsException - if any.
    • calcPressure

      public double calcPressure()

      calcPressure.

      Specified by:
      calcPressure in interface PhaseEosInterface
      Overrides:
      calcPressure in class PhaseEos
      Returns:
      a double
    • calcPressuredV

      public double calcPressuredV()

      calcPressuredV.

      Specified by:
      calcPressuredV in interface PhaseEosInterface
      Overrides:
      calcPressuredV in class PhaseEos
      Returns:
      a double
    • dFdN

      public double dFdN(int i)

      dFdN.

      Specified by:
      dFdN in interface PhaseEosInterface
      Overrides:
      dFdN in class PhaseEos
      Parameters:
      i - a int
      Returns:
      a double
    • dFdNdN

      public double dFdNdN(int i, int j)

      dFdNdN.

      Specified by:
      dFdNdN in interface PhaseEosInterface
      Overrides:
      dFdNdN in class PhaseEos
      Parameters:
      i - a int
      j - a int
      Returns:
      a double
    • dFdNdV

      public double dFdNdV(int i)

      dFdNdV.

      Specified by:
      dFdNdV in interface PhaseEosInterface
      Overrides:
      dFdNdV in class PhaseEos
      Parameters:
      i - a int
      Returns:
      a double
    • dFdNdT

      public double dFdNdT(int i)

      dFdNdT.

      Specified by:
      dFdNdT in interface PhaseEosInterface
      Overrides:
      dFdNdT in class PhaseEos
      Parameters:
      i - a int
      Returns:
      a double
    • dFdTdV

      public double dFdTdV()

      Calculate derivative of F per Temperature and Volume, i.e., dF/dT * 1/dV.

      Specified by:
      dFdTdV in interface PhaseInterface
      Overrides:
      dFdTdV in class PhaseEos
      Returns:
      a double
    • dFdVdV

      public double dFdVdV()

      dFdVdV.

      Specified by:
      dFdVdV in interface PhaseInterface
      Overrides:
      dFdVdV in class PhaseEos
      Returns:
      a double
    • getDensity

      public double getDensity()
      Get density of a phase note: does not use Peneloux volume correction.
      Specified by:
      getDensity in interface PhaseInterface
      Overrides:
      getDensity in class Phase
      Returns:
      density with unit kg/m3
    • getdPdTVn

      public double getdPdTVn()

      getdPdTVn.

      Specified by:
      getdPdTVn in interface PhaseInterface
      Overrides:
      getdPdTVn in class PhaseEos
      Returns:
      a double
    • getdPdVTn

      public double getdPdVTn()

      getdPdVTn.

      Specified by:
      getdPdVTn in interface PhaseInterface
      Overrides:
      getdPdVTn in class PhaseEos
      Returns:
      a double
    • getdPdrho

      public double getdPdrho()

      getdPdrho.

      Specified by:
      getdPdrho in interface PhaseInterface
      Overrides:
      getdPdrho in class PhaseEos
      Returns:
      a double
    • getGresTP

      public double getGresTP()

      getGresTP.

      Specified by:
      getGresTP in interface PhaseInterface
      Overrides:
      getGresTP in class PhaseEos
      Returns:
      a double
    • getHresTP

      public double getHresTP()

      getHresTP.

      Specified by:
      getHresTP in interface PhaseInterface
      Overrides:
      getHresTP in class PhaseEos
      Returns:
      a double
    • getAlpha0

      public org.netlib.util.doubleW[] getAlpha0()
      Get cached ideal Helmholtz energy derivatives.
      Returns:
      array of doubleW containing α₀ and its derivatives
    • getAlphaRes

      public org.netlib.util.doubleW[][] getAlphaRes()
      Get cached residual Helmholtz energy derivatives.
      Returns:
      matrix of doubleW containing αᵣ and its derivatives
    • getDensity_GERG2008

      public double getDensity_GERG2008()
      Get density of a phase using the GERG-2008 EoS.
      Specified by:
      getDensity_GERG2008 in interface PhaseInterface
      Overrides:
      getDensity_GERG2008 in class Phase
      Returns:
      density with unit kg/m3
    • getProperties_GERG2008

      public double[] getProperties_GERG2008()

      Get GERG properties of a phase using the GERG-2008 EoS.

      Specified by:
      getProperties_GERG2008 in interface PhaseInterface
      Overrides:
      getProperties_GERG2008 in class Phase
      Returns:
      an array of type double
    • getAlpha0_GERG2008

      public org.netlib.util.doubleW[] getAlpha0_GERG2008()
      Overloaded method to get the Leachman a0matrix with default hydrogen type ('normal').
      Specified by:
      getAlpha0_GERG2008 in interface PhaseInterface
      Overrides:
      getAlpha0_GERG2008 in class Phase
      Returns:
      matrix of the reduced ideal helmholtz free energy and its derivatives
    • getAlphares_GERG2008

      public org.netlib.util.doubleW[][] getAlphares_GERG2008()
      Overloaded method to get the Leachman armatrix with default hydrogen type ('normal').
      Specified by:
      getAlphares_GERG2008 in interface PhaseInterface
      Overrides:
      getAlphares_GERG2008 in class Phase
      Returns:
      matrix of the reduced residual helmholtz free energy and its derivatives