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

Contents of /trunk/models/vesselParams.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 576 - (show annotations) (download) (as text)
Tue May 9 03:42:08 2006 UTC (14 years, 2 months ago) by johnpye
File MIME type: text/x-ascend
File size: 3781 byte(s)
Changed all cases of *.fixed := {TRUE,FALSE} to 'FIX' and 'FREE' statements.
1 REQUIRE "atoms.a4l";
2 (* => atoms.a4l, measures.a4l, system.a4l, basemodel.a4l *)
3 PROVIDE "vesselParams.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 vessel_vol "the volume contained within the cylindrical vessel"
11 WILL_BE volume;
12 wall_thickness "the thickness of all of the vessel walls"
13 WILL_BE distance;
14 metal_density "density of the metal from which the vessel
15 is constructed"
16 WILL_BE mass_density;
17 H_to_D_ratio "the ratio of vessel height to diameter"
18 WILL_BE factor;
19 metal_mass "the mass of the metal in the walls of the vessel"
20 WILL_BE mass;
21 );
22
23 NOTES
24 'author' SELF {Arthur W. Westerberg}
25 'creation date' SELF {May, 1998}
26 END NOTES;
27
28 (* variables *)
29 side_area "the area of the cylindrical side wall of the vessel",
30 end_area "the area of the flat ends of the vessel"
31 IS_A area;
32
33 wall_vol "the volume of the walls for the vessel"
34 IS_A volume;
35 H "the vessel height (of the cylindrical side walls)",
36 D "the vessel diameter"
37 IS_A distance;
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 FIX vessel_vol;
54 FIX H_to_D_ratio;
55 FIX wall_thickness;
56 FIX metal_density;
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 bound_all;
73 RUN bound_self;
74 END bound_all;
75
76 METHOD scale_self;
77 END scale_self;
78
79 METHOD scale_all;
80 RUN scale_self;
81 END scale_all;
82
83 METHOD default_self;
84 D := 1 {m};
85 H := 1 {m};
86 END default_self;
87
88 METHOD default_all;
89 RUN default_self;
90 vessel_vol := 1 {m^3};
91 wall_thickness := 5 {mm};
92 metal_density := 5000 {kg/m^3};
93 H_to_D_ratio := 1;
94 END default_all;
95
96 END vessel;
97
98 ADD NOTES IN vessel;
99 'description' SELF {This model relates the dimensions of a
100 cylindrical vessel -- e.g., diameter, height and wall thickness
101 to the volume of metal in the walls. It uses a thin wall
102 assumption -- i.e., that the volume of metal is the area of
103 the vessel times the wall thickness.}
104 'purpose' SELF {to illustrate the insertion of notes into a model}
105 END NOTES;
106
107
108 (*
109 * vesselParams.a4c
110 * by Arthur W. Westerberg
111 * Part of the ASCEND Library
112 * $Date: 1998/06/17 19:35:04 $
113 * $Revision: 1.2 $
114 * $Author: mthomas $
115 * $Source: /afs/cs.cmu.edu/project/ascend/Repository/models/vesselParams.a4c,v $
116 *
117 * This file is part of the ASCEND Modeling Library.
118 *
119 * Copyright (C) 1998 Carnegie Mellon University
120 *
121 * The ASCEND Modeling Library is free software; you can redistribute
122 * it and/or modify it under the terms of the GNU General Public
123 * License as published by the Free Software Foundation; either
124 * version 2 of the License, or (at your option) any later version.
125 *
126 * The ASCEND Modeling Library is distributed in hope that it will
127 * be useful, but WITHOUT ANY WARRANTY; without even the implied
128 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
129 * See the GNU General Public License for more details.
130 *
131 * You should have received a copy of the GNU General Public License
132 * along with the program; if not, write to the Free Software
133 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the
134 * file named COPYING.
135 *)

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