source: trunk/sample/processes/Sample_Process.mso @ 261

Last change on this file since 261 was 248, checked in by gerson bicca, 16 years ago

Updated solver options for the new language

  • Property svn:executable set to *
File size: 3.3 KB
Line 
1#*-------------------------------------------------------------------
2* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
3*
4* This LIBRARY is free software; you can distribute it and/or modify
5* it under the therms of the ALSOC FREE LICENSE as available at
6* http://www.enq.ufrgs.br/alsoc.
7*
8* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
9* from http://www.rps.eng.br Copyright (C) 2002-2004.
10* All rights reserved.
11*
12* EMSO is distributed under the therms of the ALSOC LICENSE as
13* available at http://www.enq.ufrgs.br/alsoc.
14*
15*--------------------------------------------------------------------
16* EMSO Sample file showing an Adiabatic Production of Acetic Anhydride with a PFR and recycle
17*
18*
19* Based on Example 8-6 of Elements of Chemical Reaction Engineering
20* Second Edition H. Scott Fogler
21*
22*
23*--------------------------------------------------------------------
24*
25* This sample file needs VRTherm (www.vrtech.com.br) to run.
26*
27*----------------------------------------------------------------------
28* Author: Rafael de P. Soares
29*         Paula B. Staudt
30*               Gerson B. Bicca
31* $Id: sample_process.mso 213 2007-03-15 19:40:55Z rafael $
32*--------------------------------------------------------------------*#
33using "heat_exchangers/heater";
34using "heat_exchangers/Mheatex";
35using "reactors/pfr";
36
37FlowSheet AceticAnhydride_Process
38       
39PARAMETERS
40
41        PP              as Plugin (Brief="Physical Properties",
42                Type = "PP",
43                Components = ["acetone", "acetic anhydride", "methane"],
44                LiquidModel = "PR",
45                VapourModel = "PR"
46        );
47        NComp   as Integer;
48
49DEVICES
50
51        Feed                            as source;              # A Feed Stream
52        Mheater                 as Mheatex;     # A Multi-stream Heat Exchanger
53        Cooler                  as cooler;              # A Cooler
54        Heater                  as heater;              # A heater
55        Reac                            as pfr;                         # A PFR Reactor
56        Product                 as sink;                        # Product
57
58SET
59
60        NComp                                           = PP.NumberOfComponents;
61        Mheater.Nhot            = 1;
62    Mheater.Ncold               = 1;
63        Heater.Ninlet                           = 1;
64        Cooler.Ninlet                           = 1;
65        Mheater.FlowDirection  = "counter";
66       
67        Reac.NDisc      = 10;
68        Reac.Across     = 0.7 * 'in^2';
69        Reac.L                  = 2.28 * 'm';
70        Reac.NReac      = 1;
71
72# Reaction 1: A -> B + C
73        Reac.stoic(:,1) = [-1, 1, 1];
74
75EQUATIONS
76
77for z in [1:Reac.NDisc]
78       
79"Reaction Rate = k*C(1)"
80        Reac.r(1,z)  = exp(34.34 - (34222 * 'K') / Reac.str(z).T)*'1/s' * Reac.C(1,z);
81
82"Heat of reaction"
83        Reac.Hr(1,z) = -80.77 * 'kJ/mol';
84
85"Pressure Drop (no pressure drop)"
86        Reac.str(z+1).P = Reac.str(z).P;
87
88end
89
90SPECIFY
91
92        Feed.Outlet.F = 1 * 'kmol/h';
93        Feed.Outlet.T = 350 * 'K';
94        Feed.Outlet.P = 1.6  * 'atm';
95        Feed.Outlet.z = [1, 0, 0];
96
97        Mheater.Method.Fc                       = 1;
98        Mheater.OutletCold(1).T    = 400*'K';
99       
100        Mheater.OutletHot(1).P          = 1.5 * 'atm';
101        Mheater.OutletCold(1).P         = 1.6 * 'atm';
102
103        Heater.Outlet.T         = 1035*'K';
104        Heater.Outlet.P         =  1.6 * 'atm';
105       
106        Cooler.Outlet.T         = 400*'K';
107        Cooler.Outlet.P         =  1.5 * 'atm';
108
109        Reac.q     = 0     * 'J/s';
110
111CONNECTIONS
112
113        Feed.Outlet                                                     to  Mheater.InletCold(1);
114        Mheater.OutletCold(1)           to  Heater.Inlet(1);
115        Heater.Outlet                                           to  Reac.Inlet;
116        Reac.Outlet                                                     to  Mheater.InletHot(1);
117        Mheater.OutletHot(1)            to  Cooler.Inlet(1);
118        Cooler.Outlet                                                   to  Product.Inlet;
119
120INITIAL
121
122for z in [2:Reac.NDisc+1]
123       
124        Reac.str(z).T = Reac.Inlet.T;
125        Reac.str(z).z(1:NComp-1) = Reac.Inlet.z(1:NComp-1);
126
127end
128
129OPTIONS
130        TimeStep        = 0.05;
131        TimeEnd         = 10;
132       
133        Dynamic = true;
134        DAESolver(
135                File = "dasslc",
136                RelativeAccuracy = 1e-4
137        );
138end
Note: See TracBrowser for help on using the repository browser.