Welcome! Log In Create A New Profile Recent Messages

Advanced

freesteam (open source library)

Posted by dullfig 
freesteam (open source library)
January 23, 2015 11:23PM
Hello all:

So there is this free open source library for calculating steam properties at [freesteam.sourceforge.net] that I was wondering if anyone is familiar with or has used. I was wondering how accurate the results are.

Dan
Re: freesteam (open source library)
January 25, 2015 06:53AM
Hi Dan,

Are you wanting to generate Mollier diagrams etc. or get properties?

I've downloaded and used the program a version previous. I recall it not being unit flexible, and had other issues.

For data I like: NIST it will graph the data by any of the listed properties and I copy paste from view data into excel to process further.

I have a few other links, but I'm not sure what your after.

Keith
Re: freesteam (open source library)
January 25, 2015 12:23PM
I want to write a program that simulates the expander, by calculating the state of the steam every degree of rotation or so. So I was wondering if this library gave accurate results. It is also not clear if it correctly calculates the supercritical region.

Dan
Re: freesteam (open source library)
January 31, 2015 01:47AM
I've used it for just this purpose, using the python bindings. It seemed to correspond reasonably closely with steam table numbers. However, had to write code to use iterative solution since lookup using entropy & specific volume (end state after expansion) isn't provided. Not too bad, but annoying when modeling an expander, since both expansion and compression stages involve adiabatic expansion to known volumes.

Note that I was not using the supercritical region - just plain old 250 psi staturated steam expanding in a uniflow.

- Bart

----
Bart Smaalders [smaalders.net]



Edited 1 time(s). Last edit at 01/31/2015 01:49AM by barts.
Re: freesteam (open source library)
February 12, 2015 03:29AM
The IAPWS site has download able pdf files on all their formulations. The IAPWS-95 scientific formulations are the most accurate. The IFC formulations were designed to produce results close to the old ASME formulations. Don't won't to upset billing applications that used the old formulations.

The great thing about the scientific formulstions is they do not divide formulations into regions. One set Co Erin the entire range. And it covers higher temperature and pressures then the IFC formulations.

The 95 formulations provide formula for more properties. The drawback is the temperature and density is the independent properties. So many times a state point must be solved for. But on the other hand for simulations they are ideal. Not having to repeatedly check boundaries to figure which formula might apply takes makes up for the more accurate property calculation time. I used the IAPWS formulations to derive some additional properties. Using VisSim with it differntial equation simulation and added properties for rate of change properties ideal expansion and compression are easy to simulate. Temperature and density are ideal.during expansion and compression it is the density that is changing. The rate of change of the cylinder volume can be formulated.

I have the IAPWS 95 scientific formulations coded in c. Some of IFC formulations as well. Functions that taking several different sets of propertied.

Density inputs also take specific volume. Being reciprocal of each other


Pressure and Temperature
specific volume (or density) and temperature.
entropy and density
entropy and pressure
enthalpy and density
enthalpy and pressure
I have code fore all the listed properties plus my derived rate of change of density with respect to temperature along constant entropy or enthalpy paths. The rate of change property functions need work when the state point is a saturated mixture.

Andy
Re: freesteam (open source library)
February 12, 2015 09:35AM
Andy: I will take a look at these. Thanks
Re: freesteam (open source library)
March 18, 2015 01:56PM
The IAPWS-95 do not match up to the old K & E tables. They are at minum accurate to 3 decmal places. And that is close to the critical point. They are generally more accurate then the 1967 ASME formulatios. There a precession map in the IAPWS formulations if interested. Both the IAPWS IFC-97 industrial fomulations and the IAPWS-95 scientific formulations of precession maps in their documents. They can be downloaded from their sites.

The ISPWS-95 property formulations are based on two equations and their derivatives. All given in the documentation. The dependent variables are temperature and density. I have imemented functions taking other properties. Pressure and temperature for example solves for density at given pressure. I use the saturation line pressure temerature of the IFC formulations and the IAPWS saturation line formulations in my functions that have to solve for unknowns that may fall in the saturated region. There an IAPWS-95 saturation line formulatto that takes the boundary densities and temperature I have to use to get precise values. Except right on the critical point the provide consistent results to 12 places. Now they are not accurate to nearly that precession. But simulation steps need consistent directional steps. At small changes the points need have consistent tangents. I use integration functions in simulating processes and slop reversal a use the to go nuts. I can simulate at reasonably short time streps and be well above the jitter that would effect the slop I am intetgrating. I have shown some of my isentropic and isenthalip plots generated using integration along constant entropy and enthalpy holding to 12 places until the hit the mixture region. That is using numerical integration to calculate temperature based on the rate of change of density. Integration is with respect to time. So a simple intergration of density gives me density. And the temperature density calculates state point properties. The rate of change of temperature with respect to density property times the rate of change of density is a simple fast calculations to get temperature rate of change. The temperature density rate properties are along constant entropy and enthalpy paths.

The propertis are all functions of the base Helmholtz free energy equation and it's detivities. There two parts to it. A simple real gas part and a huge 58 term equation. The actual properties are then functions of the free energy equation and it's first and second order detivities. Nice that the detivities are already done and in the publication. In order to compute the rate of change properties I had to take a third level detivitive. That was a bear. It actually took me two weeks to do them. There 56 terms in the free energy equation. And many terms involve products of the temperature and density to various powers. And a few are e^f(d,t). If you know calculus you know why that third level was such a task. It's something like a 500+ term polynomial. Just lucky that a few of the term droped to constants in the first and second.

My boot tracks went out on my laptop. Carly sure I can recover my latest versions when I get a new computer. Waiting for my farm lease money to put a new system together. It won't be a laptop I do not have tools to even get the case apart. Should be this summer. Right now looking at an AMD A10-7850k, 32mb 2400 ram, 2TB hard drive and a 500gb SSD. Right now not planning on a graphics card. The 8 gpu cores in the 7850 should handle my RPG gamming requirements.

Anyway the core IAPWS 95 functions are all backed up. Some of the latest additions are only my dead pc.

I think my NOTE 4 can read a network drive. But need a router that I can put my back up drive on. Still using old /n router. Getting an /ac router hopefully soon.

It's all the solver functions that make my IAPWS-95 useful. The package works a lot like the ISPWS-97 IFC formulations. I have c++ class defined objects that have set property functions and get property functions. Many intermediate calculations common to multiple properties are cashed once calculated. Cleared when a set property chenge effecting it occures. So input properties do not Chang the output function calls just returned the cashed value. I call the class a state_point. A lot of work has been done to avoid recalculating unchanging values. So the scientific calculations are faster then a lot of the IFC packages. And they are more accurate messed against actual messured data.

The IFC 97 formulations are intentionally less accurate. Made to be consistent with the old ASME standard. They did not won't to effect fee calculations that used the old ASME 67 formulations. There is or was a document on the IAPWS site explaining all this. Probably steam sales for dry cleaning and heating in city distribution systems. There was no information on the favored party.

Anyway the IAPWS-95 formulations would give us the bedt, accurate, redults. That is the reason I chose them. Well that and crossing a region boundary in the 97 formulations caused huge changes using different formula from one and the other. Caused numerical intergration to go crazy. And also you are interested density change along constant in entropy or enthalpy paths. Neither being an independent input variable. So not vary fast doing double value search solver.

I may have a new system by the end of june. I hope.

Andy



Edited 3 time(s). Last edit at 03/18/2015 04:19PM by steamerandy.
Sorry, only registered users may post in this forum.

Click here to login