In [1]:
using ThermodynamicsTable
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]:
In [4]:
freesteam_region(ss)
Out[4]:
In [5]:
p = 10e5
ss = freesteam_set_pT(p, T);
freesteam_region(ss)
Out[5]:
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]:
In [9]:
ss=freesteam_region4_set_Tx(400.0,0.1)
Out[9]:
In [10]:
freesteam_region(ss)
Out[10]:
In [11]:
freesteam_rho(ss)
Out[11]:
In [12]:
plot(x->freesteam_rho(freesteam_region4_set_Tx(400.0,x)),0.1,0.9)
Out[12]:
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]:
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]: