Parent Directory | Revision Log

Revision **1619** -
(**show annotations**)
(**download**)
(**as text**)

*Wed Sep 5 06:48:07 2007 UTC*
(13 years, 9 months ago)
by *jpye*

File MIME type: text/x-ascend

File size: 2407 byte(s)

File MIME type: text/x-ascend

File size: 2407 byte(s)

Added air specific volumme.

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

2 | Copyright (C) John Pye 2007 |

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 Substance', 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 | v IS_A specific_volume; |

37 | |

38 | p_c IS_A pressure_constant; |

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

40 | |

41 | T_c IS_A temperature_constant; |

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

43 | |

44 | p_r IS_A factor; |

45 | p_r = p / p_c; |

46 | |

47 | T_r IS_A factor; |

48 | T_r = T / T_c; |

49 | |

50 | v_r IS_A factor; |

51 | v_r = (v * M) / (1{GAS_C} * T_c / p_c); |

52 | |

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

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

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

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

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

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

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

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

61 | |

62 | b_0, b_1, b_2, b_3 IS_A real_constant; |

63 | b_0 :== -8.107e-4; |

64 | b_1 :== 0.1629; |

65 | b_2 :== -0.338964; |

66 | b_3 :== -0.143369; |

67 | |

68 | h_r0 IS_A real_constant; |

69 | h_r0 :== -9.08244; |

70 | |

71 | M IS_A molar_weight_constant; |

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

73 | |

74 | h IS_A specific_enthalpy; |

75 | h_r IS_A factor; |

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

77 | |

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

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

80 | |

81 | Z IS_A factor; |

82 | Z * T_r = p_r * v_r; |

83 | |

84 | Z = 1 + (b_0 + b_1 / T_r + b_2 / T_r^2.6 + b_3 / T_r^1.6) * p_r; |

85 | |

86 | METHODS |

87 | METHOD on_load; |

88 | FIX p, T; |

89 | p := 1 {bar}; |

90 | T := 300 {K}; |

91 | h.lower_bound := -1e5 {kJ/kg}; |

92 | END on_load; |

93 | END airprops; |

94 |

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

Powered by ViewVC 1.1.22 |