Freesteam

From ASCEND
Revision as of 13:44, 13 May 2010 by UploadBot (talk | contribs) (Restored page from Google Cache, uploaded by John Pye)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
<img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" />
A transient simulation of the equilibrium of two masses of water, showing phase change. The steam properties are calculated using freesteam. The integration was performed using IDA.
This page documents an experimental feature. You can help out by testing it and recording your experiences.

freesteam is a C library that allows the properties of water and steam to be calculated according the method described by the International Association for the Properties of Water and Steam (IAPWS). Some work has been done to connect freesteam to ASCEND as an external library, and it is already quite useful for steam power cycle calculations, as demonstrated in Rankine cycle.

The latest release, 2.0, of freesteam (Jan 2010) includes bindings that will work with ASCEND 0.9.7.


For developers

Instructions for getting it up and running on your machine are as follows:


  • install GSL, SCons and Python on you system (on Ubuntu, you need gsl-dev, scons python-dev).
  • install ASCEND somewhere on your system, and make sure that 'ascend-config' is in your PATH.
  • download the latest version (2.x) of freesteam from [1]
  • compile the code using scons ([2])

If all goes well, you should now have files like ~/freesteam-2.0/libfreesteam.so as well as ~/freesteam-2.0/ascend/libfreesteam_ascend.so.

To make use of these, you need to ensure that ~/freesteam-2.0/ascend is in your ASCENDLIBRARY env var, and ~/freesteam-2.0 is in your LD_LIBRARY_PATH (Linux), PATH (Windows) or DYLD_LIBRARY_PATH (Mac OS ). On Linux, you could for example start ASCEND like this:

export ASCENDLIBRARY=~/ascend/models:~/freesteam-2.0/ascend
export LD_LIBRARY_PATH=~/ascend:~/freesteam-2.0
~/ascend/pygtk/ascdev johnpye/rankine.a4c

and this should load the simple Rankine cycle test-model for ASCEND.


For users

Freesteam version 2.0 includes Windows and Ubuntu Linux binary packages that allow you to run freesteam models in ASCEND directly.


Future work

  • support for regions. Using the ASCEND conditional modelling capabilities, we can model the transitions between fluid phases with much greater precision than currently.
  • 'smart' solving. The current black box implementation for external relations requires the user to specify which variables are 'outputs' and which are 'inputs'. freesteam is arguably better placed to make that decision (it knows how the steam properties correlations are constructed internally), but this would require a different approach to black boxes in ASCEND.

For an example using freesteam see Worked examples.

freesteam homepage: [3]