Ignore:
Timestamp:
Nov 20, 2008, 5:42:33 PM (14 years ago)
Author:
gerson bicca
Message:

updated compressor model (BRANCH)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/eml/pressure_changers/compressor.mso

    r608 r687  
    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);
    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}");
    4952        EfficiencyOperation     as positive     (Brief = "Compressor efficiency - Polytropic or Isentropic (See Compressor Type)",Lower=1E-3,Upper=1);
    5053        MechanicalEff                   as positive     (Brief = "Mechanical efficiency",Lower=1E-3,Upper=1);
    51        
    52         FluidPower      as power        (Brief = "Fluid Power");
    53         BrakePower      as power        (Brief = "Brake Power");
    5454        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);
    5764        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);
     65        PolytropicEff   as positive     (Brief = "Polytropic efficiency",Lower=1E-3,Upper=1,Protected=true);
     66        IsentropicEff   as positive     (Brief = "Isentropic efficiency",Lower=1E-3,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 = 1E-6, Protected=true);
     72        rho_out         as dens_mass            (Brief = "Mass Density at outlet conditions", Lower = 1E-6, Protected=true);
     73        rho_ise         as dens_mass            (Brief = "Mass Density at isentropic conditions", Lower = 1E-6, Hidden=true);
     74        Zfac_in                 as fraction             (Brief = "Compressibility factor at inlet", Lower = 1E-3, Protected=true);
     75        Zfac_out                as fraction             (Brief = "Compressibility factor at outlet", Lower = 1E-3, Protected=true);
    6676
    6777in      Inlet   as stream       (Brief = "Inlet stream", PosX=0.437, PosY=1, Symbol="_{in}");
    6878out     Outlet  as streamPH     (Brief = "Outlet stream", PosX=0.953, PosY=0.0, Symbol="_{out}");
    6979
    70 in      WorkIn  as power        (Brief = "Work Inlet", PosX=0, PosY=0.45);
     80in      WorkIn  as power        (Brief = "Work Inlet", PosX=0, PosY=0.45, Protected=true);
    7181
    7282SET
     
    96106        Outlet.P  = Inlet.P + Pincrease;
    97107
    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       
    101120"Compressibility factor at Inlet Conditions"
    102121        Zfac_in = PP.VapourCompressibilityFactor(Inlet.T,Inlet.P,Inlet.z);
     
    105124        Zfac_out = PP.VapourCompressibilityFactor(Outlet.T,Outlet.P,Outlet.z);
    106125
    107 "Isentropic Head"
    108         HeadIsentropic*Mwm = (PP.VapourEnthalpy(Tisentropic,Outlet.P,Outlet.z)-Inlet.h);
     126"Isentropic Efficiency"
     127        IsentropicEff*(Outlet.h-Inlet.h) = (hise-Inlet.h);
    109128
    110129"Actual Head"
     
    123142        PowerLoss = BrakePower - FluidPower;
    124143
    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 
    128144"Polytropic-Isentropic Relation"
    129145        PolytropicEff*HeadIsentropic = HeadPolytropic*IsentropicEff;
    130146
     147"Fluid Power"
     148        FluidPower = Head*Mwm*Inlet.F;
     149
     150switch CompressorType
     151
     152        case "Isentropic With GPSA Method":
     153
     154"Efficiency"
     155        EfficiencyOperation = IsentropicEff;
     156
    131157"Polytropic Efficiency"
    132158        PolytropicEff*IseCoeff*(PolyCoeff-1) = PolyCoeff*(IseCoeff-1);
    133159
    134160"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":
     161        HeadIsentropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(IseCoeff/(IseCoeff-1.001))*Rgas*Inlet.T*((Pratio)^((IseCoeff-1.001)/IseCoeff) - 1);
     162
     163"Polytropic Coefficient"
     164        HeadPolytropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(PolyCoeff/(PolyCoeff-1.001))*Rgas*Inlet.T*((Pratio)^((PolyCoeff-1.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*(PolyCoeff-1) = PolyCoeff*(IseCoeff-1);
     179
     180"Isentropic Coefficient"
     181        HeadIsentropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(IseCoeff/(IseCoeff-1.001))*Rgas*Inlet.T*((Pratio)^((IseCoeff-1.001)/IseCoeff) - 1);
     182
     183"Polytropic Coefficient"
     184        HeadPolytropic = (0.5*Zfac_in+0.5*Zfac_out)*(1/Mwm)*(PolyCoeff/(PolyCoeff-1.001))*Rgas*Inlet.T*((Pratio)^((PolyCoeff-1.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":
    146193
    147194"Efficiency"
    148195        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/(IseCoeff-1.001))*Inlet.P*HeadCorrection*((Pratio)^((IseCoeff-1.001)/IseCoeff) - 1);
     205
     206"Polytropic Head"
     207        HeadPolytropic*rho_in = (PolyCoeff/(PolyCoeff-1.001))*Inlet.P*HeadCorrection*((Pratio)^((PolyCoeff-1.001)/PolyCoeff) - 1);
     208
     209"Schultz Polytropic Head Correction"
     210        HeadCorrection*Mwm*(IseCoeff/(IseCoeff-1.001))*(Outlet.P/rho_ise -Inlet.P/rho_in) = (hise-Inlet.h);
     211
     212        case "Polytropic With ASME Method":
    151213
    152214"Efficiency"
    153215        EfficiencyOperation = PolytropicEff;
    154216
     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/(IseCoeff-1.001))*Inlet.P*HeadCorrection*((Pratio)^((IseCoeff-1.001)/IseCoeff) - 1);
     225
     226"Polytropic Head"
     227        HeadPolytropic*rho_in = (PolyCoeff/(PolyCoeff-1.001))*Inlet.P*HeadCorrection*((Pratio)^((PolyCoeff-1.001)/PolyCoeff) - 1);
     228       
     229"Schultz Polytropic Head Correction"
     230        HeadCorrection*Mwm*(IseCoeff/(IseCoeff-1.001))*(Outlet.P/rho_ise -Inlet.P/rho_in) =  (hise-Inlet.h);
    155231end
    156232
    157 
    158233end
Note: See TracChangeset for help on using the changeset viewer.