| 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 |
(* heat loss is positive if T_1 > T_2 *) |
| 61 |
q = h * 1{PI} * D_1 * (T_1 - T_2); |
| 62 |
|
| 63 |
END convection_boundary; |
| 64 |
|
| 65 |
(** |
| 66 |
This modes a thick pipe with internal flow, surrounded by 100mm of |
| 67 |
insulation and a thin external metal shell. In other words, a fairly |
| 68 |
typical lagged high-temperature pipe as used in power and chemical plant |
| 69 |
applications. |
| 70 |
|
| 71 |
Solve the model, then examine the values of T_1 and T_2 for each layer. |
| 72 |
|
| 73 |
@TODO add ability to plot the temperature versus radial distance... |
| 74 |
*) |
| 75 |
MODEL pipe_test REFINES radial_loss; |
| 76 |
|
| 77 |
n IS_A integer_constant; |
| 78 |
n:==5; |
| 79 |
|
| 80 |
U IS_A heat_transfer_coefficient; |
| 81 |
q = U * (1{PI} * D_1) * (loss[1].T_2 - T_2); |
| 82 |
|
| 83 |
loss[1..5] IS_A radial_loss; |
| 84 |
|
| 85 |
loss[1] IS_REFINED_TO convection_boundary; |
| 86 |
loss[2] IS_REFINED_TO wall_conduction; |
| 87 |
loss[3] IS_REFINED_TO wall_conduction; |
| 88 |
loss[4] IS_REFINED_TO wall_conduction; |
| 89 |
loss[5] IS_REFINED_TO convection_boundary; |
| 90 |
|
| 91 |
L, loss[1..5].L ARE_THE_SAME; |
| 92 |
|
| 93 |
FOR i IN [2..n] CREATE |
| 94 |
(* layers are touching *) |
| 95 |
loss[i].D_1, loss[i-1].D_2 ARE_THE_SAME; |
| 96 |
|
| 97 |
(* steady state: heat rate is uniform *) |
| 98 |
loss[i].q,loss[i-1].q ARE_THE_SAME; |
| 99 |
|
| 100 |
loss[i].T_1, loss[i-1].T_2 ARE_THE_SAME; |
| 101 |
|
| 102 |
END FOR; |
| 103 |
|
| 104 |
loss[1].D_1, D_1 ARE_THE_SAME; |
| 105 |
loss[n].D_2, D_2 ARE_THE_SAME; |
| 106 |
|
| 107 |
loss[1].T_1, T_1 ARE_THE_SAME; |
| 108 |
loss[n].T_2, T_2 ARE_THE_SAME; |
| 109 |
|
| 110 |
loss[1].q, q ARE_THE_SAME; |
| 111 |
|
| 112 |
METHODS |
| 113 |
METHOD default_self; |
| 114 |
RUN reset; RUN values; |
| 115 |
END default_self; |
| 116 |
|
| 117 |
METHOD specify; |
| 118 |
FIX loss[1].h; |
| 119 |
FIX loss[2..4].k; |
| 120 |
FIX loss[5].h; |
| 121 |
FIX L; |
| 122 |
FIX T_1, T_2; |
| 123 |
|
| 124 |
FIX loss[2].D_1, loss[2].D_2; |
| 125 |
FIX loss[4].D_1, loss[4].D_2; |
| 126 |
END specify; |
| 127 |
|
| 128 |
METHOD values; |
| 129 |
L := 1 {m}; |
| 130 |
T_1 := 250 {K} + 273.15 {K}; |
| 131 |
T_2 := 25 {K} + 273.15 {K}; |
| 132 |
|
| 133 |
loss[1].h := 1000 {W/m^2/K}; |
| 134 |
loss[2].k := 40 {W/m/K}; (* 'alloy steel', Ashby & Jones, Eng Matls 2, p.11 *) |
| 135 |
loss[3].k := 0.05 {W/m/K}; (* Masud's figure for lagging *) |
| 136 |
loss[4].k := 240 {W/m/K}; (* aluminium, Ashby & Jones, Eng Matls 2, p.11 *) |
| 137 |
loss[5].h := 50 {W/m^2/K}; |
| 138 |
|
| 139 |
loss[2].D_1 := 0.05 {m}; (* pipe interior *) |
| 140 |
loss[2].D_2 := 0.07 {m}; (* pipe exterior *) |
| 141 |
loss[4].D_1 := 0.17 {m}; (* cover interior *) |
| 142 |
loss[4].D_2 := 0.19 {m}; (* cover exterior *) |
| 143 |
END values; |
| 144 |
END pipe_test; |