Ignore:
Timestamp:
Oct 19, 2009, 5:41:09 PM (14 years ago)
Author:
gerson bicca
Message:

revised compressor model

File:
1 edited

Legend:

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

    r739 r864  
    4242outer NComp                     as Integer              (Brief = "Number of chemical components", Lower = 1);
    4343        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");
     44        Mw(NComp)                       as molweight    (Brief = "Molar Weight",Hidden=true);
     45        CompressorOperation     as Switcher             (Brief = "Compressor Operation Model",Valid=["Polytropic","Isentropic"], Default="Isentropic");
     46        Method  as Switcher             (Brief = "Method of Calculation",Valid=["GPSA Method","ASME Method"], Default="GPSA Method");
    4647
    4748VARIABLES
     
    148149        FluidPower = Head*Mwm*Inlet.F;
    149150
    150 switch CompressorType
    151 
    152         case "Isentropic With GPSA Method":
     151switch CompressorOperation
     152
     153        case "Isentropic":
     154       
     155switch Method
     156       
     157        case "ASME Method":
     158
     159"Efficiency"
     160        EfficiencyOperation = IsentropicEff;
     161
     162"Isentropic Coefficient"
     163        IseCoeff*ln(rho_ise/rho_in) = ln(Outlet.P/Inlet.P);
     164
     165"Polytropic Coefficient"
     166        PolyCoeff*ln(rho_out/rho_in) = ln(Outlet.P/Inlet.P);
     167
     168"Isentropic Head"
     169        HeadIsentropic*rho_in = (IseCoeff/(IseCoeff-1.001))*Inlet.P*HeadCorrection*((Pratio)^((IseCoeff-1.001)/IseCoeff) - 1);
     170
     171"Polytropic Head"
     172        HeadPolytropic*rho_in = (PolyCoeff/(PolyCoeff-1.001))*Inlet.P*HeadCorrection*((Pratio)^((PolyCoeff-1.001)/PolyCoeff) - 1);
     173
     174"Schultz Polytropic Head Correction"
     175        HeadCorrection*Mwm*(IseCoeff/(IseCoeff-1.001))*(Outlet.P/rho_ise -Inlet.P/rho_in) = (hise-Inlet.h);
     176       
     177        case "GPSA Method":
    153178
    154179"Efficiency"
     
    169194"Isentropic Head"
    170195        HeadIsentropic = Head*IsentropicEff;
    171        
    172         case "Polytropic With GPSA Method":
     196
     197end
     198
     199        case "Polytropic":
     200
     201switch Method
     202
     203        case "GPSA Method":
    173204
    174205"Efficiency"
     
    190221        HeadIsentropic = Head*IsentropicEff;
    191222       
    192         case "Isentropic With ASME Method":
    193 
    194 "Efficiency"
    195         EfficiencyOperation = IsentropicEff;
     223        case "ASME Method":
     224
     225"Efficiency"
     226        EfficiencyOperation = PolytropicEff;
    196227
    197228"Isentropic Coefficient"
     
    206237"Polytropic Head"
    207238        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":
    213 
    214 "Efficiency"
    215         EfficiencyOperation = PolytropicEff;
    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/(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);
    228239       
    229240"Schultz Polytropic Head Correction"
     
    232243
    233244end
     245
     246end
Note: See TracChangeset for help on using the changeset viewer.