CalebBell / thermo

Thermodynamics and Phase Equilibrium component of Chemical Engineering Design Library (ChEDL)
MIT License
594 stars 114 forks source link

isentropic_exponent #94

Closed andr1976 closed 2 years ago

andr1976 commented 2 years ago

In Phase.py the isentropic exponent is returned as Cp(real gas) / Cv (real gas). However, as I recall the real gas isentropic exponent is given by something like image or alternatively the Ideal gas Cp/Cv ratio is often used as a good approximation - Cp/Cv for real gas is of little use (and tends to give wrong results) when used for orifice / valve flow etc.

CalebBell commented 2 years ago

Hi Anders, Thank you very much for noticing this. I wasn't aware there was a better definition. I did, however, notice that it was giving some strange results in orifice equations.

I actually found three definitions of real gas isentropic exponent, which are explained pretty well in this free paper: http://pure.tudelft.nl/ws/portalfiles/portal/103404266/1_s2.0_S2352711021001527_main.pdf

The PV^k one seems wildly more popular than the others, so I think it makes sense for it to get the function named isentropic_exponent, and the others can be isentropic_exponent_TV and isentropic_exponent_PT; and also isentropic_exponent can be aliased as isentropic_exponent_PV for consistency.

I will get this out in the next release of thermo.

CalebBell commented 2 years ago

Hi Anders, Thank you very much for finding this. It is resolved in the new Thermo release, Thermo 0.2.12. It is out now on pypi and should make its way to conda in the next day or so. Cheers, Caleb

CalebBell commented 2 years ago

The documentation for the new methods is here: https://thermo.readthedocs.io/thermo.phases.html#thermo.phases.Phase.isentropic_exponent