CalebBell / thermo

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

CoolProp vs thermo #125

Closed afshawnlotfi closed 1 year ago

afshawnlotfi commented 1 year ago

Hi so I was doing a comparison between CoolProp and this Library and notice the output wasn't the same by a lot and was curious why

import CoolProp
T0_in = 1533;  # K                                                 
p0_in = 14.6e5;  # Pa
fluid = 'Air'

H = CoolProp.CoolProp.PropsSI('H','T',T0_in,'P',p0_in,fluid)
print(H)

from thermo.chemical import Mixture

H = Mixture('Air', T=T0_in, P=p0_in).H
print(H)
1803573.6189799542
1377808.0623975568

Are these just using different thermo models for enthalpy, but even so I feel like the difference is a lot

CalebBell commented 1 year ago

Please see CoolProp's own FAQ question 1: https://github.com/CoolProp/CoolProp/blob/master/FAQ.md

You can only compare differences in enthalpy, not absolute values.

afshawnlotfi commented 1 year ago

Oh nice, thanks for the clarification and quick response!