- Timestamp:
- Oct 13, 2008, 2:57:59 PM (14 years ago)
- Location:
- branches/gui
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/stage_separators/column.mso
r655 r666 893 893 * - a pump in reflux stream. 894 894 * 895 * ------------------------------------------------------------------* 896 Model Rectifier_subcoolingTeste 897 ATTRIBUTES 895 * ------------------------------------------------------------------*# 896 897 Model Rectifier_subcooling as Section_ColumnBasic 898 899 ATTRIBUTES 898 900 Pallete = true; 899 901 Icon = "icon/RefluxedSubcooling"; … … 920 922 "; 921 923 922 PARAMETERS 923 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 924 outer NComp as Integer; 925 NumberOfTrays as Integer(Brief="Number of trays", Default=2); 926 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 927 top as Integer(Brief="Number of top tray"); 928 bot as Integer(Brief="Number of bottom tray"); 929 VapourFlow as Switcher(Valid = ["on", "off"], Default = "on"); 930 931 SET 932 top = (NumberOfTrays-1)*(1-topdown)/2+1; 933 bot = NumberOfTrays/top; 934 935 VARIABLES 936 trays(NumberOfTrays) as trayTeste; 937 cond as condenserSteady; 938 ttop as tank_cylindrical; 939 sptop as splitter; 940 pump1 as pump; 941 alfaTopo as Real; 942 943 EQUATIONS 944 switch VapourFlow 945 case "on": 946 cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P - 947 cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV)); 948 when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off"; 924 PARAMETERS 925 CondenserVapourFlow as Switcher (Valid = ["on", "off"], Default = "on",Hidden=true); 926 927 VARIABLES 928 CondenserUnity as condenserSteady; 929 TopVessel as tank_cylindrical; 930 SplitterTop as splitter; 931 PumpUnity as pump; 932 alfaTopo as Real; 933 934 in VapourInlet as stream (Brief="Vapour Inlet in the section", PosX=0.18, PosY=1); 935 out LiquidOutlet as liquid_stream (Brief="Liquid Outlet in the section", PosX=0.25, PosY=1); 936 937 out HeatToCondenser as power (Brief="Heat supplied to Condenser",Hidden=true); 938 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.47); 939 in ConnectorSplitterTop as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 940 out HeatToTopVessel as power (Brief="Heat supplied to Top Vessel",Hidden=true); 941 942 VapourConnector as stream (Brief="Vapour connection at the middle trays", PosX=0.55, PosY=0,Hidden=true); 943 944 EQUATIONS 945 946 LiquidOutlet.F= trays(NumberOfTrays).OutletL.F; 947 LiquidOutlet.T = trays(NumberOfTrays).OutletL.T; 948 LiquidOutlet.P = trays(NumberOfTrays).OutletL.P; 949 LiquidOutlet.z = trays(NumberOfTrays).OutletL.z; 950 951 VapourConnector.F= VapourInlet.F; 952 VapourConnector.T = VapourInlet.T; 953 VapourConnector.P = VapourInlet.P; 954 VapourConnector.z = VapourInlet.z; 955 VapourConnector.v = VapourInlet.v; 956 VapourConnector.h = VapourInlet.h; 957 958 # Splitter Connector Equations 959 ConnectorSplitterTop.T = LiquidDistillate.T; 960 ConnectorSplitterTop.P = LiquidDistillate.P; 961 ConnectorSplitterTop.F = LiquidDistillate.F; 962 ConnectorSplitterTop.z = LiquidDistillate.z; 963 964 switch CondenserVapourFlow 965 966 case "on": 967 CondenserUnity.InletV.F*trays(1).vV = alfaTopo *Ah * sqrt(2*(trays(1).OutletV.P - 968 CondenserUnity.OutletL.P + 1e-8 * 'atm') / (alfa*trays(1).rhoV)); 969 when CondenserUnity.InletV.F < 1e-6 * 'kmol/h' switchto "off"; 949 970 950 case "off": 951 cond.InletV.F = 0 * 'mol/s'; 952 when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on"; 953 end 954 955 CONNECTIONS 956 #vapor 957 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 958 trays(top).OutletV to cond.InletV; 959 960 #liquid 961 cond.OutletL to ttop.Inlet; 962 ttop.Outlet to sptop.Inlet; 963 sptop.Outlet2 to pump1.Inlet; 964 pump1.Outlet to trays(top).InletL; 965 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 971 case "off": 972 CondenserUnity.InletV.F = 0 * 'mol/s'; 973 when trays(1).OutletV.P > CondenserUnity.OutletL.P + 1e-1 * 'atm' switchto "on"; 974 975 end 976 977 CONNECTIONS 978 #vapor 979 trays(1).OutletV to CondenserUnity.InletV; 980 981 #liquid 982 CondenserUnity.OutletL to TopVessel.Inlet; 983 TopVessel.Outlet to SplitterTop.Inlet; 984 SplitterTop.Outlet2 to PumpUnity.Inlet; 985 PumpUnity.Outlet to trays(1).InletL; 986 987 #Connectors 988 VapourConnector to trays(NumberOfTrays).InletV; 989 HeatToCondenser to CondenserUnity.InletQ; 990 SplitterTop.Outlet1 to ConnectorSplitterTop; 991 HeatToTopVessel to TopVessel.InletQ; 992 966 993 end 967 994
Note: See TracChangeset
for help on using the changeset viewer.