Changeset 681
 Timestamp:
 Nov 18, 2008, 12:48:24 PM (14 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/eml/pressure_changers/compressor.mso
r616 r681 27 27 Brief = "Model of a centrifugal compressor."; 28 28 Info = 29 "To be documented"; 29 "To be documented 30 31 == References == 32 33 [1] GPSA, 1979, Engineering Data Book, Chapter 4, 59  510. 34 35 [2] Bloch, Heinz P., A Practical Guide to Compressor Technology, John Wiley & Sons, Incorporate, 2006. 36 37 [3] Mark R. Sandberg, Equation Of State Influences On Compressor Performance Determination,PROCEEDINGS OF THE THIRTYFOURTH TURBOMACHINERY SYMPOSIUM, 2005."; 30 38 31 39 PARAMETERS 32 40 33 41 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 34 outer NComp as Integer 42 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 35 43 Rgas as positive (Brief = "Constant of Gases", Unit= 'kJ/kmol/K', Default = 8.31451,Hidden=true); 36 44 Mw(NComp) as molweight (Brief = "Molar Weight"); 37 CompressorType as Switcher (Brief = "Compressor Model Type",Valid=["Polytropic Operation","Isentropic Operation"], Default="Isentropic Operation");45 CompressorType as Switcher (Brief = "Compressor Model Type",Valid=["Polytropic With GPSA Method","Isentropic With GPSA Method","Isentropic With ASME Method","Polytropic With ASME Method"], Default="Isentropic With GPSA Method"); 38 46 39 47 VARIABLES 40 48 41 Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}");49 Pratio as positive (Brief = "Pressure Ratio", Lower = 1E6, Symbol ="P_{ratio}"); 42 50 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 43 Pincrease as press_delta (Brief = "Pressure Increase", DisplayUnit = 'kPa', Symbol ="P_{incr}");44 45 Head as energy_mass (Brief = "Actual Head",Hidden=true);51 Pincrease as press_delta (Brief = "Pressure Increase",Lower = 0, DisplayUnit = 'kPa', Symbol ="P_{incr}"); 52 53 Head as energy_mass (Brief = "Actual Head"); 46 54 HeadIsentropic as energy_mass (Brief = "Isentropic Head"); 47 55 HeadPolytropic as energy_mass (Brief = "Polytropic Head"); 56 HeadCorrection as positive (Brief = "Schultz Polytropic Head Correction"); 48 57 49 58 EfficiencyOperation as positive (Brief = "Compressor efficiency  Polytropic or Isentropic (See Compressor Type)",Lower=1E3,Upper=1); … … 54 63 PowerLoss as power (Brief = "Power Losses"); 55 64 56 PolyCoeff as positive 65 PolyCoeff as positive (Brief = "Polytropic Coefficient", Lower=0.2,Protected=true); 57 66 IseCoeff as positive (Brief = "Isentropic Coefficient", Lower=0.2,Protected=true); 58 PolytropicEff as positive (Brief = "Polytropic efficiency",Lower=1E3,Upper=1,Protected=true); 59 IsentropicEff as positive (Brief = "Isentropic efficiency",Lower=1E3,Upper=1,Protected=true); 60 61 Tisentropic as temperature (Brief = "Isentropic Temperature",Protected=true); 62 Mwm as molweight (Brief = "Mixture Molar Weight",Protected=true); 63 rho as dens_mass (Brief = "Mass Density",Protected=true); 64 Zfac_in as fraction (Brief = "Compressibility factor at inlet",Protected=true); 65 Zfac_out as fraction (Brief = "Compressibility factor at outlet",Protected=true); 67 PolytropicEff as positive (Brief = "Polytropic efficiency",Lower=1E3,Upper=1,Protected=true); 68 IsentropicEff as positive (Brief = "Isentropic efficiency",Lower=1E3,Upper=1,Protected=true); 69 70 Tisentropic as temperature (Brief = "Isentropic Temperature",Protected=true); 71 hise as enth_mol (Brief = "Enthalpy at constant entropy",Hidden=true); 72 Mwm as molweight (Brief = "Mixture Molar Weight",Hidden=true); 73 rho_in as dens_mass (Brief = "Mass Density at inlet conditions", Lower = 1E6, Protected=true); 74 rho_out as dens_mass (Brief = "Mass Density at outlet conditions", Lower = 1E6, Protected=true); 75 rho_ise as dens_mass (Brief = "Mass Density at isentropic conditions", Lower = 1E6, Hidden=true); 76 Zfac_in as fraction (Brief = "Compressibility factor at inlet", Lower = 1E3, Protected=true); 77 Zfac_out as fraction (Brief = "Compressibility factor at outlet", Lower = 1E3, Protected=true); 66 78 67 79 in Inlet as stream (Brief = "Inlet stream", PosX=0.437, PosY=1, Symbol="_{in}"); … … 96 108 Outlet.P = Inlet.P + Pincrease; 97 109 98 "Mass Density" 99 rho = PP.VapourDensity(Inlet.T, Inlet.P, Inlet.z); 100 110 "Mass Density at inlet conditions" 111 rho_in = PP.VapourDensity(Inlet.T, Inlet.P, Inlet.z); 112 113 "Mass Density at outlet conditions" 114 rho_out= PP.VapourDensity(Outlet.T, Outlet.P, Outlet.z); 115 116 "Mass Density at isentropic conditions" 117 rho_ise= PP.VapourDensity(Tisentropic, Outlet.P, Outlet.z); 118 119 "Enthalpy at isentropic conditions" 120 hise = PP.VapourEnthalpy(Tisentropic, Outlet.P, Outlet.z); 121 101 122 "Compressibility factor at Inlet Conditions" 102 123 Zfac_in = PP.VapourCompressibilityFactor(Inlet.T,Inlet.P,Inlet.z); … … 105 126 Zfac_out = PP.VapourCompressibilityFactor(Outlet.T,Outlet.P,Outlet.z); 106 127 107 "Isentropic Head"108 HeadIsentropic*Mwm = (PP.VapourEnthalpy(Tisentropic,Outlet.P,Outlet.z)Inlet.h);128 "Isentropic Efficiency" 129 IsentropicEff*(Outlet.hInlet.h) = (hiseInlet.h); 109 130 110 131 "Actual Head" … … 123 144 PowerLoss = BrakePower  FluidPower; 124 145 125 "Isentropic Efficiency"126 IsentropicEff*(PP.VapourEnthalpy(Outlet.T,Outlet.P,Outlet.z)Inlet.h) = (PP.VapourEnthalpy(Tisentropic,Outlet.P,Outlet.z)Inlet.h);127 128 146 "PolytropicIsentropic Relation" 129 147 PolytropicEff*HeadIsentropic = HeadPolytropic*IsentropicEff; 130 148 149 "Fluid Power" 150 FluidPower = Head*Mwm*Inlet.F; 151 152 switch CompressorType 153 154 case "Isentropic With GPSA Method": 155 156 "Efficiency" 157 EfficiencyOperation = IsentropicEff; 158 131 159 "Polytropic Efficiency" 132 160 PolytropicEff*IseCoeff*(PolyCoeff1) = PolyCoeff*(IseCoeff1); 133 161 134 162 "Isentropic Coefficient" 135 HeadIsentropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(IseCoeff/(IseCoeff1.001))*Rgas*Inlet.T*((Outlet.P/Inlet.P)^((IseCoeff1.001)/IseCoeff)  1); 136 137 "Polytropic Coefficient" 138 HeadPolytropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(PolyCoeff/(PolyCoeff1.001))*Rgas*Inlet.T*((Outlet.P/Inlet.P)^((PolyCoeff1.001)/PolyCoeff)  1); 139 140 "Fluid Power" 141 FluidPower = Head*sum(Mw*Inlet.z)*Inlet.F*EfficiencyOperation+PowerLoss; 142 143 switch CompressorType 144 145 case "Isentropic Operation": 163 HeadIsentropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(IseCoeff/(IseCoeff1.001))*Rgas*Inlet.T*((Pratio)^((IseCoeff1.001)/IseCoeff)  1); 164 165 "Polytropic Coefficient" 166 HeadPolytropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(PolyCoeff/(PolyCoeff1.001))*Rgas*Inlet.T*((Pratio)^((PolyCoeff1.001)/PolyCoeff)  1); 167 168 "Head Correction" 169 HeadCorrection =1; 170 171 "Isentropic Head" 172 HeadIsentropic = Head*IsentropicEff; 173 174 case "Polytropic With GPSA Method": 175 176 "Efficiency" 177 EfficiencyOperation = PolytropicEff; 178 179 "Polytropic Efficiency" 180 PolytropicEff*IseCoeff*(PolyCoeff1) = PolyCoeff*(IseCoeff1); 181 182 "Isentropic Coefficient" 183 HeadIsentropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(IseCoeff/(IseCoeff1.001))*Rgas*Inlet.T*((Pratio)^((IseCoeff1.001)/IseCoeff)  1); 184 185 "Polytropic Coefficient" 186 HeadPolytropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(PolyCoeff/(PolyCoeff1.001))*Rgas*Inlet.T*((Pratio)^((PolyCoeff1.001)/PolyCoeff)  1); 187 188 "Head Correction" 189 HeadCorrection =1; 190 191 "Isentropic Head" 192 HeadIsentropic = Head*IsentropicEff; 193 194 case "Isentropic With ASME Method": 146 195 147 196 "Efficiency" 148 197 EfficiencyOperation = IsentropicEff; 149 150 case "Polytropic Operation": 198 199 "Isentropic Coefficient" 200 IseCoeff*ln(rho_ise/rho_in) = ln(Outlet.P/Inlet.P); 201 202 "Polytropic Coefficient" 203 PolyCoeff*ln(rho_out/rho_in) = ln(Outlet.P/Inlet.P); 204 205 "Isentropic Head" 206 HeadIsentropic*rho_in = (IseCoeff/(IseCoeff1.001))*Inlet.P*HeadCorrection*((Pratio)^((IseCoeff1.001)/IseCoeff)  1); 207 208 "Polytropic Head" 209 HeadPolytropic*rho_in = (PolyCoeff/(PolyCoeff1.001))*Inlet.P*HeadCorrection*((Pratio)^((PolyCoeff1.001)/PolyCoeff)  1); 210 211 "Schultz Polytropic Head Correction" 212 HeadCorrection*Mwm*(IseCoeff/(IseCoeff1.001))*(Outlet.P/rho_ise Inlet.P/rho_in) = (hiseInlet.h); 213 214 case "Polytropic With ASME Method": 151 215 152 216 "Efficiency" 153 217 EfficiencyOperation = PolytropicEff; 154 218 219 "Isentropic Coefficient" 220 IseCoeff*ln(rho_ise/rho_in) = ln(Outlet.P/Inlet.P); 221 222 "Polytropic Coefficient" 223 PolyCoeff*ln(rho_out/rho_in) = ln(Outlet.P/Inlet.P); 224 225 "Isentropic Head" 226 HeadIsentropic*rho_in = (IseCoeff/(IseCoeff1.001))*Inlet.P*HeadCorrection*((Pratio)^((IseCoeff1.001)/IseCoeff)  1); 227 228 "Polytropic Head" 229 HeadPolytropic*rho_in = (PolyCoeff/(PolyCoeff1.001))*Inlet.P*HeadCorrection*((Pratio)^((PolyCoeff1.001)/PolyCoeff)  1); 230 231 "Schultz Polytropic Head Correction" 232 HeadCorrection*Mwm*(IseCoeff/(IseCoeff1.001))*(Outlet.P/rho_ise Inlet.P/rho_in) = (hiseInlet.h); 233 155 234 end 156 235 157 158 236 end
Note: See TracChangeset
for help on using the changeset viewer.