Class PhaseWax

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

public class PhaseWax extends PhaseSolid

PhaseWax class.

Supports multiple wax thermodynamic models selectable via setWaxComponentModel(String). Available models:

  • "Pedersen" (default) - Simple Clausius-Clapeyron model (ComponentWax)
  • "Won" - Won model with activity coefficient (ComponentWonWax)
  • "Wilson" - Wilson local-composition model (ComponentWaxWilson)
  • "Coutinho" - Predictive UNIQUAC model (ComponentCoutinhoWax)
Version:
$Id: $Id
Author:
esol
See Also:
  • Field Details

    • serialVersionUID

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

      private String waxComponentModelName
      The selected wax component model name. Default is Pedersen (ComponentWax).
  • Constructor Details

    • PhaseWax

      public PhaseWax()

      Constructor for PhaseWax.

  • Method Details

    • clone

      public PhaseWax clone()

      clone.

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

      public void setWaxComponentModel(String modelName)
      Sets the wax component model to use for fugacity calculations.
      Parameters:
      modelName - one of "Pedersen", "Won", "Wilson", "Coutinho"
    • getWaxComponentModel

      public String getWaxComponentModel()
      Gets the name of the currently selected wax component model.
      Returns:
      the wax component model name
    • 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 PhaseSolid
      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.