/[ascend]/trunk/models/johnpye/fprops/fluids/nonane.c
ViewVC logotype

Contents of /trunk/models/johnpye/fprops/fluids/nonane.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2301 - (show annotations) (download) (as text)
Sat Aug 21 13:28:35 2010 UTC (13 years, 10 months ago) by jpye
File MIME type: text/x-csrc
File size: 8033 byte(s)
Regen toluene model working, next water.
1 /* This file is created by Hongke Zhu, 06-08-2010.
2 Chemical & Materials Engineering Department,
3 University of Alabama in Huntsville, United States.
4
5 LITERATURE REFERENCE
6 Lemmon, E.W. and Span, R.,
7 "Short Fundamental Equations of State for 20 Industrial Fluids,"
8 J. Chem. Eng. Data, 51:785-850, 2006.
9 */
10
11 #include "../helmholtz.h"
12
13 #define NONANE_M 128.2551 /* kg/kmol */
14 #define NONANE_R (8314.472/NONANE_M) /* J/kg/K */
15 #define NONANE_TSTAR 594.55 /* K */
16
17 const IdealData ideal_data_nonane = {
18 10.7927224829 /* constant */
19 , -8.2418318753 /* linear */
20 , NONANE_TSTAR /* Tstar */
21 , NONANE_R /* cp0star */
22 , 1 /* power terms */
23 , (const IdealPowTerm[]){
24 {17.349, 0.0}
25 }
26 , 4 /* exponential terms */
27 , (const IdealExpTerm[]){
28 {24.926, 1221.0}
29 ,{24.842, 2244.0}
30 ,{11.188, 5008.0}
31 ,{17.483, 11724.0}
32 }
33 };
34
35 const HelmholtzData helmholtz_data_nonane = {
36 "nonane"
37 , /* R */ NONANE_R /* J/kg/K */
38 , /* M */ NONANE_M /* kg/kmol */
39 , /* rho_star */ 1.81*NONANE_M /* kg/m3(= rho_c for this model) */
40 , /* T_star */ NONANE_TSTAR /* K (= T_c for this model) */
41
42 , /* T_c */ NONANE_TSTAR
43 , /* rho_c */ 1.81*NONANE_M /* kg/m3 */
44 , /* T_t */ 219.7
45
46 , 0.4433 /* acentric factor */
47 , &ideal_data_nonane
48 , 12 /* power terms */
49 , (const HelmholtzPowTerm[]){
50 /* a_i, t_i, d_i, l_i */
51 {1.1151, 0.25, 1.0, 0.0}
52 , {-2.7020, 1.125, 1.0, 0.0}
53 , {0.83416, 1.5, 1.0, 0.0}
54 , {-0.38828, 1.375, 2.0, 0.0}
55 , {0.13760, 0.25, 3.0, 0.0}
56 , {0.00028185, 0.875, 7.0, 0.0}
57 , {0.62037, 0.625, 2.0, 1.0}
58 , {0.015847, 1.75, 5.0, 1.0}
59 , {-0.61726, 3.625, 1.0, 2.0}
60 , {-0.15043, 3.625, 4.0, 2.0}
61 , {-0.012982, 14.5, 3.0, 3.0}
62 , {0.0044325, 12.0, 4.0, 3.0}
63 }
64 , 0 /* gaussian terms */
65 , 0
66 , 0 /* critical terms */
67 , 0
68 };
69
70 /*
71 Test suite. These tests attempt to validate the current code using a few sample figures output by REFPROP 8.0. To compile and run the test:
72
73 ./test.py nonane
74 */
75
76 #ifdef TEST
77
78 #include "../test.h"
79 #include <math.h>
80 #include <assert.h>
81 #include <stdio.h>
82
83 const TestData td[]; const unsigned ntd;
84
85 int main(void){
86 //return helm_check_u(&helmholtz_data_nonane, ntd, td);
87 //return helm_check_dpdT_rho(&helmholtz_data_nonane, ntd, td);
88 //return helm_check_dpdrho_T(&helmholtz_data_nonane, ntd, td);
89 //return helm_check_dhdT_rho(&helmholtz_data_nonane, ntd, td);
90 //return helm_check_dhdrho_T(&helmholtz_data_nonane, ntd, td);
91 //return helm_check_dudT_rho(&helmholtz_data_nonane, ntd, td);
92 //return helm_check_dudrho_T(&helmholtz_data_nonane, ntd, td);
93 return helm_run_test_cases(&helmholtz_data_nonane, ntd, td, 'C');
94 }
95
96 /*
97 A small set of data points calculated using REFPROP 8.0, for validation.
98 */
99
100 const TestData td[] = {
101 /* Temperature, Pressure, Density, Int. Energy, Enthalpy, Entropy, Cv, Cp, Cp0, Helmholtz */
102 /* (C), (MPa), (kg/m3), (kJ/kg), (kJ/kg), (kJ/kg-K), (kJ/kg-K), (kJ/kg-K), (kJ/kg-K), (kJ/kg) */
103 {-5.0E+1, 9.99999999998E-2, 7.73459252319E+2, -4.66257916677E+2, -4.66128627384E+2, -1.46419151423E+0, 1.54771236611E+0, 1.98927937837E+0, 1.33680179376E+0, -1.39523580277E+2}
104 , {0.E+0, 9.99999999999E-2, 7.33761535383E+2, -3.6378501816E+2, -3.63648734102E+2, -1.05026000612E+0, 1.69323867058E+0, 2.12116235808E+0, 1.5323059868E+0, -7.69064974891E+1}
105 , {5.0E+1, 1.E-1, 6.94285797564E+2, -2.53341393564E+2, -2.53197360659E+2, -6.79359894582E-1, 1.87512384382E+0, 2.30259187896E+0, 1.75204613304E+0, -3.38062436294E+1}
106 , {1.00E+2, 9.99999999999E-2, 6.53526064962E+2, -1.33137159563E+2, -1.32984143477E+2, -3.33828806225E-1, 2.07094670026E+0, 2.50879973388E+0, 1.97689262907E+0, -8.56894051978E+0}
107 , {1.50E+2, 1.E-1, 6.09653916726E+2, -2.24869282896E+0, -2.08466534179E+0, -4.91696816382E-3, 2.26766731897E+0, 2.72946453486E+0, 2.19561178007E+0, -1.68077750434E-1}
108 , {2.00E+2, 1.E-1, 3.38585553495E+0, 3.74201349427E+2, 4.03735982245E+2, 9.38380830367E-1, 2.34970050222E+0, 2.42911964749E+0, 2.40196023493E+0, -6.97935404613E+1}
109 , {2.50E+2, 1.E-1, 3.0248169522E+0, 4.96703602425E+2, 5.29763454172E+2, 1.19143212504E+0, 2.53596784789E+0, 2.6102924873E+0, 2.59298835381E+0, -1.26594113787E+2}
110 , {3.00E+2, 1.E-1, 2.74015507046E+0, 6.2807090905E+2, 6.64565194019E+2, 1.43740653888E+0, 2.70815899671E+0, 2.77958893335E+0, 2.76789164801E+0, -1.95778648708E+2}
111 , {-5.0E+1, 1.E+0, 7.73952874472E+2, -4.66527749804E+2, -4.65235681472E+2, -1.46540274521E+0, 1.5482858106E+0, 1.988979376E+0, 1.33680179376E+0, -1.39523127211E+2}
112 , {0.E+0, 1.E+0, 7.34418929158E+2, -3.64142319416E+2, -3.62780698739E+2, -1.05157053604E+0, 1.69377250597E+0, 2.12043978901E+0, 1.5323059868E+0, -7.69058274978E+1}
113 , {5.0E+1, 1.E+0, 6.95177316219E+2, -2.53819055348E+2, -2.52380573429E+2, -6.80841174553E-1, 1.87562558823E+0, 2.30120803706E+0, 1.75204613304E+0, -3.38052297913E+1}
114 , {1.00E+2, 1.E+0, 6.54778216013E+2, -1.33790368485E+2, -1.32263133804E+2, -3.35583632309E-1, 2.07140037079E+0, 2.50622141705E+0, 1.97689262907E+0, -8.56733608902E+0}
115 , {1.50E+2, 1.E+0, 6.11526498231E+2, -3.18297257103E+0, -1.54772045539E+0, -7.13137992497E-3, 2.26800525649E+0, 2.72431162832E+0, 2.19561178007E+0, -1.65329155775E-1}
116 , {2.00E+2, 1.E+0, 5.62577787493E+2, 1.38653430027E+2, 1.40430961992E+2, 3.09765075464E-1, 2.45874821514E+0, 2.95918459407E+0, 2.40196023493E+0, -7.91191542867E+0}
117 , {2.50E+2, 1.E+0, 5.006528377E+2, 2.93357111056E+2, 2.9535450311E+2, 6.20775319606E-1, 2.64314455488E+0, 3.26023465554E+0, 2.59298835381E+0, -3.14014973965E+1}
118 , {3.00E+2, 1.E+0, 3.40980242198E+1, 6.07472848747E+2, 6.36800061184E+2, 1.25092600801E+0, 2.76645027354E+0, 2.97635812994E+0, 2.76789164801E+0, -1.09495392746E+2}
119 , {0.E+0, 1.E+1, 7.40700456501E+2, -3.67535690492E+2, -3.54034956272E+2, -1.0642230325E+0, 1.69902152844E+0, 2.11429174764E+0, 1.5323059868E+0, -7.68431691658E+1}
120 , {5.0E+1, 1.E+1, 7.03539459056E+2, -2.5828010462E+2, -2.44066260789E+2, -6.94931605198E-1, 1.88057093604E+0, 2.28971182023E+0, 1.75204613304E+0, -3.37129564007E+1}
121 , {1.00E+2, 1.E+1, 6.66181369702E+2, -1.39733728178E+2, -1.24722801042E+2, -3.51886054455E-1, 2.07595794125E+0, 2.48596363621E+0, 1.97689262907E+0, -8.42744695857E+0}
122 , {1.50E+2, 1.E+1, 6.27720665354E+2, -1.13105352736E+1, 4.62011756602E+0, -2.68644478473E-2, 2.27177989656E+0, 2.68784461835E+0, 2.19561178007E+0, 5.71558329968E-2}
123 , {2.00E+2, 1.E+1, 5.87220263164E+2, 1.26988005867E+2, 1.44017390967E+2, 2.84302019787E-1, 2.46054044225E+0, 2.88721214359E+0, 2.40196023493E+0, -7.52949479539E+0}
124 , {2.50E+2, 1.E+1, 5.43585208518E+2, 2.74837315008E+2, 2.93233694901E+2, 5.83932493988E-1, 2.63868286402E+0, 3.08016688323E+0, 2.59298835381E+0, -3.06469692222E+1}
125 , {3.00E+2, 1.0E+1, 4.95585159947E+2, 4.31703350235E+2, 4.51881516992E+2, 8.73429924062E-1, 2.80521246094E+0, 3.26382028988E+0, 2.76789164801E+0, -6.89030107416E+1}
126 , {5.0E+1, 1.00E+2, 7.59016332701E+2, -2.86267255902E+2, -1.54517785315E+2, -7.97314839675E-1, 1.92275565867E+0, 2.25959589146E+0, 1.75204613304E+0, -2.86149654609E+1}
127 , {1.00E+2, 1.E+2, 7.33576460863E+2, -1.73436876878E+2, -3.71184351952E+1, -4.59832181068E-1, 2.11577168293E+0, 2.43792585677E+0, 1.97689262907E+0, -1.85049851246E+0}
128 , {1.50E+2, 1.00E+2, 7.09557973455E+2, -5.16157657099E+1, 8.93170456192E+1, -1.420952169E-1, 2.30928189639E+0, 2.61901573474E+0, 2.19561178007E+0, 8.5118253212E+0}
129 , {2.00E+2, 1.E+2, 6.86762937557E+2, 7.90617984022E+1, 2.24672451702E+2, 1.60068582827E-1, 2.49525887546E+0, 2.79360948487E+0, 2.40196023493E+0, 3.32534843742E+0}
130 , {2.50E+2, 1.00E+2, 6.65080979898E+2, 2.18130433498E+2, 3.68488063655E+2, 4.48873376931E-1, 2.66955115615E+0, 2.95690074425E+0, 2.59298835381E+0, -1.66976736441E+1}
131 , {3.00E+2, 1.00E+2, 6.44451540905E+2, 3.64969930285E+2, 5.20140635377E+2, 7.25623796337E-1, 2.83051592085E+0, 3.10693491264E+0, 2.76789164801E+0, -5.09213485857E+1}
132 };
133
134 const unsigned ntd = sizeof(td)/sizeof(TestData);
135
136 #endif

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