Skip to the content.

The saftvrmie class, found in addon/pycThermopack/thermopack/saftvrmie.py, is the interface to the SAFT-VR Mie Equation of State. This class inherits the saft class, which in turn inherits the thermo class. This class implements methods for modifying fluid parameters and which terms are included in the model.

Table of contents

Constructor

Methods to initialise SAFT-VR Mie model.

Table of contents

__init__(self, comps=None, parameter_reference='Default')

Initialize SAFT-VR Mie 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

     parameter_reference (str, optional):

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

         

init(self, comps, parameter_reference='Default')

Initialize SAFT-VR Mie model in thermopack

Args:

     comps (str):

          Comma separated list of component names

     parameter_reference (str, optional):

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

         

Utility methods

Set- and get methods for interaction parameters and pure fluid parameters.

Table of contents

a1(self, temp, volume, n)

Get a1 term

Args:

     temp (float):

          Temperature (K)

     volume (float):

          Volume (m3)

     n (array like):

          Mol numbers (mol)

Returns:

     a1 (float):

          First order perturbation (K/mol)

         

a2(self, temp, volume, n)

Get a2 term

Args:

     temp (float):

          Temperature (K)

     volume (float):

          Volume (m3)

     n (array like):

          Mol numbers (mol)

Returns:

     a2 (float):

          Second order perturbation (K^2/mol)

         

a3(self, temp, volume, n)

Get a3 term

Args:

     temp (float):

          Temperature (K)

     volume (float):

          Volume (m3)

     n (array like):

          Mol numbers (mol)

Returns:

     a3 (float):

          Second order perturbation (K^3/mol)

         

a_hs(self, temp, volume, n)

Get hardsphere term

Args:

     temp (float):

          Temperature (K)

     volume (float):

          Volume (m3)

     n (array like):

          Mol numbers (mol)

Returns:

     a_hs (float):

          Second order perturbation (1/mol)

         

get_eps_kij(self, c1, c2)

Get binary well depth interaction parameter

Args:

     c1 (int):

          Component one

     c2 (int):

          Component two

         

Returns:

     kij (float):

          Well depth interaction parameter

         

get_lr_gammaij(self, c1, c2)

Get the interaction parameter gammaij for the lambda_r combining rule

Args:

     c1 (int):

          Component one

     c2 (int):

          Component two

         

Returns:

     gammaij (float):

          Repulsive exponent interaction parameter

         

get_pure_fluid_param(self, ic)

Set pure fluid parameters

Args:

     ic (int):

          Component index

          Returns;

     m (float):

          Mean number of segments.

     sigma (float):

          Temperature-independent segment diameter [m].

     eps_div_k (float):

          Well depth divided by Boltzmann’s const. [K].

     lambda_a (float):

          Attractive exponent of the Mie potential

     lambda_r (float):

          Repulsive exponent of the Mie potential

         

get_sigma_lij(self, c1, c2)

Get the interaction parameter lij for the sigma combining rule (controlling non-additivity)

Args:

     c1 (int):

          Component one

     c2 (int):

          Component two

         

Returns:

     lij (float):

          Sigma interaction parameter

         

Print saft parameters for component c

Args:

     c (int):

          Component index (FORTRAN)

         

         

set_eps_kij(self, c1, c2, kij)

Set binary well depth interaction parameter

Args:

     c1 (int):

          Component one

     c2 (int):

          Component two

     kij (float):

          Well depth interaction parameter

         

set_lr_gammaij(self, c1, c2, gammaij)

Set the interaction parameter gammaij for the lambda_r combining rule

Args:

     c1 (int):

          Component one

     c2 (int):

          Component two

     gammaij (float):

          Repulsive exponent interaction parameter

         

set_pure_fluid_param(self, ic, m, sigma, eps_div_kb, lambda_a, lambda_r)

Set pure fluid parameters

Args:

     ic (int):

          Component index

     m (float):

          Mean number of segments.

     sigma (float):

          Temperature-independent segment diameter [m].

     eps_div_kb (float):

          Well depth divided by Boltzmann’s const. [K].

     lambda_a (float):

          Attractive exponent of the Mie potential

     lambda_r (float):

          Repulsive exponent of the Mie potential

         

set_sigma_lij(self, c1, c2, lij)

Set the interaction parameter lij for the sigma combining rule (controlling non-additivity)

Args:

     c1 (int):

          Component one

     c2 (int):

          Component two

     lij (float):

          Sigma interaction parameter

         

Model control

Control which contributions to the residual Helmholtz energy are included, and the hard-sphere reference term.

Table of contents

model_control_a1(self, active)

Enable/disable first dispersion term.

Args:

     active (bool):

          Enable/disable first dispersion term

         

model_control_a2(self, active)

Enable/disable second dispersion term.

Args:

     active (bool):

          Enable/disable second dispersion term

         

model_control_a3(self, active)

Enable/disable third dispersion term.

Args:

     active (bool):

          Enable/disable third dispersion term

         

model_control_chain(self, active)

Enable/disable chain term.

Args:

     active (bool):

          Enable/disable chain term

         

model_control_hard_sphere(self, active)

Enable/disable hard-sphere term.

Args:

     active (bool):

          Enable/disable hard-sphere dispersion term

         

set_hard_sphere_reference(self, reference, exact_binary_dhs=None, enable_hs_extra=None)

Set hard-sphere reference.

Args:

     reference (str):

          “LAFITTE”, “ADDITIVE”, “NON-ADDITIVE”

     exact_binary_dhs (bool):

          Calculate d_ij from sigma_ij and epsilon_ij

          or simply as d_ij = (d_ii + d_jj)/2

     enable_hs_extra (bool):

          Correction of A_HS due to non-additive d_ij

         

Model performance

Methods to tune computation efficiency etc.

Table of contents

enable_temperature_cache(self, enable=True)

Enable/disable temperature cache.

Args:

     enable (bool):

          Enable/disable temperature cache