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

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

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

revision 2107 by jpye, Fri Oct 3 04:36:44 2008 UTC revision 2108 by jpye, Sun Dec 6 08:35:27 2009 UTC
# Line 64  double helm_cp0(double T, const IdealDat Line 64  double helm_cp0(double T, const IdealDat
64    
65      /* 'exponential' terms */      /* 'exponential' terms */
66      et = &(data->et[0]);      et = &(data->et[0]);
     for(i=0; i<data->ne; ++i, ++et){  
67  #ifdef CP0_DEBUG  #ifdef CP0_DEBUG
68        fprintf(stderr,"ne = %d\n",data->ne);
69    #endif
70        for(i=0; i<data->ne; ++i, ++et){
71    #ifdef xCP0_DEBUG
72          fprintf(stderr,"exp term\n");          fprintf(stderr,"exp term\n");
73  #endif  #endif
74          double x = et->beta / T;          double x = et->beta / T;
# Line 73  double helm_cp0(double T, const IdealDat Line 76  double helm_cp0(double T, const IdealDat
76          double d = (1-e)*(1-e);          double d = (1-e)*(1-e);
77          term = et->b * x*x * e / d;          term = et->b * x*x * e / d;
78  #ifdef CP0_DEBUG  #ifdef CP0_DEBUG
79            fprintf(stderr,"i = %d: ",i);
80          fprintf(stderr,"exp term, b = %f, beta = %f, val = %f\n",et->b, et->beta, term);          fprintf(stderr,"exp term, b = %f, beta = %f, val = %f\n",et->b, et->beta, term);
81  #endif  #endif
82          sum += term;          sum += term;
83      }      }
84    
85  #ifdef CP0_DEBUG  #ifdef CP0_DEBUG
86      fprintf(stderr,"Mult by cp0* = %f\n",data->cp0star);      fprintf(stderr,"Sum = %f. Mult by cp0* = %f => %f\n",sum,data->cp0star,sum*data->cp0star);
87  #endif  #endif
88      return data->cp0star * sum;      return data->cp0star * sum;
89  }  }

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

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