calc_new_mole_fractions
despasito.thermodynamics.calc.calc_new_mole_fractions
- calc_new_mole_fractions(phase_1_mole_fraction, phil, phiv, phase=None)[source]
Calculate the alternative phase composition given the composition and fugacity coefficients of one phase, and the fugacity coefficients of the target phase.
- 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:
phase_2_mole_fraction – Mole fraction of each component computed from fugacity coefficients, sum(xi) should equal 1.0 when the solution is found, but the resulting values may not during an equilibrium calculation (e.g. bubble point).
- Return type:
numpy.ndarray