equilibrium_objective

despasito.thermodynamics.calc.equilibrium_objective

equilibrium_objective(phase_1_mole_fraction, phil, phiv, phase=None)[source]

Computes the objective value used to determine equilibrium between phases. sum(phase_1_mole_fraction * phase_1_phi / phase_2_phi ) - 1.0, where phase is phase 2.

Parameters:
  • phase_1_mole_fraction (numpy.ndarray) – Mole fraction of each component, sum(mole fraction) must equal 1.0

  • phil (float) – Fugacity coefficient of liquid at system pressure

  • phiv (float) – Fugacity coefficient of vapor at system pressure

  • phase (str, default=None) – Use either ‘vapor’ or ‘liquid’ to define the mole fraction being computed. Default is None and it will fail to ensure the user specifies the correct phase

Returns:

objective_value – Objective value indicating how close to equilibrium we are

Return type:

numpy.ndarray