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

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

some adaption in models

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.6 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 757 2009-06-03 20:07:22Z 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        ATTRIBUTES
172        Pallete         = true;
173        Icon            = "icon/Pump";
174        Brief           = "Model of a simplified pump, used in distillation column model.";
175        Info            =
176        "Specify:
177         * the inlet stream;
178         * the pump press delta dP.
179        ";
180       
181        PARAMETERS
182outer PP as Plugin (Brief = "External Physical Properties", Type="PP");
183outer NComp as Integer;
184       
185        VARIABLES
186in      Inlet           as stream               (Brief = "Inlet stream", PosX=0, PosY=0.4727, Symbol="_{in}");
187out     Outlet          as streamPH             (Brief = "Outlet stream", PosX=1, PosY=0.1859, Symbol="_{out}");
188       
189        dP as press_delta (Brief="Pump head");
190       
191        EQUATIONS
192        "Molar Balance"
193        Inlet.F = Outlet.F;
194        Inlet.z = Outlet.z;
195       
196        "Pump head"
197        Outlet.P = Inlet.P + dP;
198       
199        "FIXME: pump potency"
200        Outlet.h = Inlet.h;
201end
202
203Model pump2
204        ATTRIBUTES
205        Pallete         = true;
206        Icon            = "icon/Pump2";
207        Brief           = "Model of a simplified pump, used in distillation column model.";
208        Info            =
209        "Specify:
210         * the inlet stream;
211         * the pump press delta dP.
212        ";
213       
214        PARAMETERS
215outer PP as Plugin (Brief = "External Physical Properties", Type="PP");
216outer NComp as Integer;
217       
218        VARIABLES
219in      Inlet           as stream               (Brief = "Inlet stream", PosX=1, PosY=0.4727, Symbol="_{in}");
220out     Outlet          as streamPH             (Brief = "Outlet stream", PosX=0, PosY=0.1859, Symbol="_{out}");
221       
222        dP as press_delta (Brief="Pump head");
223       
224        EQUATIONS
225        "Molar Balance"
226        Inlet.F = Outlet.F;
227        Inlet.z = Outlet.z;
228       
229        "Pump head"
230        Outlet.P = Inlet.P + dP;
231       
232        "FIXME: pump potency"
233        Outlet.h = Inlet.h;
234end
235
Note: See TracBrowser for help on using the repository browser.