XSteamW - a vectorizing wrapper for XSteam

バージョン 1.0.0.0 (98.2 KB) 作成者: Volker Staben
adds vectorizing capabilities to XSteam - www.mathworks.com/matlabcentral/fileexchange/9817
ダウンロード: 1.5K
更新 2010/10/30

ライセンスの表示

XSteam.m is a function, written by Magnus Holmgren, for calculating Steam and Water properties according to the IAPWS IF-97 standard. XSteam is free, see http://www.x-eng.com or http://www.mathworks.com/matlabcentral/fileexchange/9817. Thanx to Magnus for his excellent work!

XSteam does not support vectors as passed arguments. So calling XSteam following vectorized code guidelines sometimes results in error messages. Therefore writing some kind of loops around XSteam seems to be unavoidable in certain cases.

XSteamW is a "wrapper" for XSteam, doing this "looping" around XSteam:

result = XSteamW (Var1, Var2);
result = XSteamW (Var1, Var2, Var3);

Unlike calling XSteam, Var2 and/or Var3 can now passed to XSteamW as row or columns vectors.

Results are calculated as an m-by-n matrix. The number m of rows
equals the length of Var2, the number n of columns equals
the length of Var3.

Example: calculation of steam enthalpy as a function of pressure and temperature, expressed in bar and °C:

pressure = [100, 150, 200];
temperature = [500, 510, 520, 530];
XSteamW ('h_pt', pressure, temperature)

will result in

ans =

1.0e+03 *

3.3751 3.4008 3.4263 3.4517
3.3108 3.3395 3.3678 3.3957
3.2412 3.2736 3.3052 3.3361

BTW: just a simple solution - comments and optimization welcome...

引用

Volker Staben (2024). XSteamW - a vectorizing wrapper for XSteam (https://www.mathworks.com/matlabcentral/fileexchange/29186-xsteamw-a-vectorizing-wrapper-for-xsteam), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2010b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersSignal Generation についてさらに検索
タグ タグを追加
謝辞

ヒントを得たファイル: X Steam, Thermodynamic properties of water and steam.

ヒントを与えたファイル: ThermoSolver

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0