/[ascend]/trunk/models/vesselStudy.a4s
ViewVC logotype

Contents of /trunk/models/vesselStudy.a4s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download)
Fri Oct 29 20:54:12 2004 UTC (19 years, 10 months ago) by aw0a
File size: 3177 byte(s)
Setting up web subdirectory in repository
1 # This file is part of the ASCEND Modeling Library and is released
2 # under the GNU Public License as described at the end of this file.
3 #
4 # This file demonstrates the use of vesselStudy.a4c
5 # Case study demonstration for howto-model3
6
7 # Configuring the vessel model to be studied.
8 DELETE TYPES;
9 READ FILE "vesselMethods.a4c";
10
11 COMPILE V OF vessel;
12 BROWSE {V};
13 RUN {V.reset};
14 RUN {V.values};
15 SOLVE {V} WITH QRSlv;
16 BROWSE {V.metal_mass};
17
18 DELETE SYSTEM; # this line is hand written to avoid the dialog
19 ASSIGN {V.metal_mass.fixed} TRUE {};
20
21 # next line is not recorded but hand written.
22 ASSIGN {V.vessel_vol.fixed} FALSE {};
23
24 #The rest of this script is hand written.
25 # We use the scripting variable ASCEND
26 # supplies, ascGlobalVect(userhome) to
27 # find out where to put the data files.
28 # To make your scripts more portable,
29 # you should do likewise.
30
31 set dirname $ascGlobalVect(userhome)
32
33 # First study, fixed mass and wall thickness, variable H_to_D ratio
34 # Observe volumes.
35
36 STUDY {vessel_vol} \
37 IN {V} \
38 VARYING {{H_to_D_ratio} {0.1} {0.5} {0.8} {1} {1.5} {2} \
39 {3} {4} {8}} \
40 USING {QRSlv} \
41 OUTFILE $dirname/vvstudy.dat \
42 ERROR STOP;
43 ASCPLOT $dirname/vvstudy.dat;
44 ASCPLOT CLOSE;
45
46 # study areas and volume in the interesting region of 0.5 to 1.5
47 STUDY {vessel_vol} {end_area} {side_area} \
48 IN {V} \
49 VARYING {{H_to_D_ratio} {0.5} {0.6} {0.7} {0.8} {0.9} \
50 {1} {1.1} {1.2} {1.3} {1.4} {1.5}} \
51 USING {QRSlv} \
52 OUTFILE $dirname/vvstudy.dat \
53 ERROR STOP;
54 ASCPLOT $dirname/vvstudy.dat;
55 ASCPLOT CLOSE;
56
57 # study volume vs wall thickness and H_to_D_ratio
58 STUDY {vessel_vol} \
59 IN {V} \
60 VARYING \
61 {{H_to_D_ratio} {0.8} {0.9} {1} {1.1} {1.2} {1.3}} \
62 {{wall_thickness} {4 {mm}} {5 {mm}} {6 {mm}} {7 {mm}}} \
63 USING {QRSlv} \
64 OUTFILE $dirname/vvstudy.dat \
65 ERROR STOP;
66 ASCPLOT $dirname/vvstudy.dat;
67 ASCPLOT CLOSE;
68
69 # produce spreadsheet input file
70 asc_merge_data_files excel $dirname/vvs.txt $dirname/vvstudy.dat
71
72 # produce Matlab input file
73 asc_merge_data_files matlab $dirname/vvs.m $dirname/vvstudy.dat
74
75 ########## vesselStudy.a4s ends here ##########
76 #
77 # vesselStudy.a4s
78 # by Arthur W. Westerberg and Benjamin Allan
79 # May 1998
80 # Part of the ASCEND Library
81 # $Date: 1998/06/17 20:08:49 $
82 # $Revision: 1.3 $
83 # $Author: mthomas $
84 # $Source: /afs/cs.cmu.edu/project/ascend/Repository/models/vesselStudy.a4s,v $
85 #
86 # This file is part of the ASCEND Modeling Library.
87 #
88 # Copyright (C) 1998 Carnegie Mellon University
89 #
90 # The ASCEND Modeling Library is free software. You can redistribute
91 # it and/or modify it under the terms of the GNU General Public
92 # License as published by the Free Software Foundation---either
93 # version 2 of the License, or (at your option) any later version.
94 #
95 # The ASCEND Modeling Library is distributed in hope that it
96 # will be useful, but WITHOUT ANY WARRANTY--without even the implied
97 # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
98 # See the GNU General Public License for more details.
99 #
100 # You should have received a copy of the GNU General Public License
101 # along with the program. If not, write to the Free Software
102 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check
103 # the file named COPYING.

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