[75] | 1 | #*------------------------------------------------------------------- |
---|
| 2 | * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. |
---|
[57] | 3 | * |
---|
[75] | 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 | *---------------------------------------------------------------------- |
---|
[742] | 16 | * Author: Andrey Copat, Estefane S. Horn, Marcos L. Alencastro (Revised Gerson B. Bicca) |
---|
[75] | 17 | * $Id: pump.mso 840 2009-08-28 20:20:21Z bicca $ |
---|
| 18 | *--------------------------------------------------------------------*# |
---|
| 19 | |
---|
[325] | 20 | using "streams"; |
---|
[57] | 21 | |
---|
[325] | 22 | Model centrifugal_pump |
---|
[740] | 23 | |
---|
| 24 | ATTRIBUTES |
---|
[277] | 25 | Pallete = true; |
---|
[741] | 26 | Icon = "icon/Pump"; |
---|
[277] | 27 | Brief = "Model of a centrifugal pump."; |
---|
| 28 | Info = |
---|
[353] | 29 | "== Assumptions == |
---|
| 30 | * Steady State; |
---|
| 31 | * Only Liquid; |
---|
| 32 | * Adiabatic; |
---|
| 33 | * Isentropic. |
---|
| 34 | "; |
---|
[277] | 35 | |
---|
[740] | 36 | PARAMETERS |
---|
| 37 | outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); |
---|
[125] | 38 | outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); |
---|
[740] | 39 | Mw(NComp) as molweight (Brief = "Molar Weight"); |
---|
[57] | 40 | |
---|
[740] | 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); |
---|
[742] | 43 | NPSH_Options as Switcher (Brief = "NPSH Options", Valid = ["Default","Include Kinetic Head"], Default = "Default"); |
---|
[740] | 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 | |
---|
| 47 | VARIABLES |
---|
| 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 | |
---|
[742] | 64 | StaticHead as length (Brief = "Static Head"); |
---|
[740] | 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); |
---|
[325] | 68 | |
---|
[742] | 69 | VelocityHead as length (Brief = "Velocity Head",Protected=true); |
---|
| 70 | NozzleVelocity as velocity (Brief = "Velocity Inlet Nozzle",Hidden=true); |
---|
[740] | 71 | |
---|
[57] | 72 | |
---|
[741] | 73 | in Inlet as stream (Brief = "Inlet stream", PosX=0, PosY=0.4025, Symbol="_{in}"); |
---|
| 74 | out Outlet as streamPH (Brief = "Outlet stream", PosX=1, PosY=0.20, Symbol="_{out}"); |
---|
[57] | 75 | |
---|
[742] | 76 | in WorkIn as power (Brief = "Work Inlet", PosX=0.5, PosY=1, Protected=true); |
---|
| 77 | |
---|
[740] | 78 | SET |
---|
| 79 | Mw = PP.MolecularWeight(); |
---|
| 80 | g = 9.81*'m/s^2'; |
---|
[57] | 81 | |
---|
[740] | 82 | EQUATIONS |
---|
[57] | 83 | |
---|
[740] | 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; |
---|
[57] | 104 | |
---|
[740] | 105 | "Pressure Increase" |
---|
| 106 | Outlet.P = Inlet.P + Pincrease; |
---|
[57] | 107 | |
---|
[740] | 108 | "Mixture Vapour Pressure" |
---|
| 109 | Pvapor = PP.BubbleP(Inlet.T,Inlet.z); |
---|
[57] | 110 | |
---|
[740] | 111 | "Pressure Ratio" |
---|
[57] | 112 | Outlet.P = Inlet.P * Pratio; |
---|
[372] | 113 | |
---|
[740] | 114 | "Pressure Drop" |
---|
[372] | 115 | Outlet.P = Inlet.P - Pdrop; |
---|
| 116 | |
---|
[740] | 117 | "Isentropic Head" |
---|
| 118 | HeadIsentropic = -Pdrop/rho_in; |
---|
[57] | 119 | |
---|
[740] | 120 | "Pump Efficiency" |
---|
| 121 | Head = HeadIsentropic/PumpEfficiency; |
---|
[57] | 122 | |
---|
[740] | 123 | "Actual Head" |
---|
| 124 | Head*Mwm = (Outlet.h-Inlet.h); |
---|
[57] | 125 | |
---|
[740] | 126 | "Fluid Power" |
---|
| 127 | FluidPower = HeadIsentropic *Mwm* Inlet.F; |
---|
[57] | 128 | |
---|
[740] | 129 | "Brake Power" |
---|
| 130 | BrakePower * PumpEfficiency = FluidPower; |
---|
[57] | 131 | |
---|
[740] | 132 | "Eletric Power" |
---|
[742] | 133 | EletricPower = -WorkIn; |
---|
| 134 | |
---|
| 135 | "Eletric Power" |
---|
[740] | 136 | BrakePower = EletricPower * MechanicalEff; |
---|
[57] | 137 | |
---|
[740] | 138 | "Molar Balance" |
---|
[57] | 139 | Outlet.F = Inlet.F; |
---|
| 140 | |
---|
[740] | 141 | "Outlet Composition" |
---|
[57] | 142 | Outlet.z = Inlet.z; |
---|
[740] | 143 | |
---|
| 144 | "Volumetric Flow Rate" |
---|
| 145 | Fvol = Fw_in/rho_in; |
---|
| 146 | |
---|
| 147 | switch NPSH_Options |
---|
[57] | 148 | |
---|
[740] | 149 | case "Default": |
---|
[57] | 150 | |
---|
[740] | 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 | |
---|
| 160 | end |
---|
[325] | 161 | |
---|
[57] | 162 | end |
---|
| 163 | |
---|
[1] | 164 | #*------------------------------------------------------------------- |
---|
[75] | 165 | * Model of a pump (simplified, used in distillation column model) |
---|
[1] | 166 | *---------------------------------------------------------------------- |
---|
| 167 | * Author: Paula B. Staudt |
---|
| 168 | *--------------------------------------------------------------------*# |
---|
| 169 | |
---|
| 170 | Model pump |
---|
[839] | 171 | |
---|
| 172 | ATTRIBUTES |
---|
[277] | 173 | Pallete = true; |
---|
[305] | 174 | Icon = "icon/Pump"; |
---|
[277] | 175 | Brief = "Model of a simplified pump, used in distillation column model."; |
---|
| 176 | Info = |
---|
[840] | 177 | "== ASSUMPTIONS == |
---|
| 178 | * Steady State; |
---|
| 179 | * Only Liquid; |
---|
| 180 | * Adiabatic; |
---|
| 181 | * Isentropic. |
---|
| 182 | |
---|
| 183 | == SPECIFY == |
---|
| 184 | * the inlet stream; |
---|
| 185 | * the pump Pincrease. |
---|
| 186 | "; |
---|
[277] | 187 | |
---|
[839] | 188 | PARAMETERS |
---|
[840] | 189 | outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); |
---|
| 190 | outer NComp as Integer (Brief = "Number of chemical components"); |
---|
[1] | 191 | |
---|
[839] | 192 | VARIABLES |
---|
[840] | 193 | in Inlet as stream (Brief = "Inlet stream", PosX=0, PosY=0.4727, Protected=true,Symbol="_{in}"); |
---|
| 194 | out Outlet as liquid_stream (Brief = "Outlet stream", PosX=1, PosY=0.1859, Protected=true,Symbol="_{out}"); |
---|
[1] | 195 | |
---|
[840] | 196 | Pincrease as press_delta (Brief = "Pressure Increase",Lower = 0, DisplayUnit = 'kPa', Symbol ="P_{incr}"); |
---|
[1] | 197 | |
---|
[840] | 198 | EQUATIONS |
---|
| 199 | |
---|
| 200 | "Molar Balance" |
---|
[1] | 201 | Inlet.F = Outlet.F; |
---|
[840] | 202 | |
---|
| 203 | "Composittion" |
---|
[1] | 204 | Inlet.z = Outlet.z; |
---|
| 205 | |
---|
[840] | 206 | "Pump head" |
---|
| 207 | Outlet.P = Inlet.P + Pincrease; |
---|
[1] | 208 | |
---|
[840] | 209 | "Pump potency" |
---|
[125] | 210 | Outlet.h = Inlet.h; |
---|
[840] | 211 | |
---|
[1] | 212 | end |
---|
[757] | 213 | |
---|
| 214 | Model pump2 |
---|
[840] | 215 | |
---|
| 216 | ATTRIBUTES |
---|
[757] | 217 | Pallete = true; |
---|
| 218 | Icon = "icon/Pump2"; |
---|
| 219 | Brief = "Model of a simplified pump, used in distillation column model."; |
---|
| 220 | Info = |
---|
[840] | 221 | "== ASSUMPTIONS == |
---|
| 222 | * Steady State; |
---|
| 223 | * Only Liquid; |
---|
| 224 | * Adiabatic; |
---|
| 225 | * Isentropic. |
---|
| 226 | |
---|
| 227 | == SPECIFY == |
---|
| 228 | * the inlet stream; |
---|
| 229 | * the pump Pincrease. |
---|
| 230 | "; |
---|
[757] | 231 | |
---|
[840] | 232 | PARAMETERS |
---|
| 233 | outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); |
---|
| 234 | outer NComp as Integer (Brief = "Number of chemical components"); |
---|
[757] | 235 | |
---|
[840] | 236 | VARIABLES |
---|
| 237 | in Inlet as stream (Brief = "Inlet stream", PosX=1, PosY=0.4727, Protected=true,Symbol="_{in}"); |
---|
| 238 | out Outlet as liquid_stream (Brief = "Outlet stream", PosX=0, PosY=0.1859, Protected=true,Symbol="_{out}"); |
---|
[757] | 239 | |
---|
[840] | 240 | Pincrease as press_delta (Brief = "Pressure Increase",Lower = 0, DisplayUnit = 'kPa', Symbol ="P_{incr}"); |
---|
[757] | 241 | |
---|
[840] | 242 | EQUATIONS |
---|
| 243 | |
---|
| 244 | "Molar Balance" |
---|
[757] | 245 | Inlet.F = Outlet.F; |
---|
[840] | 246 | |
---|
| 247 | "Composittion" |
---|
[757] | 248 | Inlet.z = Outlet.z; |
---|
| 249 | |
---|
[840] | 250 | "Pump head" |
---|
| 251 | Outlet.P = Inlet.P + Pincrease; |
---|
[757] | 252 | |
---|
[840] | 253 | "Pump potency" |
---|
[757] | 254 | Outlet.h = Inlet.h; |
---|
[840] | 255 | |
---|
[757] | 256 | end |
---|
| 257 | |
---|