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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2649 - (hide annotations) (download) (as text)
Wed Dec 12 12:39:25 2012 UTC (12 years, 2 months ago) by jpye
File MIME type: text/x-ascend
File size: 3626 byte(s)
Fixing GPL header, removing postal address (rpmlint incorrect-fsf-address)
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 jpye 2649 You should have received a copy of the GNU General Public License
17     along with this program. If not, see <http://www.gnu.org/licenses/>.
18 johnpye 611 *)(**
19     This is a simple model for computing the
20     steady-state temperature and heat loss profile
21     of a multi-layered pipe-plus-insulation
22    
23     by John Pye
24     *)
25    
26     REQUIRE "atoms.a4l";
27     REQUIRE "johnpye/thermo_types.a4c";
28    
29     MODEL radial_loss;
30     D_1 IS_A distance;
31     D_2 IS_A distance;
32     q IS_A energy_rate;
33     L IS_A distance;
34     T_1, T_2 IS_A temperature;
35     METHODS
36     METHOD specify;
37     FIX D_1, D_2;
38     END specify;
39     END radial_loss;
40    
41     (*
42     Wall conduction
43     *)
44     MODEL wall_conduction REFINES radial_loss;
45     k IS_A thermal_conductivity;
46    
47 johnpye 617 q = 2 * 1{PI} * L * k * (T_1 - T_2) / ln(D_2/D_1);
48 johnpye 611
49     END wall_conduction;
50    
51     (*
52     Convection boundary
53     *)
54     MODEL convection_boundary REFINES radial_loss;
55     h IS_A heat_transfer_coefficient;
56     D_1, D_2 ARE_THE_SAME;
57 johnpye 617
58     (* heat loss is positive if T_1 > T_2 *)
59 johnpye 611 q = h * 1{PI} * D_1 * (T_1 - T_2);
60    
61     END convection_boundary;
62 johnpye 612
63 johnpye 617 (**
64     This modes a thick pipe with internal flow, surrounded by 100mm of
65     insulation and a thin external metal shell. In other words, a fairly
66     typical lagged high-temperature pipe as used in power and chemical plant
67     applications.
68    
69     Solve the model, then examine the values of T_1 and T_2 for each layer.
70    
71     @TODO add ability to plot the temperature versus radial distance...
72     *)
73 johnpye 612 MODEL pipe_test REFINES radial_loss;
74    
75     n IS_A integer_constant;
76     n:==5;
77    
78 johnpye 617 U IS_A heat_transfer_coefficient;
79     q = U * (1{PI} * D_1) * (loss[1].T_2 - T_2);
80    
81 johnpye 612 loss[1..5] IS_A radial_loss;
82    
83     loss[1] IS_REFINED_TO convection_boundary;
84     loss[2] IS_REFINED_TO wall_conduction;
85     loss[3] IS_REFINED_TO wall_conduction;
86     loss[4] IS_REFINED_TO wall_conduction;
87     loss[5] IS_REFINED_TO convection_boundary;
88    
89     L, loss[1..5].L ARE_THE_SAME;
90    
91 johnpye 615 FOR i IN [2..n] CREATE
92 johnpye 611 (* layers are touching *)
93     loss[i].D_1, loss[i-1].D_2 ARE_THE_SAME;
94 johnpye 612
95     (* steady state: heat rate is uniform *)
96 johnpye 615 loss[i].q,loss[i-1].q ARE_THE_SAME;
97    
98 johnpye 616 loss[i].T_1, loss[i-1].T_2 ARE_THE_SAME;
99    
100 johnpye 612 END FOR;
101    
102 johnpye 616 loss[1].D_1, D_1 ARE_THE_SAME;
103 johnpye 615 loss[n].D_2, D_2 ARE_THE_SAME;
104    
105 johnpye 616 loss[1].T_1, T_1 ARE_THE_SAME;
106     loss[n].T_2, T_2 ARE_THE_SAME;
107 johnpye 615
108 johnpye 616 loss[1].q, q ARE_THE_SAME;
109 johnpye 615
110 johnpye 612 METHODS
111     METHOD default_self;
112     RUN reset; RUN values;
113     END default_self;
114 johnpye 611
115     METHOD specify;
116     FIX loss[1].h;
117     FIX loss[2..4].k;
118 johnpye 616 FIX loss[5].h;
119     FIX L;
120     FIX T_1, T_2;
121 johnpye 611
122 johnpye 615 FIX loss[2].D_1, loss[2].D_2;
123     FIX loss[4].D_1, loss[4].D_2;
124 johnpye 611 END specify;
125    
126 johnpye 615 METHOD values;
127 johnpye 616 L := 1 {m};
128     T_1 := 250 {K} + 273.15 {K};
129     T_2 := 25 {K} + 273.15 {K};
130 johnpye 615
131 johnpye 611 loss[1].h := 1000 {W/m^2/K};
132     loss[2].k := 40 {W/m/K}; (* 'alloy steel', Ashby & Jones, Eng Matls 2, p.11 *)
133     loss[3].k := 0.05 {W/m/K}; (* Masud's figure for lagging *)
134     loss[4].k := 240 {W/m/K}; (* aluminium, Ashby & Jones, Eng Matls 2, p.11 *)
135     loss[5].h := 50 {W/m^2/K};
136    
137 johnpye 617 loss[2].D_1 := 0.05 {m}; (* pipe interior *)
138     loss[2].D_2 := 0.07 {m}; (* pipe exterior *)
139 johnpye 611 loss[4].D_1 := 0.17 {m}; (* cover interior *)
140     loss[4].D_2 := 0.19 {m}; (* cover exterior *)
141     END values;
142 johnpye 612 END pipe_test;

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