bracket_bounding_yi
despasito.thermodynamics.calc.bracket_bounding_yi
- bracket_bounding_yi(P, T, phil, xi, Eos, bounds=(0.01, 0.99), maxiter=50, tol=1e-07, density_opts={}, **kwargs)[source]
Search binary vapor mole fraction combinations for a new estimate that produces a vapor density.
- Parameters:
P (float) – [Pa] Pressure of the system
T (float) – [K] Temperature of the system
phil (float) – Fugacity coefficient of liquid at system pressure
xi (numpy.ndarray) – Liquid 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.
bounds (tuple, Optional, default=(0.01, 0.99)) – These bounds dictate the lower and upper boundary for the first component in a binary system.
maxiter (int, Optional, default=50) – Maximum number of iterations
tol (float, Optional, default=1e-7) – Tolerance to quit search for yi
density_opts (dict, Optional, default={}) – Dictionary of options used in calculating pressure vs. specific volume in
pressure_vs_volume_arrays()
- Returns:
yi (numpy.ndarray) – Vapor mole fraction of each component, sum(yi) should equal 1.0
flag (int) – Flag identifying the fluid type. A value of 0 is vapor, 1 is liquid, 2 mean a critical fluid, 3 means that neither is true, 4 means ideal gas is assumed