calc_vapor_density

despasito.thermodynamics.calc.calc_vapor_density

calc_vapor_density(P, T, xi, Eos, density_opts={}, **kwargs)[source]

Computes vapor density under system conditions.

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

  • 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.

  • density_opts (dict, Optional, default={}) – Dictionary of options used in calculating pressure vs. specific volume in pressure_vs_volume_arrays()

Returns:

  • rhov (float) – [mol/\(m^3\)] Density of vapor at system pressure

  • flag (int) – 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