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

Diff of /trunk/models/johnpye/fprops/test/ph.c

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

revision 2679 by jpye, Wed Jan 23 04:57:19 2013 UTC revision 2680 by jpye, Mon Jan 28 06:30:25 2013 UTC
# Line 29  Line 29 
29    
30  int main(void){  int main(void){
31      const PureFluid *P;      const PureFluid *P;
32      FpropsError err;      FpropsError err = FPROPS_NO_ERROR;
33      FluidState S;      FluidState S;
34      double T0, rho0, p, h, T, rho;      double T0, rho0, p, h, T, rho;
35    
# Line 55  int main(void){ Line 55  int main(void){
55      assert(fabs(T - T0) < TOL_T); \      assert(fabs(T - T0) < TOL_T); \
56      assert(fabs(rho - rho0) < TOL_RHO);      assert(fabs(rho - rho0) < TOL_RHO);
57    
58        P = fprops_fluid("isohexane","pengrob","J. Chem. Eng. Data, 51");
59        assert(P);
60    
61        TEST_PH(128.4465, 1.);
62        TEST_PH(1.284465e+02, 1/1.693087e-03);
63        TEST_PH(1.284465e+02, 1/2.232836e-03);
64        TEST_PH(1.284465e+02, 1/2.944654e-03);
65        TEST_PH(1.284465e+02, 1/3.883396e-03);
66        TEST_PH(1.284465e+02, 1/5.121405e-03);
67    
68      P = fprops_fluid("isohexane","helmholtz","J. Chem. Eng. Data, 51");      P = fprops_fluid("isohexane","helmholtz","J. Chem. Eng. Data, 51");
69      assert(P);      assert(P);
       
     TEST_PH(119.6, 807.5305511649);  
   
70    
71        TEST_PH(119.6, 807.530551164909);
72        
73      P = fprops_fluid("water","helmholtz",NULL);      P = fprops_fluid("water","helmholtz",NULL);
74      assert(P);      assert(P);
     err = FPROPS_NO_ERROR;  
75    
76      TEST_PH(314.4054538268115, 999.7897902747587);      TEST_PH(314.4054538268115, 999.7897902747587);
77    
# Line 88  int main(void){ Line 95  int main(void){
95      MSG("p = %f",p);      MSG("p = %f",p);
96      MSG("h = %f",h);      MSG("h = %f",h);
97    
98        /* all done? report success */
99      fprintf(stderr,"\n");      fprintf(stderr,"\n");
100      color_on(stderr,ASC_FG_BRIGHTGREEN);      color_on(stderr,ASC_FG_BRIGHTGREEN);
101      fprintf(stderr,"SUCCESS (%s)",__FILE__);      fprintf(stderr,"SUCCESS (%s)",__FILE__);

Legend:
Removed from v.2679  
changed lines
  Added in v.2680

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