/[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 2107 by jpye, Fri Dec 4 06:25:16 2009 UTC revision 2108 by jpye, Sun Dec 6 08:35:27 2009 UTC
# Line 35  const IdealData ideal_data_carbondioxide Line 35  const IdealData ideal_data_carbondioxide
35      , CARBONDIOXIDE_R /* cpstar / [J/kgK] */      , CARBONDIOXIDE_R /* cpstar / [J/kgK] */
36      , 1 /* power terms */      , 1 /* power terms */
37      , (const IdealPowTerm[]){      , (const IdealPowTerm[]){
38          {2.5,  0.}          {3.5,  0.}
39      }      }
40      , 5      , 5
41      , (const IdealExpTerm[]){      , (const IdealExpTerm[]){
42          {1.99427042, 3.15163}          {1.99427042 , 3.15163 * CARBONDIOXIDE_TSTAR}
43          ,{0.62105248, 6.11190}          ,{0.62105248, 6.11190 * CARBONDIOXIDE_TSTAR}
44          ,{0.41195293, 6.77708}          ,{0.41195293, 6.77708 * CARBONDIOXIDE_TSTAR}
45          ,{1.04028922, 11.32384}          ,{1.04028922, 11.32384 * CARBONDIOXIDE_TSTAR}
46          ,{0.08327678, 27.08792}          ,{0.08327678, 27.08792 * CARBONDIOXIDE_TSTAR}
47      }      }
48  };  };
49    
50    
51  /**  /**
52      Residual (non-ideal) property data for ,....      Residual (non-ideal) property data for ,....
# Line 166  int main(void){ Line 167  int main(void){
167    
168  #define CP0(T,RHO,DATA) helmholtz_cp0(T,DATA)  #define CP0(T,RHO,DATA) helmholtz_cp0(T,DATA)
169    
170    #if 0
171        fprintf(stderr,"CP0 PLOT\n");
172        for(i=0; i<=20; ++i){
173            double T = 216 + 1200.*(i/20.);
174            fprintf(stderr,"T = %f:  cp0 = %f\n", T, helmholtz_cp0(T,d));
175        }
176    #endif
177    
178      fprintf(stderr,"CP0 TESTS\n");      fprintf(stderr,"CP0 TESTS\n");
179      for(i=0; i<n;++i){      for(i=0; i<n;++i){
180          cp0 = td[i].cp0*1e3;          cp0 = td[i].cp0*1e3;
181          ASSERT_TOL(CP0, td[i].T+273.15, 0., d, cp0, cp0*1e-1);          //fprintf(stderr,"T = %f --> cp0 = %f\n", td[i].T, cp0);
182            ASSERT_TOL(CP0, td[i].T, 0., d, cp0, cp0*1e-1);
183      }      }
184  #undef CP0  #undef CP0
185    

Legend:
Removed from v.2107  
changed lines
  Added in v.2108

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