Hi all,
I'm working with a large mechanism and need to use a real gas equation of state. However, many species in my mechanism (radicals, intermediates etc) don't have published critical properties.
My question is: if I want to use a real gas EOS but lack critical property data for some species, is there a recommended way to make those species behave as ideal gas within the real gas framework?
Mathematically, setting a=0 and b=0 should cause the cubic EOS to converge to ideal gas behavior (PV=nRT), but I'm encountering NaN errors when I try this approach. I've tested this with both Peng-Robinson (with a=0, b=0, and acentric-factor=0) and Redlich-Kwong (with a=0, b=0), and both return NaN errors. I'm using Cantera 3.1.
Looking at the source code for RedlichKwongMFTP (https://github.com/Cantera/cantera/blob/main/src/thermo/RedlichKwongMFTP.cpp), I noticed that calcCriticalConditions() has explicit guards for b <= 0 and a <= 0 cases, returning early with placeholder values. However, other functions like hresid() divide by m_b_current directly, which causes division by zero when b=0.
One workaround I've seen is using a=1 and b=1 for radicals. While this avoids the division by zero, it introduces errors in the mixing rules at higher species concentrations. For trace species like radicals at ppm levels the error is negligible, but for species that can reach significant mole fractions (like biomass surrogates during pyrolysis), the error in b_mix can be several percent.
I have a few questions for the community:
Thanks in advance for any guidance.
Omkar
--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cantera-users/44c17085-7df3-4a8d-9213-72c415f6f1b2n%40googlegroups.com.