/[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 1834 by jpye, Fri Aug 22 07:23:58 2008 UTC revision 1835 by jpye, Mon Aug 25 08:18:23 2008 UTC
# Line 1  Line 1 
1  #ifndef FPROPS_HELMHOLTZ_H  #ifndef FPROPS_HELMHOLTZ_H
2  #define FPROPS_HELMHOLTZ_H  #define FPROPS_HELMHOLTZ_H
3    
4    /*
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  /**  /**
40      Data structure for rows of the coefficient and exponent table (allows      Data structure for rows of the coefficient and exponent table (allows
41      the data to be represented more concisely when declaring a fluid from      the data to be represented more concisely when declaring a fluid from
# Line 23  typedef struct HelmholtzData_struct{ Line 58  typedef struct HelmholtzData_struct{
58      double rho_star; /**< normalisation density, kg/m³ */      double rho_star; /**< normalisation density, kg/m³ */
59      double T_star; /* normalisation temperature, K */      double T_star; /* normalisation temperature, K */
60            
61      unsigned ni; /* number of coefficients in ideal equation */      const IdealData *ideal; /* data for ideal component of Helmholtz energy */
     const double *a0; /* coefficients for the ideal component of the fund eqn */  
62    
63      unsigned nr; /* number of coefficients in residual equation */      unsigned nr; /* number of coefficients in residual equation */
64      const HelmholtzATDL *atdl; /* coefficients and exponents for residual component of fund eqn */      const HelmholtzATDL *atdl; /* coefficients and exponents for residual component of fund eqn */

Legend:
Removed from v.1834  
changed lines
  Added in v.1835

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