/[ascend]/trunk/models/vesselMethods.a4c
ViewVC logotype

Contents of /trunk/models/vesselMethods.a4c

Parent Directory Parent Directory | Revision Log Revision Log


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

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