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

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

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

revision 1993 by jpye, Tue Feb 3 11:12:40 2009 UTC revision 1994 by jpye, Wed Feb 4 03:52:36 2009 UTC
# Line 212  int main(void){ Line 212  int main(void){
212      }      }
213    
214    
215      fprintf(stderr,"phi0 TESTS\n");  #if 0
216        /* these tests pass, but don't prove much */
217        fprintf(stderr,"COMPARISON OF phi0 VALUES WITH THOSE FROM FREESTEAM\n");
218      for(T = 300; T <= 900; T+= 100){      for(T = 300; T <= 900; T+= 100){
219          for(rho = 900; rho >= 0.9; rho*=0.5){          for(rho = 900; rho >= 0.9; rho*=0.5){
220              double delta = rho / d->rho_star;              double delta = rho / d->rho_star;
# Line 222  int main(void){ Line 224  int main(void){
224              ASSERT_TOL(helm_ideal, tau, delta, d->ideal, p0, p0*1e-5);              ASSERT_TOL(helm_ideal, tau, delta, d->ideal, p0, p0*1e-5);
225          }          }
226      }      }
227    #endif
228    
229      /* LOW-LEVEL TEST DATA PROVIDED IN IAPWS95 */      /* LOW-LEVEL TEST DATA PROVIDED IN IAPWS95 */
230    
# Line 266  int main(void){ Line 269  int main(void){
269      /* this test value calculated from pressure using REFPROP 8 */      /* this test value calculated from pressure using REFPROP 8 */
270      ASSERT_TOL(helmholtz_a, T, rho, d, -8.286875181e5, 1e-4);      ASSERT_TOL(helmholtz_a, T, rho, d, -8.286875181e5, 1e-4);
271      ASSERT_TOL(helm_resid_del, tau, delta, d, -7.14012024e-1, 1e-8);      ASSERT_TOL(helm_resid_del, tau, delta, d, -7.14012024e-1, 1e-8);
272        ASSERT_TOL(helmholtz_s, T, rho, d, 4.320923066e3, 5e-8);
273        ASSERT_TOL(helmholtz_cv, T, rho, d, 6.183157277e3, 5e-7);
274        ASSERT_TOL(helmholtz_p, T, rho, d, 2.203847557e7, 7e-4);
275        ASSERT_TOL(helmholtz_cp, T, rho, d, 3.531798573e6, 1e-8);
276        ASSERT_TOL(helmholtz_w, T, rho, d, 2.52140783e2, 1e-8);
277    
278      fprintf(stderr,"\nIAPWS95 SINGLE-PHASE TESTS\n");      fprintf(stderr,"\nIAPWS95 TABLE 7 (SINGLE-PHASE) TESTS\n");
279      for(i=0; i<ntd; ++i){      for(i=0; i<ntd; ++i){
280          double T = td[i].T;          double T = td[i].T;
281          double rho = td[i].rho;          double rho = td[i].rho;
# Line 279  int main(void){ Line 287  int main(void){
287          ASSERT_TOL(helmholtz_s, T, rho, d, s, s*1e-8);          ASSERT_TOL(helmholtz_s, T, rho, d, s, s*1e-8);
288          ASSERT_TOL(helmholtz_p, T, rho, d, p, p*1e-8);          ASSERT_TOL(helmholtz_p, T, rho, d, p, p*1e-8);
289          ASSERT_TOL(helmholtz_cv, T, rho, d, cv, cv*1e-8);          ASSERT_TOL(helmholtz_cv, T, rho, d, cv, cv*1e-8);
290          ASSERT_TOL(helmholtz_w, T, rho, d, w, w*1e-8);          ASSERT_TOL(helmholtz_w, T, rho, d, w, w*2e-5);
291      }      }
292    
293    
294      fprintf(stderr,"Tests completed OK (maximum error = %0.8f%%)\n",maxerr);      fprintf(stderr,"Tests completed OK (maximum error = %0.8f%%)\n",maxerr);
295      exit(0);      exit(0);
296  }  }

Legend:
Removed from v.1993  
changed lines
  Added in v.1994

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