verify_eos

despasito.thermodynamics.calculation_types.verify_eos

verify_eos(Eos, **sys_dict)[source]

The following consistency checks are performed to ensure the calculated fugacity coefficients are thermodynamically consistent.

    1. \(d(ln φ)/dP = (Z-1)/P\)

    1. \(\sum{x_i d(ln φ)/d n_1 )} = 0\)

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

  • Tlist (list, Optional, default=298.15) – [K] Temperature of the system corresponding Plist. If one value is given, this temperature will be used for all temperatures.

  • xilist (list, Optional) – Default array of 11 values from x1=0 to x1=1 for binary array. List of component mole fraction sets, where sum(xi)=1.0 for each set. Each set of components corresponds to a temperature in Tlist, or if one set is given, this composition will be used for all temperatures.

  • Plist (list, Optional, default=101325.0) – [Pa] Pressure of the system corresponding to Tlist. If one value is given, this pressure will be used for all temperatures.

  • MultiprocessingObject (obj, Optional) – Multiprocessing object, MultiprocessingJob

  • kwargs (Optional) – Keyword arguments for calc_vapor_density(), calc_liquid_density(), calc_fugacity_test_1(), and calc_fugacity_test_2(),

Returns:

output_dict – Output dictionary containing given and calculated values

  • T: [K] Temperature array generated from given instructions

  • P: [Pa] Pressure array generated from given instructions

  • xi: Composition generated from given instructions

  • residual_v1: Residual of vapor from method one

  • residual_v2: Residual of vapor from method two

  • flagv: Phase flag for vapor given temperature and calculated pressure,

a value of 0 is vapor, 1 is liquid, 2 mean a critical fluid, 3 means that neither is true, 4 means we should assume ideal gas - log_phivi: Log of the partial vapor fugacity coefficient for each component - residual_l1: Residual of liquid from method one - residual_l2: Residual of liquid from method two - flagl: Phase flag for liquid given temperature and calculated pressure, a value of 0 is vapor, 1 is liquid, 2 mean a critical fluid, 3 means that neither is true, 4 means we should assume ideal gas - log_phili: Log of the partial liquid fugacity coefficient for each component

Return type:

dict