Class PhaseDesmukhMather

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

public class PhaseDesmukhMather extends PhaseGE

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

      double GE
    • aij

      double[][] aij
    • bij

      double[][] bij
  • Constructor Details

    • PhaseDesmukhMather

      public PhaseDesmukhMather()

      Constructor for PhaseDesmukhMather.

  • Method Details

    • 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()

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

      public void setMixingRule(MixingRuleTypeInterface mr)

      setMixingRule.

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

      public void setAlpha(double[][] alpha)

      setAlpha.

      Parameters:
      alpha - an array of type 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(double[][] alpha)

      Setter for the field aij.

      Parameters:
      alpha - an array of type double
    • setBij

      public void setBij(double[][] Bij)

      Setter for the field bij.

      Parameters:
      Bij - an array of type double
    • setDij

      public void setDij(double[][] Dij)

      setDij.

      Parameters:
      Dij - an array of type double
    • setDijT

      public void setDijT(double[][] DijT)

      setDijT.

      Parameters:
      DijT - an array of type double
    • getBetaDesMatij

      public double getBetaDesMatij(int i, int j)

      getBetaDesMatij.

      Parameters:
      i - a int
      j - a int
      Returns:
      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
    • getGibbsEnergy

      public double getGibbsEnergy()

      getGibbsEnergy.

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

      public double getExcessGibbsEnergy()

      getExcessGibbsEnergy.

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

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

      getExcessGibbsEnergy.

      Parameters:
      phase - a PhaseInterface object
      numberOfComponents - a int
      temperature - a double
      pressure - a double
      pt - the PhaseType of the phase
      Returns:
      a double
    • getActivityCoefficient

      public double getActivityCoefficient(int k, int p)

      getActivityCoefficient.

      Specified by:
      getActivityCoefficient in interface PhaseInterface
      Overrides:
      getActivityCoefficient in class Phase
      Parameters:
      k - a int
      p - a int
      Returns:
      a double
    • getActivityCoefficient

      public double getActivityCoefficient(int k)

      getActivityCoefficient.

      Specified by:
      getActivityCoefficient in interface PhaseInterface
      Overrides:
      getActivityCoefficient in class PhaseGE
      Parameters:
      k - a int
      Returns:
      a double
    • getIonicStrength

      public double getIonicStrength()

      getIonicStrength.

      Returns:
      a double
    • getSolventWeight

      public double getSolventWeight()

      getSolventWeight.

      Returns:
      a double
    • getSolventDensity

      public double getSolventDensity()

      getSolventDensity.

      Returns:
      a double
    • getSolventMolarMass

      public double getSolventMolarMass()

      getSolventMolarMass.

      Returns:
      a double
    • molarVolume

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

      molarVolume.

      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.