Changeset 346 for trunk/eml/streams.mso
- Timestamp:
- Aug 19, 2007, 10:32:18 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/eml/streams.mso
r325 r346 35 35 36 36 VARIABLES 37 F as flow_mol ;38 T as temperature ;39 P as pressure ;40 z(NComp) as fraction (Brief = "OverallMolar Fraction");41 h as enth_mol ;42 v as fraction (Brief = "Vapourization fraction");37 F as flow_mol (Brief = "Stream Molar Flow Rate"); 38 T as temperature (Brief = "Stream Temperature"); 39 P as pressure (Brief = "Stream Pressure"); 40 z(NComp) as fraction (Brief = "Stream Molar Fraction"); 41 h as enth_mol (Brief = "Stream Enthalpy"); 42 v as fraction (Brief = "Vapourization fraction"); 43 43 end 44 44 … … 101 101 102 102 VARIABLES 103 x(NComp) as fraction(Brief = "Liquid Molar Fraction"); 104 y(NComp) as fraction(Brief = "Vapour Molar Fraction"); 105 103 x(NComp) as fraction (Brief = "Liquid Molar Fraction"); 104 y(NComp) as fraction (Brief = "Vapour Molar Fraction"); 105 s as entr_mol (Brief = "Stream Entropy"); 106 106 107 EQUATIONS 107 108 "Flash Calculation" 108 109 [v, x, y] = PP.FlashPH(P, h, z); 110 109 111 "Enthalpy" 110 112 h = (1-v)*PP.LiquidEnthalpy(T, P, x) + 111 113 v*PP.VapourEnthalpy(T, P, y); 114 115 "Entropy" 116 s = (1-v)*PP.LiquidEntropy(T, P, x) + 117 v*PP.VapourEntropy(T, P, y); 112 118 end 113 119 … … 153 159 x(NComp) as fraction (Brief = "Liquid Molar Fraction"); 154 160 y(NComp) as fraction (Brief = "Vapour Molar Fraction"); 155 hl as enth_mol; 156 hv as enth_mol; 161 hl as enth_mol (Brief = "Liquid Enthalpy"); 162 hv as enth_mol (Brief = "Vapour Enthalpy"); 163 s as entr_mol (Brief = "Stream Entropy"); 164 sl as entr_mol (Brief = "Liquid Entropy"); 165 sv as entr_mol (Brief = "Vapour Entropy"); 157 166 zmass(NComp) as fraction (Brief = "Mass Fraction"); 158 167 Mw as molweight (Brief = "Average Mol Weight"); … … 168 177 169 178 "Overall Enthalpy" 170 Outlet.h = (1-Outlet.v)* PP.LiquidEnthalpy(Outlet.T, Outlet.P, x) +171 Outlet.v*PP.VapourEnthalpy(Outlet.T, Outlet.P, y); 172 179 Outlet.h = (1-Outlet.v)*hl + Outlet.v*hv; 180 181 "Liquid Enthalpy" 173 182 hl = PP.LiquidEnthalpy(Outlet.T, Outlet.P, x); 183 184 "Vapour Enthalpy" 174 185 hv = PP.VapourEnthalpy(Outlet.T, Outlet.P, y); 175 186 187 "Overall Entropy" 188 s = (1-Outlet.v)*sl + Outlet.v*sv; 189 190 "Liquid Entropy" 191 sl = PP.LiquidEntropy(Outlet.T, Outlet.P, x); 192 193 "Vapour Entropy" 194 sv = PP.VapourEntropy(Outlet.T, Outlet.P, y); 195 176 196 "Average Molecular Weight" 177 197 Mw = sum(M*Outlet.z); … … 229 249 x(NComp) as fraction (Brief = "Liquid Molar Fraction"); 230 250 y(NComp) as fraction (Brief = "Vapour Molar Fraction"); 231 hl as enth_mol; 232 hv as enth_mol; 251 hl as enth_mol (Brief = "Liquid Enthalpy"); 252 hv as enth_mol (Brief = "Vapour Enthalpy"); 253 s as entr_mol (Brief = "Stream Entropy"); 254 sl as entr_mol (Brief = "Liquid Entropy"); 255 sv as entr_mol (Brief = "Vapour Entropy"); 233 256 234 257 EQUATIONS … … 237 260 238 261 "Overall Enthalpy" 239 Outlet.h = (1-Outlet.v)* PP.LiquidEnthalpy(Outlet.T, Outlet.P, x) +240 Outlet.v*PP.VapourEnthalpy(Outlet.T, Outlet.P, y); 241 262 Outlet.h = (1-Outlet.v)*hl + Outlet.v*hv; 263 264 "Liquid Enthalpy" 242 265 hl = PP.LiquidEnthalpy(Outlet.T, Outlet.P, x); 266 267 "Vapour Enthalpy" 243 268 hv = PP.VapourEnthalpy(Outlet.T, Outlet.P, y); 269 270 "Overall Entropy" 271 s = (1-Outlet.v)*sl + Outlet.v*sv; 272 273 "Liquid Entropy" 274 sl = PP.LiquidEntropy(Outlet.T, Outlet.P, x); 275 276 "Vapour Entropy" 277 sv = PP.VapourEntropy(Outlet.T, Outlet.P, y); 244 278 end 245 279 … … 285 319 Fw as flow_mass (Brief = "Stream Mass Flow"); 286 320 Fvol as flow_vol (Brief = "Volumetric Flow"); 287 321 s as entr_mol (Brief = "Stream Entropy"); 322 288 323 EQUATIONS 289 324 "Flash Calculation" … … 318 353 zmass = M*Inlet.z / Mw; 319 354 355 "Overall Entropy" 356 s = (1-v)*PP.LiquidEntropy(Inlet.T, Inlet.P, x) + 357 v*PP.VapourEntropy(Inlet.T, Inlet.P, y); 320 358 end 321 359
Note: See TracChangeset
for help on using the changeset viewer.