Class PhaseBWRSEos

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

public class PhaseBWRSEos extends PhaseSrkEos

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

      int OP
    • OE

      int OE
  • Constructor Details

    • PhaseBWRSEos

      public PhaseBWRSEos()

      Constructor for PhaseBWRSEos.

  • Method Details

    • clone

      public PhaseBWRSEos clone()

      clone.

      Specified by:
      clone in interface PhaseInterface
      Overrides:
      clone in class PhaseSrkEos
      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.

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

      public double getMolarDensity()

      getMolarDensity.

      Returns:
      a double
    • getdRhodV

      public double getdRhodV()

      getdRhodV.

      Returns:
      a double
    • getdRhodVdV

      public double getdRhodVdV()

      getdRhodVdV.

      Returns:
      a double
    • getdRhodVdVdV

      public double getdRhodVdVdV()

      getdRhodVdVdV.

      Returns:
      a double
    • getGammadRho

      public double getGammadRho()

      getGammadRho.

      Returns:
      a double
    • getFpol

      public double getFpol()

      getFpol.

      Returns:
      a double
    • getFpoldV

      public double getFpoldV()

      getFpoldV.

      Returns:
      a double
    • getFpoldRho

      public double getFpoldRho()
      Derivative of the polynomial F-term with respect to molar density.
      Returns:
      dFpol/dρ
    • getFpoldVdV

      public double getFpoldVdV()

      getFpoldVdV.

      Returns:
      a double
    • getFpoldVdVdV

      public double getFpoldVdVdV()

      getFpoldVdVdV.

      Returns:
      a double
    • getFpoldT

      public double getFpoldT()

      getFpoldT.

      Returns:
      a double
    • getFpoldTdRho

      private double getFpoldTdRho()
      Cross derivative of the polynomial F-term with respect to temperature and molar density.
      Returns:
      d2Fpol/dT dρ
    • getFpoldTdV

      private double getFpoldTdV()
      Cross derivative of the polynomial F-term with respect to temperature and molar volume.
      Returns:
      d2Fpol/dT dV
    • getFpoldTdT

      private double getFpoldTdT()
      Second derivative of the polynomial F-term with respect to temperature.
      Returns:
      d2Fpol/dT2
    • getFdRho

      public double getFdRho()
      Total derivative of F with respect to molar density.
      Returns:
      dF/dρ
    • getEL

      public double getEL()

      getEL.

      Returns:
      a double
    • getELdRho

      public double getELdRho()

      getELdRho.

      Returns:
      a double
    • getELdRhodedRho

      public double getELdRhodedRho()
      Second derivative of the exponential EL term with respect to molar density.
      Returns:
      d2EL/dρ2
    • getELdRhodedRhodedRho

      public double getELdRhodedRhodedRho()
      Third derivative of the exponential EL term with respect to molar density.
      Returns:
      d3EL/dρ3
    • getFexp

      public double getFexp()

      getFexp.

      Returns:
      a double
    • getFexpdRho

      private double getFexpdRho()
      First derivative of Fexp with respect to molar density.
      Returns:
      dFexp/dρ
    • getFexpdRhodRho

      private double getFexpdRhodRho()
      Second derivative of Fexp with respect to molar density.
      Returns:
      d2Fexp/dρ2
    • getFexpdRhodRhodRho

      private double getFexpdRhodRhodRho()
      Third derivative of Fexp with respect to molar density.
      Returns:
      d3Fexp/dρ3
    • getFexpdV

      public double getFexpdV()
      First derivative of Fexp with respect to molar volume.
      Returns:
      dFexp/dV
    • getFexpdVdV

      public double getFexpdVdV()
      Second derivative of Fexp with respect to molar volume.
      Returns:
      d2Fexp/dV2
    • getFexpdVdVdV

      public double getFexpdVdVdV()
      Third derivative of Fexp with respect to molar volume.
      Returns:
      d3Fexp/dV3
    • getFexpdTdRho

      private double getFexpdTdRho()
      Cross derivative of Fexp with respect to temperature and molar density.
      Returns:
      d2Fexp/dT dρ
    • getFexpdTdV

      private double getFexpdTdV()
      Cross derivative of Fexp with respect to temperature and molar volume.
      Returns:
      d2Fexp/dT dV
    • getFexpdT

      public double getFexpdT()

      getFexpdT.

      Returns:
      a double
    • getFexpdTdT

      private double getFexpdTdT()
      Second derivative of Fexp with respect to temperature.
      Returns:
      d2Fexp/dT2
    • calcPressure2

      public double calcPressure2()

      calcPressure2.

      Returns:
      a double
    • calcPVT

      public void calcPVT()

      calcPVT.

    • getF

      public double getF()

      getF.

      Overrides:
      getF in class PhaseEos
      Returns:
      a double
    • getdFdN

      public double getdFdN()

      getdFdN.

      Returns:
      a double
    • dFdT

      public double dFdT()

      Calculate derivative of F per Temperature, i.e., dF/dT.

      Specified by:
      dFdT in interface PhaseInterface
      Overrides:
      dFdT in class PhaseEos
      Returns:
      a double
    • dFdTdT

      public double dFdTdT()

      dFdTdT.

      Specified by:
      dFdTdT in interface PhaseInterface
      Overrides:
      dFdTdT in class PhaseEos
      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
    • dFdV

      public double dFdV()

      Calculate derivative of F per Volume, i.e., dF/dV.

      Specified by:
      dFdV in interface PhaseInterface
      Overrides:
      dFdV 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
    • dFdVdVdV

      public double dFdVdVdV()

      dFdVdVdV.

      Overrides:
      dFdVdVdV in class PhaseEos
      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
    • molarVolume2

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

      molarVolume2.

      Overrides:
      molarVolume2 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.