Changeset 860
- Timestamp:
- Oct 9, 2009, 5:53:03 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/eml/pressure_changers/pump.mso
r372 r860 21 21 22 22 Model centrifugal_pump 23 ATTRIBUTES 23 ATTRIBUTES 24 24 25 Pallete = true; 25 Icon = "icon/CentrifugalPump"; 26 27 Icon = "icon/Pump"; 28 26 29 Brief = "Model of a centrifugal pump."; 30 27 31 Info = 32 28 33 "== Assumptions == 34 29 35 * Steady State; 36 30 37 * Only Liquid; 38 31 39 * Adiabatic; 40 32 41 * Isentropic. 33 34 == Specify == 35 * the inlet stream; 36 * the Pressure Increase Pdiff. 42 37 43 "; 38 39 PARAMETERS 40 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 44 45 46 47 PARAMETERS 48 49 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 50 41 51 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"); 66 in Inlet as stream (Brief = "Inlet stream", PosX=1, PosY=0.4025, Symbol="_{in}"); 67 out 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" 52 53 Mw(NComp) as molweight (Brief = "Molar Weight"); 54 55 56 57 PumpEfficiency as positive (Brief = "Pump Efficiency", Default = 0.75, Lower=1E-3); 58 59 MechanicalEff as positive (Brief = "Mechanical efficiency", Default = 0.95, Lower=1E-3); 60 61 NPSH_Options as Switcher (Brief = "NPSH Options", Valid = ["Default","Include Kinetic Head"], Default = "Default"); 62 63 g as acceleration (Brief = "Gravity Acceleration", Default = 9.81,Hidden = true); 64 65 SuctionArea as area (Brief = "Inlet Nozzle Suction Area", Default = 0.001); 66 67 68 69 VARIABLES 70 71 Fvol as flow_vol (Brief = "Volumetric Flow Rate" ,Protected=true); 72 73 Fw_in as flow_mass (Brief = "Inlet Mass Flow Rate" ,Protected=true); 74 75 Fw_out as flow_mass (Brief = "Outlet Mass Flow Rate", Protected=true); 76 77 rho_in as dens_mass (Brief = "Mass Density at inlet conditions", Lower = 1E-6, Protected=true); 78 79 rho_out as dens_mass (Brief = "Mass Density at outlet conditions", Lower = 1E-6, Protected=true); 80 81 Mwm as molweight (Brief = "Mixture Molar Weight" ,Protected=true); 82 83 Pvapor as pressure (Brief = "Mixture Vapour Pressure" ,Protected=true); 84 85 86 87 FluidPower as power (Brief = "Fluid Power"); 88 89 BrakePower as power (Brief = "Brake Power"); 90 91 EletricPower as power (Brief = "Eletrical Potency"); 92 93 94 95 Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}"); 96 97 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 98 99 Pincrease as press_delta (Brief = "Pressure Increase",Lower = 0, DisplayUnit = 'kPa', Symbol ="P_{incr}"); 100 101 102 103 StaticHead as length (Brief = "Static Head"); 104 105 Head as energy_mass (Brief = "Actual Head", Protected=true); 106 107 HeadIsentropic as energy_mass (Brief = "Isentropic Head", Protected=true); 108 109 NPSH_available as length (Brief = "Available Net Positive Suction Head" ,Protected=true); 110 111 112 113 VelocityHead as length (Brief = "Velocity Head",Protected=true); 114 115 NozzleVelocity as velocity (Brief = "Velocity Inlet Nozzle",Hidden=true); 116 117 118 119 120 121 in Inlet as stream (Brief = "Inlet stream", PosX=0, PosY=0.4025, Symbol="_{in}"); 122 123 out Outlet as streamPH (Brief = "Outlet stream", PosX=1, PosY=0.20, Symbol="_{out}"); 124 125 126 127 in WorkIn as work_stream (Brief = "Work Inlet", PosX=0.5, PosY=1, Protected=true); 128 129 130 131 SET 132 133 Mw = PP.MolecularWeight(); 134 135 g = 9.81*'m/s^2'; 136 137 138 139 EQUATIONS 140 141 142 143 "Velocity Inlet Nozzle" 144 145 Fvol = NozzleVelocity*SuctionArea; 146 147 148 149 "Velocity Head" 150 151 VelocityHead = 0.5*NozzleVelocity^2/g; 152 153 154 155 "Average Molecular Weight" 156 157 Mwm = sum(Mw*Inlet.z); 158 159 160 161 "Mass Density at inlet conditions" 162 163 rho_in = PP.LiquidDensity(Inlet.T, Inlet.P, Inlet.z); 164 165 166 167 "Mass Density at outlet conditions" 168 169 rho_out= PP.LiquidDensity(Outlet.T, Outlet.P, Outlet.z); 170 171 172 173 "Inlet Flow Mass" 174 175 Fw_in = Mwm*Inlet.F; 176 177 178 179 "Outlet Flow Mass" 180 181 Fw_out = Fw_in; 182 183 184 185 "Pressure Increase" 186 187 Outlet.P = Inlet.P + Pincrease; 188 189 190 191 "Mixture Vapour Pressure" 192 193 Pvapor = PP.BubbleP(Inlet.T,Inlet.z); 194 195 196 197 "Pressure Ratio" 198 93 199 Outlet.P = Inlet.P * Pratio; 94 200 95 "Pressure Drop" 201 202 203 "Pressure Drop" 204 96 205 Outlet.P = Inlet.P - Pdrop; 97 206 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" 207 208 209 "Isentropic Head" 210 211 HeadIsentropic = -Pdrop/rho_in; 212 213 214 215 "Pump Efficiency" 216 217 Head = HeadIsentropic/PumpEfficiency; 218 219 220 221 "Actual Head" 222 223 Head*Mwm = (Outlet.h-Inlet.h); 224 225 226 227 "Fluid Power" 228 229 FluidPower = HeadIsentropic *Mwm* Inlet.F; 230 231 232 233 "Brake Power" 234 235 BrakePower * PumpEfficiency = FluidPower; 236 237 238 239 "Eletric Power" 240 241 EletricPower = -WorkIn.Work; 242 243 244 245 "Eletric Power" 246 247 BrakePower = EletricPower * MechanicalEff; 248 249 250 251 "Molar Balance" 252 120 253 Outlet.F = Inlet.F; 121 254 122 "Calculate Outlet Composition" 255 256 257 "Outlet Composition" 258 123 259 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)); 260 261 262 263 "Volumetric Flow Rate" 264 265 Fvol = Fw_in/rho_in; 266 267 268 269 switch NPSH_Options 270 271 272 273 case "Default": 274 275 276 277 "Net Positive Suction Head Available - Without Velocity Head" 278 279 NPSH_available = (Inlet.P - Pvapor)/(rho_in*g) + StaticHead; 280 281 282 283 case "Include Kinetic Head": 284 285 286 287 "Net Positive Suction Head Available - Included Velocity Head" 288 289 NPSH_available = (Inlet.P - Pvapor)/(rho_in*g)+VelocityHead+StaticHead; 290 291 292 end 133 293 134 294 end
Note: See TracChangeset
for help on using the changeset viewer.