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

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

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

revision 3411 by jpye, Mon Sep 10 06:26:47 2018 UTC revision 3412 by jpye, Fri Sep 14 02:19:20 2018 UTC
# Line 55  MODEL air_fluid REFINES thermophysical_f Line 55  MODEL air_fluid REFINES thermophysical_f
55      h_eq: (h - h_cor) * M = 1{kJ/kmol} * SUM[c[i]/(i+1) * (T/1{K})^(i+1) | i IN [0..n-1]];      h_eq: (h - h_cor) * M = 1{kJ/kmol} * SUM[c[i]/(i+1) * (T/1{K})^(i+1) | i IN [0..n-1]];
56    
57      (* entropy is the integral of (cp(T)/T)*dT over a temperature range, with s_cor being the offset *)      (* entropy is the integral of (cp(T)/T)*dT over a temperature range, with s_cor being the offset *)
58      s_eq: (s - s_cor) * M = 1{kJ/kmol/K} * c[0]*ln(T/1{K}) - R*ln(p/1{Pa}) + SUM[c[i]/i * (T/1{K})^i | i IN [1..n-1]];      s_eq: (s - s_cor) * M = 1{kJ/kmol/K} * c[0]*ln(T/1{K}) - R*M*ln(p/1{Pa}) + SUM[c[i]/i * (T/1{K})^i | i IN [1..n-1]];
59    
60      (* viscosity from Lo et al, 1966, doi:10.1021/je60031a020, with ideal gas EOS for dpdT_v *)      (* viscosity from Lo et al, 1966, doi:10.1021/je60031a020, with ideal gas EOS for dpdT_v *)
61      mustar IS_A viscosity;      mustar IS_A viscosity;
# Line 97  METHODS Line 97  METHODS
97          h.lower_bound := -1e5 {kJ/kg};          h.lower_bound := -1e5 {kJ/kg};
98          s.lower_bound := -1e5 {kJ/kg/K};          s.lower_bound := -1e5 {kJ/kg/K};
99          u.lower_bound := -1e5 {kJ/kg};          u.lower_bound := -1e5 {kJ/kg};
100            T.upper_bound := 2000 {K};
101            T.lower_bound := 20 {K};
102            (* h.upper_bound := 2046.04 {kJ/kg}; *)
103            (* h.lower_bound := 0 {kJ/kg}; -- maybe necessary?? *)
104      END bound_self;      END bound_self;
105      METHOD default;      METHOD default;
106          RUN bound_self;          RUN bound_self;
107            (* FIXME make same reference conditions for both h and s *)
108          FIX h_cor := 4.68596651709 {kJ/kg}; (* gives h=300.19 kJ/kg at T=300 K *)          FIX h_cor := 4.68596651709 {kJ/kg}; (* gives h=300.19 kJ/kg at T=300 K *)
109          FIX s_cor := -3.85964833492 {kJ/kg/K}; (* gives s=1.70203 at T=300 K, p=1 Pa *)          FIX s_cor := 4.61372432101  {kJ/kg/K}; (* gives s=6.8484 at T=293.15 K, p=1 bar *)
110          h := 10 {kJ/kg};          h := 200 {kJ/kg};
111      END default;      END default;
112      METHOD on_load;      METHOD on_load;
113          RUN ClearAll;          RUN ClearAll;
114          RUN default;          RUN default;
115          FIX T := 650{K};          FIX T := 560 {K};
116          FIX p := 1 {Pa};          FIX p := 20 {bar};
117    
118      END on_load;      END on_load;
119      METHOD self_test;      METHOD self_test;
120          ASSERT abs(h - 659.84 {kJ/kg}) < 2.1 {kJ/kg};          (* these values check against Cengel, table A-17 *)
121          ASSERT abs(s - 2.49364 {kJ/kg/K}) < 0.01 {kJ/kg/K};          ASSERT abs(h - 565.17 {kJ/kg}) < 2.1 {kJ/kg};
122            ASSERT abs((s - 6.8484 {kJ/kg/K}) - (2.33685 {kJ/kg/K} - 1.68 {kJ/kg/K} - R*ln(20./1.))) < 0.01 {kJ/kg/K};
123      END self_test;      END self_test;
124  END air_fluid;  END air_fluid;
125    

Legend:
Removed from v.3411  
changed lines
  Added in v.3412

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