Interface PhaseCPAInterface

All Superinterfaces:
Cloneable, PhaseEosInterface, PhaseInterface, Serializable, ThermodynamicConstantsInterface
All Known Implementing Classes:
PhaseElectrolyteCPA, PhaseElectrolyteCPAMM, PhaseElectrolyteCPAOld, PhaseElectrolyteCPAstatoil, PhasePCSAFTa, PhasePrCPA, PhaseSrkCPA, PhaseSrkCPAs, PhaseUMRCPA

public interface PhaseCPAInterface extends PhaseEosInterface

PhaseCPAInterface interface.

This interface defines the contract for CPA (Cubic Plus Association) phase implementations. It provides default implementations for the radial distribution function and its derivatives, which are the same for all cubic equations of state (SRK, PR, UMR) based on the simplified Carnahan-Starling hard-sphere model.

Version:
$Id: $Id
Author:
Even Solbraa
  • Method Details

    • getHcpatot

      double getHcpatot()

      Getter for property hcpatot.

      Returns:
      a double
    • getCrossAssosiationScheme

      int getCrossAssosiationScheme(int comp1, int comp2, int site1, int site2)

      getCrossAssosiationScheme.

      Parameters:
      comp1 - a int
      comp2 - a int
      site1 - a int
      site2 - a int
      Returns:
      a int
    • getGcpa

      double getGcpa()

      getGcpa.

      Returns:
      a double
    • getGcpav

      double getGcpav()

      getGcpav.

      Returns:
      a double
    • getTotalNumberOfAccociationSites

      int getTotalNumberOfAccociationSites()

      getTotalNumberOfAccociationSites.

      Returns:
      a int
    • setTotalNumberOfAccociationSites

      void setTotalNumberOfAccociationSites(int totalNumberOfAccociationSites)

      setTotalNumberOfAccociationSites.

      Parameters:
      totalNumberOfAccociationSites - a int
    • getCpaMixingRule

      CPAMixingRulesInterface getCpaMixingRule()

      getCpaMixingRule.

      Returns:
      a CPAMixingRulesInterface object
    • calc_hCPA

      default double calc_hCPA()
      Calculate the sum of (1 - X_i) over all association sites, weighted by moles. This is used in the CPA contribution to Helmholtz energy.
      Returns:
      hCPA value
    • calc_g

      default double calc_g()
      Calculate radial distribution function g at contact using simplified Carnahan-Starling.

      g = (2 - b/4V) / (2 * (1 - b/4V)³)

      This formula is the same for all cubic EOS (SRK, PR, UMR) since it depends only on the co-volume parameter b, not on the attraction parameter a.

      Returns:
      g value
    • calc_lngV

      default double calc_lngV()
      Calculate first volume derivative of ln(g).

      d(ln g)/dV

      Returns:
      d(ln g)/dV
    • calc_lngVV

      default double calc_lngVV()
      Calculate second volume derivative of ln(g).

      d²(ln g)/dV²

      Returns:
      d²(ln g)/dV²
    • calc_lngVVV

      default double calc_lngVVV()
      Calculate third volume derivative of ln(g).

      d³(ln g)/dV³

      Returns:
      d³(ln g)/dV³