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

Last change on this file since 740 was 740, checked in by gerson bicca, 14 years ago

improved centrifugal_pump model

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.8 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 740 2009-03-03 20:47:16Z bicca $
18*--------------------------------------------------------------------*#
19
20using "streams";
21
22Model centrifugal_pump
23       
24ATTRIBUTES
25        Pallete         = true;
26        Icon            = "icon/CentrifugalPump";
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        Head                                    as energy_mass  (Brief = "Actual Head", Protected=true);
65        HeadIsentropic          as energy_mass  (Brief = "Isentropic Head", Protected=true);
66        NPSH_available          as length                               (Brief = "Available Net Positive Suction Head" ,Protected=true);
67
68        VelocityHead                    as length                       (Brief = "Velocity Head");
69        StaticHead                      as length                       (Brief = "Static Head");
70        NozzleVelocity          as velocity                     (Brief = "Velocity Inlet Nozzle");
71
72       
73in              Inlet           as stream                       (Brief = "Inlet stream", PosX=1, PosY=0.4025, Symbol="_{in}");
74out     Outlet  as streamPH             (Brief = "Outlet stream", PosX=0, PosY=0, Symbol="_{out}");
75
76SET
77        Mw      = PP.MolecularWeight();
78        g               = 9.81*'m/s^2';
79       
80EQUATIONS
81
82 "Velocity Inlet Nozzle"
83        Fvol = NozzleVelocity*SuctionArea;
84
85"Velocity Head"
86        VelocityHead = 0.5*NozzleVelocity^2/g;
87
88"Average Molecular Weight"
89        Mwm = sum(Mw*Inlet.z);
90
91"Mass Density at inlet conditions"
92        rho_in = PP.LiquidDensity(Inlet.T, Inlet.P, Inlet.z);
93
94"Mass Density at outlet conditions"
95        rho_out= PP.LiquidDensity(Outlet.T, Outlet.P, Outlet.z);
96
97"Inlet Flow Mass"
98        Fw_in   =  Mwm*Inlet.F;
99
100"Outlet Flow Mass"
101        Fw_out  =  Fw_in;
102       
103"Pressure Increase"
104        Outlet.P  = Inlet.P + Pincrease;
105       
106"Mixture Vapour Pressure"
107        Pvapor = PP.BubbleP(Inlet.T,Inlet.z);
108       
109"Pressure Ratio"
110        Outlet.P = Inlet.P * Pratio;
111
112"Pressure Drop"
113        Outlet.P  = Inlet.P - Pdrop;
114
115"Isentropic Head"
116        HeadIsentropic = -Pdrop/rho_in;
117
118"Pump Efficiency"
119        Head = HeadIsentropic/PumpEfficiency;
120       
121"Actual Head"
122        Head*Mwm = (Outlet.h-Inlet.h);
123       
124"Fluid Power"
125        FluidPower = HeadIsentropic *Mwm* Inlet.F;
126
127"Brake Power"
128        BrakePower * PumpEfficiency = FluidPower;
129
130"Eletric Power"
131        BrakePower = EletricPower * MechanicalEff;
132       
133"Molar Balance"
134        Outlet.F = Inlet.F;
135
136"Outlet Composition"
137        Outlet.z = Inlet.z;
138
139"Volumetric Flow Rate"
140        Fvol = Fw_in/rho_in;
141
142switch NPSH_Options
143       
144        case "Default":
145       
146"Net Positive Suction Head Available - Without Velocity Head"
147        NPSH_available = (Inlet.P - Pvapor)/(rho_in*g) + StaticHead;   
148       
149        case "Include Kinetic Head":
150       
151"Net Positive Suction Head Available - Included Velocity Head"
152        NPSH_available = (Inlet.P - Pvapor)/(rho_in*g)+VelocityHead+StaticHead;
153       
154       
155end
156
157end
158
159#*-------------------------------------------------------------------
160* Model of a pump (simplified, used in distillation column model)
161*----------------------------------------------------------------------
162* Author: Paula B. Staudt
163*--------------------------------------------------------------------*#
164
165Model pump
166        ATTRIBUTES
167        Pallete         = true;
168        Icon            = "icon/Pump";
169        Brief           = "Model of a simplified pump, used in distillation column model.";
170        Info            =
171        "Specify:
172         * the inlet stream;
173         * the pump press delta dP.
174        ";
175       
176        PARAMETERS
177outer PP as Plugin (Brief = "External Physical Properties", Type="PP");
178outer NComp as Integer;
179       
180        VARIABLES
181in      Inlet           as stream               (Brief = "Inlet stream", PosX=0, PosY=0.4727, Symbol="_{in}");
182out     Outlet          as streamPH             (Brief = "Outlet stream", PosX=1, PosY=0.1859, Symbol="_{out}");
183       
184        dP as press_delta (Brief="Pump head");
185       
186        EQUATIONS
187        "Molar Balance"
188        Inlet.F = Outlet.F;
189        Inlet.z = Outlet.z;
190       
191        "Pump head"
192        Outlet.P = Inlet.P + dP;
193       
194        "FIXME: pump potency"
195        Outlet.h = Inlet.h;
196end
Note: See TracBrowser for help on using the repository browser.