Class PhaseGERG2004Eos

All Implemented Interfaces:
Serializable, Cloneable, PhaseEosInterface, PhaseInterface, ThermodynamicConstantsInterface

public class PhaseGERG2004Eos extends PhaseEos

PhaseGERG2004Eos class.

Version:
$Id: $Id
Author:
Even Solbraa
See Also:
  • Field Details

    • serialVersionUID

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

      private GERG2004EOS gergEOS
    • xFracGERG

      double[] xFracGERG
    • IPHASE

      int IPHASE
    • okVolume

      boolean okVolume
    • enthalpy

      double enthalpy
    • entropy

      double entropy
    • gibbsEnergy

      double gibbsEnergy
    • CpGERG

      double CpGERG
    • CvGERG

      double CvGERG
    • internalEnery

      double internalEnery
    • JTcoef

      double JTcoef
  • Constructor Details

    • PhaseGERG2004Eos

      public PhaseGERG2004Eos()

      Constructor for PhaseGERG2004Eos.

  • Method Details

    • clone

      public PhaseGERG2004Eos clone()

      clone.

      Specified by:
      clone in interface PhaseInterface
      Overrides:
      clone in class PhaseEos
      Returns:
      a PhaseInterface object
    • 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.
    • setxFracGERG

      public void setxFracGERG()

      Setter for the field xFracGERG.

    • 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
    • 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.