[749] | 1 | #*---------------------------------------------- |
---|
| 2 | * FlowSheet generated automaticaly by EMSO-GUI |
---|
| 3 | *----------------------------------------------*# |
---|
| 4 | |
---|
| 5 | using "streams"; |
---|
| 6 | using "stage_separators/flash"; |
---|
| 7 | using "controllers/PIDIncr"; |
---|
| 8 | using "pressure_changers/valve"; |
---|
| 9 | |
---|
| 10 | FlowSheet Sample_flash_PIDincr |
---|
| 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 | HeatToFlash as energy_source; |
---|
| 24 | |
---|
| 25 | SET |
---|
| 26 | |
---|
| 27 | SPECIFY |
---|
| 28 | HeatToFlash.OutletQ = 1026.32 * 'kW'; |
---|
| 29 | |
---|
| 30 | INITIAL |
---|
| 31 | |
---|
| 32 | GUESS |
---|
| 33 | |
---|
| 34 | DEVICES |
---|
| 35 | F101 as flash; |
---|
| 36 | |
---|
| 37 | SET |
---|
| 38 | F101.Orientation = "vertical"; |
---|
[796] | 39 | F101.Heads = "flat"; |
---|
[749] | 40 | F101.Diameter = 3.1 * 'm'; |
---|
[796] | 41 | F101.Lenght = 6 * 'm'; |
---|
[749] | 42 | F101.Levelpercent_Initial = 0.70; |
---|
| 43 | F101.Temperature_Initial = 383 * 'K'; |
---|
| 44 | F101.Composition_Initial(1) = 0.3; |
---|
| 45 | F101.Composition_Initial(2) = 0.4; |
---|
| 46 | F101.Composition_Initial(3) = 0.3; |
---|
| 47 | |
---|
| 48 | SPECIFY |
---|
| 49 | |
---|
| 50 | INITIAL |
---|
| 51 | |
---|
| 52 | GUESS |
---|
| 53 | |
---|
| 54 | DEVICES |
---|
| 55 | Feed as simple_source; |
---|
| 56 | |
---|
| 57 | SET |
---|
| 58 | |
---|
| 59 | SPECIFY |
---|
| 60 | Feed.MolarComposition(1) = 0.3; |
---|
| 61 | Feed.MolarComposition(2) = 0.3; |
---|
| 62 | Feed.MolarComposition(3) = 0.4; |
---|
| 63 | Feed.F = 500 * 'kmol/h'; |
---|
| 64 | Feed.T = 338 * 'K'; |
---|
| 65 | Feed.P = 5 * 'atm'; |
---|
| 66 | |
---|
| 67 | INITIAL |
---|
| 68 | |
---|
| 69 | GUESS |
---|
| 70 | |
---|
| 71 | DEVICES |
---|
| 72 | VaporProduct as sink; |
---|
| 73 | |
---|
| 74 | SET |
---|
| 75 | |
---|
| 76 | SPECIFY |
---|
| 77 | |
---|
| 78 | INITIAL |
---|
| 79 | |
---|
| 80 | GUESS |
---|
| 81 | |
---|
| 82 | DEVICES |
---|
| 83 | LiquidProduct as sink; |
---|
| 84 | |
---|
| 85 | SET |
---|
| 86 | |
---|
| 87 | SPECIFY |
---|
| 88 | |
---|
| 89 | INITIAL |
---|
| 90 | |
---|
| 91 | GUESS |
---|
| 92 | |
---|
| 93 | DEVICES |
---|
| 94 | PIDIncr_PC as PIDIncr; |
---|
| 95 | |
---|
| 96 | SET |
---|
| 97 | PIDIncr_PC.PID_Select = "Parallel_AWBT"; |
---|
| 98 | PIDIncr_PC.Action = "Direct"; |
---|
| 99 | PIDIncr_PC.Mode = "Automatic"; |
---|
| 100 | PIDIncr_PC.Clip = "Clipped"; |
---|
| 101 | PIDIncr_PC.alpha = 1; |
---|
| 102 | PIDIncr_PC.beta = 1; |
---|
| 103 | PIDIncr_PC.bias = 0.5; |
---|
| 104 | PIDIncr_PC.derivTime = 18 * 's'; |
---|
| 105 | PIDIncr_PC.intTime = 72 * 's'; |
---|
| 106 | PIDIncr_PC.gain = 0.9275; |
---|
| 107 | PIDIncr_PC.gamma = 1; |
---|
| 108 | PIDIncr_PC.tau = 1 * 's'; |
---|
| 109 | PIDIncr_PC.tauSet = 1 * 's'; |
---|
| 110 | PIDIncr_PC.MinInput = 0; |
---|
| 111 | PIDIncr_PC.MaxInput = 3; |
---|
| 112 | PIDIncr_PC.MinOutput = 0; |
---|
| 113 | PIDIncr_PC.MaxOutput = 1; |
---|
| 114 | |
---|
| 115 | SPECIFY |
---|
| 116 | PIDIncr_PC.SetPoint = 0.6; |
---|
| 117 | |
---|
| 118 | INITIAL |
---|
| 119 | |
---|
| 120 | GUESS |
---|
| 121 | |
---|
| 122 | DEVICES |
---|
| 123 | PIDIncr_LC as PIDIncr; |
---|
| 124 | |
---|
| 125 | SET |
---|
| 126 | PIDIncr_LC.PID_Select = "Parallel_AWBT"; |
---|
| 127 | PIDIncr_LC.Action = "Direct"; |
---|
| 128 | PIDIncr_LC.Mode = "Automatic"; |
---|
| 129 | PIDIncr_LC.Clip = "Clipped"; |
---|
| 130 | PIDIncr_LC.alpha = 1; |
---|
| 131 | PIDIncr_LC.beta = 1; |
---|
| 132 | PIDIncr_LC.bias = 0.5; |
---|
| 133 | PIDIncr_LC.derivTime = 18 * 's'; |
---|
| 134 | PIDIncr_LC.intTime = 72 * 's'; |
---|
| 135 | PIDIncr_LC.gain = 0.9275; |
---|
| 136 | PIDIncr_LC.gamma = 1; |
---|
| 137 | PIDIncr_LC.tau = 1 * 's'; |
---|
| 138 | PIDIncr_LC.tauSet = 1 * 's'; |
---|
| 139 | PIDIncr_LC.MinInput = 0; |
---|
[796] | 140 | PIDIncr_LC.MaxInput = 1; |
---|
[749] | 141 | PIDIncr_LC.MinOutput = 0; |
---|
| 142 | PIDIncr_LC.MaxOutput = 1; |
---|
| 143 | |
---|
| 144 | SPECIFY |
---|
| 145 | PIDIncr_LC.SetPoint = 0.7; |
---|
| 146 | |
---|
| 147 | INITIAL |
---|
| 148 | |
---|
| 149 | GUESS |
---|
| 150 | |
---|
| 151 | DEVICES |
---|
| 152 | valve_liquid as valve_flow; |
---|
| 153 | |
---|
| 154 | SET |
---|
| 155 | valve_liquid.MinFlow = 0 * 'kmol/h'; |
---|
| 156 | valve_liquid.MaxFlow = 500 * 'kmol/h'; |
---|
| 157 | |
---|
| 158 | SPECIFY |
---|
| 159 | |
---|
| 160 | INITIAL |
---|
| 161 | |
---|
| 162 | GUESS |
---|
| 163 | |
---|
| 164 | DEVICES |
---|
| 165 | valve_vapour as valve_flow; |
---|
| 166 | |
---|
| 167 | SET |
---|
| 168 | valve_vapour.MinFlow = 0 * 'kmol/h'; |
---|
| 169 | valve_vapour.MaxFlow = 500 * 'kmol/h'; |
---|
| 170 | |
---|
| 171 | SPECIFY |
---|
| 172 | |
---|
| 173 | INITIAL |
---|
| 174 | |
---|
| 175 | GUESS |
---|
| 176 | |
---|
| 177 | CONNECTIONS |
---|
| 178 | HeatToFlash.OutletQ to F101.InletQ; |
---|
| 179 | Feed.Outlet to F101.Inlet; |
---|
| 180 | F101.PI to PIDIncr_PC.Input; |
---|
| 181 | F101.LI to PIDIncr_LC.Input; |
---|
| 182 | PIDIncr_LC.Output to valve_liquid.FlowFraction; |
---|
| 183 | valve_liquid.Outlet to LiquidProduct.Inlet; |
---|
| 184 | valve_vapour.Outlet to VaporProduct.Inlet; |
---|
| 185 | PIDIncr_PC.Output to valve_vapour.FlowFraction; |
---|
| 186 | F101.OutletLiquid to valve_liquid.Inlet; |
---|
| 187 | F101.OutletVapour to valve_vapour.Inlet; |
---|
| 188 | |
---|
| 189 | OPTIONS |
---|
| 190 | Dynamic = true; |
---|
[796] | 191 | TimeStep = 0.2; |
---|
[749] | 192 | TimeEnd = 1; |
---|
| 193 | TimeUnit = 'h'; |
---|
| 194 | Integration = "original"; |
---|
| 195 | NLASolver( |
---|
| 196 | File = "sundials", |
---|
[796] | 197 | RelativeAccuracy = 1e-2, |
---|
[749] | 198 | AbsoluteAccuracy = 1e-3, |
---|
| 199 | MaxIterations = 100 |
---|
| 200 | ); |
---|
| 201 | DAESolver( |
---|
| 202 | File = "sundials", |
---|
[796] | 203 | RelativeAccuracy = 1e-2, |
---|
[749] | 204 | AbsoluteAccuracy = 1e-6, |
---|
| 205 | EventAccuracy = 1e-2 |
---|
| 206 | ); |
---|
| 207 | end |
---|