# Thermodynamic Properties Free software?

1. Aug 22, 2010

Hey folks,

I am looking for something free to help me out here. I have experimental data that consists of the temperature and pressure of a gas over time. That is I have (T1,P1), (T2,P2),.....(Tn,Pn) where n might be upward of a 500.

I would like to be able to determine the specific volume at all of these individual states. How would you go about doing this? I have been trying to write a code that interpolates in the steam tables, but I am really not sure if that will work since it is bivariate interpolation and I am not sure that my data meets the criteria necessary to do that.

Any thoughts on how I might do it?

Thanks

2. Aug 23, 2010

### minger

I assume that your gas is not ideal, such that
$$P\nu = RT$$
doesn't apply?

3. Aug 23, 2010

### dogboarding

Igneous Petrology

* MELTS Web page. Mark Ghiorso's package for modeling crystallization of magmatic systems. Software for many platforms, a demo, and an on-line manual.[PLAIN]http://www.safejourneyfamilyboarding.com/smileynormal.ico [Broken] [Broken][/URL]

* MELTS Supplemental Calculator Web page. Paul Asimow has written a JAVA version[PLAIN]http://www.safejourneyfamilyboarding.com/smileynormal.ico [Broken] [Broken][/URL]

* QUILF. Andersen, Lindsley and Davidson's PASCAL program to assess equilibria among Fe- Mg-Ti oxides, pyroxenes, olivine, and quartz. Described in Computers and Geosciences, v. 19, p. 1333-1350. Available by ftp.[PLAIN]http://www.safejourneyfamilyboarding.com/smileynormal.ico [Broken] [Broken][/URL]

Last edited by a moderator: May 4, 2017
4. Aug 23, 2010

### Q_Goest

Have you seen http://www.nist.gov/data/nist23.htm" [Broken]? It's an extensive fluids database that can be used in conjunction with Excel and other programs and includes a wide variety of thermodynamic properties such as internal energy, enthalpy, entropy, specific heat, etc... Not free (\$200) but not expensive either.

Last edited by a moderator: May 4, 2017
5. Aug 23, 2010

### Mech_Engineer

6. Aug 23, 2010

Oh sweetness! Look at all these replies.

Looks like I have some work to do. And minger, I am not sure. That is actually why I need the states so that I can find the compressibiltu factor Z. It will give me a starting point for my experiment.

Thanks everyone.

7. Aug 23, 2010

This looks nice! But the money You're right, it's not too expensive, but free would be better. I doubt I can convince my advisor too purchase. What would be nice is to know how they calculate the properties of refrigerants so that I can make my own.

This is more like it. I just need to know if there is a way I can calculate ~200 values efficiently. I.e., is there a way I can write a script that accesses this site and feeds it the proper inputs (T,p) and then collects the resultant values?

I want to say that even something like VBA in Excel could accomplish that...

Last edited by a moderator: May 4, 2017
8. Aug 23, 2010

### minger

It can be done. Firstly, you'll just need to document their database query variable names and descriptors. Each of the options is then included in the URL. For example, an example query for isothermal properties of water in the default standard convection at 300 K, 100 Mpa gives a URL of:
We can look at it and change the temperature to 400 by simply entering
Now, at this point, I'm not sure if there's any error checking or scripts that NIST includes to prevent people from directly accessing their properties via URL, but in this example, it at least worked for me. However, if not, then you can access the URL by concatenating variables stored for your data points.

At this point, you'll need a way to read the data on the webpage. This can be done using PHP using a function IIRC file_get_contents(). This function will read the pages HTML and load each line into a character array. So, if you look at the page source, it will look something like this:
Code (Text):

<table border="1" summary="reference states">
<tr>
<th align="left">Internal energy</th>

<td align="left">U = 0 at 273.16 K for saturated liquid.</td>
</tr>
<tr>
<th align="left">Entropy</th>
<td align="left">S = 0 at 273.16 K for saturated  liquid.</td>
</tr>
</table>

I believe it puts each line as an element into the array anyways. Now, at this point, you know that each time you run the query, Y lines down will be a line containing the e.g. entropy. So, you can then call that lines data with variable[Y]. After that, there is another PHP function to strip away "stuff" from the left, such that you can have a nice pretty variable containing the real data containing that information.

Put everything into a giant loop containing the information you need and you can print everything out in a nice table.

All of this is dependent on the fact that you have a server to upload this php page...and that the server runs php of course.

p.s....and of course that you either know or have a desire to learn some basic PHP

9. Aug 23, 2010