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

Annotation of /trunk/models/johnpye/fprops/fluids/isobutene.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2301 - (hide 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: 7520 byte(s)
Regen toluene model working, next water.
1 hongke 2280 /* This file is created by Hongke Zhu, 06-10-2010.
2     Chemical & Materials Engineering Department,
3     University of Alabama in Huntsville, United States.
4    
5     LITERATURE REFERENCE
6     Lemmon, E.W. and Ihmels, E.C.,
7     "Thermodynamic Properties of the Butenes. Part II. Short Fundamental
8     Equations of State,"
9     Fluid Phase Equilibria, 228-229C:173-187, 2005.
10     */
11    
12 jpye 2301 #include "../helmholtz.h"
13    
14 hongke 2280 #define ISOBUTENE_M 56.10632 /* kg/kmol */
15     #define ISOBUTENE_R (8314.472/ISOBUTENE_M) /* J/kg/K */
16     #define ISOBUTENE_TSTAR 418.09 /* K */
17    
18     const IdealData ideal_data_isobutene = {
19     -0.12737888 /* constant */
20     , 2.3125128 /* linear */
21     , ISOBUTENE_TSTAR /* Tstar */
22     , ISOBUTENE_R /* cp0star */
23     , 1 /* power terms */
24     , (const IdealPowTerm[]){
25     {4.0000, 0.0}
26     }
27     , 4 /* exponential terms */
28     , (const IdealExpTerm[]){
29     {4.8924, 399.0}
30     ,{7.8320, 1270.0}
31     ,{7.2867, 2005.0}
32     ,{8.7293, 4017.0}
33     }
34     };
35    
36     const HelmholtzData helmholtz_data_isobutene = {
37     "isobutene"
38     , /* R */ ISOBUTENE_R /* J/kg/K */
39     , /* M */ ISOBUTENE_M /* kg/kmol */
40     , /* rho_star */ 4.17*ISOBUTENE_M /* kg/m3(= rho_c for this model) */
41     , /* T_star */ ISOBUTENE_TSTAR /* K (= T_c for this model) */
42    
43     , /* T_c */ ISOBUTENE_TSTAR
44     , /* rho_c */ 4.17*ISOBUTENE_M /* kg/m3 */
45 jpye 2301 , /* T_t */ 132.4
46 hongke 2280
47     , 0.193 /* acentric factor */
48     , &ideal_data_isobutene
49     , 12 /* power terms */
50     , (const HelmholtzPowTerm[]){
51     /* a_i, t_i, d_i, l_i */
52     {0.77111, 0.12, 1.0, 0}
53     , {-2.7971, 1.3, 1.0, 0}
54     , {1.0118, 1.74, 1.0, 0}
55     , {0.020730, 2.1, 2.0, 0}
56     , {0.085086, 0.28, 3.0, 0}
57     , {0.00021968, 0.69, 7.0, 0}
58     , {0.20633, 0.75, 2.0, 1}
59     , {-0.078843, 2.0, 5.0, 1}
60     , {-0.23726, 4.4, 1.0, 2}
61     , {-0.080211, 4.7, 4.0, 2}
62     , {-0.027001, 15.0, 3.0, 3}
63     , {0.013072, 14.0, 4.0, 3}
64     }
65     , 0 /* gaussian terms */
66     , 0
67     , 0 /* critical terms */
68     , 0
69     };
70    
71     /*
72     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:
73    
74     ./test.py isobutene
75     */
76    
77     #ifdef TEST
78    
79 jpye 2300 #include "../test.h"
80 hongke 2280 #include <math.h>
81     #include <assert.h>
82     #include <stdio.h>
83    
84     const TestData td[]; const unsigned ntd;
85    
86     int main(void){
87     //return helm_check_u(&helmholtz_data_isobutene, ntd, td);
88     //return helm_check_dpdT_rho(&helmholtz_data_isobutene, ntd, td);
89     //return helm_check_dpdrho_T(&helmholtz_data_isobutene, ntd, td);
90     //return helm_check_dhdT_rho(&helmholtz_data_isobutene, ntd, td);
91     //return helm_check_dhdrho_T(&helmholtz_data_isobutene, ntd, td);
92     //return helm_check_dudT_rho(&helmholtz_data_isobutene, ntd, td);
93     //return helm_check_dudrho_T(&helmholtz_data_isobutene, ntd, td);
94     return helm_run_test_cases(&helmholtz_data_isobutene, ntd, td, 'C');
95     }
96    
97     /*
98     A small set of data points calculated using REFPROP 8.0, for validation.
99     */
100    
101     const TestData td[] = {
102     /* Temperature, Pressure, Density, Int. Energy, Enthalpy, Entropy, Cv, Cp, Cp0, Helmholtz */
103     /* (C), (MPa), (kg/m3), (kJ/kg), (kJ/kg), (kJ/kg-K), (kJ/kg-K), (kJ/kg-K), (kJ/kg-K), (kJ/kg) */
104     {-1.00E+2, 1.E-1, 7.25006738206E+2, -1.92564011325E+2, -1.92426081572E+2, -8.85421400145E-1, 1.34981843291E+0, 1.952998831E+0, 1.10917787075E+0, -3.92532958896E+1}
105     , {-5.0E+1, 1.E-1, 6.73383354871E+2, -9.22597671243E+1, -9.2111263305E+1, -3.77073531232E-1, 1.43560129607E+0, 2.0697770087E+0, 1.2906577383E+0, -8.11580862981E+0}
106     , {0.E+0, 1.E-1, 2.56836270464E+0, 3.63621010479E+2, 4.0255632122E+2, 1.51388135321E+0, 1.37295270533E+0, 1.55495552934E+0, 1.48413607055E+0, -4.98956811498E+1}
107     , {5.0E+1, 1.E-1, 2.13216163382E+0, 4.37172368362E+2, 4.8407312786E+2, 1.78755760326E+0, 1.54991918328E+0, 1.71365297304E+0, 1.68377493475E+0, -1.40476871132E+2}
108     , {1.00E+2, 1.E-1, 1.83155550883E+0, 5.19676802955E+2, 5.74275202795E+2, 2.04678010817E+0, 1.73837506287E+0, 1.89539582565E+0, 1.88005268472E+0, -2.44079194408E+2}
109     , {1.50E+2, 1.E-1, 1.60814149774E+0, 6.11399591609E+2, 6.73583174422E+2, 2.29629433674E+0, 1.92191283104E+0, 2.07581647931E+0, 2.06679798293E+0, -3.60277356983E+2}
110     , {2.00E+2, 1.E-1, 1.43447003411E+0, 7.11993870485E+2, 7.81706027325E+2, 2.53763160601E+0, 2.09513149045E+0, 2.24735314609E+0, 2.24148938118E+0, -4.88686523899E+2}
111     , {2.50E+2, 1.E-1, 1.29519589902E+0, 8.20927688559E+2, 8.98136086205E+2, 2.77141791537E+0, 2.25679823881E+0, 2.40800827374E+0, 2.40389356385E+0, -6.28939593865E+2}
112     , {-1.00E+2, 1.E+0, 7.25518634097E+2, -1.9286577151E+2, -1.9148744716E+2, -8.87167255253E-1, 1.35018594539E+0, 1.95214289075E+0, 1.10917787075E+0, -3.92527612634E+1}
113     , {-5.0E+1, 1.E+0, 6.74153033353E+2, -9.27230999935E+1, -9.12397572649E+1, -3.79154031481E-1, 1.43595967199E+0, 2.06778849806E+0, 1.2906577383E+0, -8.11487786853E+0}
114     , {0.E+0, 1.E+0, 6.19662573727E+2, 1.47793768255E+1, 1.63931583292E+1, 5.54477006031E-2, 1.56627819462E+0, 2.24953577532E+0, 1.48413607055E+0, -3.66162594205E-1}
115     , {5.0E+1, 1.E+0, 5.56446305891E+2, 1.33422474095E+2, 1.35219592684E+2, 4.54289160079E-1, 1.72605721516E+0, 2.52552600763E+0, 1.68377493475E+0, -1.33810679842E+1}
116     , {1.00E+2, 1.E+0, 2.10638888841E+1, 5.0294242668E+2, 5.5041704096E+2, 1.65940528775E+0, 1.80938165626E+0, 2.09980050248E+0, 1.88005268472E+0, -1.16264656444E+2}
117     , {1.50E+2, 1.E+0, 1.74944930096E+1, 5.99757083077E+2, 6.5691792789E+2, 1.92714121589E+0, 1.95464768857E+0, 2.17758647771E+0, 2.06679798293E+0, -2.15712722427E+2}
118     , {2.00E+2, 1.E+0, 1.5162843065E+1, 7.03038388087E+2, 7.6898908056E+2, 2.1773394576E+0, 2.11263102363E+0, 2.30868069055E+0, 2.24148938118E+0, -3.27169776277E+2}
119     , {2.50E+2, 1.E+0, 1.34571582671E+1, 8.136196816E+2, 8.87929575275E+2, 2.41618638037E+0, 2.26706008639E+0, 2.4491598787E+0, 2.40389356385E+0, -4.50408223289E+2}
120     , {-1.00E+2, 1.0E+1, 7.3045001212E+2, -1.95755066596E+2, -1.82064875845E+2, -9.04146253795E-1, 1.35415149219E+0, 1.94456598399E+0, 1.10917787075E+0, -3.92021427517E+1}
121     , {-5.0E+1, 1.E+1, 6.81409782037E+2, -9.70758968566E+1, -8.24004397916E+1, -3.99042849492E-1, 1.44001951619E+0, 2.05082454191E+0, 1.2906577383E+0, -8.02948499255E+0}
122     , {0.E+0, 1.E+1, 6.30985787364E+2, 8.0740320597E+0, 2.39222495636E+1, 3.03332572116E-2, 1.56898063118E+0, 2.21081903802E+0, 1.48413607055E+0, -2.11497147655E-1}
123     , {5.0E+1, 1.0E+1, 5.76336435668E+2, 1.22178372223E+2, 1.39529348807E+2, 4.18497540007E-1, 1.72399032756E+0, 2.42219117928E+0, 1.68377493475E+0, -1.30591078301E+1}
124     , {1.00E+2, 1.0E+1, 5.12805390415E+2, 2.47686979208E+2, 2.67187554254E+2, 7.85332488728E-1, 1.89154879264E+0, 2.69800316421E+0, 1.88005268472E+0, -4.53598389608E+1}
125     , {1.50E+2, 1.E+1, 4.30659148888E+2, 3.8826742342E+2, 4.11487642997E+2, 1.14770200446E+0, 2.06673861855E+0, 3.10754563526E+0, 2.06679798293E+0, -9.73826797651E+1}
126     , {2.00E+2, 1.0E+1, 3.12764396733E+2, 5.49721154651E+2, 5.81694103313E+2, 1.52726562754E+0, 2.24476910459E+0, 3.68326420933E+0, 2.24148938118E+0, -1.72904577019E+2}
127     , {2.50E+2, 1.0E+1, 2.05993310981E+2, 7.12878332012E+2, 7.61423597644E+2, 1.88867670301E+0, 2.36524301881E+0, 3.36225939283E+0, 2.40389356385E+0, -2.75182885168E+2}
128     };
129    
130     const unsigned ntd = sizeof(td)/sizeof(TestData);
131    
132     #endif

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