Changeset 687 for branches/gui/eml/pressure_changers
 Timestamp:
 Nov 20, 2008, 5:42:33 PM (14 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/gui/eml/pressure_changers/compressor.mso
r608 r687 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); 46 HeadIsentropic as energy_mass (Brief = "Isentropic Head"); 47 HeadPolytropic as energy_mass (Brief = "Polytropic Head"); 48 51 Pincrease as press_delta (Brief = "Pressure Increase",Lower = 0, DisplayUnit = 'kPa', Symbol ="P_{incr}"); 49 52 EfficiencyOperation as positive (Brief = "Compressor efficiency  Polytropic or Isentropic (See Compressor Type)",Lower=1E3,Upper=1); 50 53 MechanicalEff as positive (Brief = "Mechanical efficiency",Lower=1E3,Upper=1); 51 52 FluidPower as power (Brief = "Fluid Power");53 BrakePower as power (Brief = "Brake Power");54 54 PowerLoss as power (Brief = "Power Losses"); 55 56 PolyCoeff as positive (Brief = "Polytropic Coefficient", Lower=0.2,Protected=true); 55 Head as energy_mass (Brief = "Actual Head", Protected=true); 56 HeadIsentropic as energy_mass (Brief = "Isentropic Head", Protected=true); 57 HeadPolytropic as energy_mass (Brief = "Polytropic Head", Protected=true); 58 HeadCorrection as positive (Brief = "Schultz Polytropic Head Correction", Protected=true); 59 60 FluidPower as power (Brief = "Fluid Power", Protected=true); 61 BrakePower as power (Brief = "Brake Power", Protected=true); 62 63 PolyCoeff as positive (Brief = "Polytropic Coefficient", Lower=0.2,Protected=true); 57 64 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); 65 PolytropicEff as positive (Brief = "Polytropic efficiency",Lower=1E3,Upper=1,Protected=true); 66 IsentropicEff as positive (Brief = "Isentropic efficiency",Lower=1E3,Upper=1,Protected=true); 67 68 Tisentropic as temperature (Brief = "Isentropic Temperature",Protected=true); 69 hise as enth_mol (Brief = "Enthalpy at constant entropy",Hidden=true); 70 Mwm as molweight (Brief = "Mixture Molar Weight",Hidden=true); 71 rho_in as dens_mass (Brief = "Mass Density at inlet conditions", Lower = 1E6, Protected=true); 72 rho_out as dens_mass (Brief = "Mass Density at outlet conditions", Lower = 1E6, Protected=true); 73 rho_ise as dens_mass (Brief = "Mass Density at isentropic conditions", Lower = 1E6, Hidden=true); 74 Zfac_in as fraction (Brief = "Compressibility factor at inlet", Lower = 1E3, Protected=true); 75 Zfac_out as fraction (Brief = "Compressibility factor at outlet", Lower = 1E3, Protected=true); 66 76 67 77 in Inlet as stream (Brief = "Inlet stream", PosX=0.437, PosY=1, Symbol="_{in}"); 68 78 out Outlet as streamPH (Brief = "Outlet stream", PosX=0.953, PosY=0.0, Symbol="_{out}"); 69 79 70 in WorkIn as power (Brief = "Work Inlet", PosX=0, PosY=0.45 );80 in WorkIn as power (Brief = "Work Inlet", PosX=0, PosY=0.45, Protected=true); 71 81 72 82 SET … … 96 106 Outlet.P = Inlet.P + Pincrease; 97 107 98 "Mass Density" 99 rho = PP.VapourDensity(Inlet.T, Inlet.P, Inlet.z); 100 108 "Mass Density at inlet conditions" 109 rho_in = PP.VapourDensity(Inlet.T, Inlet.P, Inlet.z); 110 111 "Mass Density at outlet conditions" 112 rho_out= PP.VapourDensity(Outlet.T, Outlet.P, Outlet.z); 113 114 "Mass Density at isentropic conditions" 115 rho_ise= PP.VapourDensity(Tisentropic, Outlet.P, Outlet.z); 116 117 "Enthalpy at isentropic conditions" 118 hise = PP.VapourEnthalpy(Tisentropic, Outlet.P, Outlet.z); 119 101 120 "Compressibility factor at Inlet Conditions" 102 121 Zfac_in = PP.VapourCompressibilityFactor(Inlet.T,Inlet.P,Inlet.z); … … 105 124 Zfac_out = PP.VapourCompressibilityFactor(Outlet.T,Outlet.P,Outlet.z); 106 125 107 "Isentropic Head"108 HeadIsentropic*Mwm = (PP.VapourEnthalpy(Tisentropic,Outlet.P,Outlet.z)Inlet.h);126 "Isentropic Efficiency" 127 IsentropicEff*(Outlet.hInlet.h) = (hiseInlet.h); 109 128 110 129 "Actual Head" … … 123 142 PowerLoss = BrakePower  FluidPower; 124 143 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 144 "PolytropicIsentropic Relation" 129 145 PolytropicEff*HeadIsentropic = HeadPolytropic*IsentropicEff; 130 146 147 "Fluid Power" 148 FluidPower = Head*Mwm*Inlet.F; 149 150 switch CompressorType 151 152 case "Isentropic With GPSA Method": 153 154 "Efficiency" 155 EfficiencyOperation = IsentropicEff; 156 131 157 "Polytropic Efficiency" 132 158 PolytropicEff*IseCoeff*(PolyCoeff1) = PolyCoeff*(IseCoeff1); 133 159 134 160 "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": 161 HeadIsentropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(IseCoeff/(IseCoeff1.001))*Rgas*Inlet.T*((Pratio)^((IseCoeff1.001)/IseCoeff)  1); 162 163 "Polytropic Coefficient" 164 HeadPolytropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(PolyCoeff/(PolyCoeff1.001))*Rgas*Inlet.T*((Pratio)^((PolyCoeff1.001)/PolyCoeff)  1); 165 166 "Head Correction" 167 HeadCorrection =1; 168 169 "Isentropic Head" 170 HeadIsentropic = Head*IsentropicEff; 171 172 case "Polytropic With GPSA Method": 173 174 "Efficiency" 175 EfficiencyOperation = PolytropicEff; 176 177 "Polytropic Efficiency" 178 PolytropicEff*IseCoeff*(PolyCoeff1) = PolyCoeff*(IseCoeff1); 179 180 "Isentropic Coefficient" 181 HeadIsentropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(IseCoeff/(IseCoeff1.001))*Rgas*Inlet.T*((Pratio)^((IseCoeff1.001)/IseCoeff)  1); 182 183 "Polytropic Coefficient" 184 HeadPolytropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(PolyCoeff/(PolyCoeff1.001))*Rgas*Inlet.T*((Pratio)^((PolyCoeff1.001)/PolyCoeff)  1); 185 186 "Head Correction" 187 HeadCorrection =1; 188 189 "Isentropic Head" 190 HeadIsentropic = Head*IsentropicEff; 191 192 case "Isentropic With ASME Method": 146 193 147 194 "Efficiency" 148 195 EfficiencyOperation = IsentropicEff; 149 150 case "Polytropic Operation": 196 197 "Isentropic Coefficient" 198 IseCoeff*ln(rho_ise/rho_in) = ln(Outlet.P/Inlet.P); 199 200 "Polytropic Coefficient" 201 PolyCoeff*ln(rho_out/rho_in) = ln(Outlet.P/Inlet.P); 202 203 "Isentropic Head" 204 HeadIsentropic*rho_in = (IseCoeff/(IseCoeff1.001))*Inlet.P*HeadCorrection*((Pratio)^((IseCoeff1.001)/IseCoeff)  1); 205 206 "Polytropic Head" 207 HeadPolytropic*rho_in = (PolyCoeff/(PolyCoeff1.001))*Inlet.P*HeadCorrection*((Pratio)^((PolyCoeff1.001)/PolyCoeff)  1); 208 209 "Schultz Polytropic Head Correction" 210 HeadCorrection*Mwm*(IseCoeff/(IseCoeff1.001))*(Outlet.P/rho_ise Inlet.P/rho_in) = (hiseInlet.h); 211 212 case "Polytropic With ASME Method": 151 213 152 214 "Efficiency" 153 215 EfficiencyOperation = PolytropicEff; 154 216 217 "Isentropic Coefficient" 218 IseCoeff*ln(rho_ise/rho_in) = ln(Outlet.P/Inlet.P); 219 220 "Polytropic Coefficient" 221 PolyCoeff*ln(rho_out/rho_in) = ln(Outlet.P/Inlet.P); 222 223 "Isentropic Head" 224 HeadIsentropic*rho_in = (IseCoeff/(IseCoeff1.001))*Inlet.P*HeadCorrection*((Pratio)^((IseCoeff1.001)/IseCoeff)  1); 225 226 "Polytropic Head" 227 HeadPolytropic*rho_in = (PolyCoeff/(PolyCoeff1.001))*Inlet.P*HeadCorrection*((Pratio)^((PolyCoeff1.001)/PolyCoeff)  1); 228 229 "Schultz Polytropic Head Correction" 230 HeadCorrection*Mwm*(IseCoeff/(IseCoeff1.001))*(Outlet.P/rho_ise Inlet.P/rho_in) = (hiseInlet.h); 155 231 end 156 232 157 158 233 end
Note: See TracChangeset
for help on using the changeset viewer.