Changeset 681 for trunk/eml


Ignore:
Timestamp:
Nov 18, 2008, 12:48:24 PM (14 years ago)
Author:
gerson bicca
Message:

updated compressor model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eml/pressure_changers/compressor.mso

    r616 r681  
    2727        Brief           = "Model of a centrifugal compressor.";
    2828        Info            =
    29 "To be documented";
     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.";
    3038       
    3139PARAMETERS
    3240
    3341outer PP                                        as Plugin                       (Brief = "External Physical Properties", Type="PP");
    34 outer NComp                     as Integer                      (Brief = "Number of chemical components", Lower = 1);
     42outer NComp                     as Integer              (Brief = "Number of chemical components", Lower = 1);
    3543        Rgas                                            as positive             (Brief = "Constant of Gases", Unit= 'kJ/kmol/K', Default = 8.31451,Hidden=true);
    3644        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");
    3846
    3947VARIABLES
    4048
    41         Pratio          as positive             (Brief = "Pressure Ratio", Symbol ="P_{ratio}");       
     49        Pratio          as positive             (Brief = "Pressure Ratio", Lower = 1E-6, Symbol ="P_{ratio}"); 
    4250        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");
    4654        HeadIsentropic  as energy_mass  (Brief = "Isentropic Head");
    4755        HeadPolytropic  as energy_mass  (Brief = "Polytropic Head");
     56        HeadCorrection   as positive                    (Brief = "Schultz Polytropic Head Correction");
    4857       
    4958        EfficiencyOperation     as positive     (Brief = "Compressor efficiency - Polytropic or Isentropic (See Compressor Type)",Lower=1E-3,Upper=1);
     
    5463        PowerLoss       as power        (Brief = "Power Losses");
    5564       
    56         PolyCoeff                       as positive             (Brief = "Polytropic Coefficient", Lower=0.2,Protected=true);
     65        PolyCoeff                       as positive     (Brief = "Polytropic Coefficient", Lower=0.2,Protected=true);
    5766        IseCoeff                        as positive     (Brief = "Isentropic Coefficient", Lower=0.2,Protected=true);
    58         PolytropicEff           as positive     (Brief = "Polytropic efficiency",Lower=1E-3,Upper=1,Protected=true);
    59         IsentropicEff           as positive     (Brief = "Isentropic efficiency",Lower=1E-3,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=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);
    6678
    6779in      Inlet   as stream       (Brief = "Inlet stream", PosX=0.437, PosY=1, Symbol="_{in}");
     
    96108        Outlet.P  = Inlet.P + Pincrease;
    97109
    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       
    101122"Compressibility factor at Inlet Conditions"
    102123        Zfac_in = PP.VapourCompressibilityFactor(Inlet.T,Inlet.P,Inlet.z);
     
    105126        Zfac_out = PP.VapourCompressibilityFactor(Outlet.T,Outlet.P,Outlet.z);
    106127
    107 "Isentropic Head"
    108         HeadIsentropic*Mwm = (PP.VapourEnthalpy(Tisentropic,Outlet.P,Outlet.z)-Inlet.h);
     128"Isentropic Efficiency"
     129        IsentropicEff*(Outlet.h-Inlet.h) = (hise-Inlet.h);
    109130
    110131"Actual Head"
     
    123144        PowerLoss = BrakePower - FluidPower;
    124145
    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 
    128146"Polytropic-Isentropic Relation"
    129147        PolytropicEff*HeadIsentropic = HeadPolytropic*IsentropicEff;
    130148
     149"Fluid Power"
     150        FluidPower = Head*Mwm*Inlet.F;
     151
     152switch CompressorType
     153
     154        case "Isentropic With GPSA Method":
     155
     156"Efficiency"
     157        EfficiencyOperation = IsentropicEff;
     158
    131159"Polytropic Efficiency"
    132160        PolytropicEff*IseCoeff*(PolyCoeff-1) = PolyCoeff*(IseCoeff-1);
    133161
    134162"Isentropic Coefficient"
    135         HeadIsentropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(IseCoeff/(IseCoeff-1.001))*Rgas*Inlet.T*((Outlet.P/Inlet.P)^((IseCoeff-1.001)/IseCoeff) - 1);
    136 
    137 "Polytropic Coefficient"
    138         HeadPolytropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(PolyCoeff/(PolyCoeff-1.001))*Rgas*Inlet.T*((Outlet.P/Inlet.P)^((PolyCoeff-1.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/(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":
    146195
    147196"Efficiency"
    148197        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/(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":
    151215
    152216"Efficiency"
    153217        EfficiencyOperation = PolytropicEff;
    154218
     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
    155234end
    156235
    157 
    158236end
Note: See TracChangeset for help on using the changeset viewer.