source: trunk/BioModel/separators/filter.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.5 KB
Line 
1#*-------------------------------------------------------------------
2* Biorrefinaria Petrobras
3*--------------------------------------------------------------------
4* Nome do arquivo: filter.mso
5* Projeto: Modelo integrado de producao de etanol 1G/2G
6* Conteudo: filtro
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*Controle de versao:
17*Versao 2.3
18* Data:    06/2020
19* Autor:   Ediane Sa
20* Alteracao: Inclui a variável main_fluid, o usuario define o
21* o componente princial da fase fluida.
22*--------------------------------------------------------------------
23*Descricao: modelo do filtro que sera empregado
24*na biorrefinaria
25*--------------------------------------------------------------------
26
27*--------------------------------------------------------------------
28*Notas: Foi feito o flowsheet teste para averiguar o modelo
29*--------------------------------------------------------------------*#
30
31using "main_stream";
32using "assumptions";
33
34Model filter
35       
36        ATTRIBUTES
37        Pallete         = true;
38        Icon            = "icon/filter";
39        Brief           = "Model of a Filter";
40        Info =
41"== GENERAL ==
42        Model of a generic filter with a FilterCake and a Filtrate
43        streams.
44       
45== ASSUMPTIONS ==
46* Steady-state;
47* Adiabatic.
48
49== SPECIFY ==
50* The inlet stream:
51  flow rate
52  temperature
53  pressure
54  stream composition;
55* Main component of the fluid phase;
56* The split fractions for main fluid, others fluids and solid phases.
57
58== SET ==
59* Number of stream components(Ncomp/NcompS).
60";
61
62#*-------------------------------------------------------------------
63* Declaracao de variaveis
64*--------------------------------------------------------------------*#
65       
66        VARIABLES
67in      Inlet                   as main_stream  (Brief = "Inlet Stream", PosX=0.57, PosY=0.0, Symbol="_{in}", Protected = false);
68out     FilterCake              as main_stream  (Brief = "Filter Cake Stream", PosX=0.57, PosY=1.0, Symbol="_{Cake}", Protected = false);
69out     Filtrate                as main_stream  (Brief = "Filtrate Stream", PosX=0.0, PosY=0.7, Symbol="_{Filtrate}", Protected = false );
70        frac_insol              as fraction             (Brief = "Insoluble Solids Separation Efficiency", Symbol = "f_{insol}");
71        frac_fil1               as fraction             (Brief = "Main fluid Separation Efficiency", Symbol = "f_{water}");
72        frac_fil2               as fraction             (Brief = "Other fluid components Separation Efficiency", Symbol = "f_{sol}");
73        humidity                as fraction             (Brief = "Fraction of water in the Sludge");
74        impurity                as fraction             (Brief = "Fraction of solids in the Filtrate");
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);
88outer   flu                     as ConstituentFluid(Symbol = " ", Protected = true);
89                main_fluid              as positive             (Brief = "Main component of the fluid phase", Default=1);
90       
91#*-------------------------------------------------------------------
92* Define o valor dos parametros declarados no modelo
93*--------------------------------------------------------------------*#
94
95        SET
96        M  = PP.MolecularWeight();
97        MS = PPS.MolecularWeight();
98       
99#*-------------------------------------------------------------------
100* Equacoes do modelo
101*--------------------------------------------------------------------*#
102       
103        EQUATIONS
104        "Global Molar Balance (Fluid Phase)"
105        Inlet.Fluid.F = FilterCake.Fluid.F + Filtrate.Fluid.F;
106       
107        for i in [1:NComp] do
108                if i equal main_fluid then
109                        "Component Molar Balance (Fluid Phase)"
110                        Filtrate.Fluid.F * Filtrate.Fluid.z(i) = Inlet.Fluid.F * Inlet.Fluid.z(i) * frac_fil1;
111                       
112                        "Component Molar Balance (Fluid Phase)"
113                        FilterCake.Fluid.F * FilterCake.Fluid.z(i) = Inlet.Fluid.F * Inlet.Fluid.z(i) * (1 - frac_fil1);
114                else
115                        "Component Molar Balance (Fluid Phase)"
116                        Filtrate.Fluid.F * Filtrate.Fluid.z(i) = Inlet.Fluid.F * Inlet.Fluid.z(i) * frac_fil2;
117                       
118                        "Component Molar Balance (Fluid Phase)"
119                        FilterCake.Fluid.F * FilterCake.Fluid.z(i) = Inlet.Fluid.F * Inlet.Fluid.z(i) * (1 - frac_fil2);
120                end
121        end
122       
123        "Sum of Molar Fractions (Fluid Phase)"
124        sum(FilterCake.Fluid.z) = sum(Filtrate.Fluid.z);
125       
126        "Global Molar Balance (Solid Phase)"
127        Inlet.Solid.F = FilterCake.Solid.F + Filtrate.Solid.F;
128       
129        "Solid Separation Efficiency"
130        FilterCake.Solid.F = Inlet.Solid.F * frac_insol;
131       
132        "FilterCake Stream Composition (Solid Phase)"
133        FilterCake.Solid.z = Inlet.Solid.z;
134       
135        "Filtrate Stream Composition (Solid Phase)"
136        Filtrate.Solid.z = Inlet.Solid.z;
137       
138        "FilterCake Humidty"
139        FilterCake.Total.zw(main_fluid) = humidity;
140       
141        "Filtrate Stream Impurities"
142        Filtrate.Solid.Fw = impurity * (Filtrate.Fluid.Fw + Filtrate.Solid.Fw);
143       
144        "FilterCake  Molar Enthalpy (Fluid Phase)"
145        FilterCake.Fluid.h = PP.LiquidEnthalpy(FilterCake.T, FilterCake.P, FilterCake.Fluid.z);
146       
147        "Filtrate Molar Enthalpy (Fluid Phase)"
148        Filtrate.Fluid.h = PP.LiquidEnthalpy(Filtrate.T, Filtrate.P, Filtrate.Fluid.z);
149       
150        "FilterCake Molar Enthalpy (Solid Phase)"
151        FilterCake.Solid.h = PPS.VapourEnthalpy(FilterCake.T, FilterCake.P, FilterCake.Solid.z);
152       
153        "Filtrate Molar Enthalpy (Solid Phase)"
154        Filtrate.Solid.h = PPS.VapourEnthalpy(Filtrate.T, Filtrate.P, Filtrate.Solid.z);
155       
156        "Thermal Equilibrium 1"
157        FilterCake.T = Inlet.T;
158       
159        "Thermal Equilibrium 2"
160        Filtrate.T = Inlet.T;
161       
162        "FilterCake Vapour Fraction"
163        FilterCake.v = Inlet.v;
164       
165        "Filtrate Vapour Fraction"
166        Filtrate.v = Inlet.v;
167       
168        "Mechanical Equilibrium 1"
169        FilterCake.P = Inlet.P;
170       
171        "Mechanical Equilibrium 2"
172        Filtrate.P = Inlet.P;
173       
174end
175
176
177FlowSheet teste_filter
178       
179#*-------------------------------------------------------------------
180* Declaracao de dispositivos (ou blocos contendo o modelo)
181*--------------------------------------------------------------------*#
182       
183        DEVICES
184        F101 as filter;
185        S101 as main_sourceR;
186       
187#*-------------------------------------------------------------------
188* Especifica as conexoes entre os modelos
189*--------------------------------------------------------------------*#
190       
191        CONNECTIONS
192        S101.Outlet to F101.Inlet;
193       
194#*-------------------------------------------------------------------
195#Parametros
196*--------------------------------------------------------------------*#
197       
198        PARAMETERS
199        PP as Plugin    (Brief = "External Physical Properties",
200                Type="PP",
201                Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm"
202        );
203        PPS as Plugin   (Brief = "External Physical Properties",
204                Type="PP",
205                Project = "../Flowsheets/v2_2/Solid_v2_2.vrtherm"
206        );
207       
208        NComp   as Integer (Brief = "Number of chemical components in the fluid phase");
209        NCompS  as Integer (Brief = "Number of chemical components in the solid phase");
210        flu as ConstituentFluid(Symbol = " ", Protected = true);
211        sol as ConstituentSolid(Symbol = " ", Protected = true);
212       
213#*-------------------------------------------------------------------
214* Especifica variaveis definidas no modelo
215*--------------------------------------------------------------------*#
216
217        SPECIFY
218        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];
219        S101.CompositionOfSolid = [0.4, 0.3, 0.28, 0.02, 0, 0, 0, 0, 0];
220        S101.Fluid.Fw = 50 * 'kg/h';
221        S101.Solid.Fw = 50 * 'kg/h';
222        S101.T = 300.318 * 'K';
223        S101.P = 1 * 'atm';
224       
225        F101.frac_fil1 = 0.9;
226        F101.frac_fil2 = 0.9;
227        F101.frac_insol = 0.9;
228                       
229#*-------------------------------------------------------------------
230* Define o valor dos parametros declarados no modelo
231*--------------------------------------------------------------------*#
232
233        SET
234       
235        NComp = PP.NumberOfComponents();
236        NCompS = PPS.NumberOfComponents();
237       
238#*-------------------------------------------------------------------
239* Condicoes iniciais e opcoes de Solver
240*--------------------------------------------------------------------*#
241       
242        OPTIONS
243        Dynamic = false;
244
245end
Note: See TracBrowser for help on using the repository browser.