This may be a silly question, but I can't find an answer, sorry.
I am working with a mixture of R134a and R1234yf at different compositions and when I needed to calculate the fugacity coefficients of each component of the mixture I found out that when I do not impose the phase I get a result I do not understand, as it is neither the gas nor the liquid phase fugacity coefficient.
An example of this is below. With this code, the liquid phase fugacity coefficient is 0.873 and 0.909 for each compound, for the gas, the coefficients are 0.894 and 0.887, and the third case gives 0.798 and 0.787 as a result. What phase do these fugacity coefficients correspond to? Or what am I calculating instead of gas or liquid?
Thank you in advance.
import CoolProp
AS = CoolProp.AbstractState('HEOS','R134a&R1234yf')
x = 0.517
T = 283.16
P = .4498
AS.set_mole_fractions([x,1-x])
AS.specify_phase(CoolProp.iphase_liquid)
AS.update(CoolProp.PT_INPUTS,P*1e6,T)
print(AS.fugacity_coefficient(0),AS.fugacity_coefficient(1))
print(' ')
print(' ')
AS2 = CoolProp.AbstractState('HEOS','R134a&R1234yf')
AS2.set_mole_fractions([x,1-x])
AS2.specify_phase(CoolProp.iphase_gas)
AS2.update(CoolProp.PT_INPUTS,P*1e6,T)
print(AS2.fugacity_coefficient(0),AS2.fugacity_coefficient(1))
print(' ')
print(' ')
AS3 = CoolProp.AbstractState('HEOS','R134a&R1234yf')
AS3.set_mole_fractions([x,1-x])
AS3.update(CoolProp.PT_INPUTS,P*1e6,T)
print(AS3.fugacity_coefficient(0),AS3.fugacity_coefficient(1))