[Contents] [TitleIndex] [WordIndex

Thermodynamics In Scilab

In this page, we present some toolboxes which are providing thermodynamics features for Scilab. We review two toolboxes in this field: AmsterChem's toolboxes for Scilab, based on the CAPE-OPEN standard and Excel Engineering's toolbox for water and steam computations in Scilab.

Introduction

Scilab can be used for thermodynamics calculations. For example, chemical equilibrium may result in nonlinear systems of equations, which can be solved by the Scilab function fsolve. An example of this is given in the paper :

http://www.ifi.unicamp.br/ceneh/WICaC2008/PDF/19-AdilsonJAssis.pdf

where Assis, Hori, Avila-Neto and Franco, four researchers from the School of Chemical Engineering of the Federal University of Uberlandia in Brazil have used Scilab to conduct a comparative thermodynamic analysis of methane reforming reactions and to asses the influence of key operational variables on chemical equilibrium.

In this page, we present two toolboxes in this field:

AmsterChem's tools for Scilab

AmsterChem is a company which has an expertise in providing consultancy in the field of process simulation and modeling. They are experts in CAPE-OPEN software development.

AmsterChem provides two tools for Scilab:

Both modules are available for Windows can be downloaded at :

http://www.amsterchem.com/downloads.html

These toolboxes have been updated in 2010.

CAPE-OPEN Unit Operation

The SciLab CAPE-OPEN Unit Operation is a unit operation implementation for which the calculations can be entered in SciLab.

The toolbox provides the following functions:

In addition to the functions, the toolbox provides the following global variables:

The following is a simple example.

f1=getFeedProp(1,"flow")
f2=getFeedProp(2,"flow")
h1=getFeedProp(1,"enthalpy")
h2=getFeedProp(2,"enthalpy")
p1=getFeedProp(1,"pressure")
p2=getFeedProp(2,"pressure")
p=min(p1,p2)
f=f1+f2
h=(h1*f1+h2*f2)/f
totF=sum(f)
setProduct(1,totF,f/totF,"pressure",p,"enthalpy",h)

The SciLab CAPE-OPEN Unit Operation is free of charge for personal and academic use. For commercial use, a license fee must be paid.

SciLab CAPE-OPEN Thermo Import

This SciLab package allows for importing CAPE-OPEN version 1.1 thermodynamic and physical Property Packages into SciLab.

The toolbox provides functions for:

For example, the following functions can be used to calculate thermodynamic and physical properties and thermodynamic phase equilibria:

We cannot list all the function in this page. Please read the help pages provided in the toolbox for more details on this topic.

Older versions

An older version of this toolbox was released in 2009 on the former Toolbox center :

http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=1203

Excel Engineering's tools for Scilab

Excel Engineering has developped open source softwares for Scilab, including Steam and water properties based on the "International Association for Properties of Water and Steam Industrial Formulation 1997 (IAPWS IF-97).

http://xsteam.sourceforge.net/

Download it here : https://sourceforge.net/projects/xsteam/

A full implementation of the IF-97 standard that provides very accurate steam and water properties in ranges from 0-1000 bar and 0-2000°C for use in process Engineering Industry.

Provided thermodynamic properties are:

We are free to use, modify and distribute the code as long as authorship is properly acknowledged.

An example

The latest version of XSteam.sci is available here:

https://fileexchange.scilab.org/toolboxes/502000

In order to use the toolbox, we simply download the script XSteam.sci, and execute it:

exec("XSteam.sci");

The toolbox provides the following functions:

One of the main functions is the XSteam function. This function uses strings to specify which thermodynamical variable we want to compute. The main variables are the following:

There are much more variables available in the function, including:

For example, to compute the enthalpy as a function of pressure (1 bar) and temperature (20 degC), we use the following script:

-->XSteam("h_pT",1,20)
ans=
84.011811

Actually, the function provides so many variables that it is not possible to list them all in this page. Please read the comments in the file for more informations.

Some more details

The first release of toolbox was released in 2006 by Magnus Holmgren.

The script was translated to Scilab format from XSteam.m using m2sci.pl (created by Torbjørn Pettersen).


2022-09-08 09:27