/[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 1835 - (hide annotations) (download) (as text)
Mon Aug 25 08:18:23 2008 UTC (12 years, 2 months ago) by jpye
File MIME type: text/x-chdr
File size: 2321 byte(s)
Checked in generalised version of ideal gas component.
Working on adding the 'exponential' term for the Nitrogen correlation.
1 jpye 1832 #ifndef FPROPS_HELMHOLTZ_H
2     #define FPROPS_HELMHOLTZ_H
3 jpye 1822
4 jpye 1835 /*
5     Terms containing powers of 'tau'
6     */
7     typedef struct IdealPowTerm_struct{
8     double a0;
9     double t0;
10     } IdealPowTerm;
11    
12     /*
13     See J R Cooper 'Representation of the Ideal-Gas Thermaldynamic
14     Properties of Water', Int J Thermophys v 3 no 1, 1982 and also
15     Span, Lemmon, Jacobsen & Wagner 'A Reference Quality Equation of State
16     for Nitrogen' 1998.
17    
18     The form of exponential terms appearing in the reduced
19     Helmholtz function equation is
20    
21     b ln [ 1 - exp( -B tau ) ]
22    
23     where B is defined as beta / tau in the nomenclature of Cooper.
24     */
25     typedef struct IdealExpTerm_struct{
26     double b;
27     double B;
28     } IdealExpTerm;
29    
30     typedef struct IdealData_struct{
31     double c; /* constant value in phi_0 expression */
32     double m; /* linear coefficient in phi_0 expression */
33     unsigned np; /* number of power terms */
34     const IdealPowTerm *pt; /* power term data, may be NULL if np == 0 */
35     unsigned ne; /* number of 'exponential' terms */
36     const IdealExpTerm *et; /* exponential term data, maybe NULL if ne == 0 */
37     } IdealData;
38    
39 jpye 1822 /**
40     Data structure for rows of the coefficient and exponent table (allows
41     the data to be represented more concisely when declaring a fluid from
42     C code.
43     */
44 jpye 1832 typedef struct HelmholtzATDL_struct{
45 jpye 1822 double a; /* coefficient */
46     double t; /* exponent of tau */
47 jpye 1826 int d; /* exponent of delta */
48 jpye 1832 unsigned l; /* exponent X in exp(-del^X) */
49     } HelmholtzATDL;
50 jpye 1822
51     /**
52     Data structure for fluid-specific data for the Helmholtz free energy EOS.
53 jpye 1832 See Tillner-Roth 1993 for information about 'atd' and 'a0' data.
54 jpye 1822 */
55     typedef struct HelmholtzData_struct{
56 jpye 1832 double R; /**< specific gas constant */
57     double M; /**< molar mass, kg/kmol */
58     double rho_star; /**< normalisation density, kg/m�� */
59     double T_star; /* normalisation temperature, K */
60 jpye 1822
61 jpye 1835 const IdealData *ideal; /* data for ideal component of Helmholtz energy */
62 jpye 1822
63 jpye 1832 unsigned nr; /* number of coefficients in residual equation */
64     const HelmholtzATDL *atdl; /* coefficients and exponents for residual component of fund eqn */
65 jpye 1822 } HelmholtzData;
66    
67 jpye 1826 double helmholtz_p(double T, double rho, const HelmholtzData *data);
68     double helmholtz_u(double T, double rho, const HelmholtzData *data);
69     double helmholtz_h(double T, double rho, const HelmholtzData *data);
70 jpye 1829 double helmholtz_s(double T, double rho, const HelmholtzData *data);
71 jpye 1825
72 jpye 1832 #endif
73    

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