mr_v
Contributor
Well, if there was a user error, it was not on my side.I suspect there was a user error when using REFPROP. It has a plethora of settings and fluid selections, which is probably where the misstep happened.
REFPROP gives a compressibility factor (Z) of 1.0313 for air at the values you specified (70 °F and 3000 psi), and 1.0363 at 300 K and 3000 psi.
If I had to make a wild guess, I’d say whoever calculated the Z-factor likely selected the wrong fluid in REFPROP. Methane, for example, would come close to the incorrect value of 0.881. It has a Z-factor of 0.83172 at 300 K and 3000 psi. REFPROP also has a free version available, called MINI-REFPROP. It has at least air as a pseudo pure fluid.
I love COOLPROP and surprised it isn’t more widely adopted in the gas industry. It also hasn’t seen any real recognition in the SCUBA world yet, which is odd. It’s an open-source library for calculating various fluid properties, and it can be used easily by anyone with basic Python skills.
I got tired of writing Python scripts manually, so I built a small app to run a local server.
The app launches a Flask server that can be accessed via a local browser, no internet required and the app certainly doesn't connect to anything outside your local server. It’s not the neatest solution, but it was the quickest approach I could think of that didn’t involve writing a full standalone program. It was intended for personal use, so I didn’t pay much attention to which licenses to include. I sincerely apologize if I forgot to add a license and will do so when someone points it out (It's been a while and I can't recall all the dependencies). None of the heavy lifting in the app is my own. I just pulled everything together into a usable package. All I did was write the HTML and PHP front-end.
Maybe that’s of use to someone like me that likes to play around with the physics.
For what it’s worth, COOLPROP also returns a Z of 1.0313 at 3000 psi and 70 °F.
I am looking at two libraries CoolProp and Thermo. Thermo seems to cover more functionality. I will review the code shortly.
Do you have the code for your app anywhere on GitHub? If so, I can incorporate it into my soon-to-be-live site dedicated to tech diving, caves, with some used gear for sale, too.