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