• What is CAPE-OPEN?
  • FreeSteam?
  • IAPWS-IF97 SteamStandard?
  • Different Rigions

In [1]:
using ThermodynamicsTable


`perryanalytic` Property Package was created and is ready to use.

In [2]:
using FreeSteam

In [3]:
T = 400. # in Kelvin! 
p = 1e5 # 1bar .equals. 1e5 Pascals OR 100 KPa
ss = freesteam_set_pT(p, T)



Out[3]:
FreeSteam.SteamState('\Ud6df02',100000.0,400.0)

In [4]:
freesteam_region(ss)


Out[4]:
2

In [5]:
p = 10e5
ss = freesteam_set_pT(p, T);
freesteam_region(ss)


Out[5]:
1


In [6]:
T1=623.15;T2=863.15;
T3=273.15;T4=647.096;

In [7]:
using Gadfly;set_default_plot_size(20cm, 15cm);

In [8]:
Regions=plot(
layer(x=[623.15,647.96],y=[16.529,22.064]*10e5,label=["T=623.15 P=16.529MPa","T=647.96 P=22.064MPa"], 
Geom.point, Geom.label,Theme(default_point_size=4px)),
layer(freesteam_b23_p_T,T1,T2,Theme(default_color=colorant"red", line_width=2pt)),
layer(freesteam_region4_psat_T,T3,T4,Theme(default_color=colorant"orange", line_width=2pt)),
layer(x=[623.15,623.15],y=[16.529,100]*10e5,Geom.line),
layer(x=[1073.15,1073.15],y=[0.000611,100]*10e5, Geom.line),
layer(x=[2273.15,2273.15],y=[0.000611,50]*10e5, Geom.line),
layer(y=[100,100]*10e5,x=[273.15,1073.15], Geom.line),
layer(y=[50,50]*10e5,x=[1073.15,2273.15], Geom.line),
Guide.XLabel("Temprature T"),Guide.YLabel("Pressure P"),Guide.Title("IAPWS-IF97 Regions"),
Guide.xticks(ticks=[T3,T2,1073.15,2273.15]),Guide.yticks(ticks=[0.000611,50,100]*10e5))


Out[8]:
Temprature T 273.15 863.15 1073.15 2273.15 T=623.15 P=16.529MPa T=647.96 P=22.064MPa 6.11×10² 5.00×10⁷ 1.00×10⁸ Pressure P IAPWS-IF97 Regions

In [9]:
ss=freesteam_region4_set_Tx(400.0,0.1)


Out[9]:
FreeSteam.SteamState('\U1b538c04',400.0,0.1)

In [10]:
freesteam_region(ss)


Out[10]:
4

In [11]:
freesteam_rho(ss)


Out[11]:
13.514843387038287

In [12]:
plot(x->freesteam_rho(freesteam_region4_set_Tx(400.0,x)),0.1,0.9)


Out[12]:
x -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 2.5 -1.00 -0.95 -0.90 -0.85 -0.80 -0.75 -0.70 -0.65 -0.60 -0.55 -0.50 -0.45 -0.40 -0.35 -0.30 -0.25 -0.20 -0.15 -0.10 -0.05 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95 1.00 1.05 1.10 1.15 1.20 1.25 1.30 1.35 1.40 1.45 1.50 1.55 1.60 1.65 1.70 1.75 1.80 1.85 1.90 1.95 2.00 -1 0 1 2 -1.0 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 -20 -15 -10 -5 0 5 10 15 20 25 30 35 -15.0 -14.5 -14.0 -13.5 -13.0 -12.5 -12.0 -11.5 -11.0 -10.5 -10.0 -9.5 -9.0 -8.5 -8.0 -7.5 -7.0 -6.5 -6.0 -5.5 -5.0 -4.5 -4.0 -3.5 -3.0 -2.5 -2.0 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0 10.5 11.0 11.5 12.0 12.5 13.0 13.5 14.0 14.5 15.0 15.5 16.0 16.5 17.0 17.5 18.0 18.5 19.0 19.5 20.0 20.5 21.0 21.5 22.0 22.5 23.0 23.5 24.0 24.5 25.0 25.5 26.0 26.5 27.0 27.5 28.0 28.5 29.0 29.5 30.0 -20 0 20 40 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 f(x)

In [34]:
plot(
layer(x=[freesteam_region4_s_Tx(x,1.0) for x in [273.15;274:646;647.096]],y=[273.15;274:646;647.096],
Geom.line,Theme(default_color=colorant"red", line_width=2pt)),
layer(x=[freesteam_region4_s_Tx(x,0.0) for x in [273.15;274:646;647.096]],y=[273.15;274:646;647.096],
Geom.line,Theme(default_color=colorant"blue", line_width=2pt)),
Guide.XLabel("Entropy S"),Guide.YLabel("Temprature T"),Guide.Title("Steam Saturated Line"),
Guide.xticks(ticks=[0.0,freesteam_region4_s_Tx(647.096,0.0),freesteam_region4_s_Tx(273.15,1.0)]),
Guide.yticks(ticks=[273.15,647.096]))


Out[34]:
Entropy S 0.0000 4412.0215 9155.7594 273.150 647.096 Temprature T Steam Saturated Line

In [43]:
plot(
layer(x=[freesteam_region4_h_Tx(x,1.0) for x in [273.15;274:646;647.096]],y=[273.15;274:646;647.096],
Geom.path,Theme(default_color=colorant"red", line_width=2pt)),
layer(x=[freesteam_region4_h_Tx(x,0.0) for x in [273.15;274:646;647.096]],y=[273.15;274:646;647.096],
Geom.path,Theme(default_color=colorant"blue", line_width=2pt)),
Guide.XLabel("Entalpy h"),Guide.YLabel("Temprature T"),Guide.Title("Steam Saturated Line"),
Guide.xticks(ticks=[0.0,freesteam_region4_h_Tx(647.096,0.0),freesteam_region4_h_Tx(273.15,1.0)]),
Guide.yticks(ticks=[273.15,647.096]))


Out[43]:
Entalpy h 0 2.08754685×10⁶ 2.50089262×10⁶ 273.150 647.096 Temprature T Steam Saturated Line