using "stage_separators/column"; # column section with 2 trays FlowSheet SectionColumn_Test_with2tray PARAMETERS PP as CalcObject(Brief="Physical Properties",File="vrpp"); NComp as Integer; SET PP.Components = [ "isobutane", "n-pentane"]; PP.LiquidModel = "PR"; PP.VapourModel = "PR"; NComp = PP.NumberOfComponents; DEVICES sec as Section_Column; feed as stream_therm; reb as stream_therm; cond as stream_therm; zero as stream; CONNECTIONS feed to sec.trays(2).Inlet; zero to sec.trays(1).Inlet; reb to sec.trays(2).InletV; cond to sec.trays(1).InletL; SPECIFY feed.F = 113.4 * "kmol/h"; feed.T = 291 * "K"; feed.P = 168.3 * "kPa"; feed.z = [0.5, 0.5]; feed.v = 0; zero.F = 0 * "kmol/h"; zero.T = 300 * "K"; zero.P = 1 * "atm"; zero.z = [0.5, 0.5]; zero.v = 0; zero.h = 0 * "J/mol"; cond.F = 68 * "kmol/h"; cond.P = 150 * "kPa"; cond.T = 281.75 * "K"; cond.v = 0.0; cond.z = [0.6664, 0.3336]; reb.F = 153 * "kmol/h"; reb.P = 185 * "kPa"; reb.T = 328.12 * "K"; reb.z = [0.001848, 0.9982]; reb.v = 1.0; sec.trays.Emv = 1; SET sec.NTrays = 2; #COLUMN sec.trays.V = 4 * "ft^3"; sec.trays.Ah = 0.394 * "ft^2"; sec.trays.lw = 20.94 * "in"; sec.trays.hw = 0.125 * "ft"; sec.trays.Q = 0 * "kW"; sec.trays.beta = 0.6; sec.trays.alfa = 4; sec.trays.Ap = 3.94 * "ft^2"; INITIAL sec.trays.OutletL.T = 290 *"K"; sec.trays.Level = 0.9 * sec.trays.hw; sec.trays.OutletL.z(1) = 0.5; OPTIONS #relativeAccuracy = 1e-3; time = [0:10:1000]; end # column section with 8 trays FlowSheet SectionColumn_Test_with8tray PARAMETERS PP as CalcObject(Brief="Physical Properties",File="vrpp"); NComp as Integer; SET PP.Components = [ "isobutane", "n-pentane"]; PP.LiquidModel = "PR"; PP.VapourModel = "PR"; PP.Derivatives = 0; NComp = PP.NumberOfComponents; DEVICES sec as Section_Column; feed as stream_therm; reb as stream_therm; cond as stream_therm; zero as stream; CONNECTIONS feed to sec.trays(5).Inlet; zero to sec.trays([1:4]).Inlet; zero to sec.trays([6:8]).Inlet; reb to sec.trays(8).InletV; cond to sec.trays(1).InletL; SPECIFY feed.F = 113.4 * "kmol/h"; feed.T = 291 * "K"; feed.P = 168.3 * "kPa"; feed.z = [0.5, 0.5]; feed.v = 0; zero.F = 0 * "kmol/h"; zero.T = 300 * "K"; zero.P = 1 * "atm"; zero.z = [0.5, 0.5]; zero.v = 0; zero.h = 0 * "J/mol"; cond.F = 68 * "kmol/h"; cond.P = 150 * "kPa"; cond.T = 281.75 * "K"; cond.v = 0.0; cond.z = [0.6664, 0.3336]; reb.F = 153 * "kmol/h"; reb.P = 185 * "kPa"; reb.T = 328.12 * "K"; reb.z = [0.001848, 0.9982]; reb.v = 1.0; sec.trays.Emv = 1; SET sec.NTrays = 8; #COLUMN sec.trays.V = 4 * "ft^3"; sec.trays.Ah = 0.394 * "ft^2"; sec.trays.lw = 20.94 * "in"; sec.trays.hw = 0.125 * "ft"; sec.trays.Q = 0 * "kW"; sec.trays.beta = 0.6; sec.trays.alfa = 4; sec.trays.Ap = 3.94 * "ft^2"; INITIAL sec.trays.OutletL.T = [290:(330-290)/(sec.NTrays-1):330] *"K"; sec.trays.Level = 0.3 * sec.trays.hw; sec.trays.OutletL.z(1) = 0.5; OPTIONS relativeAccuracy = 1e-5; time = [0:1:100]; end FlowSheet Distillation_kettle_cond_Test PARAMETERS PP as CalcObject(Brief="Physical Properties",File="vrpp"); NComp as Integer; VARIABLES Qc as heat_rate (Brief="Heat rate removed from condenser"); Qr as heat_rate (Brief="Heat rate supplied to reboiler"); SET PP.Components = [ "isobutane", "n-pentane", "propylene", "benzene", "isobutene" ]; PP.LiquidModel = "PR"; PP.VapourModel = "PR"; PP.Derivatives = 1; NComp = PP.NumberOfComponents; DEVICES col as Distillation_kettle_cond; feed as streamTP; zero as stream; CONNECTIONS feed to col.trays(5).Inlet; zero to col.reb.Inlet; zero to col.trays([1:4]).Inlet; zero to col.trays([6:col.NTrays]).Inlet; Qc to col.cond.Q; Qr to col.reb.Q; SPECIFY feed.F = 113.4 * "kmol/h"; feed.T = 291 * "K"; feed.P = 168.3 * "kPa"; feed.z = 1/NComp; zero.F = 0 * "kmol/h"; zero.T = 300 * "K"; zero.P = 1 * "atm"; zero.z = 1/NComp; zero.v = 0; zero.h = 0 * "J/mol"; col.sptop.Outlet2.F = 85 * "kmol/h"; col.reb.OutletL.F = 28.4 * "kmol/h"; col.sptop.frac = 0.444445; col.cond.OutletV.F = 0 * "kmol/h"; Qr = 3.7743e6 * "kJ/h"; Qc = -3.71e6 * "kJ/h"; col.pump1.dP = 16 * "kPa"; col.trays.Emv = 1; SET col.NTrays = 8; col.cond.V = 2 * "m^3"; col.cond.Across = 1 * "m^2"; col.trays.V = 4 * "ft^3"; col.trays.Ah = 0.394 * "ft^2"; col.trays.lw = 20.94 * "in"; col.trays.hw = 0.125 * "ft"; col.trays.Q = 0 * "kW"; col.trays.beta = 0.6; col.trays.alfa = 4; col.trays.Ap = 3.94 * "ft^2"; col.reb.V = 2 * "m^3"; col.reb.Across = 1 * "m^2"; INITIAL # condenser col.cond.OutletL.T = 260 *"K"; col.cond.Level = 1 * "m"; col.cond.OutletL.z([1:4]) = [0.65, 0.05, 0.01, 0.01]; # reboiler col.reb.OutletL.T = 330 *"K"; col.reb.Level = 1 * "m"; col.reb.OutletL.z([1:4]) = [0.1, 0.7, 0.01, 0.01]; # column trays col.trays.OutletL.T = [290:(330-290)/(col.NTrays-1):330] * "K"; col.trays.Level = 1.2 * col.trays.hw; col.trays.OutletL.z([1:4]) = [0.5, 0.05, 0.01, 0.01]; OPTIONS relativeAccuracy = 1e-3; time = [0:0.01:1, 2:50]; end