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)

         

set_kij(self, c1, c2, kij)

Set attractive energy interaction parameter

Args:

     c1 (int):

          Component one

     c2 (int):

          Component two

     kij (array_like):

          i-j interaction parameter (2 parameters)

         

use_simplified_cpa(self, simplified)

Use simplified form for rdf in CPA

Args:

     simplified (bool):

          True if simplified