Changeset 57
- Timestamp:
- Nov 16, 2006, 2:46:48 PM (16 years ago)
- Location:
- mso
- Files:
-
- 5 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
mso/eml/pressure_changers/pump.mso
r1 r57 1 #*------------------------------------------------------------------------ 2 * This file is property of the author and cannot be used, copyed 3 * or modified without permission. 4 * 5 * Copyright (C) 2002-2006 the author 6 *------------------------------------------------------------------------- 7 * Authors: Andrey Copat Estefane da Silveira Horn 8 * $Id$ Marcos Lovato Alencastro 9 * Date: 20/02/2006 10 *------------------------------------------------------------------------- 11 * -> Steady State 12 * -> Only Liquid 13 * -> Adiabatic 14 * -> Isentropic 15 *-------------------------------------------------------------------------*# 16 using "streams"; 17 using "pressure_changers/flux_machine_basic"; 18 19 Model centrifugal_pump as flux_machine_basic 20 21 PARAMETERS 22 ext NComp as Integer (Brief = "Number of chemical components", Lower = 1); 23 ext PP as CalcObject (Brief = "External Physical Properties"); 24 Mw(NComp) as molweight (Brief = "Molar Weight"); 25 Eff as positive (Default = 0.72, Brief = "Pump Efficiency"); 26 Meff as positive (Default = 0.95, Brief = "Brake Efficiency"); 27 Beta as positive (Default = 0, Brief = "Volumetric Expansivity", Unit = "1/K"); 28 g as acceleration (Brief = "Gravity Acceleration", Default = 9.81); 29 N as vel_angular (Brief = "Rotation", Default = 100); 30 Lev as length (Brief = "Loss Friction", Default = 0); 31 32 VARIABLES 33 rho as dens_mass (Brief = "Specific Mass", Unit="kg/m^3"); 34 Cp as cp_mol (Brief = "Heat Capacity", Unit="kJ/kmol/K"); 35 FPower as power (Brief = "Fluid Power", Unit="kW"); 36 BPower as power (Brief = "Brake Power",Unit="kW"); 37 EPower as power (Brief = "Eletrical Potency", Unit="kW"); 38 Pdiff as press_delta (Brief = "Pressure Increase", Unit="kPa"); 39 Pratio as positive (Brief = "Pressure Ratio"); 40 Head as head (Brief = "Head Developed", Unit="kJ/kmol"); 41 Head_is as head (Brief = "Isoentripic Head", Unit="kJ/kmol"); 42 Mwm as molweight (Brief = "Mixture Molar Weight"); 43 pvm as pressure (Brief = "Mixture Vapour Pressure", Unit = "kPa"); 44 NPSHa as length (Brief = "Available Net Positive Suction Head"); 45 NS as positive (Brief = "Specific Speed", Unit = "(rpm*(gal/min)^0.5)/(m^3/4)"); 46 Q as flow_vol (Brief = "Volumetric Flow Rate"); 47 vm as vol_mol (Brief = "Mixture Molar Volume", Unit = "m^3/kmol"); 48 49 SET 50 Mw = PP.MolecularWeight(); 51 52 EQUATIONS 53 #Mixtures Properties 54 "Calculate Mwm for Inlet Mixture" 55 Mwm = sum(Mw([1:NComp])*Inlet.z([1:NComp])); 56 57 "Calculate Cp Using a External Physical Properties Routine" 58 Cp = PP.LiquidCp(Inlet.T,Inlet.P,Inlet.z); 59 60 "Calculate rho using a External Physical Properties Routine" 61 rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z); 62 63 "Calculate Mixture Vapour Pressure" 64 [pvm] = PP.BubbleP(Inlet.T,Inlet.z); 65 66 "Calculate Outlet Vapour Fraction" 67 Outlet.v = PP.VapourFraction(Outlet.T, Outlet.P, Outlet.z); 68 69 "Calculate Liquid Molar Volume" 70 vm = PP.LiquidVolume(Inlet.T,Inlet.P,Inlet.z); 71 72 #Mass and Energy Balance and Pump Equations 73 "Calculate Outlet Stream Pressure" 74 Outlet.P = Inlet.P + Pdiff; 75 76 "Pratio Definition" 77 Outlet.P = Inlet.P * Pratio; 78 79 "Calculate Isentropic Head" 80 Head_is = Pdiff * Mwm/rho; 81 82 "Calculate Real Head" 83 Head = Head_is/(Eff*Meff); 84 85 "Calculate Outlet Enthalpy" 86 Outlet.h - Inlet.h = Head; 87 88 "Calculate Fluid Power" 89 FPower = Head_is * Inlet.F; 90 91 "Calculate Brake Power" 92 BPower * Eff = FPower; 93 94 "Calculate Eletric Power" 95 BPower = EPower * Meff; 96 97 "Calculate Outlet Temperature" 98 (Outlet.T - Inlet.T) * Cp = (Outlet.h - Inlet.h) - Pdiff * Mwm / rho * (1 - Beta * Inlet.T); 99 100 "Molar Balance" 101 Outlet.F = Inlet.F; 102 103 "Calculate Outlet Composition" 104 Outlet.z = Inlet.z; 105 106 "Calculate Net Positive Suction Head" 107 NPSHa = - Lev + (Inlet.P - pvm)/(g*rho); #If Inlet.P is the suction pump pressure, Lev is 0. 108 109 "Calculate Volumetric Flow Rate" 110 Q = Inlet.F*vm; 111 112 "Calculate Specific Speed" 113 NS = N*(Q^0.5)/(Head^3/4); 114 115 end 116 117 1 118 #*------------------------------------------------------------------- 2 119 * Model of a pump … … 15 132 * $Id$ 16 133 *--------------------------------------------------------------------*# 17 using "streams"; 134 18 135 19 136 Model pump -
mso/eml/pressure_changers/valve.mso
r37 r57 1 #*----------------------------------------------------------------------------- 2 * Author: Estefane Horn Date:06/10/2006 3 * 4 *$Id:$ 5 *----------------------------------------------------------------------------- 6 * Assumptions 7 * -> Steady State 8 * -> Isentalpic 9 * -> Liquid 10 * 11 *# 12 13 using "streams"; 14 using "pressure_changers/flux_machine_basic"; 15 16 17 Model valve_basic as flux_machine_basic_TP 18 19 PARAMETERS 20 ext PP as CalcObject (Brief = "External Physical Properties", File = "vrpp"); 21 ext NComp as Integer (Brief = "Number of chemical components", Lower = 1); 22 rho60F as dens_mass; 23 24 VARIABLES 25 Pdiff as press_delta (Brief = "Pressure Increase", Unit = "kPa"); 26 Qv as flow_vol (Brief = "Volumetric Flow"); 27 fc as positive (Brief = "Opening Function"); 28 cv as positive (Brief = "Valve Coefficient", Unit = "m^3/h/kPa^0.5"); 29 Gf as positive (Brief = "Specific Gravity"); 30 rho as dens_mass; 31 vm as vol_mol (Brief = "Mixture Molar Volume", Unit = "m^3/kmol"); 32 33 SET 34 rho60F = 99.022 * "kg/m^3"; 35 36 EQUATIONS 37 "Calculate Outlet Stream Pressure" 38 Inlet.P - Outlet.P = Pdiff; 39 40 "Enthalpy Balance" 41 Outlet.h = Inlet.h; 42 43 "Molar Balance" 44 Outlet.F = Inlet.F; 45 46 "Calculate Outlet Composition" 47 Outlet.z = Inlet.z; 48 49 "Valve Equation" 50 Qv = fc*cv*sqrt(Pdiff/Gf); 51 52 "Calculate Gf" 53 Gf = rho/rho60F; 54 55 "Calculate Specific Mass" 56 rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z); 57 58 "Calculate Mass Flow" 59 Qv = Inlet.F*vm; 60 61 "Calculate Liquid Molar Volume" 62 vm = PP.LiquidVolume(Inlet.T,Inlet.P,Inlet.z); 63 64 end 65 66 Model valve_linear as valve_basic 67 68 VARIABLES 69 x as fraction (Brief = "Opening"); 70 71 EQUATIONS 72 73 "Opening Equation" 74 fc = 100*x; 75 76 end 77 78 Model valve_parabolic as valve_basic 79 80 PARAMETERS 81 n as positive (Brief = "Constant", Lower = 1.4, Upper = 2.6); 82 83 VARIABLES 84 x as fraction (Brief = "Opening"); 85 86 EQUATIONS 87 88 "Opening Equation" 89 fc = 100*x^n; 90 91 end 92 93 Model valve_equal as valve_basic 94 95 PARAMETERS 96 a as Real (Brief = "Constant", Default = 100); 97 98 VARIABLES 99 x as fraction (Brief = "Opening"); 100 101 EQUATIONS 102 103 "Opening Equation" 104 fc = 100*a^(x-1); 105 106 end 107 108 Model valve_quick as valve_basic 109 110 PARAMETERS 111 a as positive (Brief = "Constant", Default = 0.05); 112 n as positive (Brief = "Constant", Default = 5); 113 114 VARIABLES 115 x as fraction (Brief = "Opening"); 116 117 EQUATIONS 118 119 "Opening Equation" 120 fc = 100*(1-(a*(1-x)-(a-1)*(1-x)^n)); 121 122 end 123 1 124 #*------------------------------------------------------------------- 2 125 * Model of a valve … … 27 150 * $Id$ 28 151 *--------------------------------------------------------------------*# 29 30 using "streams";31 152 32 153 Model valve -
mso/sample/pressure_changers/sample_pump.mso
r33 r57 1 1 using "pressure_changers/pump"; 2 3 FlowSheet Pump_P1 4 5 DEVICES 6 S1 as streamTP; 7 P1 as centrifugal_pump; 8 9 CONNECTIONS 10 S1 to P1.Inlet; 11 12 PARAMETERS 13 PP as CalcObject (Brief="External Physical Properties", File="vrpp"); 14 Mw as positive (Brief = "Molar Mass", Unit = "kg/kmol"); 15 NComp as Integer (Default= 1); 16 17 SET 18 PP.Components = ["water", "benzene"]; 19 PP.LiquidModel = "PR"; 20 PP.VapourModel = "PR"; 21 NComp = PP.NumberOfComponents; 22 PP.Derivatives = 0; 23 P1.N = 1000 * "rpm"; 24 P1.Lev = 0 * "m"; 25 P1.Meff = 0.95; 26 P1.Eff = 0.72; 27 P1.Beta = 425e-6 * "1/K"; 28 29 SPECIFY 30 S1.F = 1000 * "kmol/h"; 31 S1.P = 10 * "atm"; 32 S1.T = 298 * "K" ; 33 S1.z = [1,0]; 34 P1.Pdiff = 8 * "kPa"; 35 #P1.Outlet.P = 2 * "atm"; 36 #P1.BPower = 1 * "kW"; 37 38 end 2 39 3 40 FlowSheet pump_Test -
mso/sample/pressure_changers/sample_valve.mso
r33 r57 76 76 77 77 end 78 79 FlowSheet valve_linear_Test 80 81 DEVICES 82 S1 as streamTP; 83 V1 as valve_linear; 84 85 CONNECTIONS 86 S1 to V1.Inlet; 87 88 PARAMETERS 89 PP as CalcObject (Brief="External Physical Properties", File="vrpp"); 90 NComp as Integer (Default= 1); 91 92 SET 93 PP.Components = ["water"]; 94 PP.LiquidModel = "IdealLiquid"; 95 PP.VapourModel = "Ideal"; 96 PP.Derivatives = 0; 97 NComp = PP.NumberOfComponents; 98 99 SPECIFY 100 S1.P = 2169.78 * "kPa"; 101 S1.T = 394.26 * "K" ; 102 S1.z = [1]; 103 V1.Qv = 113.56 * "m^3/h"; 104 V1.x = 0.5; 105 V1.cv = 3.997 * "m^3/h/kPa^0.5"; 106 end
Note: See TracChangeset
for help on using the changeset viewer.