Parent Directory | Revision Log

Revision **1603** -
(**hide annotations**)
(**download**)
(**as text**)

*Wed Aug 29 08:06:24 2007 UTC*
(13 years, 1 month ago)
by *jpye*

File MIME type: text/x-ascend

File size: 2159 byte(s)

File MIME type: text/x-ascend

File size: 2159 byte(s)

Added an air enthalpy correlation from a paper by Adebiyi (2005).

1 | jpye | 1603 | (* Air properties calculator for ASCEND modelling environment |

2 | Copyright (C) John Pye 2005 | ||

3 | |||

4 | This program is free software; you can redistribute it | ||

5 | and/or modify it under the terms of the GNU General Public | ||

6 | License as published by the Free Software Foundation; either | ||

7 | version 2 of the License, or (at your option) any later | ||

8 | version. | ||

9 | |||

10 | This program is distributed in the hope that it will be | ||

11 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||

12 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||

13 | PURPOSE. See the GNU General Public License for more | ||

14 | details. | ||

15 | |||

16 | You should have received a copy of the GNU General Public | ||

17 | License along with this program; if not, write to the Free | ||

18 | Software Foundation, Inc., 59 Temple Place, Suite 330, | ||

19 | Boston, MA 02111-1307 USA | ||

20 | *) | ||

21 | REQUIRE "atoms.a4l"; | ||

22 | REQUIRE "johnpye/thermo_types.a4c"; | ||

23 | |||

24 | (* | ||

25 | The air property correlations here are taken from the paper by | ||

26 | George A. Adebiyi, 'Formulations for the Thermodynamic Properties of | ||

27 | Pure Substatnce', J Energy Res Tech., 2005. doi:10.1115/1.1794695 | ||

28 | |||

29 | Currently, this model just allows the enthalpy of air to be calculated | ||

30 | given the pressure and temperature. Other correlations are implemented | ||

31 | in the Adebiyi paper, but they haven't been coded here yet. | ||

32 | *) | ||

33 | MODEL airprops; | ||

34 | p IS_A pressure; | ||

35 | T IS_A temperature; | ||

36 | |||

37 | p_c IS_A pressure_constant; | ||

38 | p_c :== 37.7 {bar}; | ||

39 | |||

40 | T_c IS_A temperature_constant; | ||

41 | T_c :== 132.6 {K}; | ||

42 | |||

43 | p_r IS_A factor; | ||

44 | p_r = p / p_c; | ||

45 | |||

46 | T_r IS_A factor; | ||

47 | T_r = T / T_c; | ||

48 | |||

49 | a[0..6] IS_A real_constant; | ||

50 | a[0] :== 1.685175; | ||

51 | a[1] :== 2.283617; | ||

52 | a[2] :== -0.49965; | ||

53 | a[3] :== 0.108826; | ||

54 | a[4] :== -0.012765; | ||

55 | a[5] :== 7.471154e-4; | ||

56 | a[6] :== -1.732085e-5; | ||

57 | |||

58 | b_1, b_2, b_3 IS_A real_constant; | ||

59 | b_1 :== 0.1629; | ||

60 | b_2 :== -0.338964; | ||

61 | b_3 :== -0.143369; | ||

62 | |||

63 | h_r0 IS_A real_constant; | ||

64 | h_r0 :== -9.08244; | ||

65 | |||

66 | M IS_A molar_weight_constant; | ||

67 | M :== 28.97 {kg/kmol}; | ||

68 | |||

69 | h IS_A specific_enthalpy; | ||

70 | h_r IS_A factor; | ||

71 | h_r = h * M / 1{GAS_C} / T_c; | ||

72 | |||

73 | h_r = SUM[ a[k]/(k+0.5)*T_r^(k+0.5) | k IN [0..6]] + h_r0 | ||

74 | + ( b_1 + 2.6*b_2 / T_r^1.6 + 1.6 * b_3 / T_r^0.6 ) * p_r; | ||

75 | |||

76 | METHODS | ||

77 | METHOD on_load; | ||

78 | FIX p, T; | ||

79 | p := 1 {bar}; | ||

80 | T := 300 {K}; | ||

81 | END on_load; | ||

82 | END airprops; | ||

83 |

john.pye@anu.edu.au | ViewVC Help |

Powered by ViewVC 1.1.22 |