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