1 |
(* ASCEND modelling environment |
2 |
Copyright (C) 1998, 2007 Carnegie Mellon University |
3 |
|
4 |
This program is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU General Public License as published by |
6 |
the Free Software Foundation; either version 2, or (at your option) |
7 |
any later version. |
8 |
|
9 |
This program is distributed in the hope that it will be useful, |
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 |
GNU General Public License for more details. |
13 |
|
14 |
You should have received a copy of the GNU General Public License |
15 |
along with this program; if not, write to the Free Software |
16 |
Foundation, Inc., 59 Temple Place - Suite 330, |
17 |
Boston, MA 02111-1307, USA. |
18 |
*) |
19 |
(* |
20 |
by Arthur W. Westerberg |
21 |
THIS FILE IS AUTO-IMPORTED INTO THE ASCEND MANUAL! BE CAREFUL WITH EDITS. |
22 |
*) |
23 |
REQUIRE "atoms.a4l"; |
24 |
|
25 |
MODEL vessel; |
26 |
NOTES |
27 |
'author' SELF {Arthur W. Westerberg} |
28 |
'creation date' SELF {May, 1998} |
29 |
END NOTES; |
30 |
|
31 |
(* variables *) |
32 |
side_area "the area of the cylindrical side wall of the vessel", |
33 |
end_area "the area of the flat ends of the vessel" |
34 |
IS_A area; |
35 |
|
36 |
vessel_vol "the volume contained within the cylindrical vessel", |
37 |
wall_vol "the volume of the walls for the vessel" |
38 |
IS_A volume; |
39 |
|
40 |
wall_thickness "the thickness of all of the vessel walls", |
41 |
H "the vessel height (of the cylindrical side walls)", |
42 |
D "the vessel diameter" |
43 |
IS_A distance; |
44 |
|
45 |
H_to_D_ratio "the ratio of vessel height to diameter" |
46 |
IS_A factor; |
47 |
|
48 |
metal_density "density of the metal from which the vessel |
49 |
is constructed" |
50 |
IS_A mass_density; |
51 |
|
52 |
metal_mass "the mass of the metal in the walls of the vessel" |
53 |
IS_A mass; |
54 |
|
55 |
(* equations *) |
56 |
FlatEnds: end_area = 1{PI} * D^2 / 4; |
57 |
Sides: side_area = 1{PI} * D * H; |
58 |
Cylinder: vessel_vol = end_area * H; |
59 |
Metal_volume: (side_area + 2 * end_area) * wall_thickness = wall_vol; |
60 |
HD_definition: D * H_to_D_ratio = H; |
61 |
VesselMass: metal_mass = metal_density * wall_vol; |
62 |
|
63 |
METHODS |
64 |
METHOD specify; |
65 |
NOTES |
66 |
'purpose' SELF {to fix four variables and make the problem well-posed} |
67 |
END NOTES; |
68 |
FIX vessel_vol; |
69 |
FIX H_to_D_ratio; |
70 |
FIX wall_thickness; |
71 |
FIX metal_density; |
72 |
END specify; |
73 |
|
74 |
METHOD values; |
75 |
NOTES |
76 |
'purpose' SELF {to set the values for the fixed variables} |
77 |
END NOTES; |
78 |
H_to_D_ratio := 2; |
79 |
vessel_vol := 250 {ft^3}; |
80 |
wall_thickness := 5 {mm}; |
81 |
metal_density := 5000 {kg/m^3}; |
82 |
END values; |
83 |
|
84 |
METHOD bound_self; |
85 |
END bound_self; |
86 |
|
87 |
METHOD scale_self; |
88 |
END scale_self; |
89 |
|
90 |
METHOD default_self; |
91 |
D := 1 {m}; |
92 |
H := 1 {m}; |
93 |
H_to_D_ratio := 1; |
94 |
vessel_vol := 1 {m^3}; |
95 |
wall_thickness := 5 {mm}; |
96 |
metal_density := 5000 {kg/m^3}; |
97 |
END default_self; |
98 |
END vessel; |
99 |
|
100 |
ADD NOTES IN vessel; |
101 |
'description' SELF {This model relates the dimensions of a |
102 |
cylindrical vessel -- e.g., diameter, height and wall thickness |
103 |
to the volume of metal in the walls. It uses a thin wall |
104 |
assumption -- i.e., that the volume of metal is the area of |
105 |
the vessel times the wall thickness.} |
106 |
'purpose' SELF {to illustrate the insertion of notes into a model} |
107 |
END NOTES; |