source: trunk/eml/stage_separators/column_Eff.mso @ 837

Last change on this file since 837 was 593, checked in by Argimiro Resende Secchi, 15 years ago

Adding efficiency models in distillation column (by Josias)

File size: 10.6 KB
Line 
1#*-------------------------------------------------------------------
2* Models of Column Section with Tray Efficiency Prediction
3* Author: Josias J. Junges
4*-------------------------------------------------------------------*#
5
6using "tray_Eff";
7using "reboiler";
8using "condenser";
9using "mixers_splitters/splitter";
10using "tank";
11using "pressure_changers/pump";
12
13Model Section_Column_EffEmp
14        ATTRIBUTES
15        Pallete         = true;
16        Icon            = "icon/SectionColumn";
17        Brief           = "Model of a column section - Tray Efficiency Prediction";
18        Info            =
19"== Model of a column section containing ==
20* NTrays trays.
21       
22== Specify ==
23* the feed stream of each tray (Inlet);
24
25* the InletL stream of the top tray;
26* the InletV stream of the bottom tray.
27       
28== Initial Conditions ==
29* the trays temperature (OutletL.T);
30* the trays liquid level (Level) OR the trays liquid flow (OutletL.F);
31* (NoComps - 1) OutletL (OR OutletV) compositions for each tray.
32";
33       
34        PARAMETERS
35        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
36        outer NComp as Integer;
37        NTrays as Integer(Brief="Number of trays", Default=2);
38        topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1);
39        top as Integer(Brief="Number of top tray");
40        bot as Integer(Brief="Number of bottom tray");
41        xas as Integer(Brief="Adjacent above stage vapour composition");
42
43        SET
44        top = (NTrays-1)*(1-topdown)/2+1;
45        bot = NTrays/top;
46       
47        VARIABLES
48        trays(NTrays) as trayEffEmp;
49
50        CONNECTIONS
51        trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV;
52        trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL;
53       
54        EQUATIONS
55       
56        if NComp > 2 then
57       
58                (trays(top).LoutLk-trays(top).LinLK)*trays(top).m=(trays(top).VoutLk-xas);
59       
60                for i in [(top+1):NTrays]
61                (trays(i).LoutLk-trays(i).LinLK)*trays(i).m=(trays(i).VoutLk-trays(i-1).VoutLk);
62                end
63       
64        else
65       
66                (trays(top).OutletL.z(1)-trays(top).InletL.z(1))*trays(top).m=(trays(top).OutletV.z(1)-xas);
67       
68                for i in [(top+1):NTrays]
69                (trays(i).OutletL.z(1)-trays(i).InletL.z(1))*trays(i).m=(trays(i).OutletV.z(1)-trays(i-1).OutletV.z(1));
70                end
71        end
72       
73end
74
75Model Section_Column_EffFund
76        ATTRIBUTES
77        Pallete         = true;
78        Icon            = "icon/SectionColumn";
79        Brief           = "Model of a column section - Tray Efficiency Prediction";
80        Info            =
81"== Model of a column section containing ==
82* NTrays trays.
83       
84== Specify ==
85* the feed stream of each tray (Inlet);
86
87* the InletL stream of the top tray;
88* the InletV stream of the bottom tray.
89       
90== Initial Conditions ==
91* the trays temperature (OutletL.T);
92* the trays liquid level (Level) OR the trays liquid flow (OutletL.F);
93* (NoComps - 1) OutletL (OR OutletV) compositions for each tray.
94";
95       
96        PARAMETERS
97        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
98        outer NComp as Integer;
99        NTrays as Integer(Brief="Number of trays", Default=2);
100        topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1);
101        top as Integer(Brief="Number of top tray");
102        bot as Integer(Brief="Number of bottom tray");
103        xas as Real(Brief="Adjacent above stage vapour composition");
104
105        SET
106        top = (NTrays-1)*(1-topdown)/2+1;
107        bot = NTrays/top;
108       
109        VARIABLES
110        trays(NTrays) as trayEffFund;
111
112        CONNECTIONS
113        trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV;
114        trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL;
115       
116        EQUATIONS
117       
118        if NComp > 2 then
119       
120                (trays(top).LoutLk-trays(top).LinLK)*trays(top).m=(trays(top).VoutLk-xas);
121       
122                for i in [(top+1):NTrays]
123                (trays(i).LoutLk-trays(i).LinLK)*trays(i).m=(trays(i).VoutLk-trays(i-1).VoutLk);
124                end
125       
126        else
127       
128                (trays(top).OutletL.z(1)-trays(top).InletL.z(1))*trays(top).m=(trays(top).OutletV.z(1)-xas);
129       
130                for i in [(top+1):NTrays]
131                (trays(i).OutletL.z(1)-trays(i).InletL.z(1))*trays(i).m=(trays(i).OutletV.z(1)-trays(i-1).OutletV.z(1));
132                end
133        end
134end
135
136#*----------------------------------------------------------------------
137* Models of Column with Tray Efficiency Prediction
138* Author: Josias J. Junges
139*---------------------------------------------------------------------*#
140Model Distillation_kettle_cond_EffEmp
141        ATTRIBUTES
142        Pallete         = true;
143        Icon            = "icon/DistillationKettleCond";
144        Brief           = "Model of a distillation column with dynamic condenser and dynamic reboiler-Tray Efficiency Prediction";
145        Info            =
146"== Specify ==
147* the feed stream of each tray (Inlet);
148
149* the pump pressure difference;
150* the heat supllied in reboiler and condenser;
151* the condenser vapor outlet flow (OutletV.F);
152* the reboiler liquid outlet flow (OutletL.F);
153* both splitter outlet flows OR one of the splitter outlet flows and the splitter frac.
154       
155== Initial Conditions ==
156* the trays temperature (OutletL.T);
157* the trays liquid level (Level) OR the trays liquid flow (OutletL.F);
158* (NoComps - 1) OutletL (OR OutletV) compositions for each tray;
159       
160* the condenser temperature (OutletL.T);
161* the condenser liquid level (Level);
162* (NoComps - 1) OutletL (OR OutletV) compositions;
163       
164* the reboiler temperature (OutletL.T);
165* the reboiler liquid level (Level);
166* (NoComps - 1) OutletL (OR OutletV) compositions.
167";
168       
169        PARAMETERS
170        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
171        outer NComp as Integer;
172        NTrays as Integer(Brief="Number of trays", Default=2);
173        topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1);
174        top as Integer(Brief="Number of top tray");
175        bot as Integer(Brief="Number of bottom tray");
176        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
177        outer iLK as Integer (Brief="Pseudo-binary ligth key index");
178        outer iHK as Integer (Brief="Pseudo-binary heavy key index");   
179       
180        SET
181        top = (NTrays-1)*(1-topdown)/2+1;
182        bot = NTrays/top;
183       
184        VARIABLES
185        trays(NTrays) as trayEffEmp;
186        cond as condenser;
187        reb as reboiler;
188        sptop as splitter;
189        pump1 as pump;
190        alfaTopo as Real;
191        condVoutLk as positive (Brief="Pseudo-binary approach");
192       
193        EQUATIONS
194        switch VapourFlow
195                case "on":
196                cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
197                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
198                when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
199               
200                case "off":
201                cond.InletV.F = 0 * 'mol/s';
202                when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
203        end     
204       
205        "Condenser pseudo-binary approach"
206        condVoutLk=cond.OutletV.z(iLK)/(cond.OutletV.z(iLK)+cond.OutletV.z(iHK));
207       
208        CONNECTIONS
209        #vapor
210        reb.OutletV to trays(bot).InletV;
211        trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV;
212        trays(top).OutletV to cond.InletV;
213       
214        #liquid
215        cond.OutletL to sptop.Inlet;   
216        sptop.Outlet2 to pump1.Inlet;
217        pump1.Outlet to trays(top).InletL;
218        trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL;
219        trays(bot).OutletL to reb.InletL;
220       
221        EQUATIONS
222       
223        if NComp > 2 then
224       
225                (trays(top).LoutLk-trays(top).LinLK)*trays(top).m=(trays(top).VoutLk-condVoutLk);
226       
227                for i in [(top+1):NTrays]
228                (trays(i).LoutLk-trays(i).LinLK)*trays(i).m=(trays(i).VoutLk-trays(i-1).VoutLk);
229                end
230       
231        else
232       
233                (trays(top).OutletL.z(1)-trays(top).InletL.z(1))*trays(top).m=(trays(top).OutletV.z(1)-cond.OutletV.z(1));
234       
235                for i in [(top+1):NTrays]
236                (trays(i).OutletL.z(1)-trays(i).InletL.z(1))*trays(i).m=(trays(i).OutletV.z(1)-trays(i-1).OutletV.z(1));
237                end
238        end
239end
240
241Model Distillation_kettle_cond_EffFund
242        ATTRIBUTES
243        Pallete         = true;
244        Icon            = "icon/DistillationKettleCond";
245        Brief           = "Model of a distillation column with dynamic condenser and dynamic reboiler-Tray Efficiency Prediction";
246        Info            =
247"== Specify ==
248* the feed stream of each tray (Inlet);
249
250* the pump pressure difference;
251* the heat supllied in reboiler and condenser;
252* the condenser vapor outlet flow (OutletV.F);
253* the reboiler liquid outlet flow (OutletL.F);
254* both splitter outlet flows OR one of the splitter outlet flows and the splitter frac.
255       
256== Initial Conditions ==
257* the trays temperature (OutletL.T);
258* the trays liquid level (Level) OR the trays liquid flow (OutletL.F);
259* (NoComps - 1) OutletL (OR OutletV) compositions for each tray;
260       
261* the condenser temperature (OutletL.T);
262* the condenser liquid level (Level);
263* (NoComps - 1) OutletL (OR OutletV) compositions;
264       
265* the reboiler temperature (OutletL.T);
266* the reboiler liquid level (Level);
267* (NoComps - 1) OutletL (OR OutletV) compositions.
268";
269       
270        PARAMETERS
271        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
272        outer NComp as Integer;
273        NTrays as Integer(Brief="Number of trays", Default=2);
274        topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1);
275        top as Integer(Brief="Number of top tray");
276        bot as Integer(Brief="Number of bottom tray");
277        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
278        outer iLK as Integer (Brief="Pseudo-binary ligth key index");
279        outer iHK as Integer (Brief="Pseudo-binary heavy key index");   
280       
281        SET
282        top = (NTrays-1)*(1-topdown)/2+1;
283        bot = NTrays/top;
284       
285        VARIABLES
286        trays(NTrays) as trayEffFund;
287        cond as condenser;
288        reb as reboiler;
289        sptop as splitter;
290        pump1 as pump;
291        alfaTopo as Real;
292        condVoutLk as positive (Brief="Pseudo-binary approach");
293       
294        EQUATIONS
295        switch VapourFlow
296                case "on":
297                cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
298                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
299                when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
300               
301                case "off":
302                cond.InletV.F = 0 * 'mol/s';
303                when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
304        end     
305       
306        "Condenser pseudo-binary approach"
307        condVoutLk=cond.OutletV.z(iLK)/(cond.OutletV.z(iLK)+cond.OutletV.z(iHK));
308
309        CONNECTIONS
310        #vapor
311        reb.OutletV to trays(bot).InletV;
312        trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV;
313        trays(top).OutletV to cond.InletV;
314       
315        #liquid
316        cond.OutletL to sptop.Inlet;   
317        sptop.Outlet2 to pump1.Inlet;
318        pump1.Outlet to trays(top).InletL;
319        trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL;
320        trays(bot).OutletL to reb.InletL;
321       
322        EQUATIONS
323       
324        if NComp > 2 then
325       
326                (trays(top).LoutLk-trays(top).LinLK)*trays(top).m=(trays(top).VoutLk-condVoutLk);
327       
328                for i in [(top+1):NTrays]
329                (trays(i).LoutLk-trays(i).LinLK)*trays(i).m=(trays(i).VoutLk-trays(i-1).VoutLk);
330                end
331       
332        else
333       
334                (trays(top).OutletL.z(1)-trays(top).InletL.z(1))*trays(top).m=(trays(top).OutletV.z(1)-cond.OutletV.z(1));
335       
336                for i in [(top+1):NTrays]
337                (trays(i).OutletL.z(1)-trays(i).InletL.z(1))*trays(i).m=(trays(i).OutletV.z(1)-trays(i-1).OutletV.z(1));
338                end
339        end
340end
Note: See TracBrowser for help on using the repository browser.