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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 612 - (hide annotations) (download) (as text)
Wed May 17 02:51:33 2006 UTC (18 years, 9 months ago) by johnpye
File MIME type: text/x-ascend
File size: 2848 byte(s)
This revision causes a segfault when you mouseover the incidence
matrix!
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 611 FOR i IN [1..n] CREATE
80     (* 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 611 loss[i].q,loss[i-1].q ARE_THE_SAME;
85 johnpye 612 END FOR;
86    
87     METHODS
88     METHOD default_self;
89     RUN reset; RUN values;
90     END default_self;
91 johnpye 611
92     METHOD specify;
93     FIX loss[1].h;
94     FIX loss[2..4].k;
95     FIX loss[5].h;
96    
97     FIX loss[1,3,5].D_1;
98     END specify;
99    
100     METHOD values;
101     loss[1].h := 1000 {W/m^2/K};
102     loss[2].k := 40 {W/m/K}; (* 'alloy steel', Ashby & Jones, Eng Matls 2, p.11 *)
103     loss[3].k := 0.05 {W/m/K}; (* Masud's figure for lagging *)
104     loss[4].k := 240 {W/m/K}; (* aluminium, Ashby & Jones, Eng Matls 2, p.11 *)
105     loss[5].h := 50 {W/m^2/K};
106    
107     loss[1].D_1 := 0.05 {m}; (* pipe interior *)
108     loss[1].D_2 := 0.07 {m}; (* pipe exterior *)
109     loss[4].D_1 := 0.17 {m}; (* cover interior *)
110     loss[4].D_2 := 0.19 {m}; (* cover exterior *)
111     END values;
112 johnpye 612 END pipe_test;

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