source: trunk/BioModel/separators/dry_cleaning.mso @ 1008

Last change on this file since 1008 was 1008, checked in by Argimiro Resende Secchi, 21 months ago

Adding BioModel? to the MSO library.

File size: 11.6 KB
Line 
1#*-------------------------------------------------------------------
2* Biorrefinaria Petrobras
3*--------------------------------------------------------------------
4* Nome do arquivo: dry_cleaning.mso
5* Projeto: Modelo integrado de producao de etanol 1G/2G
6* Conteudo: limpeza a seco 
7*--------------------------------------------------------------------*#
8
9#*-------------------------------------------------------------------
10*
11* Versao 2.2
12* Data:    03/2016
13* Autores:   Anderson R. A. Lino e Felipe F. Furlan
14*
15*--------------------------------------------------------------------
16*Descricao: modelo de limpeza a seco que sera empregado
17*na biorrefinaria.
18*--------------------------------------------------------------------
19
20*--------------------------------------------------------------------
21*Notas: Foi feito flowsheet para averiguar o modelo
22*--------------------------------------------------------------------*#
23
24using "main_stream";
25using "water_stream";
26using "energy_stream";
27using "assumptions";
28
29
30
31Model dry_cleaning
32       
33        ATTRIBUTES
34        Pallete         = true;
35        Icon            = "icon/dry_cleaning";
36        Brief           = "Model of a Dry-Cleaning";
37        Info =
38"== GENERAL ==
39        Model of a simplified sugarcane dry-cleaning used to
40        decrease the amount of impurities (dirt) in the sugarcane stream.
41       
42== ASSUMPTIONS ==
43* Steady-state;
44* Adiabatic.
45
46== SPECIFY ==
47* The CrudeCane stream:
48  flow rate
49  temperature
50  pressure;
51  stream composition;
52* The InletStraw stream (Except the fluid flow);
53  flow rate
54  temperature
55  pressure;
56  stream composition;
57* The cleaning efficiency (Cleaning_effVeg and Cleaning_effMin);
58* The fraction of sugar lost (SugarLosses);
59* The Duty;
60* The Fiber_cane.
61
62== SET ==
63* Basic composition (mass or molar);
64* Number of stream components(Ncomp/NcompS).
65";
66
67#*-------------------------------------------------------------------
68* Declaracao de variaveis
69*--------------------------------------------------------------------*#
70       
71        VARIABLES
72in      CrudeCane                       as main_stream          (Brief = "Inlet Cane", PosX=0.0, PosY=1.0, Symbol="_{Cane}", Protected = false);
73in      InletStraw                      as main_stream          (Brief = "Inlet Straw", PosX=0.2, PosY=0.5, Symbol="_{InletStraw}", Protected = false);
74out     SugarCane                       as main_stream_eq       (Brief = "SugarCane Stream", PosX=1.0, PosY=0.5, Symbol="_{Sugar}", Protected = false);
75out     Impurities                      as main_stream_eq       (Brief = "Dirt Stream", PosX=0.5, PosY=1.0, Symbol="_{Dirt}", Protected = false );
76out     OutletStraw             as main_stream_eq       (Brief = "Outlet Straw", PosX=0.8, PosY=1.0, Symbol="_{OutletStraw}", Protected = false);
77        Duty                            as positive                     (Brief = "Actual Duty (per Ton of InletStraw)", Symbol="Q_{Duty}", Default=5, Unit = 'kW*h/ton');
78        Work                            as power                        (Brief = "Inlet Work Stream", PosX=0.0, PosY=0.7, Symbol="_{Work}");
79        SFPTC                           as positive                     (Brief = "Ton of InletStraw Per Ton of Cane", Default=70, Unit = 'kg/t');
80        Cleaning_effVeg         as fraction             (Brief = "Vegetal Impurities Cleaning Efficiency");
81        Cleaning_effMin         as fraction             (Brief = "Mineral Impurities Cleaning Efficiency");
82        SugarLosses             as fraction                     (Brief = "Fraction of Sugar Lost in the Sludge");
83        humidity_sludge         as fraction                     (Brief = "Fraction of Water in the Sludge");
84        humidity_straw          as fraction                     (Brief = "Fraction of Water in the OutletStraw");
85        impurity                        as fraction                     (Brief = "Fraction of Impurities in the SugarCane");
86        Fiber_cane              as fraction                     (Brief = "Amount of Fiber in the CrudeCane", Default = 0.12, Protected = true);
87        Fiber_straw         as fraction                 (Brief = "Amount of Fiber in the InletStraw", Default = 0.24, Protected = true);
88       
89#*-------------------------------------------------------------------
90#Parametros
91*--------------------------------------------------------------------*#
92
93        PARAMETERS
94       
95outer   PP                              as Plugin               (Brief = "External Physical Properties (Fluid Phase)", Type="PP");
96outer   PPS                     as Plugin               (Brief = "External Physical Properties (Solid Phase)", Type="PP");
97outer   NComp                   as Integer              (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1);
98outer   NCompS                  as Integer              (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1);
99                M(NComp)                as molweight    (Brief = "Component Mol Weight (Fluid Phase), Vector Size = NComp", Protected=true);
100                MS(NCompS)      as molweight    (Brief = "Component Mol Weight (Solid Phase), Vector Size = NCompS", Protected=true);
101outer   flu                     as ConstituentFluid     (Symbol = " ", Protected = true);
102outer   sol                     as ConstituentSolid     (Symbol = " ", Protected = true);       
103       
104#*-------------------------------------------------------------------
105* Define o valor dos parametros declarados no modelo
106*--------------------------------------------------------------------*#
107
108        SET
109       
110        M   = PP.MolecularWeight();
111        MS   = PPS.MolecularWeight();
112       
113        SugarCane.Phase = "Liquid";
114        Impurities.Phase = "Liquid";
115        OutletStraw.Phase = "Liquid";
116       
117#*-------------------------------------------------------------------
118* Equacoes do modelo
119*--------------------------------------------------------------------*#
120       
121        EQUATIONS
122       
123        "InletStraw Flow per Flow of CrudeCane"
124        InletStraw.Total.Fw = CrudeCane.Total.Fw * SFPTC;
125       
126        "InletStraw Humidity"
127        OutletStraw.Total.zw(flu.Water) = humidity_straw;
128       
129        "Global Molar Balance (Fluid Phase)"
130        CrudeCane.Fluid.F + InletStraw.Fluid.F = SugarCane.Fluid.F + Impurities.Fluid.F + OutletStraw.Fluid.F;
131       
132        "Sum of Molar Fractions (Fluid Phase) 1"
133        sum(SugarCane.Fluid.z) = sum(Impurities.Fluid.z);
134       
135        "Sum of Molar Fractions (Fluid Phase) 2"
136        sum(SugarCane.Fluid.z) = sum(OutletStraw.Fluid.z);
137       
138        for i in [1 : NComp] do
139                "Component Molar Balance (Fluid Phase) 1"
140                CrudeCane.Fluid.F * CrudeCane.Fluid.z(i) * (1 - SugarLosses) + InletStraw.Fluid.F * InletStraw.Fluid.z(i) * (1-Cleaning_effVeg) = SugarCane.Fluid.F * SugarCane.Fluid.z(i);
141               
142                "Component Molar Balance (Fluid Phase) 2"
143                InletStraw.Fluid.F * InletStraw.Fluid.z(i) * Cleaning_effVeg + CrudeCane.Fluid.F * CrudeCane.Fluid.z(i) * SugarLosses = OutletStraw.Fluid.F * OutletStraw.Fluid.z(i);
144               
145                "Component Molar Balance (Fluid Phase) 3"
146                Impurities.Fluid.F * Impurities.Fluid.z(i) = 1e-6 * 'kmol/h';
147               
148        end
149       
150        for i in [1 : NCompS] do
151                if i equal sol.Impurities then
152                        "Component Molar Balance (Solid Phase) 1"
153                        SugarCane.Solid.F * SugarCane.Solid.z(i) = (CrudeCane.Solid.F * CrudeCane.Solid.z(i) + InletStraw.Solid.F * InletStraw.Solid.z(i)) * (1-Cleaning_effMin);
154                       
155                        "Component Molar Balance (Solid Phase) 2"
156                        OutletStraw.Solid.F * OutletStraw.Solid.z(i) = 1e-6 * 'kmol/h';
157               
158                        "Component Molar Balance (Solid Phase) 3"
159                        Impurities.Solid.F * Impurities.Solid.z(i) = (InletStraw.Solid.F * InletStraw.Solid.z(i) + CrudeCane.Solid.F * CrudeCane.Solid.z(i)) * Cleaning_effMin;
160                else
161                        "Component Molar Balance (Solid Phase) 1"
162                        SugarCane.Solid.F * SugarCane.Solid.z(i) = CrudeCane.Solid.F * CrudeCane.Solid.z(i) * (1 - SugarLosses) + InletStraw.Solid.F * InletStraw.Solid.z(i) * (1-Cleaning_effVeg);
163                       
164                        "Component Molar Balance (Solid Phase) 2"
165                        OutletStraw.Solid.F * OutletStraw.Solid.z(i) = (InletStraw.Solid.F * InletStraw.Solid.z(i)) * Cleaning_effVeg + CrudeCane.Solid.F * CrudeCane.Solid.z(i) * SugarLosses;
166               
167                        "Component Molar Balance (Solid Phase) 3"
168                        Impurities.Solid.F * Impurities.Solid.z(i) = 1e-6 * 'kmol/h';
169                end
170        end
171       
172        "Global Molar Balance (Solid Phase) 1"
173        CrudeCane.Solid.F + InletStraw.Solid.F = Impurities.Solid.F + SugarCane.Solid.F + OutletStraw.Solid.F;
174       
175        "Sum of Molar Fractions (Solid Phase) 2"
176        sum(SugarCane.Solid.z) = sum(Impurities.Solid.z);
177       
178        "Sum of Molar Fractions (Solid Phase)"
179        sum(SugarCane.Solid.z) = sum(OutletStraw.Solid.z);
180       
181        "Dirt Humidty"
182        Impurities.Total.zw(flu.Water) = humidity_sludge;
183       
184        "SugarCane Stream Impurities"
185        SugarCane.Total.zw(sol.Impurities) = impurity;
186       
187        "Thermal Equilibrium 1"
188        Impurities.T = CrudeCane.T;
189       
190        "Thermal Equilibrium 2"
191        SugarCane.T = CrudeCane.T;
192       
193        "Thermal Equilibrium 3"
194        OutletStraw.T = CrudeCane.T;
195       
196        "Mechanical Equilibrium 1"
197        Impurities.P = CrudeCane.P;
198       
199        "Mechanical Equilibrium 2"
200        SugarCane.P = CrudeCane.P;
201       
202        "Mechanical Equilibrium 3"
203        OutletStraw.P = CrudeCane.P;
204       
205        "Calculation of Fiber in the CrudeCane"
206        Fiber_cane * CrudeCane.Total.Fw =
207                CrudeCane.Solid.Fw * (CrudeCane.Solid.zw(sol.Cellulose) + CrudeCane.Solid.zw(sol.Hemicell) + CrudeCane.Solid.zw(sol.Lignin));
208       
209        "Calculation of Fiber in the InletStraw"
210        Fiber_straw * InletStraw.Total.Fw =
211                InletStraw.Solid.Fw * (InletStraw.Solid.zw(sol.Cellulose) + InletStraw.Solid.zw(sol.Hemicell) + InletStraw.Solid.zw(sol.Lignin));
212       
213        "Calculation of Work"
214        Work = InletStraw.Total.Fw * Duty;
215       
216end
217
218
219
220FlowSheet teste_dry_cleaning
221       
222#*-------------------------------------------------------------------
223* Declaracao de dispositivos (ou blocos contendo o modelo)
224*--------------------------------------------------------------------*#
225       
226        DEVICES
227        E101 as dry_cleaning;
228        S101 as main_sourceR;
229        S102 as main_sourceR;
230       
231#*-------------------------------------------------------------------
232* Especifica as conexoes entre os modelos
233*--------------------------------------------------------------------*#
234       
235        CONNECTIONS
236        S101.Outlet to E101.CrudeCane;
237        S102.Outlet to E101.InletStraw;
238       
239#*-------------------------------------------------------------------
240#Parametros
241*--------------------------------------------------------------------*#
242       
243        PARAMETERS
244        PP as Plugin    (Brief = "External Physical Properties",
245                Type="PP",
246                Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm"
247        );
248        PPS as Plugin   (Brief = "External Physical Properties",
249                Type="PP",
250                Project = "../Flowsheets/v2_2/Solid_v2_2.vrtherm"
251        );
252       
253        NComp   as Integer (Brief = "Number of chemical components in the fluid phase");
254        NCompS  as Integer (Brief = "Number of chemical components in the solid phase");
255        flu as ConstituentFluid(Symbol = " ", Protected = true);
256        sol as ConstituentSolid(Symbol = " ", Protected = true);
257       
258#*-------------------------------------------------------------------
259* Especifica variaveis definidas no modelo
260*--------------------------------------------------------------------*#
261
262        SPECIFY
263        S101.CompositionOfFluid = [0.8111, 0.1615, 0.0069, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0003, 0.0201, 0, 0];
264        S101.CompositionOfSolid = [0.4491, 0.2407, 0.2406, 0.0449, 0, 0, 0, 0, 0.0247];
265        S101.T = 300.318 * 'K';
266        S101.P = 1 * 'atm';
267       
268        S102.CompositionOfFluid = [0.8668, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.1332, 0, 0];
269        S102.CompositionOfSolid = [0.3926, 0.3203, 0.2135, 0.0735, 0, 0, 0, 0, 0];
270        S102.T = 300.318 * 'K';
271        S102.P = 1 * 'atm';
272       
273        E101.Fiber_cane = 0.131;
274        E101.Cleaning_effVeg = 0.55;
275        E101.Cleaning_effMin = 0.65;
276        E101.SugarLosses = 0.005;
277        E101.Duty = 5 * 'kW*h/t';
278       
279        EQUATIONS
280        S101.Outlet.Total.Fw = 833.333 * 't/h';
281       
282        #Quantidade de palha que entra como impureza vegetal
283        S102.Outlet.Total.Fw = 0.048 * (S101.Outlet.Total.Fw + S102.Outlet.Total.Fw);
284       
285        #Umidade da palha que entra como impureza vegetal
286        S102.Outlet.Total.zw(flu.Water) = 0.57;
287       
288#*-------------------------------------------------------------------
289* Define o valor dos parametros declarados no modelo
290*--------------------------------------------------------------------*#
291
292        SET
293        NComp = PP.NumberOfComponents();
294        NCompS = PPS.NumberOfComponents();
295        S101.CompositionBasis = "Mass";
296        S102.CompositionBasis = "Mass";
297       
298#*-------------------------------------------------------------------
299* Condicoes iniciais e opcoes de Solver
300*--------------------------------------------------------------------*#
301
302        OPTIONS
303        Dynamic = false;
304       
305end
Note: See TracBrowser for help on using the repository browser.