Changeset 577 for branches/gui/eml/streams.mso
- Timestamp:
- Jul 25, 2008, 5:48:22 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/streams.mso
r576 r577 564 564 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 565 565 M(NComp) as molweight (Brief = "Component Mol Weight"); 566 rhoModel as Switcher (Brief = "Density model", Valid = ["volume", "correlation"], Default="volume");567 566 CompostionBasis as Switcher (Brief = "Molar or Mass Compostion", Valid = ["Molar", "Mass"], Default="Molar"); 567 ValidPhases as Switcher (Brief = "Valid Phases for Flash Calculation", Valid = ["Vapour-Only", "Liquid-Only","Vapour-Liquid"], Default="Vapour-Liquid"); 568 568 569 569 … … 614 614 end 615 615 616 switch ValidPhases 617 618 case "Liquid-Only": 619 620 "Vapour Fraction" 621 Outlet.v = 0; 622 623 "Liquid Composition" 624 x = Outlet.z; 625 626 "Vapour Composition" 627 y = Outlet.z; 628 629 "Overall Enthalpy" 630 Outlet.h = PP.LiquidEnthalpy(Outlet.T, Outlet.P, x); 631 632 "Molar Volume" 633 vm = PP.LiquidVolume(Outlet.T, Outlet.P, x); 634 635 case "Vapour-Only": 636 637 "Vapor Fraction" 638 Outlet.v = 1; 639 640 "Liquid Composition" 641 x = Outlet.z; 642 643 "Vapour Composition" 644 y = Outlet.z; 645 646 "Overall Enthalpy" 647 Outlet.h = PP.VapourEnthalpy(Outlet.T, Outlet.P, y); 648 649 "Molar Volume" 650 vm = PP.VapourVolume(Outlet.T, Outlet.P, y); 651 652 653 case "Vapour-Liquid": 654 655 "Flash Calculation" 656 [Outlet.v, x, y] = PP.Flash(Outlet.T, Outlet.P, Outlet.z); 657 658 "Overall Enthalpy" 659 Outlet.h = (1-Outlet.v)*PP.LiquidEnthalpy(Outlet.T, Outlet.P, x) + Outlet.v*PP.VapourEnthalpy(Outlet.T, Outlet.P, y); 660 661 "Molar Volume" 662 vm = (1-Outlet.v)*PP.LiquidVolume(Outlet.T, Outlet.P, x) + Outlet.v*PP.VapourVolume(Outlet.T,Outlet.P,y); 663 664 end 665 666 "Molar Density" 667 rhom * vm = 1; 668 616 669 "Average Molecular Weight" 617 670 Mw = sum(M*Outlet.z); 618 619 "Flash Calculation" 620 [Outlet.v, x, y] = PP.Flash(Outlet.T, Outlet.P, Outlet.z); 621 622 "Overall Enthalpy" 623 Outlet.h = (1-Outlet.v)*PP.LiquidEnthalpy(Outlet.T, Outlet.P, x) + Outlet.v*PP.VapourEnthalpy(Outlet.T, Outlet.P, y); 624 625 switch rhoModel 626 627 case "volume": 628 "Molar Density" 629 rhom * vm = 1; 630 631 case "correlation": 632 "Mass Density" 633 rho = (1-Outlet.v)*PP.LiquidDensity(Outlet.T,Outlet.P,x) + Outlet.v*PP.VapourDensity(Outlet.T,Outlet.P,y); 634 end 635 671 636 672 "Mass or Molar Density" 637 673 rhom * Mw = rho; … … 640 676 Fw = Mw*Outlet.F; 641 677 642 "Molar Volume"643 vm = (1-Outlet.v)*PP.LiquidVolume(Outlet.T, Outlet.P, x) + Outlet.v*PP.VapourVolume(Outlet.T,Outlet.P,y);644 645 678 "Volumetric Flow" 646 679 Fvol = Outlet.F*vm ;
Note: See TracChangeset
for help on using the changeset viewer.