Ignore:
Timestamp:
Nov 20, 2008, 10:56:29 PM (14 years ago)
Author:
gerson bicca
Message:

updates

Location:
branches/gui/eml/pressure_changers
Files:
3 added
2 edited

Legend:

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

    r687 r689  
    159159
    160160"Isentropic Coefficient"
    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);
     161        HeadIsentropic*Mwm*((IseCoeff-1.001)/IseCoeff) = (0.5*Zfac_in+0.5*Zfac_out)*Rgas*Inlet.T*((Pratio)^((IseCoeff-1.001)/IseCoeff) - 1);
     162
     163"Polytropic Coefficient"
     164        HeadPolytropic*Mwm*((PolyCoeff-1.001)/PolyCoeff) = (0.5*Zfac_in+0.5*Zfac_out)*Rgas*Inlet.T*((Pratio)^((PolyCoeff-1.001)/PolyCoeff) - 1);
    165165
    166166"Head Correction"
     
    179179
    180180"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);
     181        HeadIsentropic*Mwm*((IseCoeff-1.001)/IseCoeff) = (0.5*Zfac_in+0.5*Zfac_out)*Rgas*Inlet.T*((Pratio)^((IseCoeff-1.001)/IseCoeff) - 1);
     182
     183"Polytropic Coefficient"
     184        HeadPolytropic*Mwm*((PolyCoeff-1.001)/PolyCoeff) = (0.5*Zfac_in+0.5*Zfac_out)*Rgas*Inlet.T*((Pratio)^((PolyCoeff-1.001)/PolyCoeff) - 1);
    185185
    186186"Head Correction"
  • branches/gui/eml/pressure_changers/turbine.mso

    r609 r689  
    126126end
    127127
    128 Model expander
    129        
    130 ATTRIBUTES
    131         Pallete         = true;
    132         Icon            = "icon/HidraulicTurbine";
    133         Brief           = "Model of an expansor.";
    134         Info            =
    135 "To be documented";
    136        
    137 PARAMETERS
    138 
    139 outer PP                as Plugin               (Brief = "External Physical Properties", Type="PP");
    140 outer NComp     as Integer              (Brief = "Number of chemical components", Lower = 1);
    141         Rgas            as positive     (Brief = "Constant of Gases", Unit= 'kJ/kmol/K', Default = 8.31451,Hidden=true);
    142         Mw(NComp)       as molweight    (Brief = "Molar Weight");
    143 
    144 VARIABLES
    145 
    146         IseCoeff        as positive     (Brief = "Isentropic Coefficient", Lower=0.2);
    147         Pratio          as positive             (Brief = "Pressure Ratio", Symbol ="P_{ratio}");       
    148         Pdrop           as press_delta  (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P");
    149         Pdecrease       as press_delta  (Brief = "Pressure Decrease", DisplayUnit = 'kPa', Symbol ="P_{decr}");
    150 
    151         Head                            as energy_mass  (Brief = "Head",Hidden=true);
    152         HeadIsentropic          as energy_mass  (Brief = "Isentropic Head");
    153         Tisentropic                     as temperature  (Brief = "Isentropic Temperature");
    154        
    155         IsentropicEff   as efficiency   (Brief = "Isentropic efficiency");
    156         MechanicalEff   as efficiency   (Brief = "Mechanical efficiency");
    157        
    158         FluidPower      as power                (Brief = "Fluid Power");
    159         BrakePower      as power                (Brief = "Brake Power");
    160         PowerLoss       as power                (Brief = "Power Losses",Lower=0);
    161         Mwm                     as molweight    (Brief = "Mixture Molar Weight");
    162         rho                     as dens_mass    (Brief = "Mass Density");
    163         Zfac_in         as fraction     (Brief = "Compressibility factor at inlet");
    164         Zfac_out        as fraction     (Brief = "Compressibility factor at outlet");
    165 
    166 in      Inlet           as stream       (Brief = "Inlet stream", PosX=0.05, PosY=0.0, Symbol="_{in}");
    167 out     Outlet          as streamPH     (Brief = "Outlet stream", PosX=0.65, PosY=1, Symbol="_{out}");
    168 
    169 out     WorkOut         as power        (Brief = "Work Outlet", PosX=1, PosY=0.46);
    170 
    171 SET
    172 
    173         Mw = PP.MolecularWeight();
    174 
    175         Rgas    = 8.31451*'kJ/kmol/K';
    176 
    177 EQUATIONS
    178 
    179 "Overall Molar Balance"
    180         Outlet.F = Inlet.F;
    181 
    182 "Component Molar Balance"
    183         Outlet.z = Inlet.z;
    184 
    185 "Average Molecular Weight"
    186         Mwm = sum(Mw*Inlet.z);
    187 
    188 "Pressure Ratio"
    189         Outlet.P = Inlet.P * Pratio;
    190 
    191 "Pressure Drop"
    192         Outlet.P  = Inlet.P - Pdrop;
    193 
    194 "Pressure Decrease"
    195         Outlet.P  = Inlet.P - Pdecrease;
    196 
    197 "Mass Density"
    198         rho = PP.VapourDensity(Inlet.T, Inlet.P, Inlet.z);
    199        
    200 "Compressibility factor at Inlet Conditions"
    201         Zfac_in = PP.VapourCompressibilityFactor(Inlet.T,Inlet.P,Inlet.z);
    202        
    203 "Compressibility factor at Outlet Conditions"
    204         Zfac_out = PP.VapourCompressibilityFactor(Outlet.T,Outlet.P,Outlet.z);
    205 
    206 "Isentropic Head"
    207         HeadIsentropic*Mwm = (PP.VapourEnthalpy(Tisentropic,Outlet.P,Outlet.z)-Inlet.h);
    208 
    209 "Actual Head"
    210         Head*Mwm = (Outlet.h-Inlet.h);
    211 
    212 "Isentropic Coefficient"
    213         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);
    214 
    215 "Isentropic Outlet Temperature"
    216         PP.VapourEntropy(Tisentropic, Outlet.P, Outlet.z) = PP.VapourEntropy(Inlet.T, Inlet.P, Inlet.z);
    217 
    218 
    219 if IsentropicEff equal 1
    220 
    221         then
    222 "Discharge Temperature"
    223         Outlet.T = Tisentropic;
    224 
    225         else
    226 
    227 "Discharge Temperature"
    228         (PP.VapourEnthalpy(Outlet.T,Outlet.P,Outlet.z)-Inlet.h)= (PP.VapourEnthalpy(Tisentropic,Outlet.P,Outlet.z)-Inlet.h)*IsentropicEff;
    229 
    230 end
    231 
    232 "Fluid Power"
    233         FluidPower = IsentropicEff*HeadIsentropic*sum(Mw*Inlet.z)*Inlet.F+PowerLoss;
    234 
    235 "Brake Power"
    236         BrakePower = WorkOut;
    237 
    238 "Brake Power"
    239         BrakePower = FluidPower*MechanicalEff;
    240 
    241 "Power Loss"
    242         PowerLoss = BrakePower - FluidPower;
    243 
    244 end
Note: See TracChangeset for help on using the changeset viewer.