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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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