Thermodynamic Properties Free software?

Click For Summary

Discussion Overview

The discussion revolves around finding free software or methods to determine the specific volume of a gas from experimental data consisting of temperature and pressure measurements. Participants explore various tools and approaches, including interpolation techniques and database queries, while addressing the challenges of working with non-ideal gases and the need for efficient calculations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant seeks a free method to calculate specific volume from temperature and pressure data, expressing uncertainty about the effectiveness of bivariate interpolation with their dataset.
  • Another participant questions whether the gas in question is ideal, implying that the ideal gas law may not apply.
  • Several participants mention the NIST fluids database, noting that while it is not free, a significant portion of its data is available online at no cost.
  • A participant suggests the possibility of using VBA in Excel to automate the retrieval of thermodynamic properties from the NIST database.
  • Another participant provides a detailed explanation of how to construct URL queries to access specific thermodynamic properties from the NIST database, including potential methods for parsing the returned data using PHP.
  • There is discussion about the need for error checking when accessing the NIST database and the feasibility of running scripts to collect data efficiently.

Areas of Agreement / Disagreement

Participants express a mix of agreement on the usefulness of the NIST database while also highlighting the challenges of cost and the need for free alternatives. There is no consensus on the best approach to calculate specific volume or the applicability of the ideal gas law.

Contextual Notes

The discussion includes assumptions about the nature of the gas and the limitations of the proposed methods, such as the need for proper error handling in automated queries and the dependency on specific software capabilities.

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
[tex] P\nu = RT[/tex]
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
2K
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