1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
REQUIRE "atoms.a4l";
(* => atoms.a4l, measures.a4l, system.a4l, basemodel.a4l *)
PROVIDE "vesselMethods.a4c";
(*
* This file is part of the ASCEND Modeling Library and is released
* under the GNU Public License as described at the end of this file.
*)
MODEL vessel;
NOTES
'author' SELF {Arthur W. Westerberg}
'creation date' SELF {May, 1998}
END NOTES;
(* variables *)
side_area "the area of the cylindrical side wall of the vessel",
end_area "the area of the flat ends of the vessel"
IS_A area;
vessel_vol "the volume contained within the cylindrical vessel",
wall_vol "the volume of the walls for the vessel"
IS_A volume;
wall_thickness "the thickness of all of the vessel walls",
H "the vessel height (of the cylindrical side walls)",
D "the vessel diameter"
IS_A distance;
H_to_D_ratio "the ratio of vessel height to diameter"
IS_A factor;
metal_density "density of the metal from which the vessel
is constructed"
IS_A mass_density;
metal_mass "the mass of the metal in the walls of the vessel"
IS_A mass;
(* equations *)
FlatEnds: end_area = 1{PI} * D^2 / 4;
Sides: side_area = 1{PI} * D * H;
Cylinder: vessel_vol = end_area * H;
Metal_volume: (side_area + 2 * end_area) * wall_thickness = wall_vol;
HD_definition: D * H_to_D_ratio = H;
VesselMass: metal_mass = metal_density * wall_vol;
METHODS
METHOD specify;
NOTES
'purpose' SELF {to fix four variables and make the problem well-posed}
END NOTES;
vessel_vol.fixed := TRUE;
H_to_D_ratio.fixed := TRUE;
wall_thickness.fixed := TRUE;
metal_density.fixed := TRUE;
END specify;
METHOD values;
NOTES
'purpose' SELF {to set the values for the fixed variables}
END NOTES;
H_to_D_ratio := 2;
vessel_vol := 250 {ft^3};
wall_thickness := 5 {mm};
metal_density := 5000 {kg/m^3};
END values;
METHOD bound_self;
END bound_self;
METHOD scale_self;
END scale_self;
METHOD default_self;
D := 1 {m};
H := 1 {m};
H_to_D_ratio := 1;
vessel_vol := 1 {m^3};
wall_thickness := 5 {mm};
metal_density := 5000 {kg/m^3};
END default_self;
END vessel;
ADD NOTES IN vessel;
'description' SELF {This model relates the dimensions of a
cylindrical vessel -- e.g., diameter, height and wall thickness
to the volume of metal in the walls. It uses a thin wall
assumption -- i.e., that the volume of metal is the area of
the vessel times the wall thickness.}
'purpose' SELF {to illustrate the insertion of notes into a model}
END NOTES;
(*
* vesselMethods.a4c
* by Arthur W. Westerberg
* Part of the ASCEND Library
* $Date: 1998/06/17 19:35:03 $
* $Revision: 1.2 $
* $Author: mthomas $
* $Source: /afs/cs.cmu.edu/project/ascend/Repository/models/vesselMethods.a4c,v $
*
* This file is part of the ASCEND Modeling Library.
*
* Copyright (C) 1998 Carnegie Mellon University
*
* The ASCEND Modeling Library is free software; you can redistribute
* it and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* The ASCEND Modeling Library is distributed in hope that it
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check
* the file named COPYING.
*)
|