Thermodynamic Properties Free software?

Click For Summary
SUMMARY

The discussion centers on finding free software to calculate thermodynamic properties, specifically the specific volume of a gas from experimental data points (T1, P1), (T2, P2),...,(Tn, Pn). Participants recommend using the NIST fluid properties database, which, while not entirely free, offers a significant amount of data online at no cost. They suggest utilizing PHP to automate data retrieval from the NIST database by constructing URL queries based on temperature and pressure inputs. The conversation emphasizes the importance of understanding the database's query structure for effective data extraction.

PREREQUISITES
  • Understanding of thermodynamic properties such as specific volume, internal energy, and entropy.
  • Familiarity with the NIST fluid properties database and its query structure.
  • Basic knowledge of PHP programming for web data extraction.
  • Experience with data interpolation techniques, particularly bivariate interpolation.
NEXT STEPS
  • Learn how to use the NIST fluid properties database effectively, including its query parameters.
  • Study PHP functions like file_get_contents() for web scraping and data retrieval.
  • Research bivariate interpolation methods applicable to thermodynamic data.
  • Explore VBA in Excel for automating data input and retrieval from web sources.
USEFUL FOR

Researchers, engineers, and students in thermodynamics, particularly those needing to analyze gas properties and automate data retrieval processes for experimental data analysis.

Saladsamurai
Messages
3,009
Reaction score
7
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 :smile:
 
Engineering news on Phys.org
I assume that your gas is not ideal, such that
<br /> P\nu = RT<br />
doesn't apply?
 
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 [/URL]

* MELTS Supplemental Calculator Web page. Paul Asimow has written a JAVA version[PLAIN]http://www.safejourneyfamilyboarding.com/smileynormal.ico [/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 [/URL]
 
Last edited by a moderator:
Have you seen http://www.nist.gov/data/nist23.htm" ? 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:
Oh sweetness! Look at all these replies. :smile:

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.
 
Q_Goest said:
Have you seen http://www.nist.gov/data/nist23.htm" ? 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.

This looks nice! But the money :frown: 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.


Mech_Engineer said:
Don't forget a large portion of NIST's fluid properies database is also available free online:

http://webbook.nist.gov/chemistry/fluid/

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:
Saladsamurai said:
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...

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:
...?T=300&PLow=10&PHigh=10&PInc=1&Applet=on&Digits=5&ID=C7732185&Action=Load&Type=IsoTherm&TUnit=K&PUnit=MPa&DUnit=mol%2Fl&HUnit=kJ%2Fmol&WUnit=m%2Fs&VisUnit=uPa*s&STUnit=N%2Fm&RefState=DEF

We can look at it and change the temperature to 400 by simply entering
...?T=400&PLow=10&PHigh=10&PInc=1&Applet=on&Digits=5&ID=C7732185&Action=Load&Type=IsoTherm&TUnit=K&PUnit=MPa&DUnit=mol%2Fl&HUnit=kJ%2Fmol&WUnit=m%2Fs&VisUnit=uPa*s&STUnit=N%2Fm&RefState=DEF

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:
<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
 
minger said:
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:
<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

Haha! Sweet Lucifer minger :smile: Thanks for all of that. I have no server, nor do I know any PHP. I am not sure that I am willing to go to those lengths just yet. I think that the isochoric calculations that the site makes might be just helpful enough, I just have to clarify exactly what it is doing. I will post back soon or perhaps start a new thread regarding the data it produces.

Thanks again for taking the time to help. :smile:

~Casey
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
1K
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
20K