Class PhaseHydrate

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

public class PhaseHydrate extends Phase

PhaseHydrate class.

Version:
$Id: $Id
Author:
esol
See Also:
  • Field Details

    • serialVersionUID

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

      String hydrateModel
  • Constructor Details

    • PhaseHydrate

      public PhaseHydrate()

      Constructor for PhaseHydrate.

    • PhaseHydrate

      public PhaseHydrate(String fluidModel)

      Constructor for PhaseHydrate.

      Parameters:
      fluidModel - a String object
  • Method Details

    • clone

      public PhaseHydrate clone()

      clone.

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

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

      public void setMixingRuleGEModel(String name)

      setMixingRuleGEModel.

      Parameters:
      name - a String object
    • resetMixingRule

      public void resetMixingRule(MixingRuleTypeInterface mr)

      resetMixingRule.

      Not relevant for PhaseHydrate

      Parameters:
      mr - a int
    • setMixingRule

      public void setMixingRule(MixingRuleTypeInterface mr)

      setMixingRule.

      Not relevant for PhaseHydrate

      Parameters:
      mr - a MixingRuleTypeInterface
    • setSolidRefFluidPhase

      public void setSolidRefFluidPhase(PhaseInterface refPhase)

      setSolidRefFluidPhase.

      Parameters:
      refPhase - a PhaseInterface object
    • getStableHydrateStructure

      public int getStableHydrateStructure()
      Get the stable hydrate structure type.

      Returns the hydrate structure (1 for Structure I, 2 for Structure II) that is thermodynamically stable at the current conditions. Structure I has small (5^12) and large (5^12 6^2) cavities, while Structure II has small (5^12) and large (5^12 6^4) cavities.

      Returns:
      1 for Structure I, 2 for Structure II
    • getCavityOccupancy

      public double getCavityOccupancy(String componentName, int structure, int cavityType)
      Get the cavity occupancy for a specific component in a specific cavity type.

      Cavity occupancy (θ) represents the fraction of cavities of a given type that are occupied by a specific guest molecule. Values range from 0 (empty) to 1 (fully occupied).

      Parameters:
      componentName - the name of the guest component
      structure - the hydrate structure (1 for Structure I, 2 for Structure II)
      cavityType - the cavity type (0 for small cavity, 1 for large cavity)
      Returns:
      the cavity occupancy fraction (0 to 1), or 0 if component not found
    • getSmallCavityOccupancy

      public double getSmallCavityOccupancy(int structure)
      Get the total cavity occupancy for small cavities.
      Parameters:
      structure - the hydrate structure (1 for Structure I, 2 for Structure II)
      Returns:
      the total small cavity occupancy (sum of all guest occupancies)
    • getLargeCavityOccupancy

      public double getLargeCavityOccupancy(int structure)
      Get the total cavity occupancy for large cavities.
      Parameters:
      structure - the hydrate structure (1 for Structure I, 2 for Structure II)
      Returns:
      the total large cavity occupancy (sum of all guest occupancies)
    • getHydrationNumber

      public double getHydrationNumber()
      Get the hydration number for the hydrate at current conditions.

      The hydration number is the ratio of water molecules to guest molecules in the hydrate. It depends on the cavity occupancy and hydrate structure.

      Returns:
      the hydration number (water molecules per guest molecule)
    • 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
    • getDensity

      public double getDensity()
      Get density of a phase note: does not use Peneloux volume correction.

      For gas hydrates, returns a realistic density based on hydrate structure. Structure I methane hydrate has a density of approximately 910 kg/m³, while Structure II hydrates are slightly denser at approximately 940 kg/m³.

      Specified by:
      getDensity in interface PhaseInterface
      Overrides:
      getDensity in class Phase
      Returns:
      density with unit kg/m3
    • getDensity

      public double getDensity(String unit)
      Get density of a fluid note: with Peneloux volume correction.

      For gas hydrates, returns a realistic density based on hydrate structure with unit conversion.

      Specified by:
      getDensity in interface PhaseInterface
      Overrides:
      getDensity in class Phase
      Parameters:
      unit - Supported units are kg/m3, mol/m3
      Returns:
      density in specified unit
    • getViscosity

      public double getViscosity()
      method to return viscosity of the phase.

      For gas hydrates, viscosity is not a meaningful property since hydrates are crystalline solids. Returns a very high value to indicate solid behavior (effectively infinite for flow calculations).

      Specified by:
      getViscosity in interface PhaseInterface
      Overrides:
      getViscosity in class Phase
      Returns:
      viscosity in unit kg/msec
    • getThermalConductivity

      public double getThermalConductivity()
      method to return conductivity of a phase.

      For gas hydrates, thermal conductivity is approximately 0.5-0.6 W/(m·K), similar to ice but slightly lower due to the clathrate structure.

      Specified by:
      getThermalConductivity in interface PhaseInterface
      Overrides:
      getThermalConductivity in class Phase
      Returns:
      conductivity in unit W/m*K
    • getHresTP

      public double getHresTP()

      getHresTP.

      For gas hydrates, the residual enthalpy is approximated as zero since the PVT contribution for incompressible solids is negligible.

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

      public double getSresTP()

      getSresTP.

      For gas hydrates, the residual entropy is approximated as zero since the PVT contribution for incompressible solids is negligible.

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

      public double getCpres()

      getCpres.

      For gas hydrates, the residual heat capacity at constant pressure is approximated as zero.

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

      public double getCvres()

      getCvres.

      For gas hydrates, the residual heat capacity at constant volume is approximated as zero.

      Overrides:
      getCvres in class Phase
      Returns:
      a double
    • getJouleThomsonCoefficient

      public double getJouleThomsonCoefficient()
      Get the Joule Thomson Coefficient of a phase.

      For gas hydrates, the Joule-Thomson coefficient is approximated as zero since hydrates are nearly incompressible solids.

      Specified by:
      getJouleThomsonCoefficient in interface PhaseInterface
      Overrides:
      getJouleThomsonCoefficient in class Phase
      Returns:
      Joule Thomson coefficient in K/bar