#*---------------------------------------------- * FlowSheet generated automaticaly by EMSO-GUI *----------------------------------------------*# using "streams"; using "stage_separators/column"; using "pressure_changers/valve"; using "controllers/heat_flow"; using "controllers/PIDs"; FlowSheet Column_Distillation_Kettle_Diagram PARAMETERS PP as Plugin(Brief="Physical Properties", Type="PP", Components = ["isobutane","n-pentane","propylene","benzene","isobutene"], LiquidModel = "PR", VapourModel = "PR" ); NComp as Integer; SET NComp = PP.NumberOfComponents; DEVICES feed as simple_source; SET SPECIFY feed.MolarComposition(1) = 0.20; feed.MolarComposition(2) = 0.20; feed.MolarComposition(3) = 0.20; feed.MolarComposition(4) = 0.20; feed.MolarComposition(5) = 0.20; feed.F = 113.4 * 'kmol/h'; feed.T = 291 * 'K'; feed.P = 168.30 * 'kPa'; INITIAL GUESS DEVICES Column_KC as Distillation_kettle_cond; SET Column_KC.FeedTrayLocation(1) = 9; Column_KC.NumberOfTrays = 16; Column_KC.VolumeOfTray = 0.12 * 'm^3'; Column_KC.HeatSupply = 0 * 'kW'; Column_KC.PlateArea = 0.37 * 'm^2'; Column_KC.HolesArea = 0.037 * 'm^2'; Column_KC.WeirLength = 0.53 * 'm'; Column_KC.WeirHeight = 0.038 * 'm'; Column_KC.beta = 0.6; Column_KC.alfa = 4; Column_KC.INITIALIZATION.TopTemperature = 328 * 'K'; Column_KC.INITIALIZATION.BottomTemperature = 330 * 'K'; Column_KC.INITIALIZATION.LevelFraction = 1; Column_KC.CONDENSER.V = 2 * 'm^3'; Column_KC.CONDENSER.Across = 1 * 'm^2'; Column_KC.CONDENSER.Initial_Level = 0.50 * 'm'; Column_KC.CONDENSER.Initial_Temperature = 300 * 'K'; Column_KC.REBOILER.Across = 2 * 'm^2'; Column_KC.REBOILER.V = 3 * 'm^3'; Column_KC.REBOILER.Initial_Level = 0.50 * 'm'; Column_KC.REBOILER.Initial_Temperature = 328 * 'K'; SPECIFY Column_KC.VapourDrawOffFlow = 0 * 'kmol/h'; Column_KC.LiquidDrawOffFlow = 0 * 'kmol/h'; Column_KC.MurphreeEff = 1; Column_KC.CONDENSER.OutletVapour.F = 0 * 'kmol/h'; Column_KC.SPLITTER.FlowRatios(1) = 0.6; Column_KC.PUMP.dP = 16 * 'kPa'; INITIAL GUESS DEVICES STR1 as simple_sink2; SET SPECIFY INITIAL GUESS DEVICES V1 as valve_flow; SET V1.MinFlow = 0 * 'kmol/h'; V1.MaxFlow = 600 * 'kmol/h'; SPECIFY INITIAL GUESS DEVICES STR2 as simple_sink; SET SPECIFY INITIAL GUESS DEVICES V2 as valve_flow; SET V2.MinFlow = 0 * 'kmol/h'; V2.MaxFlow = 100 * 'kmol/h'; SPECIFY INITIAL GUESS DEVICES STR3 as simple_sink; SET SPECIFY INITIAL GUESS DEVICES V3 as heat_flow; SET V3.MinHeatFlow = 0 * 'kW'; V3.MaxHeatFlow = 1000 * 'kW'; SPECIFY INITIAL GUESS DEVICES PIDT_reb as PID; SET PIDT_reb.PID_Select = "Ideal_AW"; PIDT_reb.Action = "Reverse"; PIDT_reb.Mode = "Automatic"; PIDT_reb.Clip = "Clipped"; PIDT_reb.alpha = 0.2; PIDT_reb.beta = 1; PIDT_reb.bias = 0.2; PIDT_reb.derivTime = 1 * 's'; PIDT_reb.intTime = 10 * 's'; PIDT_reb.gain = 3; PIDT_reb.gamma = 1; PIDT_reb.tau = 1 * 's'; PIDT_reb.tauSet = 1 * 's'; PIDT_reb.MinInput = 200; PIDT_reb.MaxInput = 400; PIDT_reb.MinOutput = 0; PIDT_reb.MaxOutput = 1; SPECIFY PIDT_reb.SetPoint = (58+273); INITIAL GUESS DEVICES PIDL_reb as PID; SET PIDL_reb.PID_Select = "Ideal_AW"; PIDL_reb.Action = "Direct"; PIDL_reb.Mode = "Automatic"; PIDL_reb.Clip = "Clipped"; PIDL_reb.alpha = 1; PIDL_reb.beta = 1; PIDL_reb.bias = 0; PIDL_reb.derivTime = 0 * 's'; PIDL_reb.intTime = 20 * 's'; PIDL_reb.gain = 5; PIDL_reb.gamma = 1; PIDL_reb.tau = 1 * 's'; PIDL_reb.tauSet = 1 * 's'; PIDL_reb.MinInput = 0.1; PIDL_reb.MaxInput = 0.8; PIDL_reb.MinOutput = 0; PIDL_reb.MaxOutput = 1; SPECIFY PIDL_reb.SetPoint = 0.5; INITIAL GUESS DEVICES PIDT_cond as PID; SET PIDT_cond.PID_Select = "Ideal_AW"; PIDT_cond.Action = "Reverse"; PIDT_cond.Mode = "Automatic"; PIDT_cond.Clip = "Clipped"; PIDT_cond.alpha = 0.2; PIDT_cond.beta = 1; PIDT_cond.bias = 0.5; PIDT_cond.derivTime = 10 * 's'; PIDT_cond.intTime = 100 * 's'; PIDT_cond.gain = 5; PIDT_cond.gamma = 1; PIDT_cond.tau = 1 * 's'; PIDT_cond.tauSet = 1 * 's'; PIDT_cond.MinInput = 250; PIDT_cond.MaxInput = 380; PIDT_cond.MinOutput = 0; PIDT_cond.MaxOutput = 1; SPECIFY PIDT_cond.SetPoint = (273+45); INITIAL GUESS DEVICES V4 as heat_flow; SET V4.MinHeatFlow = -3000 * 'kW'; V4.MaxHeatFlow = 0 * 'kW'; SPECIFY INITIAL GUESS DEVICES PIDL_cond as PID; SET PIDL_cond.PID_Select = "Ideal_AW"; PIDL_cond.Action = "Direct"; PIDL_cond.Mode = "Automatic"; PIDL_cond.Clip = "Clipped"; PIDL_cond.alpha = 1; PIDL_cond.beta = 1; PIDL_cond.bias = 0; PIDL_cond.derivTime = 0 * 's'; PIDL_cond.intTime = 20 * 's'; PIDL_cond.gain = 2; PIDL_cond.gamma = 1; PIDL_cond.tau = 1 * 's'; PIDL_cond.tauSet = 1 * 's'; PIDL_cond.MinInput = 0; PIDL_cond.MaxInput = 1; PIDL_cond.MinOutput = 0; PIDL_cond.MaxOutput = 1; SPECIFY PIDL_cond.SetPoint = 0.5; INITIAL GUESS CONNECTIONS feed.Outlet to Column_KC.FeedTray; Column_KC.VapourDistillate to STR1.Inlet; Column_KC.LiquidDistillate to V1.Inlet; V1.Outlet to STR2.Inlet; Column_KC.BottomProduct to V2.Inlet; V2.Outlet to STR3.Inlet; V3.HeatFlow to Column_KC.HeatToReboiler; PIDL_reb.Output to V2.FlowFraction; Column_KC.LI_reb to PIDL_reb.Input; PIDT_reb.Output to V3.HeatFlowFraction; Column_KC.TI_reb to PIDT_reb.Input; V4.HeatFlow to Column_KC.HeatToCondenser; PIDT_cond.Output to V4.HeatFlowFraction; Column_KC.TI_cond to PIDT_cond.Input; Column_KC.LI_cond to PIDL_cond.Input; PIDL_cond.Output to V1.FlowFraction; OPTIONS Dynamic = true; TimeStep = 0.01; TimeEnd = 100; TimeUnit = 's'; Integration = "original"; NLASolver( File = "sundials", RelativeAccuracy = 1e-2, AbsoluteAccuracy = 1e-6, MaxIterations = 100 ); DAESolver( File = "sundials", RelativeAccuracy = 1e-2, AbsoluteAccuracy = 1e-6, EventAccuracy = 1e-2 ); end