source: trunk/sample/reactors/sample_pfr.mso @ 548

Last change on this file since 548 was 213, checked in by Rafael de Pelegrini Soares, 17 years ago

Adapted some samples to the new Plugin mechanism

  • Property svn:keywords set to Id
File size: 2.4 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* Sample file for model pfr
17*
18*
19* Adiabatic Production of Acetic Anhydride with a PFR
20*
21* Based on Example 8-6 of Elements of Chemical Reaction Engineering
22* Second Edition H. Scott Fogler
23*
24*
25*--------------------------------------------------------------------
26*
27* This sample file needs VRTherm (www.vrtech.com.br) to run.
28*
29*----------------------------------------------------------------------
30* Author: Rafael de P. Soares
31*         Paula B. Staudt
32* $Id: sample_pfr.mso 213 2007-03-15 19:40:55Z rafael $
33*--------------------------------------------------------------------*#
34
35using "reactors/pfr";
36
37FlowSheet PFR_AceticAnhydride
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        s1      as source;
52        Reac as pfr;
53
54SET
55        NComp = PP.NumberOfComponents;
56       
57        Reac.NDisc      = 10;
58        Reac.Across     = 0.7 * 'in^2';
59        Reac.L                  = 2.28 * 'm';
60        Reac.NReac      = 1;
61
62        # Reaction 1: A -> B + C
63        Reac.stoic(:,1) = [-1, 1, 1];
64       
65EQUATIONS
66
67for z in [1:Reac.NDisc]
68       
69"Reaction Rate = k*C(1)"
70        Reac.r(1,z)  = exp(34.34 - (34222 * 'K') / Reac.str(z).T)*'1/s' * Reac.C(1,z);
71
72"Heat of reaction"
73        Reac.Hr(1,z) = -80.77 * 'kJ/mol';
74
75"Pressure Drop (no pressure drop)"
76        Reac.str(z+1).P = Reac.str(z).P;
77
78end
79
80SPECIFY
81        s1.Outlet.F = 138/1000 * 'kmol/h';
82        s1.Outlet.T = 1035 * 'K';
83        s1.Outlet.P = 1.6  * 'atm';
84        s1.Outlet.z = [1, 0, 0];
85
86"Adiabatic"
87        Reac.q     = 0     * 'J/s';
88       
89CONNECTIONS
90
91        s1.Outlet  to  Reac.Inlet;
92       
93INITIAL
94
95for z in [2:Reac.NDisc+1]
96       
97        Reac.str(z).T = Reac.Inlet.T;
98        Reac.str(z).z(1:NComp-1) = Reac.Inlet.z(1:NComp-1);
99
100end
101       
102OPTIONS
103        # This model can be solved in both steady or dynamic
104        Dynamic         = true;
105        TimeStep        = 0.05;
106        TimeEnd         = 3;
107        #Dynamic = false;
108        #DAESolver = "dassl";
109end
Note: See TracBrowser for help on using the repository browser.