Skip to the content.

The cpa class, found in addon/pycThermopack/thermopack/cpa.py, inherits from the cubic class, and is the interface to the Cubic Plus Association Equation of State. This class implements utility methods to access mixing parameters etc.

Table of contents

Constructor

Methods to initialise Cubic Plus Association model.

Table of contents

__init__(self, comps=None, eos='SRK', mixing='vdW', alpha='Classic', parameter_reference='Default')

Initialize cubic plus association model in thermopack

          If no components are specified, model must be initialized for specific components later by direct call to ‘init’

          Model can at any time be re-initialized for new components or parameters by direct calls to ‘init’

         

Args:

     comps (str, optional):

          Comma separated list of component names

     eos (str, optional):

          Cubic equation of state. Defaults to “SRK”.

     mixing (str, optional):

          Mixture model. Defaults to “vdW”.

     alpha (str, optional):

          Alpha model. Defaults to “Classic”.

     parameter_reference (str, optional):

          Which parameters to use?. Defaults to “Default”.

         

init(self, comps, eos='SRK', mixing='vdW', alpha='Classic', parameter_reference='Default')

Initialize cubic plus association model in thermopack

Args:

     comps (str):

          Comma separated list of component names

     eos (str, optional):

          Cubic equation of state. Defaults to “SRK”.

     mixing (str, optional):

          Mixture model. Defaults to “vdW”.

     alpha (str, optional):

          Alpha model. Defaults to “Classic”.

     parameter_reference (str, optional):

          Which parameters to use?. Defaults to “Default”.

         

Utility methods

Set- and get methods for interaction parameters, mixing parameters …

Table of contents

get_kij(self, c1, c2)

Get attractive energy interaction parameter

Args:

     c1 (int):

          Component one

     c2 (int):

          Component two

         

Returns:

     kij (array_like):

          i-j interaction parameter (2 parameters)

         

get_pure_params(self, ic)

Get pure parameters

Args:

     ic (int):

          Component index

         

Returns:

     params (array_like):

          a0 (Pa*L^2/mol^2), b (L/mol), eps (J/mol), beta (-), c1 (-)

         

Print cpa parameters

          Parameters printed are the five pure parameters

          a0, b, epsilon, beta, c1, and the binary parameter

          for the cubic part, kij_a, and for the association part, kij_eps.

         

set_cpa_formulation(self, simplified, elliot)

Set CPA formulation Args: simplified (bool): Use simplified form for rdf in CPA? elliot (bool): use Elliot mixing rule for association Deltas?

         

set_kij(self, c1, c2, kij_a, kij_eps)

Set attractive energy interaction parameter

Args:

     c1 (int):

          Component one

     c2 (int):

          Component two

     kij_a (int):

          cubic i-j interaction parameter

     kij_eps (int):

          association i-j interaction parameter

         

set_pure_params(self, ic, params)

Set pure parameters Input a0, b in their conventional (non-SI) units, beta and eps in SI units, c1 dimensionless.

Args:

     ic (int):

          Component index

     params (array_like):

          a0 (Pa*L^2/mol^2), b (L/mol), eps (J/mol), beta (-), c1 (-)

         

use_simplified_cpa(self, simplified)

Use simplified form for rdf in CPA

Args:

     simplified (bool):

          True if simplified