1 | #*------------------------------------------------------------------- |
---|
2 | * Biorrefinaria Petrobras |
---|
3 | *-------------------------------------------------------------------- |
---|
4 | * Nome do arquivo: evaporator.mso |
---|
5 | * Projeto: Modelo integrado de producao de etanol 1G/2G |
---|
6 | * Conteudo: evaporador |
---|
7 | *--------------------------------------------------------------------*# |
---|
8 | |
---|
9 | #*------------------------------------------------------------------- |
---|
10 | * |
---|
11 | * Versao 2.2 |
---|
12 | * Data: 03/2016 |
---|
13 | * Autores: Anderson R. A. Lino e Gabriel C. Fonseca |
---|
14 | * |
---|
15 | *-------------------------------------------------------------------- |
---|
16 | *Descricao: modelo do evaporador que sera empregado na biorrefinaria |
---|
17 | *-------------------------------------------------------------------- |
---|
18 | |
---|
19 | *-------------------------------------------------------------------- |
---|
20 | *Hipoteses assumidas: 1 - mistura perfeita |
---|
21 | * 2 - sem perdas de calor para o ambiente |
---|
22 | * 3 - modelo estacionario |
---|
23 | *Bibliografia: |
---|
24 | [1] JESUS, C. D. F. Desenvolvimento de simulador dinamico do |
---|
25 | processo de acucar. |
---|
26 | Sao Carlos, SP, UFSCar, 2000 (Dissertacao). 131p. |
---|
27 | *-------------------------------------------------------------------- |
---|
28 | |
---|
29 | *-------------------------------------------------------------------- |
---|
30 | *Notas: Foram feitos 2 flowsheets para averiguar os modelos |
---|
31 | *--------------------------------------------------------------------*# |
---|
32 | |
---|
33 | using "main_stream"; |
---|
34 | using "water_stream"; |
---|
35 | using "assumptions"; |
---|
36 | |
---|
37 | Model evaporator3 |
---|
38 | |
---|
39 | ATTRIBUTES |
---|
40 | Pallete = true; |
---|
41 | Icon = "icon/evaporator"; |
---|
42 | Brief = "Model of an Evaporator"; |
---|
43 | Info = |
---|
44 | "== GENERAl == |
---|
45 | Model of an evaporator, with calculated boiling point elevation and |
---|
46 | supposing that only water leaves the system as vapour. |
---|
47 | The boiling point elevation is given by: |
---|
48 | |
---|
49 | BPE * 0.355 * (1.036 - Brix) = Brix * (0.3 + Brix) * (0.22 * 'K' + 0.0078 * Tsat[C]). |
---|
50 | |
---|
51 | With BPE being the boiling point elevation, Outlet_Brix the mass fraction |
---|
52 | of soluble solids inside the evaporator and Tsat is the saturation |
---|
53 | temperature of pure water at the internal pressure. |
---|
54 | |
---|
55 | == ASSUMPTIONS == |
---|
56 | * Steady-state; |
---|
57 | * Only water leaves the system as vapour; |
---|
58 | * The heating steam leaves the system as saturated water; |
---|
59 | * Adiabatic. |
---|
60 | |
---|
61 | == SPECIFY == |
---|
62 | * The inlet stream: |
---|
63 | flow rate |
---|
64 | temperature |
---|
65 | pressure |
---|
66 | stream composition; |
---|
67 | * The inlet water stream: |
---|
68 | Temperature |
---|
69 | Vapourization fraction; |
---|
70 | * The outlet vapour temperature; |
---|
71 | * The outlet brix. |
---|
72 | |
---|
73 | == SET == |
---|
74 | * Basic composition (mass or molar); |
---|
75 | * Number of stream components(Ncomp/NcompS); |
---|
76 | * The compounds that participate in the Brix calculation |
---|
77 | (1 if participates, 0 if not). |
---|
78 | |
---|
79 | == REFERENCES == |
---|
80 | [1] JESUS, C. D. F. Desenvolvimento de simulador dinamico do processo de acucar. |
---|
81 | Sao Carlos, SP, UFSCar, 2000 (Dissertacao). 131p. |
---|
82 | "; |
---|
83 | #*------------------------------------------------------------------- |
---|
84 | * Parametros |
---|
85 | *--------------------------------------------------------------------*# |
---|
86 | |
---|
87 | PARAMETERS |
---|
88 | |
---|
89 | propterm as Plugin (Brief = "IAPWS 97 properties of water",Type = "water"); |
---|
90 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
91 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
92 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
93 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
94 | M(NComp) as molweight (Brief = "Component Mol Weight (Fluid Phase), Vector Size = NComp", Protected=true); |
---|
95 | MS(NCompS) as molweight (Brief = "Component Mol Weight (Solid Phase), Vector Size = NCompS", Protected=true); |
---|
96 | outer flu as ConstituentFluid(Symbol = " ", Protected = true); |
---|
97 | Brix(NComp) as Integer (Brief = "Flag for the Compound that Enters the Brix Calculation"); |
---|
98 | Brix_max as fraction (Brief = "Maximum Total Soluble Solids-Inlet", Default = 1, Symbol = "Brix_{max}"); |
---|
99 | |
---|
100 | #*------------------------------------------------------------------- |
---|
101 | * Define o valor dos parametros declarados no modelo |
---|
102 | *--------------------------------------------------------------------*# |
---|
103 | |
---|
104 | SET |
---|
105 | |
---|
106 | M = PP.MolecularWeight(); |
---|
107 | MS = PPS.MolecularWeight(); |
---|
108 | OutletV.ValidPhases = "Vapour-Only"; |
---|
109 | |
---|
110 | #*------------------------------------------------------------------- |
---|
111 | * Declaracao de variaveis |
---|
112 | *--------------------------------------------------------------------*# |
---|
113 | |
---|
114 | VARIABLES |
---|
115 | |
---|
116 | in Inlet as main_stream (Brief = "Feed Stream", PosX=1, PosY=0.3, Protected = false, Symbol="_{in}"); |
---|
117 | in InletS as water_stream (Brief = "Steam Inlet", PosX=1, PosY=0.63, Protected = true, Symbol = "_{in_S}"); |
---|
118 | out OutletL as main_stream_eq (Brief = "Liquid Outlet Stream", PosX=0, PosY=0.85, Protected = false, Symbol="_{out Liquid}"); |
---|
119 | out OutletS as water_stream_vapfrac (Brief = "Condensed Steam Outlet",PosX=0,PosY=0.63, Protected = false, Symbol = "_{out_S}"); |
---|
120 | out OutletV as water_stream_eq (Brief = "Vapour Outlet Stream", PosX=0, PosY=0.15, Protected =false, Symbol="_{outVapour}"); |
---|
121 | Q as power (Brief = "Heat Duty", PosX=0.5, PosY=1, Protected = true, Symbol="_{in}"); |
---|
122 | |
---|
123 | A as area (Brief="Area of heat exchange"); |
---|
124 | U as heat_trans_coeff (Brief="Global coefficient of heat exchange"); |
---|
125 | vfrac as fraction (Brief = "Vaporization Fraction", Symbol="\phi", Protected = true); |
---|
126 | Tsat as temperature (Brief = "Saturation Temperature", Symbol = "T_{sat}", Protected = true); |
---|
127 | P as pressure (Brief = "Pressure Inside the Evaporator"); |
---|
128 | Inlet_Brix as fraction (Brief = "Total Soluble Solids-Inlet", Symbol = "Brix_{in}"); |
---|
129 | Outlet_Brix as fraction (Brief = "Total Soluble Solids-Outlet", Symbol = "Brix_{out}"); |
---|
130 | BPE as temp_delta (Brief = "Boiling Point Elevation", Protected = true); |
---|
131 | |
---|
132 | Hv as enth_mass (Brief = "Mass Enthalpy for the Outlet Vapour Phase in the Reference State", Hidden = true); |
---|
133 | Sv as entr_mass (Brief = "Mass Entropy for the Vapour Phase in the Reference State", Hidden = true); |
---|
134 | hl1 as enth_mol (Brief = "Molar Enthalpy for the inlet Liquid Phase in the Reference State (Fluid Phase)", Hidden = true); |
---|
135 | hlsol1 as enth_mol (Brief = "Molar Enthalpy for the inlet Liquid Phase in the Reference State (Solid Phase)", Hidden = true); |
---|
136 | hl2 as enth_mol (Brief = "Molar Enthalpy for the OutletL Liquid Phase in the Reference State (Fluid Phase)", Hidden = true); |
---|
137 | hlsol2 as enth_mol (Brief = "Molar Enthalpy for the OutletL Liquid Phase in the Reference State (Solid Phase)", Hidden = true); |
---|
138 | |
---|
139 | SET |
---|
140 | OutletL.Phase = "Liquid"; |
---|
141 | OutletV.ValidPhases = "Vapour-Only"; |
---|
142 | |
---|
143 | #*------------------------------------------------------------------- |
---|
144 | * Equacoes do modelo |
---|
145 | *--------------------------------------------------------------------*# |
---|
146 | |
---|
147 | EQUATIONS |
---|
148 | |
---|
149 | if Inlet_Brix > Brix_max then |
---|
150 | |
---|
151 | "Global Mass Balance (Fluid Phase)" |
---|
152 | Inlet.Fluid.Fw = OutletV.Fw + OutletL.Fluid.Fw; |
---|
153 | |
---|
154 | "Component Molar Balance (Fluid Phase)" |
---|
155 | Inlet.Fluid.z = OutletL.Fluid.z; |
---|
156 | |
---|
157 | "Vapour Fraction" |
---|
158 | vfrac = 1e-6; |
---|
159 | |
---|
160 | "Heat Required by the Effect" |
---|
161 | Q = InletS.Fw * (InletS.H - OutletS.H); |
---|
162 | |
---|
163 | "General equation of heat exchange" |
---|
164 | Q = U * A * ( InletS.T - OutletL.T ); |
---|
165 | |
---|
166 | "Total Soluble Solids-Outlet" |
---|
167 | Outlet_Brix = Inlet_Brix; |
---|
168 | |
---|
169 | "Saturation Temperature for Pure Water" |
---|
170 | Tsat = propterm.Tsat(OutletV.P); |
---|
171 | |
---|
172 | "Boiling Point Elevation" |
---|
173 | BPE = 1 * 'K'; |
---|
174 | |
---|
175 | "Thermal Equilibrium 2" |
---|
176 | OutletL.T = Inlet.T; |
---|
177 | |
---|
178 | "Mechanical Equilibrium 2" |
---|
179 | OutletL.P = 1 * 'atm'; |
---|
180 | |
---|
181 | "Thermal Equilibrium" |
---|
182 | OutletV.T = Tsat + BPE; |
---|
183 | |
---|
184 | else |
---|
185 | |
---|
186 | "Global Mass Balance (Fluid Phase)" |
---|
187 | Inlet.Fluid.Fw = OutletV.Fw + OutletL.Fluid.Fw; |
---|
188 | |
---|
189 | for i in [1:NComp] do |
---|
190 | if i equal flu.Water then |
---|
191 | "Component Mass Balance (Fluid Phase)" |
---|
192 | Inlet.Fluid.Fw * Inlet.Fluid.zw(i) = OutletL.Fluid.Fw * OutletL.Fluid.zw(i) + OutletV.Fw; |
---|
193 | else |
---|
194 | "Component Mass Balance (Fluid Phase)" |
---|
195 | Inlet.Fluid.Fw * Inlet.Fluid.zw(i) = OutletL.Fluid.Fw * OutletL.Fluid.zw(i); |
---|
196 | end |
---|
197 | end |
---|
198 | |
---|
199 | "Vapour Fraction" |
---|
200 | OutletV.Fw = Inlet.Total.Fw * vfrac; |
---|
201 | |
---|
202 | "Energy Balance" |
---|
203 | Q = (OutletV.H - Hv) * OutletV.Fw + (OutletL.Fluid.h - hl2) * OutletL.Fluid.F + (OutletL.Solid.h - hlsol2) * OutletL.Solid.F |
---|
204 | - (Inlet.Fluid.h - hl1) * Inlet.Fluid.F - (Inlet.Solid.h - hlsol1) * Inlet.Solid.F; |
---|
205 | |
---|
206 | "Heat Required by the Effect" |
---|
207 | Q = InletS.Fw * (InletS.H - OutletS.H); |
---|
208 | |
---|
209 | "General equation of heat exchange" |
---|
210 | Q = U * A * ( InletS.T - OutletL.T ); |
---|
211 | |
---|
212 | "Total Soluble Solids-Outlet" |
---|
213 | Outlet_Brix = sum(OutletL.Fluid.zw * Brix); |
---|
214 | |
---|
215 | "Saturation Temperature for Pure Water at Pressure P" |
---|
216 | Tsat = propterm.Tsat(OutletV.P); |
---|
217 | |
---|
218 | "Boiling Point Elevation" |
---|
219 | BPE * 0.355 * ( 1.036 - Outlet_Brix) = Outlet_Brix * ( 0.3 + Outlet_Brix) * ( 0.22 * 'K' + 0.0078 * (Tsat - 273.15* 'K')); |
---|
220 | |
---|
221 | "Thermal Equilibrium 2" |
---|
222 | OutletL.T = Tsat + BPE; |
---|
223 | |
---|
224 | "Thermal Equilibrium 1" |
---|
225 | OutletV.T = OutletL.T; |
---|
226 | |
---|
227 | end |
---|
228 | |
---|
229 | "Global Mass Balance (Steam)" |
---|
230 | InletS.Fw = OutletS.Fw; |
---|
231 | |
---|
232 | "Global Molar Balance (Solid Phase)" |
---|
233 | Inlet.Solid.F = OutletL.Solid.F; |
---|
234 | |
---|
235 | "Component Molar Balance (Solid Phase)" |
---|
236 | Inlet.Solid.z = OutletL.Solid.z; |
---|
237 | |
---|
238 | "Total Soluble Solids-Inlet" |
---|
239 | Inlet_Brix = sum(Inlet.Fluid.zw * Brix); |
---|
240 | |
---|
241 | "Enthalpy of Steam, array = [OutletS.S, OutletS.H]" |
---|
242 | [OutletS.S, OutletS.H] = propterm.propPTl(OutletS.P, propterm.Tsat(OutletS.P)); |
---|
243 | |
---|
244 | "Outlet Vapour Mass Entropy and Enthalpy at the Reference State, array = [Sv, Hv]" |
---|
245 | [Sv, Hv] = propterm.propPTl(Inlet.P, 300 * 'K'); |
---|
246 | |
---|
247 | "Inlet Molar Enthalpy at the Reference State (Fluid Phase)" |
---|
248 | hl1 = PP.LiquidEnthalpy(300 * 'K', Inlet.P, Inlet.Fluid.z); |
---|
249 | |
---|
250 | "Inlet Molar Enthalpy at the Reference State (Solid Phase)" |
---|
251 | hlsol1 = PPS.VapourEnthalpy(300 * 'K', Inlet.P, Inlet.Solid.z); |
---|
252 | |
---|
253 | "Outlet Liquid Molar Enthalpy at the Reference State (Fluid Phase)" |
---|
254 | hl2 = PP.LiquidEnthalpy(300 * 'K', Inlet.P, OutletL.Fluid.z); |
---|
255 | |
---|
256 | "Outlet Liquid Molar Enthalpy at the Reference State (Solid Phase)" |
---|
257 | hlsol2 = PPS.VapourEnthalpy(300 * 'K', Inlet.P, OutletL.Solid.z); |
---|
258 | |
---|
259 | "Mechanical Equilibrium 1" |
---|
260 | OutletV.P = OutletL.P; |
---|
261 | |
---|
262 | "Mechanical Equilibrium 2" |
---|
263 | OutletL.P = P; |
---|
264 | |
---|
265 | "Mechanical Equilibrium 3" |
---|
266 | OutletS.P = InletS.P; |
---|
267 | |
---|
268 | "Outlet Condensed Steam Temperature" |
---|
269 | OutletS.T = propterm.Tsat(InletS.P); |
---|
270 | |
---|
271 | "Heat transference coefficient" |
---|
272 | U = 4.65 * (OutletL.T - 273.15 * 'K' ) / Outlet_Brix * 'kg /s^3 /K^2'; |
---|
273 | |
---|
274 | end |
---|
275 | |
---|
276 | |
---|
277 | FlowSheet teste_evaporator3 |
---|
278 | |
---|
279 | #*------------------------------------------------------------------- |
---|
280 | * Declaracao de dispositivos (ou blocos contendo o modelo) |
---|
281 | *--------------------------------------------------------------------*# |
---|
282 | |
---|
283 | DEVICES |
---|
284 | S101 as main_sourceR; |
---|
285 | S102 as water_sourceL; |
---|
286 | Ev101 as evaporator3; |
---|
287 | |
---|
288 | #*------------------------------------------------------------------- |
---|
289 | * Especifica as conexoes entre os modelos |
---|
290 | *--------------------------------------------------------------------*# |
---|
291 | |
---|
292 | CONNECTIONS |
---|
293 | S101.Outlet to Ev101.Inlet; |
---|
294 | S102.Outlet to Ev101.InletS; |
---|
295 | |
---|
296 | #*------------------------------------------------------------------- |
---|
297 | * Define o valor dos parametros declarados no modelo |
---|
298 | *--------------------------------------------------------------------*# |
---|
299 | |
---|
300 | SET |
---|
301 | S101.ValidPhases = "Vapour-Liquid"; |
---|
302 | S102.ValidPhases = "Vapour-Liquid"; |
---|
303 | NComp = PP.NumberOfComponents(); |
---|
304 | NCompS = PPS.NumberOfComponents(); |
---|
305 | |
---|
306 | #*------------------------------------------------------------------- |
---|
307 | * Especifica variaveis definidas no modelo |
---|
308 | *--------------------------------------------------------------------*# |
---|
309 | |
---|
310 | SPECIFY |
---|
311 | S101.Fluid.Fw = 441130 * 'kg/h'; |
---|
312 | S101.Solid.Fw = 6303.1 * 'kg/h'; |
---|
313 | S101.T = 373.15 * 'K'; |
---|
314 | S101.P = 0.957834 * 'atm'; |
---|
315 | S101.CompositionOfSolid = [0.4, 0.37, 0.21, 0.02, 0, 0, 0, 0, 0.002]; |
---|
316 | S101.CompositionOfFluid = [0.83, 0.16, 0.01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; |
---|
317 | |
---|
318 | Ev101.OutletV.T = 358.15 * 'K'; |
---|
319 | Ev101.Outlet_Brix = 0.52; |
---|
320 | S102.P = 1.29927 * 'atm'; |
---|
321 | S102.v = 1; |
---|
322 | |
---|
323 | #*------------------------------------------------------------------- |
---|
324 | #Parametros |
---|
325 | *--------------------------------------------------------------------*# |
---|
326 | |
---|
327 | PARAMETERS |
---|
328 | PP as Plugin (Brief = "External Physical Properties", |
---|
329 | Type="PP", |
---|
330 | Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm" |
---|
331 | ); |
---|
332 | PPS as Plugin (Brief = "External Physical Properties", |
---|
333 | Type="PP", |
---|
334 | Project = "../Flowsheets/v2_2/Solid_v2_2.vrtherm" |
---|
335 | ); |
---|
336 | |
---|
337 | NComp as Integer (Brief = "Number of chemical components in the fluid phase"); |
---|
338 | NCompS as Integer (Brief = "Number of chemical components in the solid phase"); |
---|
339 | flu as ConstituentFluid(Symbol = " ", Protected = true); |
---|
340 | sol as ConstituentSolid(Symbol = " ", Protected = true); |
---|
341 | |
---|
342 | #*------------------------------------------------------------------- |
---|
343 | * Define o valor dos parametros declarados no modelo |
---|
344 | *--------------------------------------------------------------------*# |
---|
345 | |
---|
346 | SET |
---|
347 | NComp = PP.NumberOfComponents(); |
---|
348 | NCompS = PPS.NumberOfComponents(); |
---|
349 | S101.CompositionBasis = "Mass"; |
---|
350 | Ev101.Brix = [0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; |
---|
351 | |
---|
352 | #*------------------------------------------------------------------- |
---|
353 | * Condicoes iniciais e opcoes de Solver |
---|
354 | *--------------------------------------------------------------------*# |
---|
355 | |
---|
356 | OPTIONS |
---|
357 | Dynamic = false; |
---|
358 | NLASolver( |
---|
359 | File = "sundials", |
---|
360 | RelativeAccuracy = 1e-3, |
---|
361 | AbsoluteAccuracy = 1e-6, |
---|
362 | MaxIterations = 100 |
---|
363 | ); |
---|
364 | end |
---|