Changeset 231


Ignore:
Timestamp:
Mar 26, 2007, 11:12:04 AM (16 years ago)
Author:
gerson bicca
Message:

updated simplified heat exchangers models to incorporate phase change

Location:
branches/newlanguage
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/newlanguage/eml/heat_exchangers/HeatExchangerSimplified.mso

    r197 r231  
    2121
    2222Model HeatExchangerSimplified_Basic
    23        
     23
    2424ATTRIBUTES
    2525        Pallete         = false;
     
    4141out     OutletCold  as streamPH         (Brief="Outlet Cold Stream");
    4242
     43        xh(NComp)       as fraction(Brief = "Liquid Molar Fraction in Hot Side");
     44        yh(NComp) as fraction(Brief = "Vapour Molar Fraction in Hot Side");
     45        vh                      as fraction(Brief = "Vapour Molar Fraction in Hot Side");
     46       
     47        xc(NComp)       as fraction(Brief = "Liquid Molar Fraction in Cold Side");
     48        yc(NComp) as fraction(Brief = "Vapour Molar Fraction in Cold Side");
     49        vc                      as fraction(Brief = "Vapour Molar Fraction in Cold Side");
     50
    4351        Details         as Details_Main                         (Brief="Heat Exchanger Details");
    4452        HotSide         as Main_Simplified              (Brief="Heat Exchanger Hot Side");
     
    5260EQUATIONS
    5361
     62"Flash Calculation in Hot Side"
     63        [vh, xh, yh] = PP.Flash(InletHot.T, InletHot.P, InletHot.z);
     64
     65"Flash Calculation in Cold Side"
     66        [vc, xc, yc] = PP.Flash(InletCold.T, InletCold.P, InletCold.z);
     67
    5468"Hot Stream Average Temperature"
    5569        HotSide.Properties.Average.T = 0.5*InletHot.T + 0.5*OutletHot.T;
     
    7690        ColdSide.Properties.Average.Mw = sum(M*InletCold.z);
    7791
    78 if InletCold.v equal 0
    79        
    80         then   
    81        
    8292"Cold Stream Average Heat Capacity"
    83         ColdSide.Properties.Average.Cp  =       PP.LiquidCp(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
     93        ColdSide.Properties.Average.Cp  =       (1-InletCold.v)*PP.LiquidCp(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,xc) +
     94                InletCold.v*PP.VapourCp(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,yc);
    8495
    8596"Cold Stream Inlet Heat Capacity"
    86         ColdSide.Properties.Inlet.Cp    =       PP.LiquidCp(InletCold.T,InletCold.P,InletCold.z);
     97        ColdSide.Properties.Inlet.Cp    =       (1-InletCold.v)*PP.LiquidCp(InletCold.T,InletCold.P,xc)+
     98                InletCold.v*PP.VapourCp(InletCold.T,InletCold.P,yc);
    8799
    88100"Cold Stream Outlet Heat Capacity"
    89         ColdSide.Properties.Outlet.Cp   =       PP.LiquidCp(OutletCold.T,OutletCold.P,OutletCold.z);
     101        ColdSide.Properties.Outlet.Cp   =       (1-OutletCold.v)*PP.LiquidCp(OutletCold.T,OutletCold.P,OutletCold.x)+
     102                OutletCold.v*PP.VapourCp(OutletCold.T,OutletCold.P,OutletCold.y);
    90103
    91104"Cold Stream Average Mass Density"
    92         ColdSide.Properties.Average.rho =       PP.LiquidDensity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
     105        ColdSide.Properties.Average.rho =       (1-InletCold.v)*PP.LiquidDensity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,xc)+
     106                InletCold.v*PP.VapourDensity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,yc);
    93107
    94108"Cold Stream Inlet Mass Density"
    95         ColdSide.Properties.Inlet.rho   =       PP.LiquidDensity(InletCold.T,InletCold.P,InletCold.z);
     109        ColdSide.Properties.Inlet.rho   =       (1-InletCold.v)*PP.LiquidDensity(InletCold.T,InletCold.P,xc)+
     110                InletCold.v*PP.VapourDensity(InletCold.T,InletCold.P,yc);
    96111
    97112"Cold Stream Outlet Mass Density"
    98         ColdSide.Properties.Outlet.rho  =       PP.LiquidDensity(OutletCold.T,OutletCold.P,OutletCold.z);
     113        ColdSide.Properties.Outlet.rho  =       (1-OutletCold.v)*PP.LiquidDensity(OutletCold.T,OutletCold.P,OutletCold.x)+
     114                OutletCold.v*PP.VapourDensity(OutletCold.T,OutletCold.P,OutletCold.y);
    99115
    100116"Cold Stream Average Viscosity"
    101         ColdSide.Properties.Average.Mu  =       PP.LiquidViscosity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
     117        ColdSide.Properties.Average.Mu  =       (1-InletCold.v)*PP.LiquidViscosity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,xc)+
     118                InletCold.v*PP.VapourViscosity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,yc);
    102119
    103120"Cold Stream inlet Viscosity"
    104         ColdSide.Properties.Inlet.Mu    =       PP.LiquidViscosity(InletCold.T,InletCold.P,InletCold.z);
    105        
     121        ColdSide.Properties.Inlet.Mu    =       (1-InletCold.v)*PP.LiquidViscosity(InletCold.T,InletCold.P,xc)+
     122                InletCold.v*PP.VapourViscosity(InletCold.T,InletCold.P,yc);
     123
    106124"Cold Stream Outlet Viscosity"
    107         ColdSide.Properties.Outlet.Mu   =       PP.LiquidViscosity(OutletCold.T,OutletCold.P,OutletCold.z);
     125        ColdSide.Properties.Outlet.Mu   =       (1-OutletCold.v)*PP.LiquidViscosity(OutletCold.T,OutletCold.P,OutletCold.x)+
     126                OutletCold.v*PP.VapourViscosity(OutletCold.T,OutletCold.P,OutletCold.y);
    108127
    109128"Cold Stream Average Conductivity"
    110         ColdSide.Properties.Average.K   =       PP.LiquidThermalConductivity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
     129        ColdSide.Properties.Average.K   =       (1-InletCold.v)*PP.LiquidThermalConductivity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,xc)+
     130                InletCold.v*PP.VapourThermalConductivity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,yc);
    111131
    112132"Cold Stream Inlet Conductivity"       
    113         ColdSide.Properties.Inlet.K     =       PP.LiquidThermalConductivity(InletCold.T,InletCold.P,InletCold.z);
     133        ColdSide.Properties.Inlet.K     =       (1-InletCold.v)*PP.LiquidThermalConductivity(InletCold.T,InletCold.P,xc)+
     134                InletCold.v*PP.VapourThermalConductivity(InletCold.T,InletCold.P,yc);
    114135
    115136"Cold Stream Outlet Conductivity"
    116         ColdSide.Properties.Outlet.K    =       PP.LiquidThermalConductivity(OutletCold.T,OutletCold.P,OutletCold.z);
    117 
     137        ColdSide.Properties.Outlet.K    =       (1-OutletCold.v)*PP.LiquidThermalConductivity(OutletCold.T,OutletCold.P,OutletCold.x)+
     138                OutletCold.v*PP.VapourThermalConductivity(OutletCold.T,OutletCold.P,OutletCold.y);
     139       
    118140"Cold Stream Viscosity at Wall Temperature"
    119         ColdSide.Properties.Wall.Mu     =       PP.LiquidViscosity(ColdSide.Properties.Wall.Twall,ColdSide.Properties.Average.P,InletCold.z);
    120 
    121 
    122         else
    123 
    124 "Cold Stream Average Heat Capacity"
    125         ColdSide.Properties.Average.Cp  =       PP.VapourCp(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
    126 
    127 "Cold Stream Inlet Heat Capacity"       
    128         ColdSide.Properties.Inlet.Cp    =       PP.VapourCp(InletCold.T,InletCold.P,InletCold.z);
    129 
    130 "Cold Stream Outlet Heat Capacity"     
    131         ColdSide.Properties.Outlet.Cp   =       PP.VapourCp(OutletCold.T,OutletCold.P,OutletCold.z);
    132 
    133 "Cold Stream Average Mass Density"
    134         ColdSide.Properties.Average.rho =       PP.VapourDensity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
    135 
    136 "Cold Stream Inlet Mass Density"
    137         ColdSide.Properties.Inlet.rho   =       PP.VapourDensity(InletCold.T,InletCold.P,InletCold.z);
    138 
    139 "Cold Stream Outlet Mass Density"       
    140         ColdSide.Properties.Outlet.rho  =       PP.VapourDensity(OutletCold.T,OutletCold.P,OutletCold.z);
    141 
    142 "Cold Stream Average Viscosity "
    143         ColdSide.Properties.Average.Mu  =       PP.VapourViscosity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
    144 
    145 "Cold Stream Inlet Viscosity " 
    146         ColdSide.Properties.Inlet.Mu    =       PP.VapourViscosity(InletCold.T,InletCold.P,InletCold.z);
    147 
    148 "Cold Stream Outlet Viscosity "
    149         ColdSide.Properties.Outlet.Mu   =       PP.VapourViscosity(OutletCold.T,OutletCold.P,OutletCold.z);
    150 
    151 "Cold Stream Average Conductivity "
    152         ColdSide.Properties.Average.K   =       PP.VapourThermalConductivity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
    153 
    154 "Cold Stream Inlet Conductivity "
    155         ColdSide.Properties.Inlet.K     =       PP.VapourThermalConductivity(InletCold.T,InletCold.P,InletCold.z);
    156 
    157 "Cold Stream Outlet Conductivity "
    158         ColdSide.Properties.Outlet.K    =       PP.VapourThermalConductivity(OutletCold.T,OutletCold.P,OutletCold.z);
    159        
    160 "Cold Stream Viscosity at Wall Temperature"
    161         ColdSide.Properties.Wall.Mu     =       PP.VapourViscosity(ColdSide.Properties.Wall.Twall,ColdSide.Properties.Average.P,InletCold.z);
    162 
    163 end
    164 
    165 if InletHot.v equal 0
    166 
    167         then
     141        ColdSide.Properties.Wall.Mu     =       (1-InletCold.v)*PP.LiquidViscosity(ColdSide.Properties.Wall.Twall,ColdSide.Properties.Average.P,xc)+
     142                InletCold.v*PP.VapourViscosity(ColdSide.Properties.Wall.Twall,ColdSide.Properties.Average.P,yc);
    168143
    169144"Hot Stream Average Heat Capacity"
    170         HotSide.Properties.Average.Cp   =               PP.LiquidCp(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
     145        HotSide.Properties.Average.Cp   =       (1-InletHot.v)*PP.LiquidCp(HotSide.Properties.Average.T,HotSide.Properties.Average.P,xc) +
     146                InletHot.v*PP.VapourCp(HotSide.Properties.Average.T,HotSide.Properties.Average.P,yc);
    171147
    172148"Hot Stream Inlet Heat Capacity"
    173         HotSide.Properties.Inlet.Cp     =               PP.LiquidCp(InletHot.T,InletHot.P,InletHot.z);
     149        HotSide.Properties.Inlet.Cp     =       (1-InletHot.v)*PP.LiquidCp(InletHot.T,InletHot.P,xc)+
     150                InletHot.v*PP.VapourCp(InletHot.T,InletHot.P,yc);
    174151
    175152"Hot Stream Outlet Heat Capacity"
    176         HotSide.Properties.Outlet.Cp    =               PP.LiquidCp(OutletHot.T,OutletHot.P,OutletHot.z);
     153        HotSide.Properties.Outlet.Cp    =       (1-OutletHot.v)*PP.LiquidCp(OutletHot.T,OutletHot.P,OutletHot.x)+
     154                OutletHot.v*PP.VapourCp(OutletHot.T,OutletHot.P,OutletHot.y);
    177155
    178156"Hot Stream Average Mass Density"
    179         HotSide.Properties.Average.rho  =               PP.LiquidDensity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
    180 
    181 "Hot Stream Inlet Mass Density"
    182         HotSide.Properties.Inlet.rho    =               PP.LiquidDensity(InletHot.T,InletHot.P,InletHot.z);
    183 
    184 "Hot Stream Outlet Mass Density"       
    185         HotSide.Properties.Outlet.rho   =               PP.LiquidDensity(OutletHot.T,OutletHot.P,OutletHot.z);
     157        HotSide.Properties.Average.rho =        (1-InletHot.v)*PP.LiquidDensity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,xc)+
     158                InletHot.v*PP.VapourDensity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,yc);
     159
     160"Hot Stream Inlet Mass Density"
     161        HotSide.Properties.Inlet.rho    =       (1-InletHot.v)*PP.LiquidDensity(InletHot.T,InletHot.P,xc)+
     162                InletHot.v*PP.VapourDensity(InletHot.T,InletHot.P,yc);
     163
     164"Hot Stream Outlet Mass Density"
     165        HotSide.Properties.Outlet.rho   =       (1-OutletHot.v)*PP.LiquidDensity(OutletHot.T,OutletHot.P,OutletHot.x)+
     166                OutletHot.v*PP.VapourDensity(OutletHot.T,OutletHot.P,OutletHot.y);
    186167
    187168"Hot Stream Average Viscosity"
    188         HotSide.Properties.Average.Mu   =               PP.LiquidViscosity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);       
    189 
    190 "Hot Stream Inlet Viscosity"
    191         HotSide.Properties.Inlet.Mu     =               PP.LiquidViscosity(InletHot.T,InletHot.P,InletHot.z);   
     169        HotSide.Properties.Average.Mu   =       (1-InletHot.v)*PP.LiquidViscosity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,xc)+
     170                InletHot.v*PP.VapourViscosity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,yc);
     171
     172"Hot Stream inlet Viscosity"
     173        HotSide.Properties.Inlet.Mu     =       (1-InletHot.v)*PP.LiquidViscosity(InletHot.T,InletHot.P,xc)+
     174                InletHot.v*PP.VapourViscosity(InletHot.T,InletHot.P,yc);
    192175
    193176"Hot Stream Outlet Viscosity"
    194         HotSide.Properties.Outlet.Mu    =               PP.LiquidViscosity(OutletHot.T,OutletHot.P,OutletHot.z);       
     177        HotSide.Properties.Outlet.Mu    =       (1-OutletHot.v)*PP.LiquidViscosity(OutletHot.T,OutletHot.P,OutletHot.x)+
     178                OutletHot.v*PP.VapourViscosity(OutletHot.T,OutletHot.P,OutletHot.y);
    195179
    196180"Hot Stream Average Conductivity"
    197         HotSide.Properties.Average.K    =               PP.LiquidThermalConductivity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);     
    198 
    199 "Hot Stream Inlet Conductivity"
    200         HotSide.Properties.Inlet.K              =               PP.LiquidThermalConductivity(InletHot.T,InletHot.P,InletHot.z);
     181        HotSide.Properties.Average.K    =       (1-InletHot.v)*PP.LiquidThermalConductivity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,xc)+
     182                InletHot.v*PP.VapourThermalConductivity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,yc);
     183
     184"Hot Stream Inlet Conductivity"
     185        HotSide.Properties.Inlet.K      =       (1-InletHot.v)*PP.LiquidThermalConductivity(InletHot.T,InletHot.P,xc)+
     186                InletHot.v*PP.VapourThermalConductivity(InletHot.T,InletHot.P,yc);
    201187
    202188"Hot Stream Outlet Conductivity"
    203         HotSide.Properties.Outlet.K     =               PP.LiquidThermalConductivity(OutletHot.T,OutletHot.P,OutletHot.z);     
    204 
    205 "Hot Stream Viscosity  at Wall Temperature"
    206         HotSide.Properties.Wall.Mu              =               PP.LiquidViscosity(HotSide.Properties.Wall.Twall,HotSide.Properties.Average.P,InletHot.z);     
    207 
    208         else
    209 
    210 "Hot Stream Average Heat Capacity"
    211         HotSide.Properties.Average.Cp   =               PP.VapourCp(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
    212 
    213 "Hot Stream Inlet Heat Capacity"
    214         HotSide.Properties.Inlet.Cp     =               PP.VapourCp(InletHot.T,InletHot.P,InletHot.z);
    215 
    216 "Hot Stream Outlet Heat Capacity"
    217         HotSide.Properties.Outlet.Cp    =               PP.VapourCp(OutletHot.T,OutletHot.P,OutletHot.z);
    218 
    219 "Hot Stream Average Mass Density"
    220         HotSide.Properties.Average.rho  =               PP.VapourDensity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
    221 
    222 "Hot Stream Inlet Mass Density"
    223         HotSide.Properties.Inlet.rho    =               PP.VapourDensity(InletHot.T,InletHot.P,InletHot.z);
    224 
    225 "Hot Stream Outlet Mass Density"
    226         HotSide.Properties.Outlet.rho   =               PP.VapourDensity(OutletHot.T,OutletHot.P,OutletHot.z);
    227 
    228 "Hot Stream Average Viscosity"
    229         HotSide.Properties.Average.Mu   =               PP.VapourViscosity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
    230 
    231 "Hot Stream Inlet Viscosity"
    232         HotSide.Properties.Inlet.Mu     =               PP.VapourViscosity(InletHot.T,InletHot.P,InletHot.z);
    233 
    234 "Hot Stream Outlet Viscosity"
    235         HotSide.Properties.Outlet.Mu    =               PP.VapourViscosity(OutletHot.T,OutletHot.P,OutletHot.z);
    236 
    237 "Hot Stream Average Conductivity"
    238         HotSide.Properties.Average.K    =               PP.VapourThermalConductivity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);     
    239 
    240 "Hot Stream Inlet Conductivity"
    241         HotSide.Properties.Inlet.K              =               PP.VapourThermalConductivity(InletHot.T,InletHot.P,InletHot.z);
    242        
    243 "Hot Stream Outlet Conductivity"
    244         HotSide.Properties.Outlet.K     =               PP.VapourThermalConductivity(OutletHot.T,OutletHot.P,OutletHot.z);     
    245 
     189        HotSide.Properties.Outlet.K     =       (1-OutletHot.v)*PP.LiquidThermalConductivity(OutletHot.T,OutletHot.P,OutletHot.x)+
     190                OutletHot.v*PP.VapourThermalConductivity(OutletHot.T,OutletHot.P,OutletHot.y);
     191       
    246192"Hot Stream Viscosity at Wall Temperature"
    247         HotSide.Properties.Wall.Mu              =               PP.VapourViscosity(HotSide.Properties.Wall.Twall,HotSide.Properties.Average.P,InletHot.z);
    248 
    249 end
     193        HotSide.Properties.Wall.Mu      =       (1-InletHot.v)*PP.LiquidViscosity(HotSide.Properties.Wall.Twall,HotSide.Properties.Average.P,xc)+
     194                InletHot.v*PP.VapourViscosity(HotSide.Properties.Wall.Twall,HotSide.Properties.Average.P,yc);
    250195
    251196"Energy Balance Hot Stream"
     
    307252VARIABLES
    308253
    309 Method as LMTD_Basic    (Brief="LMTD Method of Calculation");
     254        Method as LMTD_Basic    (Brief="LMTD Method of Calculation");
    310255
    311256EQUATIONS
     
    324269        Method.DTL = OutletHot.T - OutletCold.T;
    325270
    326 case "counter":
     271        case "counter":
    327272       
    328273"Temperature Difference at Inlet"
  • branches/newlanguage/sample/heat_exchangers/Sample_Simplified.mso

    r214 r231  
    7272OPTIONS
    7373
    74  Dynamic                          = false;
     74 Dynamic = false;
     75GuessFile = "GuessSimplified";
    7576
    7677end
  • branches/newlanguage/sample/heat_exchangers/sample_ShellandTubes.mso

    r214 r231  
    136136
    137137 Dynamic        = false;
    138  GuessFile   = "GuessShellandTubes";
     138 #GuessFile   = "GuessShellandTubes";
    139139
    140140end
Note: See TracChangeset for help on using the changeset viewer.