Class PhaseSolid

All Implemented Interfaces:
Serializable, Cloneable, PhaseEosInterface, PhaseInterface, ThermodynamicConstantsInterface
Direct Known Subclasses:
PhasePureComponentSolid, PhaseSolidComplex, PhaseWax

public abstract class PhaseSolid extends PhaseSrkEos

Abstract PhaseSolid class.

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

    • serialVersionUID

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

      private boolean useEosProperties
      Flag to control whether EOS-based properties should be used instead of literature-based values.

      When true, thermodynamic properties (density, entropy, enthalpy, heat capacities) are calculated using the underlying equation of state (SRK EOS). This is useful for Pedersen's approach where asphaltene is modeled as a heavy liquid phase with EOS-calculable properties.

      When false (default), solid-specific literature values are used for properties like density (e.g., 1150 kg/m³ for asphaltene), and residual properties return 0 as is typical for solids.

  • Constructor Details

    • PhaseSolid

      public PhaseSolid()

      Constructor for PhaseSolid.

  • Method Details

    • clone

      public PhaseSolid clone()

      clone.

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

      public double getEnthalpy()
      method to return enthalpy of a phase in unit Joule.
      Specified by:
      getEnthalpy in interface PhaseInterface
      Overrides:
      getEnthalpy in class Phase
      Returns:
      a double
    • setSolidRefFluidPhase

      public void setSolidRefFluidPhase(PhaseInterface refPhase)

      setSolidRefFluidPhase.

      Parameters:
      refPhase - a PhaseInterface object
    • getDensityTemp

      public double getDensityTemp()
      Get density of a phase note: at the moment return density of water (997 kg/m3).
      Returns:
      density with unit kg/m3
    • isAsphaltenePhase

      public boolean isAsphaltenePhase()
      Checks if this solid phase is predominantly asphaltene (> 50 mol% asphaltene).
      Returns:
      true if phase contains majority asphaltene
    • updatePhaseTypeForAsphaltene

      public void updatePhaseTypeForAsphaltene()
      Updates the phase type to ASPHALTENE if this phase is predominantly asphaltene. Call this after flash calculations to properly identify asphaltene-rich solid phases.
    • getAsphaltenePhaseAltDensity

      private double getAsphaltenePhaseAltDensity()
      Get asphaltene density based on literature values. Asphaltene density is typically 1100-1200 kg/m³.
      Returns:
      asphaltene density in kg/m3
    • isUseEosProperties

      public boolean isUseEosProperties()
      Check if EOS-based properties are used for this solid phase.
      Returns:
      true if EOS properties are used, false if literature-based values are used
    • setUseEosProperties

      public void setUseEosProperties(boolean useEosProperties)
      Set whether to use EOS-based properties for this solid phase.

      When enabled, thermodynamic properties (density, entropy, enthalpy, heat capacities) are calculated using the underlying equation of state. This is useful for Pedersen's approach where asphaltene behaves more like a heavy liquid phase.

      Parameters:
      useEosProperties - true to use EOS properties, false to use literature-based values
    • getSresTP

      public double getSresTP()

      getSresTP.

      For solids, the residual entropy is approximated as zero since there is no PVT contribution for incompressible solids at their reference state. When isUseEosProperties() is true, EOS-based calculation is used instead.

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

      public double getHresTP()

      getHresTP.

      For solids, the residual enthalpy is approximated as zero since the PVT contribution for incompressible solids is negligible. When isUseEosProperties() is true, EOS-based calculation is used instead.

      Specified by:
      getHresTP in interface PhaseInterface
      Overrides:
      getHresTP in class PhaseEos
      Returns:
      a double
    • getCpres

      public double getCpres()

      getCpres.

      For solids, the residual heat capacity at constant pressure is approximated as zero. When isUseEosProperties() is true, EOS-based calculation is used instead.

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

      public double getCvres()

      getCvres.

      For solids, the residual heat capacity at constant volume is approximated as zero. When isUseEosProperties() is true, EOS-based calculation is used instead.

      Overrides:
      getCvres in class PhaseEos
      Returns:
      a double
    • getCp

      public double getCp()
      method to return specific heat capacity (Cp).

      For solids, the heat capacity is taken as the sum of component heat capacities.

      Specified by:
      getCp in interface PhaseInterface
      Overrides:
      getCp in class Phase
      Returns:
      Cp in unit J/K
    • getCv

      public double getCv()
      method to return specific heat capacity (Cv).

      For solids, Cv is approximately equal to Cp since solids are nearly incompressible.

      Specified by:
      getCv in interface PhaseInterface
      Overrides:
      getCv in class Phase
      Returns:
      Cv in unit J/K
    • getSoundSpeed

      public double getSoundSpeed()
      Get the speed of sound of a phase note: implemented in phaseEos.

      Speed of sound in solids is typically 1500-4000 m/s for organic solids.

      Specified by:
      getSoundSpeed in interface PhaseInterface
      Overrides:
      getSoundSpeed in class PhaseEos
      Returns:
      speed of sound in m/s
    • getJouleThomsonCoefficient

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

      For solids, the Joule-Thomson coefficient is typically very small since solids are nearly incompressible. When isUseEosProperties() is true, EOS-based calculation is used instead.

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

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

      For asphaltene phases, returns a realistic density based on literature values. For other solid phases, uses the standard EOS-based calculation. When isUseEosProperties() is true, always uses EOS-based calculation regardless of phase type.

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