/[ascend]/trunk/models/johnpye/ideal_steam.a4c
ViewVC logotype

Diff of /trunk/models/johnpye/ideal_steam.a4c

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

revision 185 by johnpye, Fri Jan 6 00:54:21 2006 UTC revision 186 by johnpye, Fri Jan 13 03:36:44 2006 UTC
# Line 19  MODEL ideal_steam REFINES thermo_state; Line 19  MODEL ideal_steam REFINES thermo_state;
19      R "specific gas constant for water"      R "specific gas constant for water"
20          :== 0.46151805 {kJ/kg/K};          :== 0.46151805 {kJ/kg/K};
21            
22      tau = Tc / T;      z_01: tau = Tc / T;
23      delta = rho / rhoc;      z_02: delta = rho / rhoc;
24            
25            
26      range_0 IS_A set OF integer_constant;      range_0 IS_A set OF integer_constant;
# Line 63  MODEL ideal_steam REFINES thermo_state; Line 63  MODEL ideal_steam REFINES thermo_state;
63      (*------------ IDEAL PARTS ------------*)      (*------------ IDEAL PARTS ------------*)
64    
65      phi0 IS_A factor;      phi0 IS_A factor;
66      phi0_expr: phi0 =      z_phi0_expr: phi0 =
67          SUM[ n0[i]*ln(1-exp(-tau*gamma0[i])) | i IN [range_01] ]          SUM[ n0[i]*ln(1-exp(-tau*gamma0[i])) | i IN [range_01] ]
68          + ln(delta) + n0[1] + n0[2]*tau + n0[3]*ln(tau);          + ln(delta) + n0[1] + n0[2]*tau + n0[3]*ln(tau);
69    
70      phi0delta IS_A factor;      phi0delta IS_A factor;
71      phi0delta_expr: phi0delta = 1.0/delta;      z_phi0delta_expr: phi0delta = 1.0/delta;
72    
73      phi0deltadelta IS_A factor;      phi0deltadelta IS_A factor;
74      phi0deltadelta_expr: phi0deltadelta =      z_phi0deltadelta_expr: phi0deltadelta =
75          -1.0/(delta*delta);          -1.0/(delta*delta);
76    
77    
78      phi0tau IS_A factor;      phi0tau IS_A factor;
79      phi0tau_expr: phi0tau =      z_phi0tau_expr: phi0tau =
80          n0[2] + n0[3]/tau          n0[2] + n0[3]/tau
81          + SUM[ n0[i]*gamma0[i]*(1/(1-exp(-tau*gamma0[i])) - 1) | i IN [range_01] ];          + SUM[ n0[i]*gamma0[i]*(1/(1-exp(-tau*gamma0[i])) - 1) | i IN [range_01] ];
82    
# Line 84  MODEL ideal_steam REFINES thermo_state; Line 84  MODEL ideal_steam REFINES thermo_state;
84      phi0deltatau :== 0.0;      phi0deltatau :== 0.0;
85    
86      phi0tautau IS_A factor;      phi0tautau IS_A factor;
87      phi0tautau_expr: phi0tautau      z_phi0tautau_expr: phi0tautau
88          = -n0[3] / tau^2          = -n0[3] / tau^2
89          - SUM [ n0[i] * gamma0[i]^2 * exp(-gamma0[i] * tau) / ( 1 - exp(-gamma0[i] * tau) )^2 | i IN range_01 ];          - SUM [ n0[i] * gamma0[i]^2 * exp(-gamma0[i] * tau) / ( 1 - exp(-gamma0[i] * tau) )^2 | i IN range_01 ];
90    
91    
92      (*--------- THERMO PROPERTY RELATIONS ----------- *)      (*--------- THERMO PROPERTY RELATIONS ----------- *)
93    
94      pressure: p = rho * R * T;      z_pressure: p = rho * R * T;
95    
96      internal_energy: u  = R * T * tau * (phi0tau);      z_internal_energy: u    = R * T * tau * (phi0tau);
97    
98      enthalpy: h = R * T * (1 + tau*(phi0tau));      z_enthalpy: h = R * T * (1 + tau*(phi0tau));
99    
100      entropy: s = R * (tau*(phi0tau) - phi0);      z_entropy: s = R * (tau*(phi0tau) - phi0);
101    
102      c_isochoric: cv = - R * tau^2 * (phi0tautau);      z_c_isochoric: cv = - R * tau^2 * (phi0tautau);
103    
104      c_isobaric: cp = - R * tau^2 * (phi0tautau);      z_c_isobaric: cp = - R * tau^2 * (phi0tautau);
105    
106      spd_sound: w^2      z_spd_sound: w^2
107          = R * T * (1 - 1/(tau^2 * phi0tautau));          = R * T * (1 - 1/(tau^2 * phi0tautau));
108    
109  METHODS  METHODS

Legend:
Removed from v.185  
changed lines
  Added in v.186

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