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 | * Model of cstr reactor |
---|
17 | *-------------------------------------------------------------------- |
---|
18 | * |
---|
19 | * |
---|
20 | * |
---|
21 | *---------------------------------------------------------------------- |
---|
22 | * Author: Paula B. Staudt |
---|
23 | * $Id: cstr.mso 77 2006-12-08 19:21:59Z paula $ |
---|
24 | *--------------------------------------------------------------------*# |
---|
25 | |
---|
26 | using "streams"; |
---|
27 | |
---|
28 | Model cstr_basic |
---|
29 | PARAMETERS |
---|
30 | ext NComp as Integer; |
---|
31 | NReac as Integer; |
---|
32 | stoic(NComp, NReac) as Real (Brief = "Stoichiometric Matrix"); |
---|
33 | |
---|
34 | VARIABLES |
---|
35 | in Inlet as stream; |
---|
36 | out Outlet as stream_therm; |
---|
37 | q as heat_rate; |
---|
38 | Vr as volume (Brief="Reacting Volume"); |
---|
39 | M as mol (Brief = "Molar total amount"); |
---|
40 | C(NComp) as conc_mol(Brief="Components concentration"); |
---|
41 | |
---|
42 | EQUATIONS |
---|
43 | "Molar fraction" |
---|
44 | Outlet.z * M = C * Vr; |
---|
45 | "Vapourisation Fraction" |
---|
46 | Outlet.v = Inlet.v; |
---|
47 | end |
---|
48 | |
---|
49 | Model cstr_yield as cstr_basic |
---|
50 | PARAMETERS |
---|
51 | yield(NReac) as fraction; |
---|
52 | |
---|
53 | EQUATIONS |
---|
54 | Outlet.z*Outlet.F = Inlet.z*Inlet.F * sumt(stoic*(1-yield)); |
---|
55 | "Reactor Energy Balance" |
---|
56 | diff(M*Outlet.h) = Inlet.F*Inlet.h - Outlet.F*Outlet.h - q; |
---|
57 | end |
---|
58 | |
---|
59 | |
---|
60 | Model cstr as cstr_basic |
---|
61 | VARIABLES |
---|
62 | r(NReac) as reaction_mol; |
---|
63 | Hr(NReac) as heat_reaction; |
---|
64 | |
---|
65 | EQUATIONS |
---|
66 | "Component Molar Balance" |
---|
67 | diff(Outlet.z*M) = (Inlet.F*Inlet.z - Outlet.F*Outlet.z) + sumt(stoic*r)*Vr; |
---|
68 | |
---|
69 | "Reactor Energy Balance" |
---|
70 | diff(M*Outlet.h) = Inlet.F*Inlet.h - Outlet.F*Outlet.h + |
---|
71 | sum(Hr*sum(stoic*r))*Vr - q; |
---|
72 | end |
---|