1 | #*------------------------------------------------------------------- |
---|
2 | * Biorrefinaria Petrobras |
---|
3 | *-------------------------------------------------------------------- |
---|
4 | * Nome do arquivo: cleaning.mso |
---|
5 | * Projeto: Modelo integrado de producao de etanol 1G/2G |
---|
6 | * Conteudo: lavadora |
---|
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 da lavadora que sera empregado |
---|
17 | *na biorrefinaria. |
---|
18 | *-------------------------------------------------------------------- |
---|
19 | |
---|
20 | *-------------------------------------------------------------------- |
---|
21 | *Notas: Foi feito o flowsheet teste para averiguar o modelo |
---|
22 | *--------------------------------------------------------------------*# |
---|
23 | |
---|
24 | using "main_stream"; |
---|
25 | using "assumptions"; |
---|
26 | |
---|
27 | Model cleaning |
---|
28 | |
---|
29 | ATTRIBUTES |
---|
30 | Pallete = true; |
---|
31 | Icon = "icon/cleaning"; |
---|
32 | Brief = "Model of a Washer"; |
---|
33 | Info = |
---|
34 | "== GENERAL == |
---|
35 | Model of a simplified sugarcane washer where water is used to |
---|
36 | decrease the amount of impurities (dirt) in the sugarcane stream. |
---|
37 | |
---|
38 | == ASSUMPTIONS == |
---|
39 | * Steady-state; |
---|
40 | * No water is absorbed by the sugarcane; |
---|
41 | * Adiabatic. |
---|
42 | |
---|
43 | == SPECIFY == |
---|
44 | * The CrudeCane stream: |
---|
45 | flow rate |
---|
46 | temperature |
---|
47 | pressure; |
---|
48 | stream composition; |
---|
49 | * The Water stream (Except the fluid flow); |
---|
50 | flow rate |
---|
51 | temperature |
---|
52 | pressure |
---|
53 | stream composition; |
---|
54 | * The water stream (Except the fluid flow); |
---|
55 | * The cleaning efficiency (Efficiency); |
---|
56 | * The fraction of sugar lost (SugarLosses); |
---|
57 | * The fraction of solids kept in the main stream (Separation). |
---|
58 | |
---|
59 | == SET == |
---|
60 | * Number of stream components(Ncomp/NcompS); |
---|
61 | * Basic composition (mass or molar). |
---|
62 | "; |
---|
63 | |
---|
64 | #*------------------------------------------------------------------- |
---|
65 | * Declaracao de variaveis |
---|
66 | *--------------------------------------------------------------------*# |
---|
67 | |
---|
68 | VARIABLES |
---|
69 | in CrudeCane as main_stream (Brief = "Inlet Cane", PosX=0.0, PosY=0.5, Symbol="_{Cane}", Protected = false); |
---|
70 | in Water as main_stream (Brief = "Inlet Water", PosX=0.5, PosY=0.0, Symbol="_{Water}", Protected = false); |
---|
71 | out SugarCane as main_stream_eq (Brief = "SugarCane Stream", PosX=1.0, PosY=0.5, Symbol="_{Sugar}", Protected = false); |
---|
72 | out Dirt as main_stream_eq (Brief = "Dirt Stream", PosX=0.5, PosY=1.0, Symbol="_{Dirt}", Protected = false ); |
---|
73 | Separation as fraction (Brief = "Separation Efficiency"); |
---|
74 | Efficiency as fraction (Brief = "Cleaning Efficiency"); |
---|
75 | SugarLosses as fraction (Brief = "Fraction of Sugar Lost in the Sludge"); |
---|
76 | humidity as fraction (Brief = "Fraction of Water in the SugarCane"); |
---|
77 | impurity as fraction (Brief = "Fraction of Solids in the Sludge"); |
---|
78 | WFPTC as positive (Brief = "Ton of Water Per Ton of Cane"); |
---|
79 | Fiber as fraction (Brief = "Amount of Fiber in the Inlet Sugarcane", Default = 0.12, Protected = true); |
---|
80 | |
---|
81 | #*------------------------------------------------------------------- |
---|
82 | #Parametros |
---|
83 | *--------------------------------------------------------------------*# |
---|
84 | |
---|
85 | PARAMETERS |
---|
86 | |
---|
87 | outer PP as Plugin (Brief = "External Physical Properties (Fluid Phase)", Type="PP"); |
---|
88 | outer PPS as Plugin (Brief = "External Physical Properties (Solid Phase)", Type="PP"); |
---|
89 | outer NComp as Integer (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1); |
---|
90 | outer NCompS as Integer (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1); |
---|
91 | M(NComp) as molweight (Brief = "Component Mol Weight (Fluid Phase), Vector Size = NComp", Protected=true); |
---|
92 | MS(NCompS) as molweight (Brief = "Component Mol Weight (Solid Phase), Vector Size = NCompS", Protected=true); |
---|
93 | outer flu as ConstituentFluid(Symbol = " ", Protected = true); |
---|
94 | outer sol as ConstituentSolid(Symbol = " ", Protected = true); |
---|
95 | |
---|
96 | #*------------------------------------------------------------------- |
---|
97 | * Define o valor dos parametros declarados no modelo |
---|
98 | *--------------------------------------------------------------------*# |
---|
99 | |
---|
100 | SET |
---|
101 | |
---|
102 | M = PP.MolecularWeight(); |
---|
103 | MS = PPS.MolecularWeight(); |
---|
104 | |
---|
105 | SugarCane.Phase = "Liquid"; |
---|
106 | Dirt.Phase = "Liquid"; |
---|
107 | |
---|
108 | #*------------------------------------------------------------------- |
---|
109 | * Equacoes do modelo |
---|
110 | *--------------------------------------------------------------------*# |
---|
111 | |
---|
112 | EQUATIONS |
---|
113 | "Water Flow per Flow of Fiber" |
---|
114 | Water.Fluid.Fw = (CrudeCane.Fluid.Fw + CrudeCane.Solid.Fw) * WFPTC; |
---|
115 | |
---|
116 | "Global Molar Balance (Fluid Phase)" |
---|
117 | CrudeCane.Fluid.F + Water.Fluid.F = SugarCane.Fluid.F + Dirt.Fluid.F; |
---|
118 | |
---|
119 | "Sum of Molar Fractions (Fluid Phase)" |
---|
120 | sum(SugarCane.Fluid.z) = sum(Dirt.Fluid.z); |
---|
121 | |
---|
122 | for i in [1 : NComp] do |
---|
123 | if i equal flu.Water then |
---|
124 | "Component Molar Balance (Fluid Phase) 1" |
---|
125 | CrudeCane.Fluid.F * CrudeCane.Fluid.z(i) = SugarCane.Fluid.F * SugarCane.Fluid.z(i); |
---|
126 | |
---|
127 | "Component Molar Balance (Fluid Phase) 2" |
---|
128 | Water.Fluid.F * Water.Fluid.z(i) = Dirt.Fluid.F * Dirt.Fluid.z(i); |
---|
129 | |
---|
130 | else |
---|
131 | "Component Molar Balance (Fluid Phase) 1" |
---|
132 | CrudeCane.Fluid.F * CrudeCane.Fluid.z(i) * (1 - SugarLosses) = SugarCane.Fluid.F * SugarCane.Fluid.z(i); |
---|
133 | |
---|
134 | "Component Molar Balance (Fluid Phase) 2" |
---|
135 | CrudeCane.Fluid.F * CrudeCane.Fluid.z(i) * SugarLosses = Dirt.Fluid.F * Dirt.Fluid.z(i); |
---|
136 | end |
---|
137 | end |
---|
138 | |
---|
139 | for i in [1 : NCompS] do |
---|
140 | if i equal sol.Impurities then |
---|
141 | "Component Molar Balance (Solid Phase) 1" |
---|
142 | SugarCane.Solid.F * SugarCane.Solid.z(i) = (CrudeCane.Solid.F * CrudeCane.Solid.z(i) + Water.Solid.F * Water.Solid.z(i)) * (1-Efficiency); |
---|
143 | |
---|
144 | "Component Molar Balance (Solid Phase) 2" |
---|
145 | Dirt.Solid.F * Dirt.Solid.z(i) = (CrudeCane.Solid.F * CrudeCane.Solid.z(i) + Water.Solid.F * Water.Solid.z(i)) * Efficiency; |
---|
146 | else |
---|
147 | "Component Molar Balance (Solid Phase) 1" |
---|
148 | SugarCane.Solid.F * SugarCane.Solid.z(i) = (CrudeCane.Solid.F * CrudeCane.Solid.z(i) + Water.Solid.F * Water.Solid.z(i)) * Separation; |
---|
149 | |
---|
150 | "Component Molar Balance (Solid Phase) 2" |
---|
151 | Dirt.Solid.F * Dirt.Solid.z(i) = (CrudeCane.Solid.F * CrudeCane.Solid.z(i) + Water.Solid.F * Water.Solid.z(i)) * (1-Separation); |
---|
152 | end |
---|
153 | end |
---|
154 | |
---|
155 | "Global Molar Balance (Solid Phase)" |
---|
156 | CrudeCane.Solid.F + Water.Solid.F = Dirt.Solid.F + SugarCane.Solid.F; |
---|
157 | |
---|
158 | "Sum of Molar Fractions (Solid Phase)" |
---|
159 | sum(SugarCane.Solid.z) = sum(Dirt.Solid.z); |
---|
160 | |
---|
161 | "Solid Humidty" |
---|
162 | Dirt.Total.zw(flu.Water) = humidity; |
---|
163 | |
---|
164 | "SugarCane Stream Impurities" |
---|
165 | SugarCane.Fluid.Fw = impurity * (SugarCane.Fluid.Fw + SugarCane.Solid.Fw); |
---|
166 | |
---|
167 | "Thermal Equilibrium 1" |
---|
168 | Dirt.T = CrudeCane.T; |
---|
169 | |
---|
170 | "Thermal Equilibrium 2" |
---|
171 | SugarCane.T = CrudeCane.T; |
---|
172 | |
---|
173 | "Mechanical Equilibrium 1" |
---|
174 | Dirt.P = CrudeCane.P; |
---|
175 | |
---|
176 | "Mechanical Equilibrium 2" |
---|
177 | SugarCane.P = CrudeCane.P; |
---|
178 | |
---|
179 | "Calculation of Fiber" |
---|
180 | Fiber * (CrudeCane.Solid.Fw + CrudeCane.Fluid.Fw) = |
---|
181 | CrudeCane.Solid.Fw * (CrudeCane.Solid.z(sol.Cellulose) + CrudeCane.Solid.z(sol.Hemicell) + CrudeCane.Solid.z(sol.Lignin)); |
---|
182 | |
---|
183 | end |
---|
184 | |
---|
185 | |
---|
186 | FlowSheet teste_cleaning |
---|
187 | |
---|
188 | #*------------------------------------------------------------------- |
---|
189 | * Declaracao de dispositivos (ou blocos contendo o modelo) |
---|
190 | *--------------------------------------------------------------------*# |
---|
191 | |
---|
192 | DEVICES |
---|
193 | C101 as cleaning; |
---|
194 | S101 as main_sourceR; |
---|
195 | S102 as main_sourceR; |
---|
196 | |
---|
197 | #*------------------------------------------------------------------- |
---|
198 | * Especifica as conexoes entre os modelos |
---|
199 | *--------------------------------------------------------------------*# |
---|
200 | |
---|
201 | CONNECTIONS |
---|
202 | S101.Outlet to C101.CrudeCane; |
---|
203 | S102.Outlet to C101.Water; |
---|
204 | |
---|
205 | #*------------------------------------------------------------------- |
---|
206 | #Parametros |
---|
207 | *--------------------------------------------------------------------*# |
---|
208 | |
---|
209 | PARAMETERS |
---|
210 | PP as Plugin (Brief = "External Physical Properties", |
---|
211 | Type="PP", |
---|
212 | Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm" |
---|
213 | ); |
---|
214 | PPS as Plugin (Brief = "External Physical Properties", |
---|
215 | Type="PP", |
---|
216 | Project = "../Flowsheets/v2_2/Solid_v2_2.vrtherm" |
---|
217 | ); |
---|
218 | |
---|
219 | NComp as Integer (Brief = "Number of chemical components in the fluid phase"); |
---|
220 | NCompS as Integer (Brief = "Number of chemical components in the solid phase"); |
---|
221 | flu as ConstituentFluid(Symbol = " ", Protected = true); |
---|
222 | sol as ConstituentSolid(Symbol = " ", Protected = true); |
---|
223 | |
---|
224 | #*------------------------------------------------------------------- |
---|
225 | * Especifica variaveis definidas no modelo |
---|
226 | *--------------------------------------------------------------------*# |
---|
227 | |
---|
228 | SPECIFY |
---|
229 | # CrudeCane |
---|
230 | S101.CompositionOfFluid(1:3) = [0.8, 0.16, 0.04]; |
---|
231 | S101.CompositionOfFluid(4:NComp) = 0; |
---|
232 | S101.CompositionOfSolid = [0.57, 0.193, 0.193, 0, 0.044, 0, 0, 0, 0]; |
---|
233 | S101.Fluid.Fw = 442.78 * 't/h'; |
---|
234 | S101.Solid.Fw = 57.2 * 't/h'; |
---|
235 | S101.T = 300.318 * 'K'; |
---|
236 | S101.P = 1 * 'atm'; |
---|
237 | |
---|
238 | # Water |
---|
239 | S102.CompositionOfFluid = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; |
---|
240 | S102.CompositionOfSolid = [0.57, 0.193, 0.193, 0, 0.044, 0, 0, 0, 0]; |
---|
241 | S102.Fluid.Fw = 1100 * 't/h'; |
---|
242 | S102.Solid.Fw = 0 * 'kg/h'; |
---|
243 | S102.T = 300.318 * 'K'; |
---|
244 | S102.P = 1 * 'atm'; |
---|
245 | |
---|
246 | C101.Efficiency = 0.9; |
---|
247 | C101.Separation = 0.99; |
---|
248 | C101.SugarLosses = 0.02; |
---|
249 | |
---|
250 | #*------------------------------------------------------------------- |
---|
251 | * Define o valor dos parametros declarados no modelo |
---|
252 | *--------------------------------------------------------------------*# |
---|
253 | |
---|
254 | SET |
---|
255 | NComp = PP.NumberOfComponents(); |
---|
256 | NCompS = PPS.NumberOfComponents(); |
---|
257 | S101.CompositionBasis = "Molar"; |
---|
258 | S102.CompositionBasis = "Molar"; |
---|
259 | |
---|
260 | #*------------------------------------------------------------------- |
---|
261 | * Condicoes iniciais e opcoes de Solver |
---|
262 | *--------------------------------------------------------------------*# |
---|
263 | |
---|
264 | OPTIONS |
---|
265 | Dynamic = false; |
---|
266 | |
---|
267 | end |
---|