/[ascend]/trunk/models/johnpye/fprops/helmholtz.h
ViewVC logotype

Diff of /trunk/models/johnpye/fprops/helmholtz.h

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

revision 1829 by jpye, Fri Aug 22 05:00:53 2008 UTC revision 1832 by jpye, Fri Aug 22 07:23:58 2008 UTC
# Line 1  Line 1 
1    #ifndef FPROPS_HELMHOLTZ_H
2    #define FPROPS_HELMHOLTZ_H
3    
4  /**  /**
5      Data structure for rows of the coefficient and exponent table (allows      Data structure for rows of the coefficient and exponent table (allows
6      the data to be represented more concisely when declaring a fluid from      the data to be represented more concisely when declaring a fluid from
7      C code.      C code.
8  */  */
9  typedef struct HelmholtzATD_struct{  typedef struct HelmholtzATDL_struct{
10      double a; /* coefficient */      double a; /* coefficient */
11      double t; /* exponent of tau */      double t; /* exponent of tau */
12      int d; /* exponent of delta */      int d; /* exponent of delta */
13  } HelmholtzATD;      unsigned l; /* exponent X in exp(-del^X) */
14    } HelmholtzATDL;
15    
16  /**  /**
17      Data structure for fluid-specific data for the Helmholtz free energy EOS.      Data structure for fluid-specific data for the Helmholtz free energy EOS.
18        See Tillner-Roth 1993 for information about 'atd' and 'a0' data.
19  */  */
20  typedef struct HelmholtzData_struct{  typedef struct HelmholtzData_struct{
21      double R; /* specific gas constant */      double R; /**< specific gas constant */
22      double rho_star; /* normalisation density */      double M; /**< molar mass, kg/kmol */
23      double T_star; /* normalisation temperature */      double rho_star; /**< normalisation density, kg/m³ */
24        double T_star; /* normalisation temperature, K */
25            
26      double a0[6]; /* coefficients for the ideal component of the fund eqn */      unsigned ni; /* number of coefficients in ideal equation */
27        const double *a0; /* coefficients for the ideal component of the fund eqn */
28    
29      HelmholtzATD atd[21];      unsigned nr; /* number of coefficients in residual equation */
30        const HelmholtzATDL *atdl; /* coefficients and exponents for residual component of fund eqn */
31  } HelmholtzData;  } HelmholtzData;
32    
33  double helmholtz_p(double T, double rho, const HelmholtzData *data);  double helmholtz_p(double T, double rho, const HelmholtzData *data);
# Line 28  double helmholtz_u(double T, double rho, Line 35  double helmholtz_u(double T, double rho,
35  double helmholtz_h(double T, double rho, const HelmholtzData *data);  double helmholtz_h(double T, double rho, const HelmholtzData *data);
36  double helmholtz_s(double T, double rho, const HelmholtzData *data);  double helmholtz_s(double T, double rho, const HelmholtzData *data);
37    
38  const HelmholtzData helmholtz_data_ammonia;  #endif
39    

Legend:
Removed from v.1829  
changed lines
  Added in v.1832

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