> |
restart;#'therm_proc6.mws'.22-6-05. |
Elementary procedures available. Examples with H2O.
Note that 0-references for u (h for the case) and s are taken at the liquid state in the triple point (as in Mollier diagram), and that vapour values are computed through the boiling line (where the hlv-data is available) instead of through the triple line.
> |
read"../therm_eq.m":read"../therm_proc.m":with(therm_proc): |
> |
su:="H2O";dat:=[T1=300*K_];Wdat:=get_gas_data(su),get_liq_data(su):get_pv_data(su): |
The 6 functions programmed are: pv,hl,hv,hlv,sl,sv. For enthalpies:
> |
hl=hl(T);hl_:=subs(Wdat,T=T1,dat,hl(T));hv=hl(T);hv_:=subs(Wdat,T=T1,dat,hv(T));hlv=hlv(T);hlv_:=subs(Wdat,T=T1,dat,hlv(T)); |
you may verify that hlv=hv-hl.
Antoine's fitting is used for vapour pressure.
> |
get_pv_data(gen):'pv(T)'=pv(T);get_pv_data(su):'pv(T)'=pv(T);pv300_:=evalf(subs(dat,pv(T1))); |
and for entropies:
> |
sl=sl(T);sl_:=evalf(subs(Wdat,T=T1,dat,sl(T)));sv=sv(T,p);sv_:=evalf(subs(Const,Wdat,T=T1,p=pv300_,dat,sv(T,p)));slv:='hlv/T';slv_:=subs(dat,hlv_/T1); |
and again you may verify that slv=sv-sl.
and again you may verify that slv=sv-sl.
Additionaly, a procedure is available to evaluate the exit conditions upon isentropic expansion of a vapor (presumably falling into the wet region).
NOTE: it assumes gas_data & liq_data available in dat. Makes available all other values!!!
> |
dat:=op(dat),Wdat,Const: |
> |
dat1:=[T3=800*K_,p3=1e6*Pa_,p4=1e4*Pa_];wet_vap(op(subs(dat1,[T3,p3,p4])));evalf([T4=T4_,h4l=h4l_,h4v=h4v_,s4l=s4l_,s4v=s4v_],3);'T4'=TKC(T4_); |