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

Contents of /trunk/models/vesselPlain.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1294 - (show annotations) (download) (as text)
Mon Feb 26 22:44:04 2007 UTC (12 years, 9 months ago) by johnpye
File MIME type: text/x-ascend
File size: 1820 byte(s)
Added build() inside Simulation::check() function.
Updated syntax/comments in vessel, vesselPlain models (need to revisit the tutorial now).
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 REQUIRE "atoms.a4l"; (* => atoms.a4l, measures.a4l, system.a4l, basemodel.a4l *)
20 (*
21 by Art Westerberg, 1998
22
23 This model illustrates how variables are declared and relations written.
24 The model contains no initialisation for any of the variable values, and
25 does not specify which variables are 'fixed' and which ones should be
26 solved for. For this reason, when loaded, this model will cause problems
27 that ASCEND will attempt to resolve through warnings to the user.
28 *)
29
30 MODEL vesselPlain;
31
32 (* variables *)
33 side_area, end_area IS_A area;
34 vessel_vol, wall_vol IS_A volume;
35 wall_thickness, H, D IS_A distance;
36 H_to_D_ratio IS_A factor;
37 metal_density IS_A mass_density;
38 metal_mass IS_A mass;
39
40 (* equations *)
41 FlatEnds: end_area = 1{PI} * D^2 / 4;
42 Sides: side_area = 1{PI} * D * H;
43 Cylinder: vessel_vol = end_area * H;
44 Metal_volume: (side_area + 2 * end_area) * wall_thickness = wall_vol;
45 HD_definition: D * H_to_D_ratio = H;
46 VesselMass: metal_mass = metal_density * wall_vol;
47
48 END vesselPlain;

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