Peng-Robinson

EOS type: cubic.peng-robinson

Since its publication in 1976, the Peng & Robinson equation of state (PR EOS) has become one of the most useful and successfully applied models for thermodynamic and volumetric calculations in both industrial and academic fields. Although several variations exist, the traditional form in terms of density is:

\(P=\frac{R T \rho}{1-b_{ij} \rho}-\frac{a_{ij} \rho^2}{(1+b_{ij} \rho)+\rho b_{ij} (1-b_{ij} \rho)}\)

Where:

\(a_{i}=0.45723553 \frac{R^2 T_{C}^2}{P_{C}}\)

\(b_{i}=0.07779607 \frac{R T_{C}}{P_{C}}\)

\(\alpha_{i}=[1+(0.37464+1.54226 \omega-0.26992 \omega^2) (1-\sqrt{T_{R}^2})]^2\)

We used the following mixing rules:

\(a_{ij}=\sum{\sum{x_{i} x_{j} \sqrt{a_{i} \alpha_{i} a_{j} \alpha_{j}} (1-k_{ij})}}\)

\(b_{ij}=\sum{x_{i} b{i}}\)

class EosType(**kwargs)[source]

EOS object for the Peng-Robinson EOS.

All input and calculated parameters are defined as hidden attributes.

Parameters:
  • beads (list[str]) – List of unique component names

  • bead_library (dict) – A dictionary where bead names are the keys to access EOS self interaction parameters:

    • Tc: \(T_{C}\), Critical temperature [K]

    • Pc: \(P_{C}\), Critical pressure [Pa]

    • omega: \(\omega\), Acentric factor

  • cross_library (dict, Optional, default={}) – Optional library of bead cross interaction parameters. As many or as few of the desired parameters may be defined for whichever group combinations are desired.

    • kij: \(k_{ij}\), binary interaction parameter

Variables:
  • beads (list[str]) – List of component names

  • bead_library (dict) – A dictionary where bead names are the keys to access EOS self interaction parameters. See description under Parameters

  • cross_library (dict) – Library of bead cross interaction parameters. See description under Parameters

  • parameter_types (list[str]) – List of parameter names used Peng-Robinson EOS: [“ai”, “bi”, “kij”, “Tc”, “Pc”, “omega”]. Used in parameter fitting.

  • parameter_bound_extreme (dict) –

    With each parameter names as an entry representing a list with the minimum and maximum feasible parameter value. For the Peng-Robinson EOS:

    • ai: [0., 50.]

    • bi: [0., 1e-3]

    • kij: [-1.,1.]

    • omega: [0,1]

    • Tc: [0, 1000] [K]

    • Pc: [1, 1e+8] [Pa]

  • number_of_components (int) – Number of components in mixture represented by given EOS object.

  • T (float, default=numpy.nan) – Temperature value is initially defined as NaN for a placeholder until temperature dependent attributes are initialized by using a method of this class.

density_max(xi, T, maxpack=0.9)[source]

Estimate the maximum density based on the hard sphere packing fraction.

Parameters:
  • xi (list[float]) – Mole fraction of each component

  • T (float) – Temperature of the system [K]

  • maxpack (float, Optional, default=0.9) – Maximum packing fraction

Returns:

max_density – Maximum molar density [\(mol/m^3\)]

Return type:

float

fugacity_coefficient(P, rho, xi, T)[source]

Compute fugacity coefficient

Parameters:
  • P (float) – Pressure of the system [Pa]

  • rho (float) – Molar density of system [\(mol/m^3\)]

  • T (float) – Temperature of the system [K]

  • xi (list[float]) – Mole fraction of each component

Returns:

fugacity_coefficient\(\phi_i\), Array of fugacity coefficient values for each component

Return type:

numpy.ndarray

parameter_refresh()[source]

To refresh dependent parameters

Those parameters that are dependent on bead_library and cross_library attributes must be updated by running this function after all parameters from update_parameters method have been changed.

pressure(rho, T, xi)[source]

Compute pressure given system information

Parameters:
  • rho (numpy.ndarray) – Number density of system [\(mol/m^3\)]

  • T (float) – Temperature of the system [K]

  • xi (list[float]) – Mole fraction of each component

Returns:

P – Array of pressure values [Pa] associated with each density and so equal in length

Return type:

numpy.ndarray

update_parameter(param_name, bead_names, param_value)[source]

Update a single parameter value during parameter fitting process.

To refresh those parameters that are dependent on to bead_library or cross_library, use method “parameter refresh”.

Parameters:
  • param_name (str) – Parameter to be fit. See EOS documentation for supported parameter names. Cross interaction parameter names should be composed of parameter name and the other bead type, separated by an underscore (e.g. kij_CO2).

  • bead_names (list) – Bead names to be changed. For a self interaction parameter, the length will be 1, for a cross interaction parameter, the length will be two.

  • param_value (float) – Value of parameter