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

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

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

revision 2284 by jpye, Sat Aug 14 10:52:06 2010 UTC revision 2285 by jpye, Sat Aug 14 13:47:07 2010 UTC
# Line 342  int helm_check_dudrho_T(const HelmholtzD Line 342  int helm_check_dudrho_T(const HelmholtzD
342  }  }
343    
344    
345    int helm_calc_offsets(double Tref, double rhoref, double href, double sref, const HelmholtzData *d){
346        double h = helmholtz_h(Tref, rhoref, d);
347        double s = helmholtz_s(Tref, rhoref, d);
348    
349        fprintf(stderr,"Tref = %f\n",Tref);
350        fprintf(stderr,"rhoref = %f\n",rhoref);
351        fprintf(stderr,"--> h(Tref,rhoref) = %.14e  (wanted %.14e)\n",h, href);
352        fprintf(stderr,"--> s(Tref,rhoref) = %.14e  (wanted %.14e)\n",s, sref);
353    
354        double m_new = d->ideal->m + (href - h)/d->R/d->T_star;
355    
356        double c_new = d->ideal->c - (sref - s)/d->R;
357    
358        fprintf(stderr,"c_new = %.20e\n",c_new);
359        fprintf(stderr,"m_new = %.20e\n",m_new);
360    
361        return 0;
362    }
363    

Legend:
Removed from v.2284  
changed lines
  Added in v.2285

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