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

Contents of /trunk/models/johnpye/fprops/python/spinodal.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2117 - (show annotations) (download) (as text)
Wed Dec 9 04:30:18 2009 UTC (10 years, 6 months ago) by jpye
File MIME type: text/x-python
File size: 415 byte(s)
Improving Python build of FPROPS.
Added spinodal.py for visualisation of spinodal points.
Added placeholder critical and triple point data for the other fluids (needs to be filled in).
Allow peering inside helmholtz data form Python (eg to access critical point data).
1 import fprops
2
3 D = fprops.helmholtz_data_carbondioxide;
4
5 from pylab import *
6 hold(1)
7
8 TT = array([217, 230,240,250,260,280,300])
9 L = []
10
11 for T in TT:
12 rr = logspace(log10(10),log10(1200), 200)
13 print rr
14 pp = [max(fprops.helmholtz_p(T,r,D),1.) for r in rr]
15
16 semilogy(rr,pp)
17 L.append("T = %f K" % T)
18
19 xlabel('Density')
20 ylabel('Pressure')
21 #legend(L)
22
23 axis([10,1200,1.,1e6 * D.p_c])
24 #axis([0,1000,0,100e6])
25 show()
26

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