source: trunk/BioModel/pressure_changers/pump_m.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: 9.4 KB
Line 
1#*-------------------------------------------------------------------
2* Biorrefinaria Petrobras
3*--------------------------------------------------------------------
4* Nome do arquivo: pump_m.mso
5* Projeto: Modelo integrado de producao de etanol 1G/2G
6* Conteudo: bomba
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 bomba que sera empregado na biorrefinaria
17*--------------------------------------------------------------------
18
19*--------------------------------------------------------------------
20*Notas: Foi feito o flowsheet teste para averiguar o modelo
21*As siglas R, L sao indicativos da posisao da corrente de saida
22*sendo R=right e L=legth.
23*--------------------------------------------------------------------*#
24
25using "main_stream";
26using "energy_stream";
27
28Model pump_mL
29
30        ATTRIBUTES
31        Pallete         = true;
32        Icon            = "icon/pumpL";
33        Brief           = "Model of Pump for the Solid Stream";
34        Info            =
35"== GENERAL ==
36        General model for the solid stream.
37       
38== ASSUMPTIONS ==
39* Steady State;
40* Only Liquid;
41* Adiabatic.
42
43== SPECIFY ==
44* Inlet stream:
45  flow rate
46  temperature
47  pressure
48  stream composition;
49* Outlet pressure or pressure increase;
50* Pump efficiency.
51       
52== SET ==
53* fluid density in the pump.
54";
55
56#*-------------------------------------------------------------------
57#Parametros
58*--------------------------------------------------------------------*#
59
60        PARAMETERS
61outer   PP                      as Plugin                       (Brief = "External Physical Properties", Type="PP");
62outer   PPS             as Plugin                       (Brief = "External Physical Properties", Type="PP");
63outer   NComp           as Integer                      (Brief = "Number of Chemical Components", Lower = 1);
64outer   NCompS          as Integer                      (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1);
65                M(NComp)        as molweight            (Brief = "Component Mol Weight", Protected=true, Hidden=true);
66                MS(NCompS)      as molweight            (Brief = "Component Mol Weight", Protected=true, Hidden=true);
67                density         as dens_mass            (Brief = "Mixture/Solution density", Symbol = "\rho");
68       
69#*-------------------------------------------------------------------
70* Define o valor dos parametros declarados no modelo
71*--------------------------------------------------------------------*#
72
73        SET
74        M   = PP.MolecularWeight();
75        MS   = PPS.MolecularWeight();
76       
77#*-------------------------------------------------------------------
78* Declaracao de variaveis
79*--------------------------------------------------------------------*#
80       
81VARIABLES
82
83in  Inlet       as main_stream          (Brief = "Inlet Stream", PosX=0.0, PosY=0.414, Protected = false, Symbol="_{in}");
84out Outlet      as main_stream_PH       (Brief = "Outlet Stream", PosX=0.504, PosY=0.0, Protected = false, Symbol="_{out}");
85       
86        PIn     as press_delta          (Brief = "Pressure Increase", Default=0.01, Lower=0, DisplayUnit='kPa', Symbol ="\Delta P");
87        Pout    as pressure                     (Brief = "Outlet Pressure", Default=1, Lower=0, DisplayUnit='atm', Symbol ="\Outlet P");
88        n               as fraction             (Brief = "Pump Efficiency", Symbol = "\eta");
89in      Inlet_p as power_stream         (Brief = "Pump Potency", PosX=0.5, PosY=1.0, Symbol = "_{in}");
90       
91#*-------------------------------------------------------------------
92* Equacoes do modelo
93*--------------------------------------------------------------------*#
94
95        EQUATIONS
96
97        "Molar Balance (Fluid Phase)"
98        Inlet.Fluid.F  = Outlet.Fluid.F;
99       
100        "Molar Balance (Solid Phase)"
101        Inlet.Solid.F = Outlet.Solid.F;
102
103        "Molar Fraction Constraint (Fluid Phase)"
104        Outlet.Fluid.z = Inlet.Fluid.z;
105       
106        "Molar Fraction Constraint (Solid Phase)"
107        Outlet.Solid.z = Inlet.Solid.z;
108       
109        "Pressure Increase"
110        Outlet.P = Inlet.P + PIn;
111       
112        "Outlet Pressure"
113        Outlet.P = Pout;       
114       
115        "Energy Balance"
116        Inlet_p.W = Inlet.Fluid.F * (Outlet.Fluid.h - Inlet.Fluid.h) + Inlet.Solid.F * (Outlet.Solid.h - Inlet.Solid.h);
117       
118        "Work"
119        Inlet_p.W = (Inlet.Fluid.Fw + Inlet.Solid.Fw) * PIn / n / density;
120       
121end
122
123Model pump_mR
124
125        ATTRIBUTES
126        Pallete         = true;
127        Icon            = "icon/pumpR";
128        Brief           = "Model of Pump for the Solid Stream";
129        Info            =
130"== GENERAL ==
131        General model for the solid stream.
132       
133== ASSUMPTIONS ==
134* Steady State;
135* Only Liquid;
136* Adiabatic.
137
138== SPECIFY ==
139* Inlet stream:
140  flow rate
141  temperature
142  pressure
143  stream composition;
144* Outlet pressure or pressure increase;
145* Pump efficiency.
146       
147== SET ==
148* fluid density in the pump.
149";
150
151#*-------------------------------------------------------------------
152#Parametros
153*--------------------------------------------------------------------*#
154
155        PARAMETERS
156outer   PP                      as Plugin                       (Brief = "External Physical Properties", Type="PP");
157outer   PPS             as Plugin                       (Brief = "External Physical Properties", Type="PP");
158outer   NComp           as Integer                      (Brief = "Number of Chemical Components", Lower = 1);
159outer   NCompS          as Integer                      (Brief = "Number of Chemical Components for the Solid Phase", Lower = 1);
160                M(NComp)        as molweight            (Brief = "Component Mol Weight", Protected=true, Hidden=true);
161                MS(NCompS)      as molweight            (Brief = "Component Mol Weight", Protected=true, Hidden=true);
162                density         as dens_mass            (Brief = "Mixture/Solution density", Symbol = "\rho");
163       
164#*-------------------------------------------------------------------
165* Define o valor dos parametros declarados no modelo
166*--------------------------------------------------------------------*#
167
168        SET
169        M   = PP.MolecularWeight();
170        MS   = PPS.MolecularWeight();
171       
172#*-------------------------------------------------------------------
173* Declaracao de variaveis
174*--------------------------------------------------------------------*#
175       
176VARIABLES
177
178in  Inlet       as main_stream          (Brief = "Inlet Stream", PosX=1.0, PosY=0.414, Protected = false, Symbol="_{in}");
179out Outlet      as main_stream_PH       (Brief = "Outlet Stream", PosX=0.495, PosY=0.0, Protected = false, Symbol="_{out}");
180       
181        PIn     as press_delta          (Brief = "Pressure Increase", Default=0.01, Lower=0, DisplayUnit='kPa', Symbol ="\Delta P");
182        Pout    as pressure                     (Brief = "Outlet Pressure", Default=1, Lower=0, DisplayUnit='atm', Symbol ="\Outlet P");
183        n               as fraction             (Brief = "Pump Efficiency", Symbol = "\eta");
184in      Inlet_p as power_stream         (Brief = "Pump Potency", PosX=0.5, PosY=1.0, Symbol = "_{in}");
185       
186#*-------------------------------------------------------------------
187* Equacoes do modelo
188*--------------------------------------------------------------------*#
189
190        EQUATIONS
191
192        "Molar Balance (Fluid Phase)"
193        Inlet.Fluid.F  = Outlet.Fluid.F;
194       
195        "Molar Balance (Solid Phase)"
196        Inlet.Solid.F = Outlet.Solid.F;
197
198        "Molar Fraction Constraint (Fluid Phase)"
199        Outlet.Fluid.z = Inlet.Fluid.z;
200       
201        "Molar Fraction Constraint (Solid Phase)"
202        Outlet.Solid.z = Inlet.Solid.z;
203       
204        "Pressure Increase"
205        Outlet.P = Inlet.P + PIn;
206       
207        "Outlet Pressure"
208        Outlet.P = Pout;       
209       
210        "Energy Balance"
211        Inlet_p.W = Inlet.Fluid.F * (Outlet.Fluid.h - Inlet.Fluid.h) + Inlet.Solid.F * (Outlet.Solid.h - Inlet.Solid.h);
212       
213        "Work"
214        Inlet_p.W = (Inlet.Fluid.Fw + Inlet.Solid.Fw) * PIn / n / density;
215
216end
217
218
219FlowSheet teste_pump_m
220       
221#*-------------------------------------------------------------------
222* Declaracao de dispositivos (ou blocos contendo o modelo)
223*--------------------------------------------------------------------*#
224       
225        DEVICES
226        Inlet   as main_sourceR;
227        P               as pump_mL;
228        E101    as power_sourceR;
229       
230#*-------------------------------------------------------------------
231* Especifica as conexoes entre os modelos
232*--------------------------------------------------------------------*#
233       
234        CONNECTIONS
235        Inlet.Outlet to P.Inlet;
236        E101.Outlet_p to P.Inlet_p;
237       
238#*-------------------------------------------------------------------
239* Especifica variaveis definidas no modelo
240*--------------------------------------------------------------------*#
241       
242        SPECIFY
243       
244        Inlet.Fluid.Fw = 2000 * 'kg/h';
245        Inlet.Solid.Fw = 1 * 'kg/h';
246        Inlet.T = 303 * 'K';
247        Inlet.P = 1 * 'atm';
248        Inlet.CompositionOfSolid = [0.4, 0.30, 0.28, 0, 0, 0.02, 0, 0, 0];
249        Inlet.CompositionOfFluid(1:3) = [0.85, 0.01, 0.14];
250        Inlet.CompositionOfFluid(4:NComp) = 0;
251       
252        P.PIn = 1 * 'atm';
253        P.n = 0.5;
254       
255#*-------------------------------------------------------------------
256#Parametros
257*--------------------------------------------------------------------*#
258
259       
260        PARAMETERS
261        PP as Plugin    (Brief = "External Physical Properties",
262                Type="PP",
263                Project = "../Flowsheets/v2_2/Fluid_v2_2.vrtherm"
264        );
265        PPS as Plugin   (Brief = "External Physical Properties",
266                Type="PP",
267                Project = "../Flowsheets/v2_2/Solid_v2_2.vrtherm"
268        );
269       
270        NComp   as Integer      (Brief = "Number of chemical components in the fluid phase");
271        NCompS  as Integer      (Brief = "Number of chemical components in the solid phase");
272       
273#*-------------------------------------------------------------------
274* Define o valor dos parametros declarados no modelo
275*--------------------------------------------------------------------*#
276       
277        SET
278        NComp = PP.NumberOfComponents();
279        NCompS = PPS.NumberOfComponents();
280        P.density = 1000 * 'kg/m^3';
281       
282#*-------------------------------------------------------------------
283* Opcoes de Solver
284*--------------------------------------------------------------------*#
285       
286        OPTIONS
287        Dynamic = false;
288        NLASolver (File = "nlasolver", MaxIterations = 100);
289
290end
Note: See TracBrowser for help on using the repository browser.