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

Diff of /trunk/models/johnpye/fprops/carbondioxide.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2113 by jpye, Tue Dec 8 03:37:27 2009 UTC revision 2114 by jpye, Tue Dec 8 08:08:00 2009 UTC
# Line 28  Line 28 
28    
29  //#define CARBONDIOXIDE_R 188.9241  //#define CARBONDIOXIDE_R 188.9241
30  #define GAS_C 8314.510  #define GAS_C 8314.510
31  #define CARBONDIOXIDE_TSTAR 304.1282  #define CARBONDIOXIDE_TC 304.1282
32  #define CARBONDIOXIDE_M 44.0098  #define CARBONDIOXIDE_M 44.0098
33  #define CARBONDIOXIDE_R (GAS_C/CARBONDIOXIDE_M)  #define CARBONDIOXIDE_R (GAS_C/CARBONDIOXIDE_M)
34  #define CARBONDIOXIDE_PC 73773e6  #define CARBONDIOXIDE_PC 7.3773e6
35  #define CARBONDIOXIDE_RHOC 467.6  #define CARBONDIOXIDE_RHOC 467.6
36    
37  #define CARBONDIOXIDE_TREF 298.15  #define CARBONDIOXIDE_TREF 298.15
# Line 45  Line 45 
45  */  */
46  const IdealData ideal_data_carbondioxide = {  const IdealData ideal_data_carbondioxide = {
47      -1.1571354956e+003/CARBONDIOXIDE_R /* constant, adjust to solve s */      -1.1571354956e+003/CARBONDIOXIDE_R /* constant, adjust to solve s */
48      , 2.9392750129e+005/CARBONDIOXIDE_TSTAR/CARBONDIOXIDE_R /* linear, adjust to solver h */      , 2.9392750129e+005/CARBONDIOXIDE_TC/CARBONDIOXIDE_R /* linear, adjust to solver h */
49      , CARBONDIOXIDE_TSTAR /* Tstar / [K] */      , CARBONDIOXIDE_TC /* Tstar / [K] */
50      , CARBONDIOXIDE_R /* cpstar / [J/kgK] */      , CARBONDIOXIDE_R /* cpstar / [J/kgK] */
51      , 1 /* power terms */      , 1 /* power terms */
52      , (const IdealPowTerm[]){      , (const IdealPowTerm[]){
# Line 54  const IdealData ideal_data_carbondioxide Line 54  const IdealData ideal_data_carbondioxide
54      }      }
55      , 5      , 5
56      , (const IdealExpTerm[]){      , (const IdealExpTerm[]){
57          {1.99427042 , 3.15163 * CARBONDIOXIDE_TSTAR}          {1.99427042 , 3.15163 * CARBONDIOXIDE_TC}
58          ,{0.62105248, 6.11190 * CARBONDIOXIDE_TSTAR}          ,{0.62105248, 6.11190 * CARBONDIOXIDE_TC}
59          ,{0.41195293, 6.77708 * CARBONDIOXIDE_TSTAR}          ,{0.41195293, 6.77708 * CARBONDIOXIDE_TC}
60          ,{1.04028922, 11.32384 * CARBONDIOXIDE_TSTAR}          ,{1.04028922, 11.32384 * CARBONDIOXIDE_TC}
61          ,{0.08327678, 27.08792 * CARBONDIOXIDE_TSTAR}          ,{0.08327678, 27.08792 * CARBONDIOXIDE_TC}
62      }      }
63  };  };
64    
# Line 69  const HelmholtzData helmholtz_data_carbo Line 69  const HelmholtzData helmholtz_data_carbo
69      /* R */ CARBONDIOXIDE_R /* 1000 * kJ/kmolK / kg/kmol = J/kgK */      /* R */ CARBONDIOXIDE_R /* 1000 * kJ/kmolK / kg/kmol = J/kgK */
70      , /* M */ CARBONDIOXIDE_M /* kg/kmol */      , /* M */ CARBONDIOXIDE_M /* kg/kmol */
71      , /* rho_star */ CARBONDIOXIDE_RHOC /* kg/m³ (= rho_c for this model) */      , /* rho_star */ CARBONDIOXIDE_RHOC /* kg/m³ (= rho_c for this model) */
72      , /* T_star */ CARBONDIOXIDE_TSTAR /* K (= T_c for this model) */      , /* T_star */ CARBONDIOXIDE_TC /* K (= T_c for this model) */
73    
74        , /* T_c */ CARBONDIOXIDE_TC
75        , /* p_c */ CARBONDIOXIDE_PC
76        , /* rho_c */ CARBONDIOXIDE_RHOC
77    
78      ,  0.239 /* acentric factor, from Reid, Prausnitz & Polling */      ,  0.239 /* acentric factor, from Reid, Prausnitz & Polling */
79      , &ideal_data_carbondioxide      , &ideal_data_carbondioxide
80      , 34 /* power terms */      , 34 /* power terms */
# Line 183  int main(void){ Line 188  int main(void){
188      exit(1);      exit(1);
189  #endif  #endif
190    
191        fprintf(stderr,"XIANG SATURATION CURVE\n");
192        T = 300;
193        p = fprops_psat_T_xiang(T, d);
194        fprintf(stderr,"T = %f -> psat(T) = %f\n", T, p);
195    
196        exit(1);
197    
198      return helm_run_test_cases(d, ntd, td, 'K');      return helm_run_test_cases(d, ntd, td, 'K');
199    
200      //fprintf(stderr,"Tests completed OK (maximum error = %0.2f%% (%5.2e))\n",maxerr,maxerr);      //fprintf(stderr,"Tests completed OK (maximum error = %0.2f%% (%5.2e))\n",maxerr,maxerr);

Legend:
Removed from v.2113  
changed lines
  Added in v.2114

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