Hello Everyone,
I'm modelling components for Kalina cycle system (a power system that uses the mixture ammonia+water as work fluid) as part of my thesis, with Peng-Robinson backend, using the python wrapper. Also I need to do some plots.
I have CoolProp version 6.4.1.
I've attached the code here:
import CoolProp
backend = 'PR'
fluid = 'Ammonia&Water'
AS = CoolProp.AbstractState(backend, fluid)
# set mole fraction of NH3
x = 0.5
AS.set_mole_fractions([x, 1 - x])
# set binary interaction parameter
AS.set_binary_interaction_double(0, 1, "kij", -0.2401)
# pressure in Pa and temperature in K
P = 3e6
T = 390
# solve for P,T inputs
AS.update(CoolProp.PT_INPUTS, P, T)
# print results
print("T = %.2f K" % AS.T())
print("P = %.1f kPa" % (AS.p()/1000))
print("rho = %.5f kg/m^3" % (AS.rhomass()))
print("H = %.2f kJ/kg" % (AS.hmass()/1000))
print("S = %.5f kJ/kg*K" % (AS.smass()/1000))
print("phase = %s" % (AS.phase()))
However this return the following error
ValueError Traceback (most recent call last)
<ipython-input-18-5a46a4779b09> in <module>()
17
18 # solve for P,T inputs
---> 19 AS.update(CoolProp.PT_INPUTS, P, T)
20
21 # print results
CoolProp/AbstractState.pyx in CoolProp.CoolProp.AbstractState.update()
CoolProp/AbstractState.pyx in CoolProp.CoolProp.AbstractState.update()
ValueError: Unable to find gaseous density for T: 390 K, p: 3e+06 Pa
In fact, return the same ValueError for any mole fraction in the interval 0.47 <= x <= 0.62.
But if we modify the composition, for example to x = 0.4, this return the following results
T = 390.00 K
P = 3000.0 kPa
rho = 667.73139 kg/m^3
H = 474.96 kJ/kg
S = 2.07423 kJ/kg*K
phase = 5
will there be any solution for this problem?
Thanks
Regards,
Luis Jiménez