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

Contents of /trunk/models/johnpye/fprops/fluids/isopentane.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, 9 months ago) by jpye
File MIME type: text/x-csrc
File size: 8655 byte(s)
Regen toluene model working, next water.
1 /* This file is created by Hongke Zhu, 05-30-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 ISOPENTANE_M 72.14878 /* kg/kmol */
14 #define ISOPENTANE_R (8314.472/ISOPENTANE_M) /* J/kg/K */
15 #define ISOPENTANE_TSTAR 460.35 /* K */
16
17 const IdealData ideal_data_isopentane = {
18 2.5822330405 /* constant */
19 , 1.1609103419 /* linear */
20 , ISOPENTANE_TSTAR /* Tstar */
21 , ISOPENTANE_R /* cp0star */
22 , 1 /* power terms */
23 , (const IdealPowTerm[]){
24 {4.0, 0.0}
25 }
26 , 4 /* exponential terms */
27 , (const IdealExpTerm[]){
28 {7.4056, 442.0}
29 ,{9.5772, 1109.0}
30 ,{15.765, 2069.0}
31 ,{12.119, 4193.0}
32 }
33 };
34
35 const HelmholtzData helmholtz_data_isopentane = {
36 "isopentane"
37 ,/* R */ ISOPENTANE_R /* J/kg/K */
38 , /* M */ ISOPENTANE_M /* kg/kmol */
39 , /* rho_star */ 3.271*ISOPENTANE_M /* kg/m3(= rho_c for this model) */
40 , /* T_star */ ISOPENTANE_TSTAR /* K (= T_c for this model) */
41
42 , /* T_c */ ISOPENTANE_TSTAR
43 , /* rho_c */ 3.271*ISOPENTANE_M /* kg/m3 */
44 , /* T_t */ 112.65
45
46 , 0.2274 /* acentric factor */
47 , &ideal_data_isopentane
48 , 12 /* power terms */
49 , (const HelmholtzPowTerm[]){
50 /* a_i, t_i, d_i, l_i */
51 {1.0963, 0.25, 1.0, 0.0}
52 , {-3.0402, 1.125, 1.0, 0.0}
53 , {1.0317, 1.5, 1.0, 0.0}
54 , {-0.15410, 1.375, 2.0, 0.0}
55 , {0.11535, 0.25, 3.0, 0.0}
56 , {0.00029809, 0.875, 7.0, 0.0}
57 , {0.39571, 0.625, 2.0, 1.0}
58 , {-0.045881, 1.75, 5.0, 1.0}
59 , {-0.35804, 3.625, 1.0, 2.0}
60 , {-0.10107, 3.625, 4.0, 2.0}
61 , {-0.035484, 14.5, 3.0, 3.0}
62 , {0.018156, 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 isopentane
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_isopentane, ntd, td);
87 //return helm_check_dpdT_rho(&helmholtz_data_isopentane, ntd, td);
88 //return helm_check_dpdrho_T(&helmholtz_data_isopentane, ntd, td);
89 //return helm_check_dhdT_rho(&helmholtz_data_isopentane, ntd, td);
90 //return helm_check_dhdrho_T(&helmholtz_data_isopentane, ntd, td);
91 //return helm_check_dudT_rho(&helmholtz_data_isopentane, ntd, td);
92 //return helm_check_dudrho_T(&helmholtz_data_isopentane, ntd, td);
93 return helm_run_test_cases(&helmholtz_data_isopentane, 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 {-1.50E+2, 9.99999999999E-2, 7.78550312815E+2, -3.43072768579E+2, -3.42944324729E+2, -1.68639820825E+0, 1.2109664353E+0, 1.73318559763E+0, 7.9315042852E-1, -1.35392829234E+2}
104 , {-1.00E+2, 1.E-1, 7.31615405686E+2, -2.56129486188E+2, -2.55992802352E+2, -1.09423598625E+0, 1.27339821127E+0, 1.77520239781E+0, 1.04703383547E+0, -6.66625251679E+1}
105 , {-5.0E+1, 9.99999999998E-2, 6.86412994888E+2, -1.63721771626E+2, -1.63576086738E+2, -6.26188803709E-1, 1.42153518231E+0, 1.9335335328E+0, 1.28928091095E+0, -2.39877400782E+1}
106 , {0.E+0, 9.99999999999E-2, 6.39798925037E+2, -6.18656892875E+1, -6.17093901815E+1, -2.15019576635E-1, 1.60473724012E+0, 2.14893064783E+0, 1.52877366088E+0, -3.13309192947E+0}
107 , {5.0E+1, 1.E-1, 2.77895865624E+0, 3.46334462867E+2, 3.82319165186E+2, 1.26712944717E+0, 1.6670912668E+0, 1.8026223977E+0, 1.76605183873E+0, -6.31384179855E+1}
108 , {1.00E+2, 1.E-1, 2.37427126126E+0, 4.35676536114E+2, 4.77794722706E+2, 1.54146793809E+0, 1.8909057096E+0, 2.01760029077E+0, 1.99802107731E+0, -1.39522224983E+2}
109 , {1.50E+2, 1.E-1, 2.07877443698E+0, 5.359683458E+2, 5.84073613125E+2, 1.80846786388E+0, 2.11011646574E+0, 2.23266007124E+0, 2.22086119372E+0, -2.29284830801E+2}
110 , {2.00E+2, 1.E-1, 1.85125428434E+0, 6.4690576755E+2, 7.00923198243E+2, 2.06926133235E+0, 2.31932766322E+0, 2.43961753715E+0, 2.43189064067E+0, -3.3216523185E+2}
111 , {-1.50E+2, 9.99999999999E-1, 7.78888990351E+2, -3.43252192637E+2, -3.41968312633E+2, -1.68785765623E+0, 1.21173556151E+0, 1.73321603701E+0, 7.9315042852E-1, -1.35392522273E+2}
112 , {-1.00E+2, 1.E+0, 7.32093591367E+2, -2.56393071744E+2, -2.55027126171E+2, -1.09576111518E+0, 1.27405524678E+0, 1.77473466453E+0, 1.04703383547E+0, -6.66620346495E+1}
113 , {-5.0E+1, 1.E+0, 6.87096969272E+2, -1.64106791999E+2, -1.62651393351E+2, -6.27917760584E-1, 1.42212509521E+0, 1.93228839921E+0, 1.28928091095E+0, -2.39869437249E+1}
114 , {0.E+0, 1.E+0, 6.40821505665E+2, -6.24410772398E+1, -6.08805802978E+1, -2.17131076481E-1, 1.60524928451E+0, 2.14613799748E+0, 1.52877366088E+0, -3.13172369909E+0}
115 , {5.0E+1, 1.E+0, 5.9009233559E+2, 5.10083907362E+1, 5.2703040776E+1, 1.64118050727E-1, 1.80603589919E+0, 2.40545070877E+0, 1.76605183873E+0, -2.02635735615E+0}
116 , {1.00E+2, 1.E+0, 5.28957694694E+2, 1.78979336832E+2, 1.80869847189E+2, 5.32315557976E-1, 2.01689444775E+0, 2.74176498548E+0, 1.99802107731E+0, -1.96542136266E+1}
117 , {1.50E+2, 1.E+0, 2.41907172271E+1, 5.20042556099E+2, 5.61380726878E+2, 1.50431401502E+0, 2.16040451009E+0, 2.39915735636E+0, 2.22086119372E+0, -1.16507919355E+2}
118 , {2.00E+2, 1.E+0, 2.03613727259E+1, 6.35250316569E+2, 6.84362918822E+2, 1.77888282416E+0, 2.34633809154E+0, 2.53067109651E+0, 2.43189064067E+0, -2.06428091682E+2}
119 , {-1.50E+2, 1.E+1, 7.82199117007E+2, -3.44988468147E+2, -3.32203999611E+2, -1.70219752832E+0, 1.2193666527E+0, 1.73376893914E+0, 7.9315042852E-1, -1.35362842534E+2}
120 , {-1.00E+2, 1.E+1, 7.36716746923E+2, -2.58918545791E+2, -2.4534480793E+2, -1.11061614675E+0, 1.28056713138E+0, 1.77072526548E+0, 1.04703383547E+0, -6.66153599808E+1}
121 , {-5.0E+1, 1.E+1, 6.93599481333E+2, -1.67740208546E+2, -1.53322666046E+2, -6.44531455062E-1, 1.42799435601E+0, 1.92160179107E+0, 1.28928091095E+0, -2.39130143487E+1}
122 , {0.E+0, 1.E+1, 6.50267219504E+2, -6.77334780057E+1, -5.2355184744E+1, -2.36952413252E-1, 1.61047574784E+0, 2.12332283756E+0, 1.52877366088E+0, -3.00992632582E+0}
123 , {5.0E+1, 1.E+1, 6.04723391628E+2, 4.29805055226E+1, 5.95169916887E+1, 1.38604599484E-1, 1.80994026798E+0, 2.35586617313E+0, 1.76605183873E+0, -1.80957080052E+0}
124 , {1.00E+2, 1.E+1, 5.54686645669E+2, 1.6560457376E+2, 1.83632770541E+2, 4.95277408984E-1, 2.01632068755E+0, 2.61282175757E+0, 1.99802107731E+0, -1.92081914026E+1}
125 , {1.50E+2, 1.E+1, 4.96777641179E+2, 3.01134798796E+2, 3.21264529225E+2, 8.41035681866E-1, 2.22363086981E+0, 2.89806594774E+0, 2.22086119372E+0, -5.4749449986E+1}
126 , {2.00E+2, 1.0E+1, 4.25713816192E+2, 4.50629354548E+2, 4.74119313341E+2, 1.18213147019E+0, 2.42954576174E+0, 3.22364163912E+0, 2.43189064067E+0, -1.08696150571E+2}
127 , {-1.00E+2, 1.00E+2, 7.72558533779E+2, -2.76759224491E+2, -1.47319194218E+2, -1.23225354894E+0, 1.33930344398E+0, 1.76461451134E+0, 1.04703383547E+0, -6.33945224932E+1}
128 , {-5.0E+1, 1.E+2, 7.39636927131E+2, -1.91454267779E+2, -5.62527975279E+1, -7.70876257474E-1, 1.48064204721E+0, 1.88892144984E+0, 1.28928091095E+0, -1.94332309234E+1}
129 , {0.E+0, 1.E+2, 7.09211505905E+2, -9.86924640628E+1, 4.23091964677E+1, -3.72914843202E-1, 1.65915442261E+0, 2.05847331872E+0, 1.52877366088E+0, 3.16922535786E+0}
130 , {5.0E+1, 1.E+2, 6.80508049224E+2, 2.97720181422E+0, 1.49926235134E+2, -1.15629720409E-2, 1.85512796491E+0, 2.24822332369E+0, 1.76605183873E+0, 6.71377622924E+0}
131 , {1.00E+2, 1.00E+2, 6.53163289488E+2, 1.14130501572E+2, 2.67231573861E+2, 3.25619017617E-1, 2.05706703286E+0, 2.4441224608E+0, 1.99802107731E+0, -7.37423485157E+0}
132 , {1.50E+2, 1.E+2, 6.27025932181E+2, 2.3480183624E+2, 3.94284873332E+2, 6.44894371712E-1, 2.25703125457E+0, 2.6369297874E+0, 2.22086119372E+0, -3.80852171505E+1}
133 , {2.00E+2, 1.00E+2, 6.02059803664E+2, 3.64682773449E+2, 5.30779229966E+2, 9.49592326534E-1, 2.45006104425E+0, 2.82111672668E+0, 2.43189064067E+0, -8.46168358503E+1}
134 };
135
136 const unsigned ntd = sizeof(td)/sizeof(TestData);
137
138 #endif

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