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 277 2007-06-16 20:17:45Z paula $ |
---|
18 | *--------------------------------------------------------------------*# |
---|
19 | |
---|
20 | using "pressure_changers/flux_machine_basic"; |
---|
21 | |
---|
22 | Model centrifugal_pump as flux_machine_basic |
---|
23 | ATTRIBUTES |
---|
24 | Pallete = true; |
---|
25 | 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", Unit = '(rpm*(gal/min)^0.5)/(m^3/4)'); |
---|
64 | Q as flow_vol (Brief = "Volumetric Flow Rate"); |
---|
65 | vm as vol_mol (Brief = "Mixture Molar Volume"); |
---|
66 | |
---|
67 | SET |
---|
68 | Mw = PP.MolecularWeight(); |
---|
69 | |
---|
70 | EQUATIONS |
---|
71 | #Mixtures Properties |
---|
72 | "Calculate Mwm for Inlet Mixture" |
---|
73 | Mwm = sum(Mw([1:NComp])*Inlet.z([1:NComp])); |
---|
74 | |
---|
75 | "Calculate Cp Using a External Physical Properties Routine" |
---|
76 | Cp = PP.LiquidCp(Inlet.T,Inlet.P,Inlet.z); |
---|
77 | |
---|
78 | "Calculate rho using a External Physical Properties Routine" |
---|
79 | rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z); |
---|
80 | |
---|
81 | "Calculate Mixture Vapour Pressure" |
---|
82 | [pvm] = PP.BubbleP(Inlet.T,Inlet.z); |
---|
83 | |
---|
84 | "Calculate Outlet Vapour Fraction" |
---|
85 | Outlet.v = PP.VapourFraction(Outlet.T, Outlet.P, Outlet.z); |
---|
86 | |
---|
87 | "Calculate Liquid Molar Volume" |
---|
88 | vm = PP.LiquidVolume(Inlet.T,Inlet.P,Inlet.z); |
---|
89 | |
---|
90 | #Mass and Energy Balance and Pump Equations |
---|
91 | "Calculate Outlet Stream Pressure" |
---|
92 | Outlet.P = Inlet.P + Pdiff; |
---|
93 | |
---|
94 | "Pratio Definition" |
---|
95 | Outlet.P = Inlet.P * Pratio; |
---|
96 | |
---|
97 | "Calculate Isentropic Head" |
---|
98 | Head_is = Pdiff * Mwm/rho; |
---|
99 | |
---|
100 | "Calculate Real Head" |
---|
101 | Head = Head_is/(Eff*Meff); |
---|
102 | |
---|
103 | "Calculate Outlet Enthalpy" |
---|
104 | Outlet.h - Inlet.h = Head; |
---|
105 | |
---|
106 | "Calculate Fluid Power" |
---|
107 | FPower = Head_is * Inlet.F; |
---|
108 | |
---|
109 | "Calculate Brake Power" |
---|
110 | BPower * Eff = FPower; |
---|
111 | |
---|
112 | "Calculate Eletric Power" |
---|
113 | BPower = EPower * Meff; |
---|
114 | |
---|
115 | "Calculate Outlet Temperature" |
---|
116 | (Outlet.T - Inlet.T) * Cp = (Outlet.h - Inlet.h) - Pdiff * Mwm / rho * (1 - Beta * Inlet.T); |
---|
117 | |
---|
118 | "Molar Balance" |
---|
119 | Outlet.F = Inlet.F; |
---|
120 | |
---|
121 | "Calculate Outlet Composition" |
---|
122 | Outlet.z = Inlet.z; |
---|
123 | |
---|
124 | "Calculate Net Positive Suction Head" |
---|
125 | NPSHa = - Lev + (Inlet.P - pvm)/(g*rho); #If Inlet.P is the suction pump pressure, Lev is 0. |
---|
126 | |
---|
127 | "Calculate Volumetric Flow Rate" |
---|
128 | Q = Inlet.F*vm; |
---|
129 | |
---|
130 | "Calculate Specific Speed" |
---|
131 | NS = N*(Q^0.5)/(Head^3/4); |
---|
132 | |
---|
133 | end |
---|
134 | |
---|
135 | |
---|
136 | #*------------------------------------------------------------------- |
---|
137 | * Model of a pump (simplified, used in distillation column model) |
---|
138 | *---------------------------------------------------------------------- |
---|
139 | * Author: Paula B. Staudt |
---|
140 | *--------------------------------------------------------------------*# |
---|
141 | |
---|
142 | Model pump |
---|
143 | ATTRIBUTES |
---|
144 | Pallete = true; |
---|
145 | 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 |
---|
154 | outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); |
---|
155 | outer NComp as Integer; |
---|
156 | |
---|
157 | VARIABLES |
---|
158 | in Inlet as stream; |
---|
159 | out Outlet as streamPH; |
---|
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; |
---|
173 | end |
---|