/[ascend]/trunk/models/johnpye/fprops/python/sat.py
ViewVC logotype

Diff of /trunk/models/johnpye/fprops/python/sat.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2224 by jpye, Tue Dec 15 08:34:56 2009 UTC revision 2225 by jpye, Mon Jul 26 03:40:18 2010 UTC
# Line 16  rhof1 = [] Line 16  rhof1 = []
16  rhog1 = []  rhog1 = []
17  psat1 = []  psat1 = []
18    
19  TT2 = linspace(T_min, D.T_c, 50)  TT2 = linspace(T_min, D.T_c, 300)
20  TT1 = []  TT1 = []
21  for T in TT2:  for T in TT2:
22      res, p1, rf1, rg1 = phase_solve(T,D)      res, p1, rf1, rg1 = fprops_sat_T(T,D)
23      #if res:      if res:
24      #   continue          print "error in saturation function T =",T
25            continue
26      rhof1.append(rf1)      rhof1.append(rf1)
27      rhog1.append(rg1)      rhog1.append(rg1)
28      psat1.append(p1)      psat1.append(p1)
29      print "T=%f, psat=%f, rhof=%f, rhog=%f" % (T,p1,rf1,rg1)      #print "T=%f, psat=%f bar, rhof=%f, rhog=%f" % (T,p1/1e5,rf1,rg1)
30      TT1.append(T)      TT1.append(T)
31    
32    TT = array(TT)
33    TT1 = array(TT1)
34    psat1 = array(psat1)
35    psat = array(psat)
36    
37  plot(rhog,TT,label="vapour (Chouaieb)")  plot(rhog,TT,label="vapour (Chouaieb)")
38  plot(rhof,TT,label="liquid (Rackett)")  plot(rhof,TT,label="liquid (Rackett)")
39    
# Line 45  ylabel('Temperature') Line 51  ylabel('Temperature')
51  figure()  figure()
52  hold(1)  hold(1)
53    
54  plot(TT,psat,label="Xiang")  plot(TT,psat/1e5,label="Xiang")
55  plot(TT1,psat1,'rx',label="Maxwell")  plot(TT1,psat1/1e5,'rx',label="Maxwell")
56    
57  show()  show()
58    

Legend:
Removed from v.2224  
changed lines
  Added in v.2225

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22