/[ascend]/trunk/models/johnpye/fprops/nitrogen.c
ViewVC logotype

Diff of /trunk/models/johnpye/fprops/nitrogen.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1834 by jpye, Fri Aug 22 08:48:51 2008 UTC revision 1835 by jpye, Mon Aug 25 08:18:23 2008 UTC
# Line 9  Int J Thermophysics, Vol 18, No 4, 1998. Line 9  Int J Thermophysics, Vol 18, No 4, 1998.
9  This is the nitrogren property correlation recommended  This is the nitrogren property correlation recommended
10  by NIST in its program REFPROP 7.0. */  by NIST in its program REFPROP 7.0. */
11    
12    const IdealData ideal_data_nitrogen = {
13        -12.76953 /* constant */
14        ,-0.007841630 /* linear */
15        , 3 /* power terms */
16        , (const IdealPowTerm[]){
17            {1.934819,     -1.}
18            ,{-1.247742e-5, -2.}
19            ,{6.678326e-8,  -3.}
20        }
21        , 1
22        , (const IdealExpTerm[]){
23            {1.012941, 26.65788}
24        }
25    };
26    
27  const HelmholtzData helmholtz_data_ammonia = {  const HelmholtzData helmholtz_data_ammonia = {
28      /* R */ 8.31451 / 28.01348e-3 /* J/molK * kg/mol = J/kg/K */      /* R */ 8.31451 / 28.01348e-3 /* J/molK * kg/mol = J/kg/K */
29      , /* M */ 28.01348 /* kg/kmol */      , /* M */ 28.01348 /* kg/kmol */
30      , /* rho_star */ 11.1839 * 28.01348 /* mol/L * kg/kmol = kg/kL = kg/m³ = rho_c for this model*/      , /* rho_star */ 11.1839 * 28.01348 /* mol/L * kg/kmol = kg/kL = kg/m³ = rho_c for this model*/
31      , /* T_star */ 126.192 /* K = T_c for this model */      , /* T_star */ 126.192 /* K = T_c for this model */
32      , 5 /* ni */      , &ideal_data_nitrogen
33      , (const double[]){ /* a0 values 1..5 */      , 21 /* nr */
          /* need to work out how to implement these still */  
     }, 21 /* nr */  
34      , (const HelmholtzATDL[]){      , (const HelmholtzATDL[]){
35          /* a_i, t_i, d_i, l_i */          /* a_i, t_i, d_i, l_i */
36          { 0.924803575275,      0.25,    1,  0}          { 0.924803575275,      0.25,    1,  0}
# Line 63  const HelmholtzData helmholtz_data_ammon Line 76  const HelmholtzData helmholtz_data_ammon
76    
77      To run the test, compile and run as follows:      To run the test, compile and run as follows:
78    
79      gcc helmholtz.c ammonia.c -DTEST -o ammonia -lm && ./ammonia      gcc helmholtz.c nitrogen.c -DTEST -o nitrogen -lm && ./nitrogen
80    
81      These tests all currently pass with a maximum error of 2%. The error      These tests all currently pass with a maximum error of 2%. The error
82      seems to arise in the enthalpy data for low temperatures. Haven't been      seems to arise in the enthalpy data for low temperatures. Haven't been

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

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