Calculating properties of exhaust gases. Python. Gas Turbines. PropsSI

436 views
Skip to first unread message

joseagf...@gmail.com

unread,
Mar 4, 2019, 7:28:07 AM3/4/19
to coolprop-users
Hi, 
I'm doing some gas turbine calculations in Python and I'm using CoolProp to get enthalpies, specific heats, entropise, etc for the gases involved in the process.
I have three main gases: Inlet air (air), Fuel (natural gas), and exhaust

For air i'm just using the pseudo-fluid 'air'. Using 'air' I'm able to get the properties at higher pressures and temperatures calling for example: h_amb = CP.PropsSI('H','T', 300, 'P', 1e5,'air')

For the fuel, I can use 'TypicalNaturalGas.mix' the same way I use 'air'. I can also specify a fuel mix based on molar composition e.g. 'Methane[0.9223]&Ethane[0.0578]&n-Propane[0.0197]'

For the exhaust gases after the combustion chamber I have defined a mixture 'Nitrogen[0.7439]&Oxygen[0.1018]&Argon[0.0088]&CarbonDioxide[0.05]&Water[0.0955]' . THE PROBLEM IS that I can only get properties for this mix if evaluated at "low" temperatures (up to 110°C). However, this is gas exiting the combustion chamber and temperatures there are about 1500°C. When I try to get the enthalpy of the mix at 1753 [K] and 1.7e+6 [Pa] I get the following error:

File "CoolProp\CoolProp.pyx", line 348, in CoolProp.CoolProp.PropsSI (CoolProp\CoolProp.cpp:47071)
  File "CoolProp\CoolProp.pyx", line 428, in CoolProp.CoolProp.PropsSI (CoolProp\CoolProp.cpp:46859)
  File "CoolProp\CoolProp.pyx", line 315, in CoolProp.CoolProp.__Props_err2 (CoolProp\CoolProp.cpp:45002)
ValueError: One stationary point (not good) for T=1753.15,p=1.69529e+06,z=[ 0.847729796459, 0.0919932493663, 0.00915063428722, 0.020148321175, 0.0309779987129 ] : PropsSI("H","T",1753.15,"P",1695288.96,"Nitrogen[0.7439385201800557]&Oxygen[0.10178292892083783]&Argon[0.00876722448039776]&CarbonDioxide[0.05000199376383732]&Water[0.09550933265487122]")

I tried getting the enthalpy of each fluid separately at those conditions (temp, and press) and CoolProp would calculate them properly, however, when I try to get the enthalpy of the mix at those conditions, I get the error.

I wonder, is it possible to do what I want to do with CoolProp?
Is there another function, other than PropsSI, that I should use instead?
Any ideas? alternatives?
At the end what I need is a function that calculates the enthalpy and other thermodynamic properties of a exhaust gases (in this case with this molar composition) at referenced temperatures and pressures (1753 [K] and 1.7e+6 [Pa])

Thanks in advance for the support,
Jose Garcia

Ian Bell

unread,
Mar 5, 2019, 12:43:58 AM3/5/19
to coolpro...@googlegroups.com
You just need to specify the phase (gas in this case), so it will skip the full phase detection:

import CoolProp.CoolProp as CP
fluids = "Nitrogen&Oxygen&Argon&CarbonDioxide&Water"
comps = [0.7439385201800557,0.10178292892083783,0.00876722448039776,0.05000199376383732,0.09550933265487122]
AS = CP.AbstractState('HEOS',fluids)
AS.set_mass_fractions(comps)
AS.specify_phase(CP.iphase_gas)
AS.update(CP.PT_INPUTS, 1.69529e+06, 1753.15)
print(AS.hmolar())

and this is now also available in the high-level interface: http://www.coolprop.org/coolprop/HighLevelAPI.html#imposing-the-phase-optional

--
You received this message because you are subscribed to the Google Groups "coolprop-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-user...@googlegroups.com.
To post to this group, send email to coolpro...@googlegroups.com.
Visit this group at https://groups.google.com/group/coolprop-users.
For more options, visit https://groups.google.com/d/optout.

joseagf...@gmail.com

unread,
Mar 5, 2019, 6:05:23 AM3/5/19
to coolprop-users
Thank you very much Ian, it works very good.

I have found another obstacle, trying to define the fluid with Hmass and P as inputs, I get the error "phase envelope must be built to carry out HSU_P_flash for mixture"

I found another user with the same error, back in 2017, and you replied:

"On Friday, September 1, 2017 at 9:28:04 AM UTC+8, Ian Bell wrote:
Basically, most flash calculations for mixtures do not work in CoolProp.  It was never finished, we need someone, not me, to dig into it.  For that, you'll need REFPROP."

 I was wondering if that is still the status of that feature, or if there is something else I could do... I suppose I can set a solver and find the properties I need by iterating but I wanted to try other alternatives first

Again, thank you very much for the support,
Jose

Ian Bell

unread,
Mar 5, 2019, 10:23:04 PM3/5/19
to coolpro...@googlegroups.com
Yes, you are right, your best option in this case is to iterate, and it should be pretty reliable (and fast) as long as you specify the phase.  And I'm guessing in this case that you probably have a pretty reasonable guess for the temperature. Also, you could use the analytic derivatives to make the solver more reliable (see the first_partial_deriv function).
Reply all
Reply to author
Forward
0 new messages