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

Annotation of /trunk/models/old_separation_demos.a4s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations) (download)
Fri Oct 29 20:54:12 2004 UTC (19 years, 7 months ago) by aw0a
File size: 6711 byte(s)
Setting up web subdirectory in repository
1 aw0a 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 object passing
5     #
6     # Parameterized flash and column test script
7    
8     DELETE TYPES;
9     READ FILE "ben/benplotcol.a4c";
10    
11     # C5/C6/C7 flash. Liquid feed, vapor and liquid products
12     COMPILE tvlf OF test_vapor_liquid_flash;
13     BROWSE {tvlf};
14     RUN tvlf.defaults;
15     RUN {tvlf.values};
16     ASSIGN tvlf.equilibrated FALSE;
17     RUN {tvlf.reset};
18     SOLVE {tvlf} WITH QRSlv;
19     DELETE SYSTEM;
20     ASSIGN tvlf.equilibrated TRUE;
21     RUN {tvlf.reset};
22     SOLVE {tvlf} WITH QRSlv;
23    
24     # Acetone-Benzene-Chloroform flash
25     COMPILE thvlf OF test_hard_vapor_liquid_flash;
26     BROWSE {thvlf};
27     RUN thvlf.defaults;
28     RUN {thvlf.values};
29     ASSIGN thvlf.equilibrated FALSE;
30     RUN {thvlf.reset};
31     SOLVE {thvlf} WITH QRSlv;
32     DELETE SYSTEM;
33     ASSIGN thvlf.equilibrated TRUE;
34     RUN {thvlf.reset};
35     SOLVE {thvlf} WITH QRSlv;
36    
37     # Internal Tray
38     COMPILE tt OF test_tray;
39     BROWSE {tt};
40     RUN tt.defaults;
41     RUN {tt.values};
42     ASSIGN tt.equilibrated FALSE;
43     RUN {tt.reset};
44     SOLVE {tt} WITH QRSlv;
45     DELETE SYSTEM
46     ASSIGN tt.equilibrated TRUE;
47     RUN {tt.reset};
48     SOLVE {tt} WITH QRSlv;
49     RUN tt.Tray.reset_to_adiabatic;
50     SOLVE {tt} WITH QRSlv;
51    
52     # "Simple" feed tray with 1 V/L feed.
53     COMPILE tft OF test_feed_tray;
54     BROWSE {tft};
55     RUN tft.defaults;
56     RUN {tft.values};
57     ASSIGN tft.equilibrated FALSE;
58     RUN {tft.reset};
59     SOLVE {tft} WITH QRSlv;
60     DELETE SYSTEM;
61     ASSIGN tft.equilibrated TRUE;
62     RUN {tft.reset};
63     SOLVE {tft} WITH QRSlv;
64     RUN {tft.Feed_tray.reset_to_adiabatic};
65     SOLVE {tft} WITH QRSlv;
66    
67     # "Simple" Condenser with 1 liquid product
68     COMPILE tc OF test_condenser;
69     BROWSE {tc};
70     RUN tc.defaults;
71     RUN {tc.values};
72     RUN {tc.reset};
73     SOLVE {tc} WITH QRSlv;
74    
75     # "Simple" Reboiler with 1 liquid product
76     COMPILE tr OF test_reboiler;
77     BROWSE {tr};
78     RUN tr.defaults;
79     RUN {tr.values};
80     ASSIGN tr.equilibrated FALSE;
81     RUN {tr.reset};
82     SOLVE {tr} WITH QRSlv;
83     DELETE SYSTEM;
84     ASSIGN tr.equilibrated TRUE;
85     RUN {tr.reset};
86     SOLVE {tr} WITH QRSlv;
87    
88     # Internal Tray Stack Model
89     COMPILE tts OF test_tray_stack;
90     BROWSE {tts};
91     RUN tts.defaults;
92     ASSIGN {tts.equilibrated} FALSE;
93     RUN {tts.reset};
94     SOLVE {tts} WITH QRSlv;
95     DELETE SYSTEM;
96     ASSIGN {tts.equilibrated} TRUE;
97     RUN {tts.reset};
98     SOLVE {tts} WITH QRSlv;
99     RUN {tts.reset_to_adiabatic};
100     SOLVE {tts} WITH QRSlv;
101    
102     # "Simple" Column Model
103     # Note that some of the solves in the following model
104     # may require a few more iterations than the solver
105     # gives by default, depending on the solver scaling
106     # and factorization and step control options.
107     # Just hit the Solve button again.
108    
109     COMPILE {tsc} OF {test_simple_column};
110     RUN tsc.defaults;
111     BROWSE {tsc};
112     RUN {tsc.values};
113    
114     # Configure to solve mass balances first
115     ASSIGN tsc.Equilibrated FALSE;
116     RUN {tsc.Column.reset};
117     SOLVE tsc;
118    
119     # Configure to solve mass and energy balances
120     # with slack Qin on each tray, fixed RR and BU.
121     # It might be easier to free BU (reboil_ratio) and
122     # specify the distillate.Ftot flow.
123     DELETE SYSTEM;
124     ASSIGN tsc.Equilibrated TRUE;
125     RUN {tsc.Column.reset};
126     SOLVE {tsc};
127    
128     # Configure to solve energy balanced column
129     # with fixed RR and BU and saturated liquid feed.
130     RUN {tsc.Column.reset_to_adiabatic};
131     SOLVE {tsc};
132    
133     COMPILE tmwdc OF mw_demo_column;
134     BROWSE {tmwdc};
135     RUN tmwdc.defaults;
136     RUN {tmwdc.mw_column.values};
137     RUN {tmwdc.mw_column.Column.reset_to_massbal};
138     SOLVE {tmwdc} WITH QRSlv;
139     RUN {tmwdc.mw_column.Column.reset_to_fullthermo};
140     SOLVE {tmwdc} WITH QRSlv;
141     RUN {tmwdc.mw_column.Column.reset_to_adiabatic};
142     SOLVE {tmwdc} WITH QRSlv;
143    
144     COMPILE tabcdc OF abc_demo_column;
145     BROWSE {tabcdc};
146     RUN tabcdc.defaults;
147     RUN tabcdc.abc_column.values;
148     RUN {tabcdc.abc_column.Column.reset_to_massbal};
149     SOLVE {tabcdc.abc_column.Column} WITH QRSlv;
150     RUN {tabcdc.abc_column.Column.reset_to_fullthermo};
151     SOLVE {tabcdc.abc_column.Column} WITH QRSlv;
152     RUN {tabcdc.abc_column.Column.reset_to_adiabatic};
153     SOLVE {tabcdc.abc_column.Column} WITH QRSlv;
154    
155     COMPILE tc567dc OF c567_demo_column;
156     BROWSE {tc567dc};
157     RUN tc567dc.defaults;
158     RUN {tc567dc.c567_column.values};
159     RUN {tc567dc.c567_column.Column.reset_to_massbal};
160     SOLVE {tc567dc} WITH QRSlv;
161     RUN tc567dc.c567_column.scale;
162     RUN {tc567dc.c567_column.Column.reset_to_fullthermo};
163     SOLVE {tc567dc} WITH QRSlv;
164     RUN tc567dc.c567_column.scale;
165     RUN {tc567dc.c567_column.Column.reset_to_adiabatic};
166     SOLVE {tc567dc} WITH QRSlv;
167    
168     COMPILE mwdpc OF mw_demo_plot_column;
169     BROWSE {mwdpc};
170     RUN mwdpc.defaults;
171     RUN {mwdpc.mw_column.values};
172     RUN {mwdpc.mw_column.Column.reset_to_massbal};
173     SOLVE {mwdpc} WITH QRSlv;
174     RUN {mwdpc.mw_column.Column.reset_to_fullthermo};
175     SOLVE {mwdpc} WITH QRSlv;
176     RUN {mwdpc.mw_column.Column.reset_to_adiabatic};
177     SOLVE {mwdpc} WITH QRSlv;
178    
179     PLOT {mwdpc.mw_column.Plot_K} ;
180     SHOW LAST;
181     PLOT {mwdpc.mw_column.Plot_x} ;
182     SHOW LAST;
183     PLOT {mwdpc.mw_column.Plot_y} ;
184     SHOW LAST;
185     PLOT {mwdpc.mw_column.Plot_P} ;
186     SHOW LAST;
187     PLOT {mwdpc.mw_column.Plot_T} ;
188     SHOW LAST;
189    
190    
191     COMPILE c567dpc OF c567_demo_plot_column;
192     BROWSE {c567dpc};
193     RUN c567dpc.defaults;
194     RUN {c567dpc.c567_column.values};
195     RUN {c567dpc.c567_column.Column.reset_to_massbal};
196     SOLVE {c567dpc} WITH QRSlv;
197     RUN {c567dpc.c567_column.Column.reset_to_fullthermo};
198     SOLVE {c567dpc} WITH QRSlv;
199     # Need more than the default iterations, or better scaling. Do iterations.
200     SOLVE {c567dpc} WITH QRSlv;
201     RUN {c567dpc.c567_column.Column.reset_to_adiabatic};
202     SOLVE {c567dpc} WITH QRSlv;
203     PLOT {c567dpc.c567_column.Plot_K} ;
204     SHOW LAST;
205     PLOT {c567dpc.c567_column.Plot_T} ;
206     SHOW LAST;
207     PLOT {c567dpc.c567_column.Plot_x} ;
208     SHOW LAST;
209     PLOT {c567dpc.c567_column.Plot_y} ;
210     SHOW LAST;
211     PLOT {c567dpc.c567_column.Plot_P} ;
212     SHOW LAST;
213    
214     ########## old_separation_demos.a4s ends here ##########
215     #
216     # old_separation_demos.a4s
217     # by Benjamin Allan
218     # March 30, 1997
219     # Part of the ASCEND Library
220     # $Date: 1998/06/17 20:08:36 $
221     # $Revision: 1.3 $
222     # $Author: mthomas $
223     # $Source: /afs/cs.cmu.edu/project/ascend/Repository/models/old_separation_demos.a4s,v $
224     #
225     # This file is part of the ASCEND Modeling Library.
226     #
227     # Copyright (C) 1997 - 1998 Carnegie Mellon University
228     #
229     # The ASCEND Modeling Library is free software. You can redistribute
230     # it and/or modify it under the terms of the GNU General Public
231     # License as published by the Free Software Foundation---either
232     # version 2 of the License, or (at your option) any later version.
233     #
234     # The ASCEND Modeling Library is distributed in hope that it
235     # will be useful, but WITHOUT ANY WARRANTY--without even the implied
236     # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
237     # See the GNU General Public License for more details.
238     #
239     # You should have received a copy of the GNU General Public License
240     # along with the program. If not, write to the Free Software
241     # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check
242     # the file named COPYING.

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