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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 611 - (show annotations) (download) (as text)
Tue May 16 08:27:05 2006 UTC (16 years, 4 months ago) by johnpye
File MIME type: text/x-ascend
File size: 3241 byte(s)
Adding a simple model for radial heat loss, eg from an insulated pipe. Under development.
1 (* 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
64 (*
65 A sequence of radial losses in series
66 *)
67 MODEL radial_losses(
68 n WILL_BE integer;
69 ) REFINES radial_loss;
70
71 loss[1..n] IS_A radial_loss;
72
73 (* all the same length *)
74 L, loss[1..n].L ARE_THE_SAME;
75
76 (* the ID of the whole lot equals the ID for the first element *)
77 D_1, loss[1].D_1 ARE_THE_SAME;
78
79 (* the OD of the whole lot equals the OD of the last element *)
80 D_2, loss[n].D_2 ARE_THE_SAME;
81
82 FOR i IN [1..n] CREATE
83 (* layers are touching *)
84 loss[i].D_1, loss[i-1].D_2 ARE_THE_SAME;
85 (* heat rate is uniform *)
86 loss[i].q,loss[i-1].q ARE_THE_SAME;
87 END FOR;
88
89 END radial_losses;
90
91 (*
92 Sample model: a stainless steel pipe
93 with lagging (aka insulation) and a thin steel
94 sheel.
95 *)
96 MODEL test_lagged_pipe REFINES radial_losses(
97 n IS_A integer_constant;
98 )
99 n:=5;
100
101 loss[1] IS_A convection_boundary;
102 loss[2] IS_A wall_conduction;
103 loss[3] IS_A wall_conduction;
104 loss[4] IS_A wall_conduction;
105 loss[5] IS_A convection_boundary;
106
107 METHODS
108 METHOD specify;
109 FIX loss[1].h;
110 FIX loss[2..4].k;
111 FIX loss[5].h;
112
113 FIX loss[1,3,5].D_1;
114 END specify;
115
116 METHOD values;
117 loss[1].h := 1000 {W/m^2/K};
118 loss[2].k := 40 {W/m/K}; (* 'alloy steel', Ashby & Jones, Eng Matls 2, p.11 *)
119 loss[3].k := 0.05 {W/m/K}; (* Masud's figure for lagging *)
120 loss[4].k := 240 {W/m/K}; (* aluminium, Ashby & Jones, Eng Matls 2, p.11 *)
121 loss[5].h := 50 {W/m^2/K};
122
123 loss[1].D_1 := 0.05 {m}; (* pipe interior *)
124 loss[1].D_2 := 0.07 {m}; (* pipe exterior *)
125 loss[4].D_1 := 0.17 {m}; (* cover interior *)
126 loss[4].D_2 := 0.19 {m}; (* cover exterior *)
127 END values;
128 END test_lagged_pipe;

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