source: trunk/BioModel/separators/centrifuge.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: 8.4 KB
Line 
1#*-------------------------------------------------------------------
2* Biorrefinaria Petrobras
3*--------------------------------------------------------------------
4* Nome do arquivo: centrifuge.mso
5* Projeto: Modelo integrado de producao de etanol 1G/2G
6* Conteudo: centrifuga
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 centrifuga que sera empregado
17*na biorrefinaria
18*--------------------------------------------------------------------
19
20*--------------------------------------------------------------------
21*Notas: Foi feito o flowsheet teste para averiguar o modelo
22*--------------------------------------------------------------------*#
23
24using "main_stream";
25using "energy_stream";
26using "assumptions";
27
28Model centrifuge
29       
30        ATTRIBUTES
31        Pallete         = true;
32        Icon            = "icon/centrifuge";
33        Brief           = "Model of a Centrifuge";
34        Info =
35"== GENERAL ==
36        Model of a generic centrifuge with a FilterCake and a Filtrate
37        streams.
38       
39== ASSUMPTIONS ==
40* Steady-state;
41* Adiabatic;
42* Centrifuges operate continuously.
43
44== SPECIFY ==
45* The inlet stream:
46  flow rate
47  temperature
48  pressure
49  stream composition;
50* The split fractions for the fluid and solid phases;
51* Individual power requirement (Power).
52
53== SET ==
54* Number of stream components(Ncomp/NcompS).
55";
56
57#*-------------------------------------------------------------------
58* Declaracao de variaveis
59*--------------------------------------------------------------------*#
60       
61        VARIABLES
62in      Inlet                   as main_stream  (Brief = "Inlet Stream", PosX=0.0, PosY=0.40, Symbol="_{in}", Protected = false);
63out     FilterCake              as main_stream  (Brief = "Filter Cake Stream", PosX=0.50, PosY=1.0, Symbol="_{Cake}", Protected = false);
64out     Filtrate                as main_stream  (Brief = "Filtrate Stream", PosX=1.0, PosY=0.50, Symbol="_{Filtrate}", Protected = false );
65in      Inlet_p                 as power_stream (Brief = "Centrifuge Potency", PosX=0.00, PosY=0.80, Symbol = "_{inWork}");
66
67        frac_sol                as fraction             (Brief = "Solids Separation Efficiency", Symbol = "f_{sol}");
68        frac_liq                as fraction             (Brief = "Liquid Separation Efficiency", Symbol = "f_{liq}");
69        humidity                as fraction             (Brief = "Fraction of water in the Sludge");
70        impurity                as fraction             (Brief = "Fraction of solids in the Filtrate");
71       
72        Nunits                  as Real         (Brief = "Number of Centrifuges Used in the Process");
73        Ncent                   as Real                 (Brief = "Number of Centrifuges Calculated", Protected = true, Hidden = true);
74        Power                   as power                (Brief = "Individual Centrifuge Power Requirement");
75       
76#*-------------------------------------------------------------------
77#Parametros
78*--------------------------------------------------------------------*#
79
80        PARAMETERS
81       
82outer   PP                              as Plugin               (Brief = "External Physical Properties (Fluid Phase)", Type="PP");
83outer   PPS                     as Plugin               (Brief = "External Physical Properties (Solid Phase)", Type="PP");
84outer   NComp                   as Integer              (Brief = "Number of Chemical Components for the Fluid Phase", Lower = 1);
85outer   NCompS                  as Integer              (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1);
86                M(NComp)                as molweight    (Brief = "Component Mol Weight (Fluid Phase), Vector Size = NComp", Protected=true);
87                MS(NCompS)      as molweight    (Brief = "Component Mol Weight (Solid Phase), Vector Size = NCompS", Protected=true);
88                density                 as dens_mass    (Brief = "Mixture/Solution density", Default = 1000);
89                fvol_cent               as flow_vol             (Brief = "Volumetric Flow per centrifuge", Default = 80);
90outer   flu as ConstituentFluid(Symbol = " ", Protected = true);
91
92       
93#*-------------------------------------------------------------------
94* Define o valor dos parametros declarados no modelo
95*--------------------------------------------------------------------*#
96
97        SET
98        M   = PP.MolecularWeight();
99        MS  = PPS.MolecularWeight();
100       
101#*-------------------------------------------------------------------
102* Equacoes do modelo
103*--------------------------------------------------------------------*#
104       
105        EQUATIONS
106        "Global Molar Balance (Fluid Phase)"
107        Inlet.Fluid.F = FilterCake.Fluid.F + Filtrate.Fluid.F;
108       
109        "Liquid Separation Efficiency"
110        Filtrate.Fluid.F = Inlet.Fluid.F * frac_liq;
111       
112        "Filtrate Stream Composition (Fluid Phase)"
113        Filtrate.Fluid.z = Inlet.Fluid.z;
114       
115        "FilterCake Stream Composition (Fluid Phase)"
116        FilterCake.Fluid.z = Inlet.Fluid.z;
117       
118        "Global Molar Balance (Solid Phase)"
119        Inlet.Solid.F = FilterCake.Solid.F + Filtrate.Solid.F;
120       
121        "Solid Separation Efficiency"
122        FilterCake.Solid.F = Inlet.Solid.F * frac_sol;
123       
124        "Filtrate Stream Composition (Solid Phase)"
125        FilterCake.Solid.z = Inlet.Solid.z;
126       
127        "FilterCake Stream Composition (Solid Phase)"
128        Filtrate.Solid.z = Inlet.Solid.z;
129       
130        "FilterCake Humidty"
131        FilterCake.Total.zw(flu.Water) = humidity;
132       
133        "Filtrate Stream Impurities"
134        Filtrate.Solid.Fw = impurity * (Filtrate.Fluid.Fw + Filtrate.Solid.Fw);
135       
136        "FilterCake  Molar Enthalpy (Fluid Phase)"
137        FilterCake.Fluid.h = Inlet.Fluid.h;
138       
139        "Filtrate Molar Enthalpy (Fluid Phase)"
140        Filtrate.Fluid.h = Inlet.Fluid.h;
141       
142        "FilterCake Molar Enthalpy (Solid Phase)"
143        FilterCake.Solid.h = Inlet.Solid.h;
144       
145        "Filtrate Molar Enthalpy (Solid Phase)"
146        Filtrate.Solid.h = Inlet.Solid.h;
147       
148        "Thermal Equilibrium 1"
149        FilterCake.T = Inlet.T;
150       
151        "Thermal Equilibrium 2"
152        Filtrate.T = Inlet.T;
153       
154        "FilterCake Vapour Fraction"
155        FilterCake.Fluid.v = Inlet.Fluid.v;
156       
157        "Filtrate Vapour Fraction"
158        Filtrate.Fluid.v = Inlet.Fluid.v;
159       
160        "Mechanical Equilibrium 1"
161        FilterCake.P = Inlet.P;
162       
163        "Mechanical Equilibrium 2"
164        Filtrate.P = Inlet.P;
165       
166        "Total Centrifuge Power Requirement"
167        Inlet_p.W = Power * Nunits;
168       
169        "Number of Centrifuges Calculated"
170        fvol_cent * density      * Ncent = Inlet.Total.Fw;
171       
172        "Number of Centrifuges used in the Process"
173        Nunits = round(Ncent) + 1;
174       
175end
176
177
178
179FlowSheet teste_centrifuge
180       
181#*-------------------------------------------------------------------
182* Declaracao de dispositivos (ou blocos contendo o modelo)
183*--------------------------------------------------------------------*#
184       
185        DEVICES
186        E101 as centrifuge;
187        S101 as main_sourceR;
188        S102 as power_sourceR;
189       
190#*-------------------------------------------------------------------
191* Especifica as conexoes entre os modelos
192*--------------------------------------------------------------------*#
193       
194        CONNECTIONS
195        S101.Outlet to E101.Inlet;
196        S102.Outlet_p to E101.Inlet_p;
197       
198#*-------------------------------------------------------------------
199#Parametros
200*--------------------------------------------------------------------*#
201       
202        PARAMETERS
203        PP as Plugin    (Brief = "External Physical Properties",
204                Type="PP",
205                Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm"
206        );
207        PPS as Plugin   (Brief = "External Physical Properties",
208                Type="PP",
209                Project = "../Flowsheets/v2_2/Solid_v2_2.vrtherm"
210        );
211       
212        NComp   as Integer (Brief = "Number of chemical components in the fluid phase");
213        NCompS  as Integer (Brief = "Number of chemical components in the solid phase");
214        flu as ConstituentFluid(Symbol = " ", Protected = true);
215        sol as ConstituentSolid(Symbol = " ", Protected = true);
216       
217#*-------------------------------------------------------------------
218* Especifica variaveis definidas no modelo
219*--------------------------------------------------------------------*#
220
221        SPECIFY
222        S101.CompositionOfFluid = [0.8, 0.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0,0];
223        S101.CompositionOfSolid = [0.4, 0.3, 0.28, 0.02, 0, 0, 0, 0, 0];
224        S101.Fluid.Fw = 50 * 'kg/h';
225        S101.Solid.Fw = 50 * 'kg/h';
226        S101.T = 300.318 * 'K';
227        S101.P = 1 * 'atm';
228       
229        E101.frac_sol = 0.9;
230        E101.frac_liq = 0.9;
231        E101.Power = 100 * 'hp';
232       
233#*-------------------------------------------------------------------
234* Define o valor dos parametros declarados no modelo
235*--------------------------------------------------------------------*#
236
237        SET
238       
239        NComp = PP.NumberOfComponents();
240        NCompS = PPS.NumberOfComponents();
241       
242#*-------------------------------------------------------------------
243* Condicoes iniciais e opcoes de Solver
244*--------------------------------------------------------------------*#
245
246        OPTIONS
247        Dynamic = false;
248        NLASolver(
249                File = "sundials",
250                RelativeAccuracy = 1e-3,
251                AbsoluteAccuracy = 1e-6,
252                MaxIterations = 100
253        );
254
255end
256
Note: See TracBrowser for help on using the repository browser.