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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1832 - (show 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 #ifndef FPROPS_HELMHOLTZ_H
2 #define FPROPS_HELMHOLTZ_H
3
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 typedef struct HelmholtzATDL_struct{
10 double a; /* coefficient */
11 double t; /* exponent of tau */
12 int d; /* exponent of delta */
13 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.
18 See Tillner-Roth 1993 for information about 'atd' and 'a0' data.
19 */
20 typedef struct HelmholtzData_struct{
21 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
26 unsigned ni; /* number of coefficients in ideal equation */
27 const double *a0; /* coefficients for the ideal component of the fund eqn */
28
29 unsigned nr; /* number of coefficients in residual equation */
30 const HelmholtzATDL *atdl; /* coefficients and exponents for residual component of fund eqn */
31 } HelmholtzData;
32
33 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 double helmholtz_s(double T, double rho, const HelmholtzData *data);
37
38 #endif
39

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