Class PhaseDefault

java.lang.Object
neqsim.thermo.phase.Phase
neqsim.thermo.phase.PhaseDefault
All Implemented Interfaces:
Serializable, Cloneable, PhaseInterface, ThermodynamicConstantsInterface

public class PhaseDefault extends Phase

PhaseDefault class.

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

  • Constructor Details

    • PhaseDefault

      public PhaseDefault()

      Constructor for PhaseDefault.

    • PhaseDefault

      public PhaseDefault(ComponentInterface comp)

      Constructor for PhaseDefault.

      Parameters:
      comp - a ComponentInterface object
  • Method Details

    • setComponentType

      public void setComponentType(ComponentInterface comp)

      setComponentType.

      Parameters:
      comp - a ComponentInterface 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.
    • 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.
    • getMixingRule

      public EosMixingRulesInterface getMixingRule()
      Get mixing rule.
      Returns:
      a MixingRulesInterface
    • setMixingRuleGEModel

      public void setMixingRuleGEModel(String name)

      setMixingRuleGEModel.

      Parameters:
      name - a String object
    • setMixingRule

      public void setMixingRule(MixingRuleTypeInterface mr)

      setMixingRule.

      Parameters:
      mr - a MixingRuleTypeInterface
    • resetMixingRule

      public void resetMixingRule(MixingRuleTypeInterface mr)

      resetMixingRule.

      Parameters:
      mr - a int
    • getMolarVolume

      public double getMolarVolume()
      method to return molar volume of the phase note: without Peneloux volume correction.
      Specified by:
      getMolarVolume in interface PhaseInterface
      Overrides:
      getMolarVolume in class Phase
      Returns:
      molar volume volume in unit m3/mol*1e5
    • getGibbsEnergy

      public double getGibbsEnergy()

      getGibbsEnergy.

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

      public double getSoundSpeed()
      Get the speed of sound of a phase note: implemented in phaseEos.
      Specified by:
      getSoundSpeed in interface PhaseInterface
      Specified by:
      getSoundSpeed in class Phase
      Returns:
      speed of sound in m/s