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

Annotation of /trunk/models/johnpye/radialheatloss.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 616 - (hide annotations) (download) (as text)
Wed May 17 06:34:46 2006 UTC (18 years, 9 months ago) by johnpye
File MIME type: text/x-ascend
File size: 3188 byte(s)
Fixed bugs with unspecified vars in this model.
1 johnpye 611 (* ASCEND model library
2     Copyright (c) 2006 Carnegie Mellon University
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     This is a simple model for computing the
22     steady-state temperature and heat loss profile
23     of a multi-layered pipe-plus-insulation
24    
25     by John Pye
26     *)
27    
28     REQUIRE "atoms.a4l";
29     REQUIRE "johnpye/thermo_types.a4c";
30    
31     MODEL radial_loss;
32     D_1 IS_A distance;
33     D_2 IS_A distance;
34     q IS_A energy_rate;
35     L IS_A distance;
36     T_1, T_2 IS_A temperature;
37     METHODS
38     METHOD specify;
39     FIX D_1, D_2;
40     END specify;
41     END radial_loss;
42    
43     (*
44     Wall conduction
45     *)
46     MODEL wall_conduction REFINES radial_loss;
47     k IS_A thermal_conductivity;
48    
49     q = 2 * 1{PI} * L * k *(T_1 - T_2) / ln(D_2/D_1);
50    
51     END wall_conduction;
52    
53     (*
54     Convection boundary
55     *)
56     MODEL convection_boundary REFINES radial_loss;
57     h IS_A heat_transfer_coefficient;
58     D_1, D_2 ARE_THE_SAME;
59    
60     q = h * 1{PI} * D_1 * (T_1 - T_2);
61    
62     END convection_boundary;
63 johnpye 612
64     MODEL pipe_test REFINES radial_loss;
65    
66     n IS_A integer_constant;
67     n:==5;
68    
69     loss[1..5] IS_A radial_loss;
70    
71     loss[1] IS_REFINED_TO convection_boundary;
72     loss[2] IS_REFINED_TO wall_conduction;
73     loss[3] IS_REFINED_TO wall_conduction;
74     loss[4] IS_REFINED_TO wall_conduction;
75     loss[5] IS_REFINED_TO convection_boundary;
76    
77     L, loss[1..5].L ARE_THE_SAME;
78    
79 johnpye 615 FOR i IN [2..n] CREATE
80 johnpye 611 (* layers are touching *)
81     loss[i].D_1, loss[i-1].D_2 ARE_THE_SAME;
82 johnpye 612
83     (* steady state: heat rate is uniform *)
84 johnpye 615 loss[i].q,loss[i-1].q ARE_THE_SAME;
85    
86 johnpye 616 loss[i].T_1, loss[i-1].T_2 ARE_THE_SAME;
87    
88 johnpye 612 END FOR;
89    
90 johnpye 616 loss[1].D_1, D_1 ARE_THE_SAME;
91 johnpye 615 loss[n].D_2, D_2 ARE_THE_SAME;
92    
93 johnpye 616 loss[1].T_1, T_1 ARE_THE_SAME;
94     loss[n].T_2, T_2 ARE_THE_SAME;
95 johnpye 615
96 johnpye 616 loss[1].q, q ARE_THE_SAME;
97 johnpye 615
98 johnpye 612 METHODS
99     METHOD default_self;
100     RUN reset; RUN values;
101     END default_self;
102 johnpye 611
103     METHOD specify;
104     FIX loss[1].h;
105     FIX loss[2..4].k;
106 johnpye 616 FIX loss[5].h;
107     FIX L;
108     FIX T_1, T_2;
109 johnpye 611
110 johnpye 615 FIX loss[2].D_1, loss[2].D_2;
111     FIX loss[4].D_1, loss[4].D_2;
112 johnpye 611 END specify;
113    
114 johnpye 615 METHOD values;
115 johnpye 616 L := 1 {m};
116     T_1 := 250 {K} + 273.15 {K};
117     T_2 := 25 {K} + 273.15 {K};
118 johnpye 615
119 johnpye 611 loss[1].h := 1000 {W/m^2/K};
120     loss[2].k := 40 {W/m/K}; (* 'alloy steel', Ashby & Jones, Eng Matls 2, p.11 *)
121     loss[3].k := 0.05 {W/m/K}; (* Masud's figure for lagging *)
122     loss[4].k := 240 {W/m/K}; (* aluminium, Ashby & Jones, Eng Matls 2, p.11 *)
123     loss[5].h := 50 {W/m^2/K};
124    
125     loss[1].D_1 := 0.05 {m}; (* pipe interior *)
126     loss[1].D_2 := 0.07 {m}; (* pipe exterior *)
127     loss[4].D_1 := 0.17 {m}; (* cover interior *)
128     loss[4].D_2 := 0.19 {m}; (* cover exterior *)
129     END values;
130 johnpye 612 END pipe_test;

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