source: trunk/eml/pressure_changers/pump.mso @ 860

Last change on this file since 860 was 860, checked in by gerson bicca, 13 years ago

updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.0 KB
Line 
1#*-------------------------------------------------------------------
2* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
3*
4* This LIBRARY is free software; you can distribute it and/or modify
5* it under the therms of the ALSOC FREE LICENSE as available at
6* http://www.enq.ufrgs.br/alsoc.
7*
8* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
9* from http://www.rps.eng.br Copyright (C) 2002-2004.
10* All rights reserved.
11*
12* EMSO is distributed under the therms of the ALSOC LICENSE as
13* available at http://www.enq.ufrgs.br/alsoc.
14*
15*----------------------------------------------------------------------
16* Author: Andrey Copat, Estefane S. Horn, Marcos L. Alencastro
17* $Id: pump.mso 860 2009-10-09 20:53:03Z bicca $
18*--------------------------------------------------------------------*#
19
20using "streams";
21
22Model centrifugal_pump
23ATTRIBUTES
24
25        Pallete         = true;
26
27        Icon            = "icon/Pump";
28
29        Brief           = "Model of a centrifugal pump.";
30
31        Info            =
32
33"== Assumptions ==
34
35* Steady State;
36
37* Only Liquid;
38
39* Adiabatic;
40
41* Isentropic.
42
43";
44
45       
46
47PARAMETERS
48
49        outer PP                        as Plugin                       (Brief = "External Physical Properties", Type="PP");
50
51        outer NComp     as Integer                      (Brief = "Number of chemical components", Lower = 1);
52
53        Mw(NComp)               as molweight    (Brief = "Molar Weight");
54
55       
56
57        PumpEfficiency          as positive             (Brief = "Pump Efficiency", Default = 0.75, Lower=1E-3);
58
59        MechanicalEff           as positive             (Brief = "Mechanical efficiency", Default = 0.95, Lower=1E-3);
60
61        NPSH_Options       as Switcher          (Brief = "NPSH Options", Valid = ["Default","Include Kinetic Head"], Default = "Default");
62
63        g                                                       as acceleration (Brief = "Gravity Acceleration", Default = 9.81,Hidden = true);
64
65        SuctionArea                     as area                         (Brief = "Inlet Nozzle Suction Area", Default = 0.001);
66
67       
68
69VARIABLES
70
71        Fvol                            as flow_vol             (Brief = "Volumetric Flow Rate" ,Protected=true);
72
73        Fw_in                   as flow_mass    (Brief = "Inlet Mass Flow Rate" ,Protected=true);
74
75        Fw_out                  as flow_mass    (Brief = "Outlet Mass Flow Rate", Protected=true);
76
77        rho_in                  as dens_mass    (Brief = "Mass Density at inlet conditions", Lower = 1E-6, Protected=true);
78
79        rho_out                 as dens_mass    (Brief = "Mass Density at outlet conditions", Lower = 1E-6, Protected=true);
80
81        Mwm                     as molweight    (Brief = "Mixture Molar Weight" ,Protected=true);
82
83        Pvapor                  as pressure             (Brief = "Mixture Vapour Pressure" ,Protected=true);   
84
85       
86
87        FluidPower        as power                      (Brief = "Fluid Power");
88
89        BrakePower       as power                       (Brief = "Brake Power");
90
91        EletricPower      as power                      (Brief = "Eletrical Potency");
92
93       
94
95        Pratio          as positive             (Brief = "Pressure Ratio", Symbol ="P_{ratio}");       
96
97        Pdrop           as press_delta  (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P");
98
99        Pincrease       as press_delta  (Brief = "Pressure Increase",Lower = 0,  DisplayUnit = 'kPa', Symbol ="P_{incr}");
100
101       
102
103        StaticHead                      as length                               (Brief = "Static Head");
104
105        Head                                    as energy_mass  (Brief = "Actual Head", Protected=true);
106
107        HeadIsentropic          as energy_mass  (Brief = "Isentropic Head", Protected=true);
108
109        NPSH_available          as length                               (Brief = "Available Net Positive Suction Head" ,Protected=true);
110
111
112
113        VelocityHead                    as length                       (Brief = "Velocity Head",Protected=true);
114
115        NozzleVelocity          as velocity                     (Brief = "Velocity Inlet Nozzle",Hidden=true);
116
117
118
119       
120
121in              Inlet           as stream                       (Brief = "Inlet stream", PosX=0, PosY=0.4025, Symbol="_{in}");
122
123out     Outlet  as streamPH             (Brief = "Outlet stream", PosX=1, PosY=0.20, Symbol="_{out}");
124
125
126
127in      WorkIn  as work_stream  (Brief = "Work Inlet", PosX=0.5, PosY=1, Protected=true);
128
129
130
131SET
132
133        Mw      = PP.MolecularWeight();
134
135        g               = 9.81*'m/s^2';
136
137       
138
139EQUATIONS
140
141
142
143 "Velocity Inlet Nozzle"
144
145        Fvol = NozzleVelocity*SuctionArea;
146
147
148
149"Velocity Head"
150
151        VelocityHead = 0.5*NozzleVelocity^2/g;
152
153
154
155"Average Molecular Weight"
156
157        Mwm = sum(Mw*Inlet.z);
158
159
160
161"Mass Density at inlet conditions"
162
163        rho_in = PP.LiquidDensity(Inlet.T, Inlet.P, Inlet.z);
164
165
166
167"Mass Density at outlet conditions"
168
169        rho_out= PP.LiquidDensity(Outlet.T, Outlet.P, Outlet.z);
170
171
172
173"Inlet Flow Mass"
174
175        Fw_in   =  Mwm*Inlet.F;
176
177
178
179"Outlet Flow Mass"
180
181        Fw_out  =  Fw_in;
182
183       
184
185"Pressure Increase"
186
187        Outlet.P  = Inlet.P + Pincrease;
188
189       
190
191"Mixture Vapour Pressure"
192
193        Pvapor = PP.BubbleP(Inlet.T,Inlet.z);
194
195       
196
197"Pressure Ratio"
198
199        Outlet.P = Inlet.P * Pratio;
200
201
202
203"Pressure Drop"
204
205        Outlet.P  = Inlet.P - Pdrop;
206
207
208
209"Isentropic Head"
210
211        HeadIsentropic = -Pdrop/rho_in;
212
213
214
215"Pump Efficiency"
216
217        Head = HeadIsentropic/PumpEfficiency;
218
219       
220
221"Actual Head"
222
223        Head*Mwm = (Outlet.h-Inlet.h);
224
225       
226
227"Fluid Power"
228
229        FluidPower = HeadIsentropic *Mwm* Inlet.F;
230
231
232
233"Brake Power"
234
235        BrakePower * PumpEfficiency = FluidPower;
236
237
238
239"Eletric Power"
240
241        EletricPower = -WorkIn.Work;
242
243
244
245"Eletric Power"
246
247        BrakePower = EletricPower * MechanicalEff;
248
249       
250
251"Molar Balance"
252
253        Outlet.F = Inlet.F;
254
255
256
257"Outlet Composition"
258
259        Outlet.z = Inlet.z;
260
261
262
263"Volumetric Flow Rate"
264
265        Fvol = Fw_in/rho_in;
266
267
268
269switch NPSH_Options
270
271       
272
273        case "Default":
274
275       
276
277"Net Positive Suction Head Available - Without Velocity Head"
278
279        NPSH_available = (Inlet.P - Pvapor)/(rho_in*g) + StaticHead;   
280
281       
282
283        case "Include Kinetic Head":
284
285       
286
287"Net Positive Suction Head Available - Included Velocity Head"
288
289        NPSH_available = (Inlet.P - Pvapor)/(rho_in*g)+VelocityHead+StaticHead;
290
291
292end
293
294end
295
296#*-------------------------------------------------------------------
297* Model of a pump (simplified, used in distillation column model)
298*----------------------------------------------------------------------
299* Author: Paula B. Staudt
300*--------------------------------------------------------------------*#
301
302Model pump
303        ATTRIBUTES
304        Pallete         = true;
305        Icon            = "icon/Pump";
306        Brief           = "Model of a simplified pump, used in distillation column model.";
307        Info            =
308        "Specify:
309         * the inlet stream;
310         * the pump press delta dP.
311        ";
312       
313        PARAMETERS
314outer PP as Plugin (Brief = "External Physical Properties", Type="PP");
315outer NComp as Integer;
316       
317        VARIABLES
318in      Inlet           as stream               (Brief = "Inlet stream", PosX=0, PosY=0.4727, Symbol="_{in}");
319out     Outlet          as streamPH             (Brief = "Outlet stream", PosX=1, PosY=0.1859, Symbol="_{out}");
320       
321        dP as press_delta (Brief="Pump head");
322       
323        EQUATIONS
324        "Molar Balance"
325        Inlet.F = Outlet.F;
326        Inlet.z = Outlet.z;
327       
328        "Pump head"
329        Outlet.P = Inlet.P + dP;
330       
331        "FIXME: pump potency"
332        Outlet.h = Inlet.h;
333end
Note: See TracBrowser for help on using the repository browser.