[681] | 1 | #*------------------------------------------------------------------- |
---|
| 2 | * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. |
---|
| 3 | * |
---|
| 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 | *---------------------------------------------------------------------- |
---|
| 16 | * Author: Marcos L. Alencastro, Estefane S. Horn (Revised Gerson B. Bicca) |
---|
| 17 | * $Id: compressor.mso 681 2008-11-18 14:48:24Z bicca $ |
---|
| 18 | *--------------------------------------------------------------------*# |
---|
| 19 | |
---|
| 20 | using "streams"; |
---|
| 21 | |
---|
| 22 | Model centrifugal_compressor |
---|
| 23 | |
---|
| 24 | ATTRIBUTES |
---|
| 25 | Pallete = true; |
---|
| 26 | Icon = "icon/CentrifugalCompressor"; |
---|
| 27 | Brief = "Model of a centrifugal compressor."; |
---|
| 28 | Info = |
---|
| 29 | "To be documented |
---|
| 30 | |
---|
| 31 | == References == |
---|
| 32 | |
---|
| 33 | [1] GPSA, 1979, Engineering Data Book, Chapter 4, 5-9 - 5-10. |
---|
| 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 THIRTY-FOURTH TURBOMACHINERY SYMPOSIUM, 2005."; |
---|
| 38 | |
---|
| 39 | PARAMETERS |
---|
| 40 | |
---|
| 41 | outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); |
---|
| 42 | outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); |
---|
| 43 | Rgas as positive (Brief = "Constant of Gases", Unit= 'kJ/kmol/K', Default = 8.31451,Hidden=true); |
---|
| 44 | Mw(NComp) as molweight (Brief = "Molar Weight"); |
---|
| 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"); |
---|
| 46 | |
---|
| 47 | VARIABLES |
---|
| 48 | |
---|
| 49 | Pratio as positive (Brief = "Pressure Ratio", Lower = 1E-6, Symbol ="P_{ratio}"); |
---|
| 50 | Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); |
---|
| 51 | Pincrease as press_delta (Brief = "Pressure Increase",Lower = 0, DisplayUnit = 'kPa', Symbol ="P_{incr}"); |
---|
| 52 | |
---|
| 53 | Head as energy_mass (Brief = "Actual Head"); |
---|
| 54 | HeadIsentropic as energy_mass (Brief = "Isentropic Head"); |
---|
| 55 | HeadPolytropic as energy_mass (Brief = "Polytropic Head"); |
---|
| 56 | HeadCorrection as positive (Brief = "Schultz Polytropic Head Correction"); |
---|
| 57 | |
---|
| 58 | EfficiencyOperation as positive (Brief = "Compressor efficiency - Polytropic or Isentropic (See Compressor Type)",Lower=1E-3,Upper=1); |
---|
| 59 | MechanicalEff as positive (Brief = "Mechanical efficiency",Lower=1E-3,Upper=1); |
---|
| 60 | |
---|
| 61 | FluidPower as power (Brief = "Fluid Power"); |
---|
| 62 | BrakePower as power (Brief = "Brake Power"); |
---|
| 63 | PowerLoss as power (Brief = "Power Losses"); |
---|
| 64 | |
---|
| 65 | PolyCoeff as positive (Brief = "Polytropic Coefficient", Lower=0.2,Protected=true); |
---|
| 66 | IseCoeff as positive (Brief = "Isentropic Coefficient", Lower=0.2,Protected=true); |
---|
| 67 | PolytropicEff as positive (Brief = "Polytropic efficiency",Lower=1E-3,Upper=1,Protected=true); |
---|
| 68 | IsentropicEff as positive (Brief = "Isentropic efficiency",Lower=1E-3,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 = 1E-6, Protected=true); |
---|
| 74 | rho_out as dens_mass (Brief = "Mass Density at outlet conditions", Lower = 1E-6, Protected=true); |
---|
| 75 | rho_ise as dens_mass (Brief = "Mass Density at isentropic conditions", Lower = 1E-6, Hidden=true); |
---|
| 76 | Zfac_in as fraction (Brief = "Compressibility factor at inlet", Lower = 1E-3, Protected=true); |
---|
| 77 | Zfac_out as fraction (Brief = "Compressibility factor at outlet", Lower = 1E-3, Protected=true); |
---|
| 78 | |
---|
| 79 | in Inlet as stream (Brief = "Inlet stream", PosX=0.437, PosY=1, Symbol="_{in}"); |
---|
| 80 | out Outlet as streamPH (Brief = "Outlet stream", PosX=0.953, PosY=0.0, Symbol="_{out}"); |
---|
| 81 | |
---|
| 82 | in WorkIn as work_stream (Brief = "Work Inlet", PosX=0, PosY=0.45); |
---|
| 83 | |
---|
| 84 | SET |
---|
| 85 | |
---|
| 86 | Mw = PP.MolecularWeight(); |
---|
| 87 | |
---|
| 88 | Rgas = 8.31451*'kJ/kmol/K'; |
---|
| 89 | |
---|
| 90 | EQUATIONS |
---|
| 91 | |
---|
| 92 | "Overall Molar Balance" |
---|
| 93 | Outlet.F = Inlet.F; |
---|
| 94 | |
---|
| 95 | "Component Molar Balance" |
---|
| 96 | Outlet.z = Inlet.z; |
---|
| 97 | |
---|
| 98 | "Average Molecular Weight" |
---|
| 99 | Mwm = sum(Mw*Inlet.z); |
---|
| 100 | |
---|
| 101 | "Pressure Ratio" |
---|
| 102 | Outlet.P = Inlet.P * Pratio; |
---|
| 103 | |
---|
| 104 | "Pressure Drop" |
---|
| 105 | Outlet.P = Inlet.P - Pdrop; |
---|
| 106 | |
---|
| 107 | "Pressure Increase" |
---|
| 108 | Outlet.P = Inlet.P + Pincrease; |
---|
| 109 | |
---|
| 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 | |
---|
| 122 | "Compressibility factor at Inlet Conditions" |
---|
| 123 | Zfac_in = PP.VapourCompressibilityFactor(Inlet.T,Inlet.P,Inlet.z); |
---|
| 124 | |
---|
| 125 | "Compressibility factor at Outlet Conditions" |
---|
| 126 | Zfac_out = PP.VapourCompressibilityFactor(Outlet.T,Outlet.P,Outlet.z); |
---|
| 127 | |
---|
| 128 | "Isentropic Efficiency" |
---|
| 129 | IsentropicEff*(Outlet.h-Inlet.h) = (hise-Inlet.h); |
---|
| 130 | |
---|
| 131 | "Actual Head" |
---|
| 132 | Head*Mwm = (Outlet.h-Inlet.h); |
---|
| 133 | |
---|
| 134 | "Isentropic Outlet Temperature" |
---|
| 135 | PP.VapourEntropy(Tisentropic, Outlet.P, Outlet.z) = PP.VapourEntropy(Inlet.T, Inlet.P, Inlet.z); |
---|
| 136 | |
---|
| 137 | "Brake Power" |
---|
| 138 | BrakePower = -WorkIn.Work; |
---|
| 139 | |
---|
| 140 | "Brake Power" |
---|
| 141 | BrakePower*MechanicalEff = FluidPower; |
---|
| 142 | |
---|
| 143 | "Power Loss" |
---|
| 144 | PowerLoss = BrakePower - FluidPower; |
---|
| 145 | |
---|
| 146 | "Polytropic-Isentropic Relation" |
---|
| 147 | PolytropicEff*HeadIsentropic = HeadPolytropic*IsentropicEff; |
---|
| 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 | |
---|
| 159 | "Polytropic Efficiency" |
---|
| 160 | PolytropicEff*IseCoeff*(PolyCoeff-1) = PolyCoeff*(IseCoeff-1); |
---|
| 161 | |
---|
| 162 | "Isentropic Coefficient" |
---|
| 163 | HeadIsentropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(IseCoeff/(IseCoeff-1.001))*Rgas*Inlet.T*((Pratio)^((IseCoeff-1.001)/IseCoeff) - 1); |
---|
| 164 | |
---|
| 165 | "Polytropic Coefficient" |
---|
| 166 | HeadPolytropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(PolyCoeff/(PolyCoeff-1.001))*Rgas*Inlet.T*((Pratio)^((PolyCoeff-1.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*(PolyCoeff-1) = PolyCoeff*(IseCoeff-1); |
---|
| 181 | |
---|
| 182 | "Isentropic Coefficient" |
---|
| 183 | HeadIsentropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(IseCoeff/(IseCoeff-1.001))*Rgas*Inlet.T*((Pratio)^((IseCoeff-1.001)/IseCoeff) - 1); |
---|
| 184 | |
---|
| 185 | "Polytropic Coefficient" |
---|
| 186 | HeadPolytropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(PolyCoeff/(PolyCoeff-1.001))*Rgas*Inlet.T*((Pratio)^((PolyCoeff-1.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": |
---|
| 195 | |
---|
| 196 | "Efficiency" |
---|
| 197 | EfficiencyOperation = IsentropicEff; |
---|
| 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/(IseCoeff-1.001))*Inlet.P*HeadCorrection*((Pratio)^((IseCoeff-1.001)/IseCoeff) - 1); |
---|
| 207 | |
---|
| 208 | "Polytropic Head" |
---|
| 209 | HeadPolytropic*rho_in = (PolyCoeff/(PolyCoeff-1.001))*Inlet.P*HeadCorrection*((Pratio)^((PolyCoeff-1.001)/PolyCoeff) - 1); |
---|
| 210 | |
---|
| 211 | "Schultz Polytropic Head Correction" |
---|
| 212 | HeadCorrection*Mwm*(IseCoeff/(IseCoeff-1.001))*(Outlet.P/rho_ise -Inlet.P/rho_in) = (hise-Inlet.h); |
---|
| 213 | |
---|
| 214 | case "Polytropic With ASME Method": |
---|
| 215 | |
---|
| 216 | "Efficiency" |
---|
| 217 | EfficiencyOperation = PolytropicEff; |
---|
| 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/(IseCoeff-1.001))*Inlet.P*HeadCorrection*((Pratio)^((IseCoeff-1.001)/IseCoeff) - 1); |
---|
| 227 | |
---|
| 228 | "Polytropic Head" |
---|
| 229 | HeadPolytropic*rho_in = (PolyCoeff/(PolyCoeff-1.001))*Inlet.P*HeadCorrection*((Pratio)^((PolyCoeff-1.001)/PolyCoeff) - 1); |
---|
| 230 | |
---|
| 231 | "Schultz Polytropic Head Correction" |
---|
| 232 | HeadCorrection*Mwm*(IseCoeff/(IseCoeff-1.001))*(Outlet.P/rho_ise -Inlet.P/rho_in) = (hise-Inlet.h); |
---|
| 233 | |
---|
| 234 | end |
---|
| 235 | |
---|
| 236 | end |
---|