pressure_vs_volume_arrays

despasito.thermodynamics.calc.pressure_vs_volume_arrays

pressure_vs_volume_arrays(T, xi, Eos, min_density_fraction=2e-06, density_increment=5.0, max_volume_increment=0.0001, pressure_min=100, maxiter=25, multfactor=2, extended_npts=20, max_density=None, density_max_opts={}, max_array_length=1000000, **kwargs)[source]

Output arrays with specific volume and pressure arrays calculated from the given EOS.

This function is fundamental to every calculation, the options of which are passed through higher level calculation with the keyword variable density_opts.

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

  • xi (numpy.ndarray) – Mole fraction of each component, sum(xi) should equal 1.0

  • Eos (obj) – An instance of the defined EOS class to be used in thermodynamic computations.

  • min_density_fraction (float, Optional, default=(1.0/500000.0)) – Fraction of the maximum density used to calculate, and is equal to, the minimum density of the density array. The minimum density is the reciprocal of the maximum specific volume used to calculate the roots.

  • density_increment (float, Optional, default=5.0) – The increment between density values in the density array.

  • max_volume_increment (float, Optional, default=1.0E-4) – Maximum increment between specific volume array values. After conversion from density to specific volume, the increment values are compared to this value.

  • pressure_min (float, Optional, default=100) – Ensure pressure curve reaches down to this value

  • multfactor (int, Optional, default=2) – Multiplication factor to extend range

  • extended_npts (int, Optional, default=20) – Number of points in extended range

  • maxiter (int, Optional, default=25) – Number of times to multiply range by to obtain full pressure vs. specific volume curve

  • max_density (float, Optional, default=None) – [mol/\(m^3\)] Maximum molar density defined, if default of None is used then the Eos object method, density_max is used.

  • max_array_length (int, Optional, default=5e+5) – Maximum array length of the density array before an error is given.

  • density_max_opts (dict, Optional, default={}) – Keyword arguments for density_max method for EOS object

Returns:

  • vlist (numpy.ndarray) – [\(m^3\)/mol] Specific volume array.

  • Plist (numpy.ndarray) – [Pa] Pressure associated with specific volume of system with given temperature and composition