[891] | 1 | #*---------------------------------------------- |
---|
| 2 | * FlowSheet generated automaticaly by EMSO-GUI |
---|
| 3 | *----------------------------------------------*# |
---|
| 4 | |
---|
| 5 | using "streams"; |
---|
| 6 | using "pressure_changers/valve"; |
---|
| 7 | using "controllers/PIDs"; |
---|
| 8 | using "stage_separators/tank"; |
---|
| 9 | |
---|
| 10 | FlowSheet Sample_TankL_PID |
---|
| 11 | PARAMETERS |
---|
| 12 | PP as Plugin(Brief="Physical Properties", |
---|
| 13 | Type="PP", |
---|
| 14 | Components = ["n-butane","benzene","n-octane"], |
---|
| 15 | LiquidModel = "SRK", |
---|
| 16 | VapourModel = "SRK" |
---|
| 17 | ); |
---|
| 18 | NComp as Integer; |
---|
| 19 | SET |
---|
| 20 | NComp = PP.NumberOfComponents; |
---|
| 21 | |
---|
| 22 | DEVICES |
---|
| 23 | Feed as simple_source; |
---|
| 24 | |
---|
| 25 | SET |
---|
| 26 | |
---|
| 27 | SPECIFY |
---|
| 28 | Feed.MolarComposition(1) = 0.3; |
---|
| 29 | Feed.MolarComposition(2) = 0.3; |
---|
| 30 | Feed.MolarComposition(3) = 0.4; |
---|
| 31 | Feed.F = 500 * 'kmol/h'; |
---|
| 32 | Feed.T = 338 * 'K'; |
---|
| 33 | Feed.P = 5 * 'atm'; |
---|
| 34 | |
---|
| 35 | INITIAL |
---|
| 36 | |
---|
| 37 | GUESS |
---|
| 38 | |
---|
| 39 | DEVICES |
---|
| 40 | valve_liquid as valve_flow; |
---|
| 41 | |
---|
| 42 | SET |
---|
| 43 | |
---|
| 44 | SPECIFY |
---|
| 45 | |
---|
| 46 | INITIAL |
---|
| 47 | |
---|
| 48 | GUESS |
---|
| 49 | |
---|
| 50 | DEVICES |
---|
| 51 | PID_LC as PID; |
---|
| 52 | |
---|
| 53 | SET |
---|
| 54 | PID_LC.PID_Select = "Parallel_AWBT"; |
---|
| 55 | PID_LC.Action = "Direct"; |
---|
| 56 | PID_LC.Mode = "Automatic"; |
---|
| 57 | PID_LC.Clip = "Clipped"; |
---|
| 58 | PID_LC.alpha = 1; |
---|
| 59 | PID_LC.beta = 1; |
---|
| 60 | PID_LC.bias = 0.5; |
---|
| 61 | PID_LC.derivTime = 19 * 's'; |
---|
| 62 | PID_LC.intTime = 76 * 's'; |
---|
| 63 | PID_LC.gain = 1.1776; |
---|
| 64 | PID_LC.gamma = 1; |
---|
| 65 | PID_LC.tau = 1 * 's'; |
---|
| 66 | PID_LC.tauSet = 1 * 's'; |
---|
| 67 | PID_LC.MinInput = 0; |
---|
| 68 | PID_LC.MaxInput = 2; |
---|
| 69 | PID_LC.MinOutput = 0; |
---|
| 70 | PID_LC.MaxOutput = 1; |
---|
| 71 | |
---|
| 72 | SPECIFY |
---|
| 73 | PID_LC.SetPoint = 0.7; |
---|
| 74 | |
---|
| 75 | INITIAL |
---|
| 76 | |
---|
| 77 | GUESS |
---|
| 78 | |
---|
| 79 | DEVICES |
---|
| 80 | LiquidProduct as simple_sink; |
---|
| 81 | |
---|
| 82 | SET |
---|
| 83 | |
---|
| 84 | SPECIFY |
---|
| 85 | |
---|
| 86 | INITIAL |
---|
| 87 | |
---|
| 88 | GUESS |
---|
| 89 | |
---|
| 90 | DEVICES |
---|
| 91 | Heat_Duty as energy_source2; |
---|
| 92 | |
---|
| 93 | SET |
---|
| 94 | |
---|
| 95 | SPECIFY |
---|
| 96 | Heat_Duty.OutletQ = 0 * 'kW'; |
---|
| 97 | |
---|
| 98 | INITIAL |
---|
| 99 | |
---|
| 100 | GUESS |
---|
| 101 | |
---|
| 102 | DEVICES |
---|
| 103 | TankL_1 as TankL; |
---|
| 104 | |
---|
| 105 | SET |
---|
| 106 | TankL_1.Levelpercent_Initial = 0.80; |
---|
| 107 | TankL_1.Geometry.Orientation = "horizontal"; |
---|
| 108 | TankL_1.Geometry.Heads = "elliptical"; |
---|
| 109 | TankL_1.Geometry.Diameter = 2 * 'm'; |
---|
| 110 | TankL_1.Geometry.Lenght = 5.5 * 'm'; |
---|
| 111 | |
---|
| 112 | SPECIFY |
---|
| 113 | |
---|
| 114 | INITIAL |
---|
| 115 | |
---|
| 116 | GUESS |
---|
| 117 | |
---|
| 118 | CONNECTIONS |
---|
| 119 | PID_LC.Output to valve_liquid.FlowFraction; |
---|
| 120 | valve_liquid.Outlet to LiquidProduct.Inlet; |
---|
| 121 | Feed.Outlet to TankL_1.Inlet; |
---|
| 122 | Heat_Duty.OutletQ to TankL_1.InletQ; |
---|
| 123 | TankL_1.OutletLiquid to valve_liquid.Inlet; |
---|
| 124 | TankL_1.LI to PID_LC.Input; |
---|
| 125 | |
---|
| 126 | OPTIONS |
---|
| 127 | Dynamic = true; |
---|
| 128 | TimeStep = 0.2; |
---|
| 129 | TimeEnd = 12; |
---|
| 130 | TimeUnit = 'h'; |
---|
| 131 | Integration = "original"; |
---|
| 132 | NLASolver( |
---|
| 133 | File = "sundials", |
---|
| 134 | RelativeAccuracy = 1e-3, |
---|
| 135 | AbsoluteAccuracy = 1e-3, |
---|
| 136 | MaxIterations = 100 |
---|
| 137 | ); |
---|
| 138 | DAESolver( |
---|
| 139 | File = "sundials", |
---|
| 140 | RelativeAccuracy = 1e-2, |
---|
| 141 | AbsoluteAccuracy = 1e-6, |
---|
| 142 | EventAccuracy = 1e-2 |
---|
| 143 | ); |
---|
| 144 | end |
---|