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

Last change on this file since 345 was 325, checked in by Argimiro Resende Secchi, 16 years ago

Set icons positions for most devices.

  • 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 325 2007-07-29 00:41:04Z 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        Pdiff     as press_delta        (Brief = "Pressure Increase", DisplayUnit='kPa');
57        Pratio    as positive           (Brief = "Pressure Ratio");     
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);
67out     Outlet    as stream                     (Brief = "Outlet stream", PosX=0, PosY=0);
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        #Mass and Energy Balance and Pump Equations     
93        "Calculate Outlet Stream Pressure"
94        Outlet.P = Inlet.P + Pdiff;
95       
96        "Pratio Definition"
97        Outlet.P = Inlet.P * Pratio;
98       
99        "Calculate Isentropic Head"
100        Head_is = Pdiff * Mwm/rho;
101
102        "Calculate Real Head"
103        Head = Head_is/(Eff*Meff);
104       
105        "Calculate Outlet Enthalpy"
106        Outlet.h - Inlet.h = Head;
107       
108        "Calculate Fluid Power"
109        FPower = Head_is * Inlet.F;
110
111        "Calculate Brake Power"
112        BPower * Eff = FPower;
113
114        "Calculate Eletric Power"
115        BPower = EPower * Meff;
116       
117        "Calculate Outlet Temperature"
118        (Outlet.T - Inlet.T) * Cp = (Outlet.h - Inlet.h) -  Pdiff * Mwm / rho * (1 - Beta * Inlet.T);
119       
120        "Molar Balance"
121        Outlet.F = Inlet.F;
122
123        "Calculate Outlet Composition"
124        Outlet.z = Inlet.z;
125       
126        "Calculate Net Positive Suction Head"
127        NPSHa = - Lev + (Inlet.P - pvm)/(g*rho); #If Inlet.P is the suction pump pressure, Lev is 0.
128       
129        "Calculate Volumetric Flow Rate"
130        Q = Inlet.F*vm;
131
132        "Calculate Specific Speed"
133        NS = N*(Q^0.5)/((Head/Mwm)^(3/4));
134
135end
136
137#*-------------------------------------------------------------------
138* Model of a pump (simplified, used in distillation column model)
139*----------------------------------------------------------------------
140* Author: Paula B. Staudt
141*--------------------------------------------------------------------*#
142
143Model pump
144        ATTRIBUTES
145        Pallete         = true;
146        Icon            = "icon/Pump";
147        Brief           = "Model of a simplified pump, used in distillation column model.";
148        Info            =
149        "Specify:
150         * the inlet stream;
151         * the pump press delta dP.
152        ";
153       
154        PARAMETERS
155outer PP as Plugin (Brief = "External Physical Properties", Type="PP");
156outer NComp as Integer;
157       
158        VARIABLES
159in      Inlet           as stream               (Brief = "Inlet stream", PosX=0, PosY=0.4727);
160out     Outlet          as streamPH             (Brief = "Outlet stream", PosX=1, PosY=0.1859);
161       
162        dP as press_delta (Brief="Pump head");
163       
164        EQUATIONS
165        "Molar Balance"
166        Inlet.F = Outlet.F;
167        Inlet.z = Outlet.z;
168       
169        "Pump head"
170        Outlet.P = Inlet.P + dP;
171       
172        "FIXME: pump potency"
173        Outlet.h = Inlet.h;
174end
Note: See TracBrowser for help on using the repository browser.