Enum Class StateOfMatter

java.lang.Object
java.lang.Enum<StateOfMatter>
neqsim.thermo.phase.StateOfMatter
All Implemented Interfaces:
Serializable, Comparable<StateOfMatter>, Constable

public enum StateOfMatter extends Enum<StateOfMatter>
States of matter, a way of relating the PhaseTypes to classical states of matter.
Author:
ASMF
  • Enum Constant Details

  • Constructor Details

    • StateOfMatter

      private StateOfMatter()
  • Method Details

    • values

      public static StateOfMatter[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static StateOfMatter valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromPhaseType

      public static StateOfMatter fromPhaseType(PhaseType pt)
      Get StateOfMatter value from Phasetype object.
      Parameters:
      pt - PhaseType object
      Returns:
      StateOfMatter object
    • isGas

      public static boolean isGas(PhaseType pt)
      Check if PhaseType object is a gas state of matter.
      Parameters:
      pt - PhaseType object to check.
      Returns:
      True if pt converts to StateOfMatter.GAS
    • isLiquid

      public static boolean isLiquid(PhaseType pt)
      Check if PhaseType object is a liquid state of matter.
      Parameters:
      pt - PhaseType object to check.
      Returns:
      True if pt converts to StateOfMatter.LIQUID
    • isSolid

      public static boolean isSolid(PhaseType pt)
      Check if PhaseType object is a solid state of matter.
      Parameters:
      pt - PhaseType object to check.
      Returns:
      True if pt converts to StateOfMatter.SOLID
    • isAsphaltene

      public static boolean isAsphaltene(PhaseType pt)
      Check if PhaseType object is an asphaltene phase (either solid or liquid).

      Returns true for both ASPHALTENE (solid asphaltene precipitate) and LIQUID_ASPHALTENE (asphaltene-rich heavy liquid phase in Pedersen's approach).

      Parameters:
      pt - PhaseType object to check.
      Returns:
      True if pt is ASPHALTENE or LIQUID_ASPHALTENE