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

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

Enhancing Sample_Process example.

  • Property svn:executable set to *
File size: 3.7 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 simple_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        Heat_1                  as energy_source; # Heat Supplied
58        Cold_2                  as energy_source; # Cold Supplied
59SET
60
61        NComp                                   = PP.NumberOfComponents;
62        Mheater.Nhot            = 1;
63    Mheater.Ncold               = 1;
64        Heater.Ninlet                   = 1;
65        Cooler.Ninlet                   = 1;
66        Heater.Kvalues                  = "no";# Faster convergence
67        Cooler.Kvalues                  = "no";# Faster convergence
68        Mheater.FlowDirection   = "counter";
69       
70        Reac.NDisc      = 10;
71        Reac.Across = 0.7 * 'in^2';
72        Reac.L          = 2.28 * 'm';
73        Reac.NReac      = 1;
74
75# Reaction 1: A -> B + C
76        Reac.stoic(:,1) = [-1, 1, 1];
77
78EQUATIONS
79
80for z in [1:Reac.NDisc]
81       
82"Reaction Rate = k*C(1)"
83        Reac.r(1,z)  = exp(34.34 - (34222 * 'K') / Reac.str(z).T)*'1/s' * Reac.C(1,z);
84
85"Heat of reaction"
86        Reac.Hr(1,z) = -80.77 * 'kJ/mol';
87
88"Pressure Drop (no pressure drop)"
89        Reac.str(z+1).P = Reac.str(z).P;
90
91end
92
93SPECIFY
94
95        Feed.Outlet.F = 1 * 'kmol/h';
96        Feed.Outlet.T = 350 * 'K';
97        Feed.Outlet.P = 1.6  * 'atm';
98        Feed.Outlet.z = [1, 0, 0];
99
100        Mheater.Method.Fc               = 1;
101        Mheater.OutletCold(1).T         = 400*'K';
102       
103        Mheater.OutletHot(1).P          = 1.5 * 'atm';
104        Mheater.OutletCold(1).P         = 1.6 * 'atm';
105
106        Heater.Outlet.T         = 1035*'K';
107        Heater.Outlet.P         =  1.6 * 'atm';
108       
109        Cooler.Outlet.T         = 400*'K';
110        Cooler.Outlet.P         =  1.5 * 'atm';
111
112        Reac.q                  = 0     * 'J/s';
113
114CONNECTIONS
115
116        Feed.Outlet                             to  Mheater.InletCold(1);
117        Mheater.OutletCold(1)           to  Heater.Inlet(1);
118        Heater.Outlet                           to  Reac.Inlet;
119        Reac.Outlet                             to  Mheater.InletHot(1);
120        Mheater.OutletHot(1)            to  Cooler.Inlet(1);
121        Cooler.Outlet                           to  Product.Inlet;
122        Heat_1.OutletQ                          to Heater.InletQ;
123        Cold_2.OutletQ                          to Cooler.InletQ;
124
125INITIAL
126
127for z in [2:Reac.NDisc+1]
128       
129        Reac.str(z).T = Reac.Inlet.T;
130        Reac.str(z).z(1:NComp-1) = Reac.Inlet.z(1:NComp-1);
131
132end
133
134OPTIONS
135        TimeStep        = 0.05;
136        TimeEnd         = 10;
137        Dynamic = true;
138        DAESolver(
139                File = "dasslc",
140                RelativeAccuracy = 1e-4
141        );
142end
Note: See TracBrowser for help on using the repository browser.