source: branches/gui/eml/pressure_changers/pump.mso @ 840

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

updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.1 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 (Revised Gerson B. Bicca)
17* $Id: pump.mso 840 2009-08-28 20:20:21Z bicca $
18*--------------------------------------------------------------------*#
19
20using "streams";
21
22Model centrifugal_pump
23       
24ATTRIBUTES
25        Pallete         = true;
26        Icon            = "icon/Pump";
27        Brief           = "Model of a centrifugal pump.";
28        Info            =
29"== Assumptions ==
30* Steady State;
31* Only Liquid;
32* Adiabatic;
33* Isentropic.
34";
35       
36PARAMETERS
37        outer PP                        as Plugin                       (Brief = "External Physical Properties", Type="PP");
38        outer NComp     as Integer                      (Brief = "Number of chemical components", Lower = 1);
39        Mw(NComp)               as molweight    (Brief = "Molar Weight");
40       
41        PumpEfficiency          as positive             (Brief = "Pump Efficiency", Default = 0.75, Lower=1E-3);
42        MechanicalEff           as positive             (Brief = "Mechanical efficiency", Default = 0.95, Lower=1E-3);
43        NPSH_Options       as Switcher          (Brief = "NPSH Options", Valid = ["Default","Include Kinetic Head"], Default = "Default");
44        g                                                       as acceleration (Brief = "Gravity Acceleration", Default = 9.81,Hidden = true);
45        SuctionArea                     as area                         (Brief = "Inlet Nozzle Suction Area", Default = 0.001);
46       
47VARIABLES
48        Fvol                            as flow_vol             (Brief = "Volumetric Flow Rate" ,Protected=true);
49        Fw_in                   as flow_mass    (Brief = "Inlet Mass Flow Rate" ,Protected=true);
50        Fw_out                  as flow_mass    (Brief = "Outlet Mass Flow Rate", Protected=true);
51        rho_in                  as dens_mass    (Brief = "Mass Density at inlet conditions", Lower = 1E-6, Protected=true);
52        rho_out                 as dens_mass    (Brief = "Mass Density at outlet conditions", Lower = 1E-6, Protected=true);
53        Mwm                     as molweight    (Brief = "Mixture Molar Weight" ,Protected=true);
54        Pvapor                  as pressure             (Brief = "Mixture Vapour Pressure" ,Protected=true);   
55       
56        FluidPower        as power                      (Brief = "Fluid Power");
57        BrakePower       as power                       (Brief = "Brake Power");
58        EletricPower      as power                      (Brief = "Eletrical Potency");
59       
60        Pratio          as positive             (Brief = "Pressure Ratio", Symbol ="P_{ratio}");       
61        Pdrop           as press_delta  (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P");
62        Pincrease       as press_delta  (Brief = "Pressure Increase",Lower = 0,  DisplayUnit = 'kPa', Symbol ="P_{incr}");
63       
64        StaticHead                      as length                               (Brief = "Static Head");
65        Head                                    as energy_mass  (Brief = "Actual Head", Protected=true);
66        HeadIsentropic          as energy_mass  (Brief = "Isentropic Head", Protected=true);
67        NPSH_available          as length                               (Brief = "Available Net Positive Suction Head" ,Protected=true);
68
69        VelocityHead                    as length                       (Brief = "Velocity Head",Protected=true);
70        NozzleVelocity          as velocity                     (Brief = "Velocity Inlet Nozzle",Hidden=true);
71
72       
73in              Inlet           as stream                       (Brief = "Inlet stream", PosX=0, PosY=0.4025, Symbol="_{in}");
74out     Outlet  as streamPH             (Brief = "Outlet stream", PosX=1, PosY=0.20, Symbol="_{out}");
75
76in      WorkIn  as power        (Brief = "Work Inlet", PosX=0.5, PosY=1, Protected=true);
77
78SET
79        Mw      = PP.MolecularWeight();
80        g               = 9.81*'m/s^2';
81       
82EQUATIONS
83
84 "Velocity Inlet Nozzle"
85        Fvol = NozzleVelocity*SuctionArea;
86
87"Velocity Head"
88        VelocityHead = 0.5*NozzleVelocity^2/g;
89
90"Average Molecular Weight"
91        Mwm = sum(Mw*Inlet.z);
92
93"Mass Density at inlet conditions"
94        rho_in = PP.LiquidDensity(Inlet.T, Inlet.P, Inlet.z);
95
96"Mass Density at outlet conditions"
97        rho_out= PP.LiquidDensity(Outlet.T, Outlet.P, Outlet.z);
98
99"Inlet Flow Mass"
100        Fw_in   =  Mwm*Inlet.F;
101
102"Outlet Flow Mass"
103        Fw_out  =  Fw_in;
104       
105"Pressure Increase"
106        Outlet.P  = Inlet.P + Pincrease;
107       
108"Mixture Vapour Pressure"
109        Pvapor = PP.BubbleP(Inlet.T,Inlet.z);
110       
111"Pressure Ratio"
112        Outlet.P = Inlet.P * Pratio;
113
114"Pressure Drop"
115        Outlet.P  = Inlet.P - Pdrop;
116
117"Isentropic Head"
118        HeadIsentropic = -Pdrop/rho_in;
119
120"Pump Efficiency"
121        Head = HeadIsentropic/PumpEfficiency;
122       
123"Actual Head"
124        Head*Mwm = (Outlet.h-Inlet.h);
125       
126"Fluid Power"
127        FluidPower = HeadIsentropic *Mwm* Inlet.F;
128
129"Brake Power"
130        BrakePower * PumpEfficiency = FluidPower;
131
132"Eletric Power"
133        EletricPower = -WorkIn;
134
135"Eletric Power"
136        BrakePower = EletricPower * MechanicalEff;
137       
138"Molar Balance"
139        Outlet.F = Inlet.F;
140
141"Outlet Composition"
142        Outlet.z = Inlet.z;
143
144"Volumetric Flow Rate"
145        Fvol = Fw_in/rho_in;
146
147switch NPSH_Options
148       
149        case "Default":
150       
151"Net Positive Suction Head Available - Without Velocity Head"
152        NPSH_available = (Inlet.P - Pvapor)/(rho_in*g) + StaticHead;   
153       
154        case "Include Kinetic Head":
155       
156"Net Positive Suction Head Available - Included Velocity Head"
157        NPSH_available = (Inlet.P - Pvapor)/(rho_in*g)+VelocityHead+StaticHead;
158       
159       
160end
161
162end
163
164#*-------------------------------------------------------------------
165* Model of a pump (simplified, used in distillation column model)
166*----------------------------------------------------------------------
167* Author: Paula B. Staudt
168*--------------------------------------------------------------------*#
169
170Model pump
171
172ATTRIBUTES
173        Pallete         = true;
174        Icon            = "icon/Pump";
175        Brief           = "Model of a simplified pump, used in distillation column model.";
176        Info            =
177"== ASSUMPTIONS ==
178* Steady State;
179* Only Liquid;
180* Adiabatic;
181* Isentropic.
182
183== SPECIFY ==
184* the inlet stream;
185* the pump Pincrease.
186";
187       
188PARAMETERS
189        outer PP        as Plugin (Brief = "External Physical Properties", Type="PP");
190        outer NComp as Integer (Brief = "Number of chemical components");
191       
192VARIABLES
193        in      Inlet           as stream                       (Brief = "Inlet stream", PosX=0, PosY=0.4727, Protected=true,Symbol="_{in}");
194        out     Outlet          as liquid_stream        (Brief = "Outlet stream", PosX=1, PosY=0.1859, Protected=true,Symbol="_{out}");
195       
196        Pincrease               as press_delta  (Brief = "Pressure Increase",Lower = 0,  DisplayUnit = 'kPa', Symbol ="P_{incr}");
197       
198EQUATIONS
199
200"Molar Balance"
201        Inlet.F = Outlet.F;
202
203"Composittion"
204        Inlet.z = Outlet.z;
205       
206"Pump head"
207        Outlet.P = Inlet.P + Pincrease;
208       
209"Pump potency"
210        Outlet.h = Inlet.h;
211
212end
213
214Model pump2
215
216ATTRIBUTES
217        Pallete         = true;
218        Icon            = "icon/Pump2";
219        Brief           = "Model of a simplified pump, used in distillation column model.";
220        Info            =
221"== ASSUMPTIONS ==
222* Steady State;
223* Only Liquid;
224* Adiabatic;
225* Isentropic.
226
227== SPECIFY ==
228* the inlet stream;
229* the pump Pincrease.
230";
231       
232PARAMETERS
233        outer PP        as Plugin (Brief = "External Physical Properties", Type="PP");
234        outer NComp as Integer (Brief = "Number of chemical components");
235       
236VARIABLES
237        in      Inlet           as stream                       (Brief = "Inlet stream", PosX=1, PosY=0.4727, Protected=true,Symbol="_{in}");
238        out     Outlet          as liquid_stream        (Brief = "Outlet stream", PosX=0, PosY=0.1859, Protected=true,Symbol="_{out}");
239       
240        Pincrease               as press_delta  (Brief = "Pressure Increase",Lower = 0,  DisplayUnit = 'kPa', Symbol ="P_{incr}");
241       
242EQUATIONS
243
244"Molar Balance"
245        Inlet.F = Outlet.F;
246
247"Composittion"
248        Inlet.z = Outlet.z;
249       
250"Pump head"
251        Outlet.P = Inlet.P + Pincrease;
252       
253"Pump potency"
254        Outlet.h = Inlet.h;
255
256end
257
Note: See TracBrowser for help on using the repository browser.