/[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 1837 by jpye, Mon Aug 25 08:18:23 2008 UTC revision 1838 by jpye, Thu Aug 28 08:32:29 2008 UTC
# Line 41  typedef struct     IdealData_struct{ Line 41  typedef struct     IdealData_struct{
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
42      C code.      C code.
43  */  */
44  typedef struct HelmholtzATDL_struct{  typedef struct HelmholtzPowTerm_struct{
45      double a; /* coefficient */      double a; /* coefficient */
46      double t; /* exponent of tau */      double t; /* exponent of tau */
47      int d; /* exponent of delta */      int d; /* exponent of delta */
48      unsigned l; /* exponent X in exp(-del^X) */      unsigned l; /* exponent X in exp(-del^X) */
49  } HelmholtzATDL;  } HelmholtzPowTerm;
50    
51    /**
52        Data structure for 'exponential terms' in the residual expression.
53        These terms are of the form used in Span et al, 1998, as cited in
54        the file 'nitrogen.c'.
55    */
56    typedef struct HelmholtzExpTerm_struct{
57        double a; /* coefficient */
58        double t; /* exponent of tau */
59        int d; /* exponent of delta */
60        int phi;
61        int beta;
62        double gamma;
63    } HelmholtzExpTerm;
64    
65  /**  /**
66      Data structure for fluid-specific data for the Helmholtz free energy EOS.      Data structure for fluid-specific data for the Helmholtz free energy EOS.
# Line 60  typedef struct HelmholtzData_struct{ Line 74  typedef struct HelmholtzData_struct{
74            
75      const IdealData *ideal; /* data for ideal component of Helmholtz energy */      const IdealData *ideal; /* data for ideal component of Helmholtz energy */
76    
77      unsigned nr; /* number of coefficients in residual equation */      unsigned np; /* number of power terms in residual equation */
78      const HelmholtzATDL *atdl; /* coefficients and exponents for residual component of fund eqn */      const HelmholtzPowTerm *pt; /* power term data for residual eqn, maybe NULL if np == 0 */
79        unsigned ne; /* number of exponential terms (a la Span et al 1998) for residual eqn */
80        const HelmholtzExpTerm *et; /* exponential term data, maybe NULL if ne == 0 */
81  } HelmholtzData;  } HelmholtzData;
82    
83  double helmholtz_p(double T, double rho, const HelmholtzData *data);  double helmholtz_p(double T, double rho, const HelmholtzData *data);

Legend:
Removed from v.1837  
changed lines
  Added in v.1838

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