MATLAB/Engineering thermodynamics

< MATLAB

This page is devoted to XSteam.m, which is a Matlab code available available on the internet.[1]


Matlab code to generate steam tables

http://www.mathworks.com/matlabcentral/fileexchange/9817-x-steam--thermodynamic-properties-of-water-and-steam

This website also has a US units version, as well as detailed instructions on how to call the function. Once you have this code in a MATLAB folder with the title

 XSteam.m

you can call it from the command window with a variety of arguments. The following two examples are taken from the pdf file that accompanies the download:

 XSteam('h_pt',1,20)

Returns the enthalpy of water at 1 bar and 20 C.

 XSteam('TSat_p',1)

Returns the saturation temperature of water at 1 bar.

Backup copy of XSteam.m

MATLAB code that uses Xsteam to generate steam tables and graphs

This version of the code uses an Excel spreadsheet that must be placed in the same folder as the executable code. The spreadsheet is called parameters, and the first row contains the pressures. The columns contain the corresponding temperatures. Do not include the saturation temperature -- that is automatically included. The and the MATLAB code is called TableGraphMaker.m.[2]

Copy of parameters

Copy of TableGraphMaker.m

Footnotes and references

  1. XSteam available at http://www.mathworks.com/matlabcentral/fileexchange/9817-x-steam--thermodynamic-properties-of-water-and-steam
  2. aka "student"
This article is issued from Wikiversity - version of the Tuesday, March 24, 2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.