Changeset 569 for branches/gui/eml/streams.mso
- Timestamp:
- Jul 24, 2008, 5:16:27 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/streams.mso
r562 r569 415 415 out OutletQ as power(Brief = "Outlet energy stream", PosX=1, PosY=0.46, Symbol="_{out}"); 416 416 end 417 418 Model info_stream 419 ATTRIBUTES 420 Pallete = true; 421 Icon = "icon/Info_Stream"; 422 Brief = "Material stream information"; 423 Info = " 424 This model should be used for middle streams when additional 425 information about the stream is desired. 426 427 Some of the additional informations calculated by this models are: 428 * Mass density 429 * Mass flow 430 * Mass compostions 431 * Specific volume 432 * Vapour fraction 433 * Volumetric flow 434 * Liquid and Vapour compositions 435 * Viscosity 436 * Heat Capacity 437 * Thermal Conductivity 438 * Temperature in Celsius Degrees 439 "; 440 441 PARAMETERS 442 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 443 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 444 M(NComp) as molweight (Brief = "Component Mol Weight"); 445 446 SET 447 448 M = PP.MolecularWeight(); 449 450 VARIABLES 451 452 in Inlet as stream (Brief = "Inlet Stream", PosX=0, PosY=0.5308, Protected=true , Symbol="_{in}"); 453 out Outlet as stream (Brief = "Outlet Stream", PosX=1, PosY=0.5308, Protected=true , Symbol="_{out}"); 454 455 v as fraction (Brief = "Vapourization fraction",Hidden=true); 456 x(NComp) as fraction (Brief = "Liquid Molar Fraction",Hidden=true); 457 y(NComp) as fraction (Brief = "Vapour Molar Fraction",Hidden=true); 458 459 Fw as flow_mass (Brief = "Stream Mass Flow",Protected=true); 460 Fvol as flow_vol (Brief = "Volumetric Flow",Protected=true); 461 T_Cdeg as temperature (Brief = "Temperature in °C", Lower=-200,Protected=true); 462 463 Mu as viscosity (Brief="Stream Viscosity",Lower=0.0001, Symbol = "\mu",Protected=true); 464 Cp as cp_mol (Brief="Stream Molar Heat Capacity", Upper=1e10,Protected=true); 465 K as conductivity (Brief="Stream Thermal Conductivity", Default=1.0, Lower=1e-5, Upper=500,Protected=true); 466 Mw as molweight (Brief = "Average Mol Weight",Protected=true); 467 vm as volume_mol (Brief = "Molar Volume",Protected=true); 468 rho as dens_mass (Brief = "Stream Mass Density",Protected=true); 469 rhom as dens_mol (Brief = "Stream Molar Density",Protected=true); 470 s as entr_mol (Brief = "Stream Entropy",Protected=true); 471 zmass(NComp) as fraction (Brief = "Mass Fraction",Protected=true); 472 473 EQUATIONS 474 475 "Flash Calculation" 476 [v, x, y] = PP.FlashPH(Inlet.P, Inlet.h, Inlet.z); 477 478 "Average Molecular Weight" 479 Mw = sum(M*Inlet.z); 480 481 "Mass Density" 482 rho * ((1-v)/PP.LiquidDensity(Inlet.T,Inlet.P,x) + v/PP.VapourDensity(Inlet.T,Inlet.P,y)) = 1; 483 484 "Mass or Molar Density" 485 rhom * Mw = rho; 486 487 "Flow Mass" 488 Fw = Mw*Inlet.F; 489 490 "Molar Volume" 491 vm = (1-v)*PP.LiquidVolume(Inlet.T, Inlet.P, x) + v*PP.VapourVolume(Inlet.T,Inlet.P,y); 492 493 "Volumetric Flow" 494 Fvol = Inlet.F*vm ; 495 496 "Mass Fraction" 497 zmass = M*Inlet.z / Mw; 498 499 "Stream Heat Capacity" 500 Cp = (1-v)*PP.LiquidCp(Inlet.T, Inlet.P, x) + v*PP.VapourCp(Inlet.T,Inlet.P,y); 501 502 "Stream Viscosity" 503 Mu = (1-v)*PP.LiquidViscosity(Inlet.T, Inlet.P, x) + v*PP.VapourViscosity(Inlet.T,Inlet.P,y); 504 505 "Stream ThermalConductivity" 506 K = (1-v)*PP.LiquidThermalConductivity(Inlet.T, Inlet.P, x) + v*PP.VapourThermalConductivity(Inlet.T,Inlet.P,y); 507 508 "Stream Overall Entropy" 509 s = (1-v)*PP.LiquidEntropy(Inlet.T, Inlet.P, x) + v*PP.VapourEntropy(Inlet.T, Inlet.P, y); 510 511 "Temperature in °C" 512 T_Cdeg = Inlet.T - 273.15 * 'K'; 513 514 "Outlet Flow" 515 Outlet.F = Inlet.F; 516 517 "Outlet Temperature" 518 Outlet.T = Inlet.T; 519 520 "Outlet Pressure" 521 Outlet.P = Inlet.P; 522 523 "Outlet Vapour Fraction" 524 Outlet.v = Inlet.v; 525 526 "Outlet Enthalpy" 527 Outlet.h = Inlet.h; 528 529 "Outlet Composition" 530 Outlet.z= Inlet.z; 531 532 end
Note: See TracChangeset
for help on using the changeset viewer.