CoolProp / IF97

Open-source C++ implementation of the IAPWS-IF97 equations
MIT License
88 stars 31 forks source link

Generic Thermodynamic Derivatives Function #29

Open henningjp opened 6 years ago

henningjp commented 6 years ago

A generic routine could be written for thermodynamic derivatives of any two property pairs as is done in CoolProp and RefProp. The generic formulas for such a function based on IF97 Gibbs and Helmholtz equations and their derivatives is provided in advisory note IAPWS AN3-07(2014).

Simon-Lopez commented 5 years ago

Hi there. Is this issue still relevant ?

henningjp commented 5 years ago

CoolProp calculates them for the HEOS fluids. The IF97 just returns "not implemented". I thought it might be a nice enhancement if there was enough interest (I haven't seen any yet). Its pretty straight forward. I just haven't gotten around to doing anything with it yet. I thought it might also provide an opportunity for someone else to get involved.

Simon-Lopez commented 5 years ago

Thanks for the answer! There is interest from my part but the fact that there is not wide interest makes me wonder... :wink: I'll try to have a look and might come back to you if you don't mind! Maybe, the idea here was not to duplicate code. It's not yet really clear to me what are the exact links between Coolprop and IF97...

henningjp commented 5 years ago

CoolProp handles over 120 materials using Helmholtz Equations of State (HEOS), including water. The Water HEOS is from IAPWS-95. CoolProp also handles a number of other backends that provide other computational methods (incompressible liquids, humid air, etc.). This IF97 routine is used in the IF97 backend that provided a faster alternative to the HEOS formulation for water which is iterative. The derivatives are provided in the HEOS backend and could also be provided in IF97 is there is any call for it. I don't use them myself in my own work, but somebody might.

The only other thing not implemented from the IAPWS-IF97 specification is the meta-stable states mentioned in issue #30. These two items would make this library the most complete implementation of IF97 that I know of. However, this last bit may not be worth the effort if nobody cares. It may just be an academic exercise.