Changeset 448 for branches/packed/eml/stage_separators/tray.mso
 Timestamp:
 Jan 22, 2008, 3:14:11 PM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/packed/eml/stage_separators/tray.mso
r436 r448 169 169 end 170 170 171 Model packedStage as trayBasic 172 PARAMETERS 173 PPwater as Plugin(Brief="Physical Properties", 174 Type="PP", 175 Components = [ "water" ], 176 LiquidModel = "PR", 177 VapourModel = "PR" 178 ); 179 180 # PackingType as Switcher(Valid = ["random", "structured"], Default = "randon"); 181 # PressureDropModel as Switcher(Valid = ["Leva", "Prahl"], Default = "Prahl"); 182 183 a as Real (Brief="Constant used in Leva equation", Default=873.55); 184 b as Real (Brief="Constant used in Leva equation", Default=0.058); 185 # Fp as Real (Brief="Packing factor", Default = 300); 186 e as fraction (Brief="Packing Porosity", Default=0.84); 187 dp as length (Brief="Packing Dimension", Default=0.013); 188 # C as Real (Brief="Prahl method constant", Unit = 'kg^0.2*m^1.8/s^2.2', Default = 2.994); 189 190 # S as length (Brief="Structured packing parameter", Default=0.009); 191 # teta as Real (Brief="Structured packing parameter", Unit= 'deg', Default=45); 192 # C3 as Real (Brief="Structured packing parameter", Default=3.38); 193 194 Across as area (Brief="Tower cross section area"); 195 Mw(NComp) as molweight (Brief = "Component Mol Weight"); 196 g as acceleration (Default=9.81); 197 198 SET 199 Mw = PP.MolecularWeight(); 200 Ap = Across; 201 202 VARIABLES 203 rhoL as dens_mass (Brief="Liquid density"); 204 rhoV as dens_mass (Brief="Vapor density"); 205 viscL as viscosity (Brief="Liquid Viscosity"); 206 # viscV as viscosity (Brief="Vapor Viscosity"); 207 rhow as dens_mass (Brief="Water density"); 208 visclw as viscosity (Brief="Water viscosity"); 209 210 L as flux_mass (Brief="Liquid mass flux"); 211 G as flux_mass (Brief="Liquid mass flux"); 212 Llin as flux_mass (Brief="Water contribution on liquid mass flux"); 213 # X as Real (Brief="Term in Prahl correlation"); 214 # Y as Real (Brief="Term in Prahl correlation"); 215 # Reg as Real (Brief="Packing Reynolds"); 216 # Ge as velocity (Brief="Temporay variable"); 217 # Fr as Real (Brief="Froud number"); 218 phiL as Real (Brief="Liquid holdup in packed towers"); 219 220 # deltaP_z as Real (Unit = 'inH2O/ft'); 221 222 EQUATIONS 223 # deltaP_z = (InletV.P  OutletV.P) / (V/Across); 224 225 "If the liquid is not water  mass flux correction" 226 Llin = L * rhow/rhoL; 227 228 "Base unit conversion (mol > mass)" 229 L = OutletL.F*sum(Mw*OutletL.z)/Across; 230 G = OutletV.F*sum(Mw*OutletV.z)/Across; 231 232 # "X in Prahl correlation" 233 # X * G = L * (rhoV/rhoL)^0.5; 234 235 # "Y in Prahl correlation" 236 # Y = G^2 * Fp * (rhow/rhoL) * viscL^0.2 / (rhoV*rhoL*C) ; 237 238 "Water Liquid Viscosity" 239 visclw = PPwater.LiquidViscosity(OutletL.T, OutletL.P, 1); 240 "Water Liquid Density" 241 rhow = PPwater.LiquidDensity(OutletL.T, OutletL.P, 1); 242 "Liquid Viscosity" 243 viscL = PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z); 244 # "Vapor Viscosity" 245 # viscV = PP.VapourViscosity(OutletV.T, OutletV.P, OutletV.z); 246 "Liquid Density" 247 rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z); 248 "Vapour Density" 249 rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z); 250 251 # "Froud number" 252 # Fr = (L/rhoL)^2 / S/g; 253 # "Reynolds number" 254 # Reg = S*(G/rhoV/(e*sin(teta)))*rhoV/viscV; 255 # "Temporary variable" 256 # Ge = G/rhoV /(e*sin(teta)); 257 "Conversion from ML to phiL" 258 phiL = ML*vL / V; 259 260 # switch PackingType 261 # case "random": 262 # switch PressureDropModel 263 # case "Leva": 264 (InletV.P  OutletV.P)/'Pa' / (V/'m^3'/(Across/'m^2') ) = a * 10^(b*Llin/'kg/m^2/s') * (G/('kg/m^2/s'))^2/(rhoV/('kg/m^3')); 265 #(InletV.P  OutletV.P) / (V/(Across) ) = a * 10^(b*Llin) * (G)^2/(rhoV); 266 # case "Prahl": 267 # (InletV.P  OutletV.P)/'0.03937*inH2O' = (V/Across)/'m' * Y*(1116*X+500)/(1Y*(35*X+3)); 268 # end 269 phiL = (1.53e4 + (2.9e5*e*(dp*L/(viscL*e))^0.66 * (viscL/visclw)^0.75)) * (dp/'m')^(1.2); 270 #* case "structured": 271 (InletV.P  OutletV.P)/'Pa'= (V/Across)/'m' * ( (0.171 + 92.7/Reg) * (rhoV/('kg/m^3')*(Ge/('m/s'))^2/(S/'m')) ) 272 * (1/(1C3 * sqrt(Fr) ))^5; 273 274 phiL = C3 * sqrt(Fr); 275 end 276 *# 277 end 278 171 279 #* 172 280 * Model of a tray with reaction … … 323 431 V = ML* vL + MV*vV; 324 432 end 325 326 Model packedStage1 as trayBasic327 #it's not working....initialization problems.328 PARAMETERS329 PPwater as Plugin(Brief="Physical Properties",330 Type="PP",331 Components = [ "water" ],332 LiquidModel = "PR",333 VapourModel = "PR"334 );335 336 PackingType as Switcher(Valid = ["random", "structured"], Default = "randon");337 PressureDropModel as Switcher(Valid = ["Leva", "Prahl"], Default = "Prahl");338 339 a as Real (Brief="Constant used in Leva equation", Unit='1/m', Default=873.55);340 b as Real (Brief="Constant used in Leva equation", Unit='m^2*s/kg', Default=0.058);341 Fp as Real (Brief="Packing factor", Default = 300);342 e as fraction (Brief="Packing Porosity", Default=0.84);343 dp as length (Brief="Packing Dimension", Default=0.013);344 C as Real (Brief="Prahl method constant", Unit = 'kg^0.2*m^1.8/s^2.2', Default = 2.994);345 346 S as length (Brief="Structured packing parameter", Default=0.009);347 teta as Real (Brief="Structured packing parameter", Unit= 'deg', Default=45);348 C3 as Real (Brief="Structured packing parameter", Default=3.38);349 350 Across as area (Brief="Tower cross section area");351 Mw(NComp) as molweight (Brief = "Component Mol Weight");352 g as acceleration (Default=9.81);353 354 SET355 Mw = PP.MolecularWeight();356 357 VARIABLES358 rhoL as dens_mass (Brief="Liquid density");359 rhoV as dens_mass (Brief="Vapor density");360 viscL as viscosity (Brief="Liquid Viscosity");361 viscV as viscosity (Brief="Vapor Viscosity");362 rhow as dens_mass (Brief="Water density");363 visclw as viscosity (Brief="Water viscosity");364 365 L as flux_mass (Brief="Liquid mass flux");366 G as flux_mass (Brief="Liquid mass flux");367 Llin as flux_mass (Brief="Water contribution on liquid mass flux");368 X as Real (Brief="Term in Prahl correlation");369 Y as Real (Brief="Term in Prahl correlation");370 Reg as Real (Brief="Packing Reynolds");371 Ge as velocity (Brief="Temporay variable");372 Fr as Real (Brief="Froud number");373 phiL as Real (Brief="Liquid holdup in packed towers");374 375 EQUATIONS376 "If the liquid is not water  mass flux correction"377 Llin = L * rhow/rhoL;378 379 "Base unit conversion"380 L = OutletL.F*sum(Mw)/Across;381 G = OutletV.F*sum(Mw)/Across;382 383 "X in Prahl correlation"384 X * G = L * (rhoV/rhoL)^0.5;385 386 "Y in Prahl correlation"387 Y = G^2 * Fp * (rhow/rhoL) * viscL^0.2 / (rhoV*rhoL*C) ;388 389 "Water Liquid Viscosity"390 visclw = PPwater.LiquidViscosity(OutletL.T, OutletL.P, 1);391 "Water Liquid Density"392 rhow = PPwater.LiquidDensity(OutletL.T, OutletL.P, 1);393 "Liquid Viscosity"394 viscL = PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z);395 "Vapor Viscosity"396 viscV = PP.VapourViscosity(OutletV.T, OutletV.P, OutletV.z);397 "Liquid Density"398 rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);399 "Vapour Density"400 rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);401 402 "Froud number"403 Fr = (L/rhoL)^2 / S/g;404 "Reynolds number"405 Reg = S*(G/rhoV/(e*sin(teta)))*rhoV/viscV;406 "Temporary variable"407 Ge = G/rhoV /(e*sin(teta));408 "Conversion from ML to phiL"409 phiL = ML*vL / V;410 411 switch PackingType412 case "random":413 switch PressureDropModel414 case "Leva":415 (InletV.P  OutletV.P) = (V/Across) * a * 10^(b*Llin) * G^2/rhoV;416 case "Prahl":417 (InletV.P  OutletV.P)/'0.101972*Pa' = (V/Across)/'m' * Y*(1116*X+500)/(1Y*(35*X+3));418 end419 phiL = (1.53e4 + 2.9e5 * e * (dp * L/viscL/e)^0.66 * (viscL/visclw)^0.75) * (dp/'m')^(1.2);420 421 case "structured":422 (InletV.P  OutletV.P) = (V/Across) * (0.171 + 92.7/Reg)*(rhoV*(Ge)^2 / S)423 * (1/(1C3 * Fr^0.5))^5;424 425 phiL = C3 * Fr^0.5;426 end427 428 # OutletL.F = 220 * 'kmol/h';429 # OutletV.F = 150 * 'kmol/h';430 end431 432 Model packedStage2 as trayBasic433 PARAMETERS434 PPwater as Plugin(Brief="Physical Properties",435 Type="PP",436 Components = [ "water" ],437 LiquidModel = "PR",438 VapourModel = "PR"439 );440 441 PackingType as Switcher(Valid = ["random", "structured"], Default = "randon");442 PressureDropModel as Switcher(Valid = ["Leva", "Prahl"], Default = "Prahl");443 444 a as Real (Brief="Constant used in Leva equation", Default=873.55);445 b as Real (Brief="Constant used in Leva equation", Default=0.058);446 Fp as Real (Brief="Packing factor", Default = 300);447 e as fraction (Brief="Packing Porosity", Default=0.84);448 dp as length (Brief="Packing Dimension", Default=0.013);449 C as Real (Brief="Prahl method constant", Unit = 'kg^0.2*m^1.8/s^2.2', Default = 2.994);450 451 S as length (Brief="Structured packing parameter", Default=0.009);452 teta as Real (Brief="Structured packing parameter", Unit= 'deg', Default=45);453 C3 as Real (Brief="Structured packing parameter", Default=3.38);454 455 Across as area (Brief="Tower cross section area");456 Mw(NComp) as molweight (Brief = "Component Mol Weight");457 g as acceleration (Default=9.81);458 459 SET460 Mw = PP.MolecularWeight();461 462 VARIABLES463 rhoL as dens_mass (Brief="Liquid density");464 rhoV as dens_mass (Brief="Vapor density");465 viscL as viscosity (Brief="Liquid Viscosity");466 viscV as viscosity (Brief="Vapor Viscosity");467 rhow as dens_mass (Brief="Water density");468 visclw as viscosity (Brief="Water viscosity");469 470 L as flux_mass (Brief="Liquid mass flux");471 G as flux_mass (Brief="Liquid mass flux");472 Llin as flux_mass (Brief="Water contribution on liquid mass flux");473 X as Real (Brief="Term in Prahl correlation");474 Y as Real (Brief="Term in Prahl correlation");475 Reg as Real (Brief="Packing Reynolds");476 Ge as velocity (Brief="Temporay variable");477 Fr as Real (Brief="Froud number");478 phiL as Real (Brief="Liquid holdup in packed towers");479 480 deltaP_z as Real (Unit = 'inH2O/ft');481 482 EQUATIONS483 deltaP_z = (InletV.P  OutletV.P) / (V/Across);484 485 "If the liquid is not water  mass flux correction"486 Llin = L * rhow/rhoL;487 488 "Base unit conversion (mol > mass)"489 L = OutletL.F*sum(Mw*OutletL.z)/Across;490 G = OutletV.F*sum(Mw*OutletV.z)/Across;491 492 "X in Prahl correlation"493 X * G = L * (rhoV/rhoL)^0.5;494 495 "Y in Prahl correlation"496 Y = G^2 * Fp * (rhow/rhoL) * viscL^0.2 / (rhoV*rhoL*C) ;497 498 "Water Liquid Viscosity"499 visclw = PPwater.LiquidViscosity(OutletL.T, OutletL.P, 1);500 "Water Liquid Density"501 rhow = PPwater.LiquidDensity(OutletL.T, OutletL.P, 1);502 "Liquid Viscosity"503 viscL = PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z);504 "Vapor Viscosity"505 viscV = PP.VapourViscosity(OutletV.T, OutletV.P, OutletV.z);506 "Liquid Density"507 rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);508 "Vapour Density"509 rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);510 511 "Froud number"512 Fr = (L/rhoL)^2 / S/g;513 "Reynolds number"514 Reg = S*(G/rhoV/(e*sin(teta)))*rhoV/viscV;515 "Temporary variable"516 Ge = G/rhoV /(e*sin(teta));517 "Conversion from ML to phiL"518 phiL = ML*vL / V;519 520 switch PackingType521 case "random":522 switch PressureDropModel523 case "Leva":524 #(InletV.P  OutletV.P)/'Pa' / (V/'m^3'/(Across/'m^2') ) = a * 10^(b*Llin/'kg/m^2/s') * (G/('kg/m^2/s'))^2/(rhoV/('kg/m^3'));525 (InletV.P  OutletV.P) / (V/(Across) ) = a * 10^(b*Llin) * (G)^2/(rhoV);526 case "Prahl":527 (InletV.P  OutletV.P)/'0.03937*inH2O' = (V/Across)/'m' * Y*(1116*X+500)/(1Y*(35*X+3));528 end529 phiL = (1.53e4 + (2.9e5*e*(dp*L/(viscL*e))^0.66 * (viscL/visclw)^0.75)) * (dp/'m')^(1.2);530 531 case "structured":532 (InletV.P  OutletV.P)/'Pa'= (V/Across)/'m' * ( (0.171 + 92.7/Reg) * (rhoV/('kg/m^3')*(Ge/('m/s'))^2/(S/'m')) )533 * (1/(1C3 * sqrt(Fr) ))^5;534 535 phiL = C3 * sqrt(Fr);536 end537 538 539 end
Note: See TracChangeset
for help on using the changeset viewer.