source: branches/gui/sample/reactors/sample_pfr.mso @ 745

Last change on this file since 745 was 745, checked in by gerson bicca, 14 years ago

PFR reactor updates

  • Property svn:keywords set to Id
File size: 2.6 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 745 2009-03-20 19:59:07Z bicca $
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 simple_source;
52        Reac as pfr;
53
54SET
55        NComp = PP.NumberOfComponents;
56       
57        s1.ValidPhases = "Vapour-Liquid";
58        #s1.CompositionBasis = "Molar";
59       
60        Reac.NDisc      = 10;
61        Reac.Dpipe      = 3 * 'in';
62        Reac.L                  = 15 * 'm';
63        Reac.NReac      = 1;
64        Reac.Roughness  = 4.572E-5*'m';
65
66        # Reaction 1: A -> B + C
67        Reac.stoic(:,1) = [-1, 1, 1];
68       
69EQUATIONS
70
71for z in [1:Reac.NDisc] do
72       
73"Reaction Rate = k*C(1)"
74        Reac.r(1,z)  = exp(34.34 - (34222 * 'K') / Reac.str(z).T)*'1/s' * Reac.C(1,z);
75
76"Heat of reaction"
77        Reac.Hr(1,z) = -80.77 * 'kJ/mol';
78
79end
80
81SPECIFY
82        s1.F = 138/1000 * 'kmol/h';
83        s1.T = 1035 * 'K';
84        s1.P = 1.6  * 'atm';
85        s1.MolarComposition = [1, 0, 0];
86
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] do
96       
97        Reac.str(z).T = Reac.Inlet.T;
98        Reac.vel(z) = Reac.vel(1);
99        #Reac.str(z).F = Reac.str(1).F;
100        Reac.str(z).z(1:NComp-1) = Reac.Inlet.z(1:NComp-1);
101
102end
103
104VARIABLES
105
106SOMA as Real;
107
108EQUATIONS
109
110SOMA = sum(Reac.Outlet.z);
111
112OPTIONS
113        # This model can be solved in both steady or dynamic
114        Dynamic         = true;
115        TimeStep        = 0.05;
116        TimeEnd         = 3;
117        DAESolver(File="sundials", RelativeAccuracy=1e-2);
118        NLASolver(RelativeAccuracy=1e-4);
119        #InitialFile = "PFR_AceticAnhydride";
120        #Dynamic = false;
121        #DAESolver = "dassl";
122end
Note: See TracBrowser for help on using the repository browser.