Class PhaseGEUnifac

All Implemented Interfaces:
Serializable, Cloneable, PhaseGEInterface, PhaseInterface, ThermodynamicConstantsInterface
Direct Known Subclasses:
PhaseGEUnifacPSRK, PhaseGEUnifacUMRPRU

public class PhaseGEUnifac extends PhaseGEUniquac

PhaseGEUnifac class.

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

    • serialVersionUID

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

      static org.apache.logging.log4j.Logger logger
      Logger object for class.
    • aij

      double[][] aij
    • bij

      double[][] bij
    • cij

      double[][] cij
    • checkedGroups

      boolean checkedGroups
  • Constructor Details

    • PhaseGEUnifac

      public PhaseGEUnifac()

      Constructor for PhaseGEUnifac.

    • PhaseGEUnifac

      public PhaseGEUnifac(PhaseInterface phase, double[][] alpha, double[][] Dij, String[][] mixRule, double[][] intparam)

      Constructor for PhaseGEUnifac.

      Parameters:
      phase - a PhaseInterface object
      alpha - an array of type double
      Dij - an array of type double
      mixRule - an array of String objects
      intparam - an array of type double
  • Method Details

    • addComponent

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

      Add component to component array and update moles variables.

      Specified by:
      addComponent in interface PhaseInterface
      Overrides:
      addComponent in class PhaseGEUniquac
      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.
    • setMixingRule

      public void setMixingRule(MixingRuleTypeInterface mr)

      setMixingRule.

      Specified by:
      setMixingRule in interface PhaseInterface
      Overrides:
      setMixingRule in class PhaseGE
      Parameters:
      mr - a MixingRuleTypeInterface
    • init

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

      init.

      initType used in component.init()

      Specified by:
      init in interface PhaseInterface
      Overrides:
      init in class PhaseGE
      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.
    • calcaij

      public void calcaij()

      calcaij.

    • checkGroups

      public void checkGroups()

      checkGroups.

    • getExcessGibbsEnergy

      public double getExcessGibbsEnergy()

      getExcessGibbsEnergy.

      Specified by:
      getExcessGibbsEnergy in interface PhaseInterface
      Overrides:
      getExcessGibbsEnergy in class PhaseGEUniquac
      Returns:
      a double
    • getExcessGibbsEnergy

      public double getExcessGibbsEnergy(PhaseInterface phase, int numberOfComponents, double temperature, double pressure, PhaseType pt)

      getExcessGibbsEnergy.

      Specified by:
      getExcessGibbsEnergy in interface PhaseGEInterface
      Overrides:
      getExcessGibbsEnergy in class PhaseGEUniquac
      Parameters:
      phase - a PhaseInterface object
      numberOfComponents - a int
      temperature - a double
      pressure - a double
      pt - the PhaseType of the phase
      Returns:
      a double
    • getGibbsEnergy

      public double getGibbsEnergy()

      getGibbsEnergy.

      Specified by:
      getGibbsEnergy in interface PhaseInterface
      Overrides:
      getGibbsEnergy in class PhaseGEUniquac
      Returns:
      a double
    • getAij

      public double getAij(int i, int j)

      Getter for the field aij.

      Parameters:
      i - a int
      j - a int
      Returns:
      a double
    • setAij

      public void setAij(int i, int j, double val)

      Setter for the field aij.

      Parameters:
      i - a int
      j - a int
      val - a double
    • getBij

      public double getBij(int i, int j)

      Getter for the field bij.

      Parameters:
      i - a int
      j - a int
      Returns:
      a double
    • setBij

      public void setBij(int i, int j, double val)

      Setter for the field bij.

      Parameters:
      i - a int
      j - a int
      val - a double
    • getCij

      public double getCij(int i, int j)

      Getter for the field cij.

      Parameters:
      i - a int
      j - a int
      Returns:
      a double
    • setCij

      public void setCij(int i, int j, double val)

      Setter for the field cij.

      Parameters:
      i - a int
      j - a int
      val - a double