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 | * Equilibrium conversion |
---|
17 | *---------------------------------------------------------------------- |
---|
18 | * Solved problem from Fogler (1999) |
---|
19 | * Problem number: 3-8a and 3-8b |
---|
20 | * Page: 91 (Brazilian edition, 2002) |
---|
21 | *---------------------------------------------------------------------- |
---|
22 | * |
---|
23 | * Description: |
---|
24 | * Sample to calculate the equilibrium conversion for batch and |
---|
25 | * continuous systems. Be considered the following reaction of |
---|
26 | * decomposition: |
---|
27 | * N2O4 <-> 2NO2 |
---|
28 | * |
---|
29 | * Assumptions: |
---|
30 | * * steady-state |
---|
31 | * * isotermic and isobaric system |
---|
32 | * * gaseous phase |
---|
33 | * |
---|
34 | * Specify: |
---|
35 | * * the inlet stream (z,P,T) |
---|
36 | * * the equilibrium constant |
---|
37 | * |
---|
38 | * Flowsheets: |
---|
39 | * * a batch system |
---|
40 | * * a continuous system |
---|
41 | * |
---|
42 | *---------------------------------------------------------------------- |
---|
43 | * Author: Christiano D. Wetzel Guerra and Rodolfo Rodrigues |
---|
44 | * $Id: equilibrium_conversion.mso 171 2007-03-02 13:06:53Z bicca $ |
---|
45 | *--------------------------------------------------------------------*# |
---|
46 | |
---|
47 | using "types"; |
---|
48 | |
---|
49 | |
---|
50 | #*--------------------------------------------------------------------- |
---|
51 | * Model of a stream |
---|
52 | *--------------------------------------------------------------------*# |
---|
53 | |
---|
54 | Model stream |
---|
55 | PARAMETERS |
---|
56 | outer NComp as Integer (Brief="Number of chemical components", Lower=1); |
---|
57 | |
---|
58 | VARIABLES |
---|
59 | C(NComp)as conc_mol(Brief="Concentration", Unit='kmol/l', Lower=0); |
---|
60 | z(NComp)as fraction(Brief="Molar fraction"); |
---|
61 | end |
---|
62 | |
---|
63 | |
---|
64 | #*--------------------------------------------------------------------- |
---|
65 | * Example 3-8a: In a batch system |
---|
66 | *--------------------------------------------------------------------*# |
---|
67 | |
---|
68 | FlowSheet batch |
---|
69 | PARAMETERS |
---|
70 | NComp as Integer (Brief="Number of chemical components", Lower=1); |
---|
71 | R as Real (Brief="Universal gas constant", Unit='atm*l/mol/K', Default=0.082); |
---|
72 | stoic(NComp) as Real(Brief="Stoichiometric coefficients"); |
---|
73 | |
---|
74 | VARIABLES |
---|
75 | Inlet as stream; # Inlet stream |
---|
76 | Outlet as stream; # Outlet stream |
---|
77 | X as fraction (Brief="Molar conversion", Lower=0); |
---|
78 | Kc as Real (Brief="Equilibrium constant", Unit='mol/l'); |
---|
79 | C as conc_mol (Brief="Total outlet concentration", Unit='mol/l', Lower=0); |
---|
80 | Co as conc_mol (Brief="Total inlet concentration", Unit='mol/l', Lower=0); |
---|
81 | T as temperature (Brief="Temperature", Unit='K'); |
---|
82 | P as pressure (Brief="Pressure", Unit='atm'); |
---|
83 | Theta(NComp) as Real(Brief="Parameter Theta"); |
---|
84 | |
---|
85 | EQUATIONS |
---|
86 | "Inlet molar fraction" |
---|
87 | Inlet.C = Inlet.z*Co; |
---|
88 | |
---|
89 | "Total inlet concentration" |
---|
90 | Co = P/(R*T); |
---|
91 | |
---|
92 | "Outlet molar fraction" |
---|
93 | Outlet.C = Outlet.z*sum(Outlet.C); |
---|
94 | |
---|
95 | "Total outlet concentration" |
---|
96 | C = sum(Outlet.C); |
---|
97 | |
---|
98 | "Outlet concentration" |
---|
99 | Outlet.C = Inlet.C(1)*(Theta + stoic*X); |
---|
100 | |
---|
101 | "Parameter Theta" |
---|
102 | Theta = Inlet.z/Inlet.z(1); |
---|
103 | |
---|
104 | "Equilibrium constant" |
---|
105 | Kc = Outlet.C(2)^2/Outlet.C(1); |
---|
106 | |
---|
107 | SET |
---|
108 | NComp = 2; # A and B |
---|
109 | stoic = [-1.0, 2.0]; # A <-> 2B |
---|
110 | |
---|
111 | SPECIFY |
---|
112 | "Inlet molar fraction" |
---|
113 | Inlet.z = [1.0, 0.0]; |
---|
114 | |
---|
115 | "Inlet pressure" |
---|
116 | P = 2.0*'atm'; |
---|
117 | "Inlet temperature" |
---|
118 | T = 340*'K'; |
---|
119 | |
---|
120 | "Equilibrium constant" |
---|
121 | Kc = 0.1*'mol/l'; |
---|
122 | |
---|
123 | OPTIONS |
---|
124 | Dynamic = false; |
---|
125 | end |
---|
126 | |
---|
127 | |
---|
128 | #*--------------------------------------------------------------------- |
---|
129 | * Example 3-8b: In a continuous system |
---|
130 | *--------------------------------------------------------------------*# |
---|
131 | |
---|
132 | FlowSheet continuous |
---|
133 | PARAMETERS |
---|
134 | NComp as Integer (Brief="Number of chemical components", Lower=1); |
---|
135 | R as Real (Brief="Universal gas constant", Unit='atm*l/mol/K', Default=0.082); |
---|
136 | stoic(NComp) as Real(Brief="Stoichiometric coefficients"); |
---|
137 | |
---|
138 | VARIABLES |
---|
139 | Inlet as stream; # Inlet stream |
---|
140 | Outlet as stream; # Outlet stream |
---|
141 | X as fraction (Brief="Molar conversion", Lower=0); |
---|
142 | Kc as Real (Brief="Equilibrium constant", Unit='mol/l'); |
---|
143 | C as conc_mol (Brief="Total outlet concentration", Unit='mol/l', Lower=0); |
---|
144 | Co as conc_mol (Brief="Total inlet concentration", Unit='mol/l', Lower=0); |
---|
145 | T as temperature (Brief="Temperatura", Unit='K'); |
---|
146 | P as pressure (Brief="Pressure", Unit='atm'); |
---|
147 | Theta(NComp) as Real(Brief="Parameter Theta"); |
---|
148 | epsilon as Real (Brief="Parameter epsilon"); |
---|
149 | |
---|
150 | EQUATIONS |
---|
151 | "Inlet molar fraction" |
---|
152 | Inlet.C = Inlet.z*Co; |
---|
153 | |
---|
154 | "Total inlet concentration" |
---|
155 | Co = P/(R*T); |
---|
156 | |
---|
157 | "Outlet molar fraction" |
---|
158 | Outlet.C = Outlet.z*sum(Outlet.C); |
---|
159 | |
---|
160 | "Total outlet concentration" |
---|
161 | C = sum(Outlet.C); |
---|
162 | |
---|
163 | "Outlet concentration" |
---|
164 | Outlet.C = Inlet.C(1)*(Theta + stoic*X)/(1 + epsilon*X); |
---|
165 | |
---|
166 | "Parameter Theta" |
---|
167 | Theta = Inlet.z/Inlet.z(1); |
---|
168 | |
---|
169 | "Parameter epsilon" |
---|
170 | epsilon = Inlet.z(1)*sum(stoic); |
---|
171 | |
---|
172 | "Equilibrium constant" |
---|
173 | Kc = Outlet.C(2)^2/Outlet.C(1); |
---|
174 | |
---|
175 | SET |
---|
176 | NComp = 2; # A and B |
---|
177 | stoic = [-1.0, 2.0]; # A <-> 2B |
---|
178 | |
---|
179 | SPECIFY |
---|
180 | "Inlet molar fraction" |
---|
181 | Inlet.z = [1.0, 0.0]; |
---|
182 | |
---|
183 | "Inlet pressure" |
---|
184 | P = 2.0*'atm'; |
---|
185 | "Inlet temperature" |
---|
186 | T = 340*'K'; |
---|
187 | |
---|
188 | "Equilibrium constant" |
---|
189 | Kc = 0.1*'mol/l'; |
---|
190 | |
---|
191 | OPTIONS |
---|
192 | Dynamic = false; |
---|
193 | end |
---|