Changeset 740
- Timestamp:
- Mar 3, 2009, 5:47:16 PM (15 years ago)
- Location:
- branches/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/pressure_changers/pump.mso
r372 r740 21 21 22 22 Model centrifugal_pump 23 ATTRIBUTES 23 24 ATTRIBUTES 24 25 Pallete = true; 25 26 Icon = "icon/CentrifugalPump"; … … 31 32 * Adiabatic; 32 33 * Isentropic. 33 34 == Specify ==35 * the inlet stream;36 * the Pressure Increase Pdiff.37 34 "; 38 35 39 40 outer PP as Plugin (Brief = "External Physical Properties", Type="PP");36 PARAMETERS 37 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 41 38 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); 39 Mw(NComp) as molweight (Brief = "Molar Weight"); 49 40 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}"); 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); 43 NPSH_Options as Switcher (Brief = "NPSH Options", Valid = ["Default","Include Kinetic Head"], Default = "Default"); 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 64 Head as energy_mass (Brief = "Actual Head", Protected=true); 65 HeadIsentropic as energy_mass (Brief = "Isentropic Head", Protected=true); 66 NPSH_available as length (Brief = "Available Net Positive Suction Head" ,Protected=true); 68 67 69 SET 70 Mw = PP.MolecularWeight(); 68 VelocityHead as length (Brief = "Velocity Head"); 69 StaticHead as length (Brief = "Static Head"); 70 NozzleVelocity as velocity (Brief = "Velocity Inlet Nozzle"); 71 71 72 72 EQUATIONS 73 #Mixtures Properties 74 "Calculate Mwm for Inlet Mixture" 75 Mwm = sum(Mw([1:NComp])*Inlet.z([1:NComp])); 73 in Inlet as stream (Brief = "Inlet stream", PosX=1, PosY=0.4025, Symbol="_{in}"); 74 out Outlet as streamPH (Brief = "Outlet stream", PosX=0, PosY=0, Symbol="_{out}"); 76 75 77 "Calculate Cp Using a External Physical Properties Routine" 78 Cp = PP.LiquidCp(Inlet.T,Inlet.P,Inlet.z); 76 SET 77 Mw = PP.MolecularWeight(); 78 g = 9.81*'m/s^2'; 79 79 80 "Calculate rho using a External Physical Properties Routine" 81 rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z); 80 EQUATIONS 82 81 83 "Calculate Mixture Vapour Pressure" 84 [pvm] = PP.BubbleP(Inlet.T,Inlet.z); 82 "Velocity Inlet Nozzle" 83 Fvol = NozzleVelocity*SuctionArea; 84 85 "Velocity Head" 86 VelocityHead = 0.5*NozzleVelocity^2/g; 87 88 "Average Molecular Weight" 89 Mwm = sum(Mw*Inlet.z); 90 91 "Mass Density at inlet conditions" 92 rho_in = PP.LiquidDensity(Inlet.T, Inlet.P, Inlet.z); 93 94 "Mass Density at outlet conditions" 95 rho_out= PP.LiquidDensity(Outlet.T, Outlet.P, Outlet.z); 96 97 "Inlet Flow Mass" 98 Fw_in = Mwm*Inlet.F; 99 100 "Outlet Flow Mass" 101 Fw_out = Fw_in; 85 102 86 "Calculate Outlet Vapour Fraction"87 Outlet. v = PP.VapourFraction(Outlet.T, Outlet.P, Outlet.z);103 "Pressure Increase" 104 Outlet.P = Inlet.P + Pincrease; 88 105 89 "Calculate Liquid Molar Volume"90 vm = PP.LiquidVolume(Inlet.T,Inlet.P,Inlet.z);106 "Mixture Vapour Pressure" 107 Pvapor = PP.BubbleP(Inlet.T,Inlet.z); 91 108 92 109 "Pressure Ratio" 93 110 Outlet.P = Inlet.P * Pratio; 94 111 95 112 "Pressure Drop" 96 113 Outlet.P = Inlet.P - Pdrop; 97 114 98 "CalculateIsentropic Head"99 Head _is = -Pdrop * Mwm/rho;115 "Isentropic Head" 116 HeadIsentropic = -Pdrop/rho_in; 100 117 101 "Calculate Real Head"102 Head = Head _is/(Eff*Meff);118 "Pump Efficiency" 119 Head = HeadIsentropic/PumpEfficiency; 103 120 104 "Calculate Outlet Enthalpy"105 Outlet.h - Inlet.h = Head;121 "Actual Head" 122 Head*Mwm = (Outlet.h-Inlet.h); 106 123 107 "CalculateFluid Power"108 F Power = Head_is* Inlet.F;124 "Fluid Power" 125 FluidPower = HeadIsentropic *Mwm* Inlet.F; 109 126 110 "CalculateBrake Power"111 B Power * Eff = FPower;127 "Brake Power" 128 BrakePower * PumpEfficiency = FluidPower; 112 129 113 "CalculateEletric Power"114 B Power = EPower * Meff;130 "Eletric Power" 131 BrakePower = EletricPower * MechanicalEff; 115 132 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" 133 "Molar Balance" 120 134 Outlet.F = Inlet.F; 121 135 122 "CalculateOutlet Composition"136 "Outlet Composition" 123 137 Outlet.z = Inlet.z; 138 139 "Volumetric Flow Rate" 140 Fvol = Fw_in/rho_in; 141 142 switch NPSH_Options 124 143 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. 144 case "Default": 127 145 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)); 146 "Net Positive Suction Head Available - Without Velocity Head" 147 NPSH_available = (Inlet.P - Pvapor)/(rho_in*g) + StaticHead; 148 149 case "Include Kinetic Head": 150 151 "Net Positive Suction Head Available - Included Velocity Head" 152 NPSH_available = (Inlet.P - Pvapor)/(rho_in*g)+VelocityHead+StaticHead; 153 154 155 end 133 156 134 157 end -
branches/gui/sample/pressure_changers/sample_pump.mso
r585 r740 37 37 PP as Plugin (Brief="External Physical Properties", 38 38 Type="PP", 39 Components = ["water" , "benzene"],39 Components = ["water"], 40 40 LiquidModel = "PR", 41 41 VapourModel = "PR" … … 46 46 SET 47 47 NComp = PP.NumberOfComponents; 48 P1.N = 1000 * 'rpm'; 49 P1.Lev = 0 * 'm'; 50 P1.Meff = 0.95; 51 P1.Eff = 0.72; 52 P1.Beta = 425e-6 * '1/K'; 48 P1.MechanicalEff = 0.95; 49 P1.PumpEfficiency = 0.72; 50 P1.SuctionArea = 0.001*'m^2'; 53 51 54 52 S1.ValidPhases = "Vapour-Liquid"; … … 59 57 S1.P = 10 * 'atm'; 60 58 S1.T = 298 * 'K' ; 61 S1.Composition = [1 ,0];59 S1.Composition = [1]; 62 60 63 P1.Pdrop = -8 * 'kPa'; 64 #P1.Outlet.P = 2 * 'atm'; 65 #P1.BPower = 1 * 'kW'; 61 P1.StaticHead = 10 * 'm'; 62 P1.Outlet.P = 18 * 'atm'; 66 63 67 64 end
Note: See TracChangeset
for help on using the changeset viewer.