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

Last change on this file since 601 was 372, checked in by Argimiro Resende Secchi, 15 years ago

Adding pressure drop variable (Pdrop) and pressure ratio (Pratio) in some models. Need to do the same for other models.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.2 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 372 2007-09-21 22:17:36Z arge $
18*--------------------------------------------------------------------*#
19
20using "streams";
21
22Model centrifugal_pump
23        ATTRIBUTES
24        Pallete         = true;
25        Icon            = "icon/CentrifugalPump";
26        Brief           = "Model of a centrifugal pump.";
27        Info            =
28"== Assumptions ==
29* Steady State;
30* Only Liquid;
31* Adiabatic;
32* Isentropic.
33       
34== Specify ==
35* the inlet stream;
36* the Pressure Increase Pdiff.
37";
38       
39        PARAMETERS
40        outer PP        as Plugin                       (Brief = "External Physical Properties", Type="PP");
41        outer NComp     as Integer                      (Brief = "Number of chemical components", Lower = 1);
42        Mw(NComp)       as molweight            (Brief = "Molar Weight");
43        Eff             as positive             (Default = 0.72, Brief = "Pump Efficiency");
44        Meff            as positive             (Default = 0.95, Brief = "Brake Efficiency");
45        Beta            as positive             (Default = 0, Brief = "Volumetric Expansivity", Unit = '1/K');
46        g                       as acceleration         (Brief = "Gravity Acceleration", Default = 9.81);
47        N                       as vel_angular          (Brief = "Rotation", Default = 100);
48        Lev                     as length                       (Brief = "Loss Friction", Default = 0);
49       
50        VARIABLES
51        rho               as dens_mass          (Brief = "Specific Mass");
52        Cp        as cp_mol                     (Brief = "Heat Capacity");
53        FPower    as power                      (Brief = "Fluid Power");
54        BPower    as power                      (Brief = "Brake Power");
55        EPower    as power                      (Brief = "Eletrical Potency");
56        Pratio    as positive           (Brief = "Pressure Ratio", Symbol ="P_{ratio}");       
57        Pdrop     as press_delta        (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P");
58        Head      as head                       (Brief = "Head Developed");
59        Head_is   as head                       (Brief = "Isoentripic Head");
60        Mwm       as molweight          (Brief = "Mixture Molar Weight");
61        pvm               as pressure           (Brief = "Mixture Vapour Pressure");                   
62        NPSHa     as length                     (Brief = "Available Net Positive Suction Head");
63        NS                as positive           (Brief = "Specific Speed");
64        Q                 as flow_vol           (Brief = "Volumetric Flow Rate");
65        vm                as vol_mol            (Brief = "Mixture Molar Volume");
66in      Inlet     as stream                     (Brief = "Inlet stream", PosX=1, PosY=0.4025, Symbol="_{in}");
67out     Outlet    as stream                     (Brief = "Outlet stream", PosX=0, PosY=0, Symbol="_{out}");
68
69        SET
70        Mw = PP.MolecularWeight();
71       
72        EQUATIONS
73        #Mixtures Properties
74        "Calculate Mwm for Inlet Mixture"
75        Mwm = sum(Mw([1:NComp])*Inlet.z([1:NComp]));
76
77        "Calculate Cp Using a External Physical Properties Routine"
78        Cp = PP.LiquidCp(Inlet.T,Inlet.P,Inlet.z);
79       
80        "Calculate rho using a External Physical Properties Routine"
81        rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z);
82
83        "Calculate Mixture Vapour Pressure"
84        [pvm] = PP.BubbleP(Inlet.T,Inlet.z);
85       
86        "Calculate Outlet Vapour Fraction"
87        Outlet.v = PP.VapourFraction(Outlet.T, Outlet.P, Outlet.z);
88       
89        "Calculate Liquid Molar Volume"
90        vm = PP.LiquidVolume(Inlet.T,Inlet.P,Inlet.z);
91       
92        "Pressure Ratio"
93        Outlet.P = Inlet.P * Pratio;
94
95        "Pressure Drop"
96        Outlet.P  = Inlet.P - Pdrop;
97
98        "Calculate Isentropic Head"
99        Head_is = -Pdrop * Mwm/rho;
100
101        "Calculate Real Head"
102        Head = Head_is/(Eff*Meff);
103       
104        "Calculate Outlet Enthalpy"
105        Outlet.h - Inlet.h = Head;
106       
107        "Calculate Fluid Power"
108        FPower = Head_is * Inlet.F;
109
110        "Calculate Brake Power"
111        BPower * Eff = FPower;
112
113        "Calculate Eletric Power"
114        BPower = EPower * Meff;
115       
116        "Calculate Outlet Temperature"
117        (Outlet.T - Inlet.T) * Cp = (Outlet.h - Inlet.h) + Pdrop * Mwm / rho * (1 - Beta * Inlet.T);
118       
119        "Molar Balance"
120        Outlet.F = Inlet.F;
121
122        "Calculate Outlet Composition"
123        Outlet.z = Inlet.z;
124       
125        "Calculate Net Positive Suction Head"
126        NPSHa = - Lev + (Inlet.P - pvm)/(g*rho); #If Inlet.P is the suction pump pressure, Lev is 0.
127       
128        "Calculate Volumetric Flow Rate"
129        Q = Inlet.F*vm;
130
131        "Calculate Specific Speed"
132        NS = N*(Q^0.5)/((Head/Mwm)^(3/4));
133
134end
135
136#*-------------------------------------------------------------------
137* Model of a pump (simplified, used in distillation column model)
138*----------------------------------------------------------------------
139* Author: Paula B. Staudt
140*--------------------------------------------------------------------*#
141
142Model pump
143        ATTRIBUTES
144        Pallete         = true;
145        Icon            = "icon/Pump";
146        Brief           = "Model of a simplified pump, used in distillation column model.";
147        Info            =
148        "Specify:
149         * the inlet stream;
150         * the pump press delta dP.
151        ";
152       
153        PARAMETERS
154outer PP as Plugin (Brief = "External Physical Properties", Type="PP");
155outer NComp as Integer;
156       
157        VARIABLES
158in      Inlet           as stream               (Brief = "Inlet stream", PosX=0, PosY=0.4727, Symbol="_{in}");
159out     Outlet          as streamPH             (Brief = "Outlet stream", PosX=1, PosY=0.1859, Symbol="_{out}");
160       
161        dP as press_delta (Brief="Pump head");
162       
163        EQUATIONS
164        "Molar Balance"
165        Inlet.F = Outlet.F;
166        Inlet.z = Outlet.z;
167       
168        "Pump head"
169        Outlet.P = Inlet.P + dP;
170       
171        "FIXME: pump potency"
172        Outlet.h = Inlet.h;
173end
Note: See TracBrowser for help on using the repository browser.