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

Contents of /trunk/models/collocation.a4s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download)
Fri Oct 29 20:54:12 2004 UTC (15 years ago) by aw0a
File size: 4494 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 collocation.a4l
5
6 DELETE TYPES;
7 READ FILE "collocation.a4l";
8
9 COMPILE coll OF test_coll_column;
10 BROWSE {coll};
11 RUN {coll.values};
12
13 #################################################
14 # Here we initialize and solve the feed tray state so the
15 # relative volatilities can be used throughout the column.
16 #################################################
17
18 RUN {coll.Column.feed_tray.state.reset_to_fullthermo};
19
20 # The following lines give us a saturated liquid state
21
22 ASSIGN {coll.Column.feed_tray.state.phase_fraction['vapor'].fixed} TRUE {*};
23 ASSIGN {coll.Column.feed_tray.state.phase_fraction['vapor']} 0.0 {};
24 ASSIGN {coll.Column.feed_tray.state.T.fixed} FALSE {*};
25 SOLVE {coll.Column.feed_tray.state} WITH QRSlv;
26 DELETE SYSTEM;
27 RUN {coll.Column.propagate_feed_values};
28
29 ###################################################
30 # Here we solve the column at constant relative volatilities.
31 ###################################################
32
33 RUN {coll.Column.reset_to_massbal};
34 SOLVE {coll.Column} WITH QRSlv;
35
36 ###################################################
37 # Here we activate transform equations which yeild more
38 # accurate collocation solutions and resolve the model
39 ###################################################
40
41 RUN {coll.Column.trans_poly};
42 RUN {coll.Column.z_based_poly};
43 SOLVE {coll.Column} WITH QRSlv;
44
45 ######################################################
46 # Here we solve the column using thermodynamic corolations.
47 # This is a constant molal overflow calculation (Heat balance is
48 # not enforced on the trays).
49 ######################################################
50
51 RUN {coll.Column.reset_to_fullthermo};
52 SOLVE {coll.Column} WITH QRSlv;
53
54 ######################################################
55 # Here we solve the column using thermodynamic corolations
56 # and Heat balances on the trays.
57 ######################################################
58
59 RUN {coll.Column.reset_to_adiabatic};
60 RUN {coll.Column.zero_Q};
61 SOLVE {coll} WITH QRSlv;
62
63
64 ######################################################
65 # Here we change the reflux ratio several times, resolving the
66 # model at each increment.
67 ######################################################
68
69 RUN {coll.Column.scale_self};
70
71 ASSIGN {coll.Column.condenser.reflux_ratio} 4 {};
72 SOLVE {coll} WITH QRSlv;
73 ASSIGN {coll.Column.condenser.reflux_ratio} 6 {};
74 SOLVE {coll} WITH QRSlv;
75 ASSIGN {coll.Column.condenser.reflux_ratio} 8 {};
76 SOLVE {coll} WITH QRSlv;
77
78 ######################################################
79 # One of the benefits of collocation is that the number of trays
80 # can be changed without the need for a model recompilation.
81 # Here we change the number of trays in the stripping section
82 # and rectifying section from 10 to 14 and resolve
83 ######################################################
84
85 ASSIGN {coll.Column.s_stack[1]} 14 {};
86 ASSIGN {coll.Column.s_stack[2]} 14 {};
87 RUN {coll.Column.scale_self};
88 SOLVE {coll} WITH QRSlv;
89
90 ######################################################
91 # Here we generate and display two plots. Additional plots are
92 # available.
93 ######################################################
94
95 PLOT {coll.Column.T_Liq_diagram_e.plot};
96 SHOW LAST;
97 PLOT {coll.Column.Plot_xs};
98 SHOW LAST;
99
100 ########## collocation.a4s ends here ##########
101 #
102 # collocation.a4s
103 # by Ken Tyner
104 # May 13, 1998
105 # Part of the ASCEND Library
106 # $Date: 1998/06/17 20:08:28 $
107 # $Revision: 1.4 $
108 # $Author: mthomas $
109 # $Source: /afs/cs.cmu.edu/project/ascend/Repository/models/collocation.a4s,v $
110 #
111 # This file is part of the ASCEND Modeling Library.
112 #
113 # Copyright (C) 1998 Carnegie Mellon University
114 #
115 # The ASCEND Modeling Library is free software. You can redistribute
116 # it and/or modify it under the terms of the GNU General Public
117 # License as published by the Free Software Foundation---either
118 # version 2 of the License, or (at your option) any later version.
119 #
120 # The ASCEND Modeling Library is distributed in hope that it
121 # will be useful, but WITHOUT ANY WARRANTY--without even the implied
122 # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
123 # See the GNU General Public License for more details.
124 #
125 # You should have received a copy of the GNU General Public License
126 # along with the program. If not, write to the Free Software
127 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check
128 # the file named COPYING.

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