#*---------------------------------------------- * FlowSheet generated automaticaly by EMSO-GUI *----------------------------------------------*# using "streams.mso"; using "pressure_changers/valve.mso"; using "controllers/PIDs.mso"; using "stage_separators/tank.mso"; using "pressure_changers/pump.mso"; FlowSheet Sample_TankVL_PID PARAMETERS PP as Plugin(Brief="Physical Properties", Type="PP", Components = ["n-butane","benzene","n-octane"], LiquidModel = "SRK", VapourModel = "SRK" ); NComp as Integer; SET NComp = PP.NumberOfComponents; DEVICES Feed as simple_source; VaporProduct as sink; valve_liquid as valve_flow; valve_Vapour as valve_flow; PID_LC as PID; PID_PC as PID; LiquidProduct as simple_sink; Heat_Duty as energy_source2; V001 as TankVL; pump_1 as pump; CONNECTIONS valve_Vapour.Outlet to VaporProduct.Inlet; PID_LC.Output to valve_liquid.FlowFraction; PID_PC.Output to valve_Vapour.FlowFraction; valve_liquid.Outlet to LiquidProduct.Inlet; V001.OutletVapour to valve_Vapour.Inlet; V001.PI to PID_PC.Input; V001.LI to PID_LC.Input; Heat_Duty.OutletQ to V001.InletQ; V001.OutletLiquid to valve_liquid.Inlet; Feed.Outlet to pump_1.Inlet; pump_1.Outlet to V001.Inlet; SET valve_liquid.MaxFlow = 2000 * 'kmol/h' ; valve_liquid.MinFlow = 0 * 'kmol/h' ; valve_Vapour.MinFlow = 0 * 'kmol/h' ; valve_Vapour.MaxFlow = 1000 * 'kmol/h' ; PID_LC.PID_Select = "Parallel_AWBT" ; PID_LC.Action = "Direct" ; PID_LC.Mode = "Automatic" ; PID_LC.Clip = "Clipped" ; PID_LC.alpha = 1 ; PID_LC.beta = 1 ; PID_LC.bias = 0.5 ; PID_LC.derivTime = 19 * 's' ; PID_LC.intTime = 76 * 's' ; PID_LC.gain = 1.1776 ; PID_LC.gamma = 1 ; PID_LC.tau = 1 * 's' ; PID_LC.tauSet = 1 * 's' ; PID_LC.MinInput = 0 ; PID_LC.MaxInput = 2 ; PID_LC.MinOutput = 0 ; PID_LC.MaxOutput = 1 ; PID_PC.PID_Select = "Parallel_AWBT" ; PID_PC.Action = "Direct" ; PID_PC.Mode = "Automatic" ; PID_PC.Clip = "Clipped" ; PID_PC.alpha = 1 ; PID_PC.beta = 1 ; PID_PC.bias = 0.5 ; PID_PC.derivTime = 18 * 's' ; PID_PC.intTime = 72 * 's' ; PID_PC.gain = 0.9275 ; PID_PC.gamma = 1 ; PID_PC.tau = 1 * 's' ; PID_PC.tauSet = 1 * 's' ; PID_PC.MinInput = 0 ; PID_PC.MaxInput = 4 ; PID_PC.MinOutput = 0 ; PID_PC.MaxOutput = 1 ; V001.Levelpercent_Initial = 0.5 ; V001.Temperature_Initial = 300 * 'K' ; V001.Geometry.Diameter = 2 * 'm' ; V001.Geometry.Lenght = 6 * 'm' ; V001.Geometry.Heads = "flat" ; V001.Geometry.Orientation = "horizontal" ; V001.Kfactor = 0.6 ; V001.Composition_Initial(1) = 0.3 ; V001.Composition_Initial(2) = 0.3 ; SPECIFY Feed.MolarComposition(1) = 0.3 ; Feed.MolarComposition(2) = 0.3 ; Feed.MolarComposition(3) = 0.4 ; Feed.T = 338 * 'K' ; Feed.P = 5 * 'atm' ; PID_LC.SetPoint = 0.7 ; PID_PC.SetPoint = 0.6 ; Heat_Duty.OutletQ = 0 * 'kW' ; pump_1.Pincrease = 12 * 'kPa' ; OPTIONS Dynamic = true; TimeStep = 0.2; TimeEnd = 4; TimeUnit = 'h'; Integration = "original"; NLASolver( File = "sundials", RelativeAccuracy = 1e-3, AbsoluteAccuracy = 1e-3, MaxIterations = 100 ); DAESolver( File = "dasslc", RelativeAccuracy = 1e-2, AbsoluteAccuracy = 1e-6, EventAccuracy = 1e-2 ); end