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

Annotation of /trunk/models/johnpye/fprops/python/solve_ph.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2260 - (hide annotations) (download) (as text)
Thu Aug 5 06:28:01 2010 UTC (13 years, 11 months ago) by jpye
File MIME type: text/x-python
File size: 616 byte(s)
Error messages to detect temperatures below critical point.
1 jpye 2251 from fprops import *
2     from pylab import *
3    
4     D = helmholtz_data_water;
5    
6 jpye 2260 p = 207.544081e5;
7     h = 2722.928340e3
8     #p = 279.851966e5
9     #h = 1894.424202e3
10     #p = 1e5;
11     #h = 300e3;
12 jpye 2251 print "p = %f bar, h = %f kJ/kg" % (p/1e5, h/1e3)
13    
14 jpye 2254 print "p_raw(400,0.9) =", helmholtz_p_raw(400,0.9,D)
15    
16 jpye 2251 res, T, rho = fprops_solve_ph(p,h,0,D);
17    
18     print "res = %d" % res
19    
20     print "T = %f" % T
21     print "rho = %f" % rho
22    
23 jpye 2257 p_eval = helmholtz_p(T,rho,D)
24     h_eval = helmholtz_h(T,rho,D)
25     print "p(T,rho) = %f bar\t (target: %f, err = %e)" % (p_eval/1e5, p/1e5, (p_eval - p))
26     print "h(T,rho) = %f kJ/kg\t (target: %f, err = %e)" % (h_eval/1e3, h/1e3, (h_eval - h))
27 jpye 2251

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