[799] | 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 | |
---|
| 41 | SET |
---|
| 42 | |
---|
| 43 | SPECIFY |
---|
| 44 | |
---|
| 45 | INITIAL |
---|
| 46 | |
---|
| 47 | GUESS |
---|
| 48 | |
---|
| 49 | DEVICES |
---|
| 50 | valve_liquid as valve_flow; |
---|
| 51 | |
---|
| 52 | SET |
---|
| 53 | |
---|
| 54 | SPECIFY |
---|
| 55 | |
---|
| 56 | INITIAL |
---|
| 57 | |
---|
| 58 | GUESS |
---|
| 59 | |
---|
| 60 | DEVICES |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | SET |
---|
| 64 | |
---|
| 65 | SPECIFY |
---|
| 66 | |
---|
| 67 | INITIAL |
---|
| 68 | |
---|
| 69 | GUESS |
---|
| 70 | |
---|
| 71 | DEVICES |
---|
| 72 | PID_LC as PID; |
---|
| 73 | |
---|
| 74 | SET |
---|
| 75 | PID_LC.PID_Select = "Parallel_AWBT"; |
---|
| 76 | PID_LC.Action = "Direct"; |
---|
| 77 | PID_LC.Mode = "Automatic"; |
---|
| 78 | PID_LC.Clip = "Clipped"; |
---|
| 79 | PID_LC.alpha = 1; |
---|
| 80 | PID_LC.beta = 1; |
---|
| 81 | PID_LC.bias = 0.5; |
---|
| 82 | PID_LC.derivTime = 19 * 's'; |
---|
| 83 | PID_LC.intTime = 76 * 's'; |
---|
| 84 | PID_LC.gain = 1.1776; |
---|
| 85 | PID_LC.gamma = 1; |
---|
| 86 | PID_LC.tau = 1 * 's'; |
---|
| 87 | PID_LC.tauSet = 1 * 's'; |
---|
| 88 | PID_LC.MinInput = 0; |
---|
| 89 | PID_LC.MaxInput = 2; |
---|
| 90 | PID_LC.MinOutput = 0; |
---|
| 91 | PID_LC.MaxOutput = 1; |
---|
| 92 | |
---|
| 93 | SPECIFY |
---|
| 94 | PID_LC.SetPoint = 0.7; |
---|
| 95 | |
---|
| 96 | INITIAL |
---|
| 97 | |
---|
| 98 | GUESS |
---|
| 99 | |
---|
| 100 | DEVICES |
---|
| 101 | |
---|
| 102 | |
---|
| 103 | |
---|
| 104 | SPECIFY |
---|
| 105 | |
---|
| 106 | INITIAL |
---|
| 107 | |
---|
| 108 | GUESS |
---|
| 109 | |
---|
| 110 | DEVICES |
---|
| 111 | LiquidProduct as simple_sink; |
---|
| 112 | |
---|
| 113 | SET |
---|
| 114 | |
---|
| 115 | SPECIFY |
---|
| 116 | |
---|
| 117 | INITIAL |
---|
| 118 | |
---|
| 119 | GUESS |
---|
| 120 | |
---|
| 121 | DEVICES |
---|
| 122 | Heat_Duty as energy_source2; |
---|
| 123 | |
---|
| 124 | SET |
---|
| 125 | |
---|
| 126 | SPECIFY |
---|
| 127 | Heat_Duty.OutletQ = 0 * 'kW'; |
---|
| 128 | |
---|
| 129 | INITIAL |
---|
| 130 | |
---|
| 131 | GUESS |
---|
| 132 | |
---|
| 133 | DEVICES |
---|
| 134 | V001 as TankL; |
---|
| 135 | |
---|
| 136 | SET |
---|
| 137 | V001.Orientation = "horizontal"; |
---|
| 138 | V001.Heads = "hemispherical"; |
---|
| 139 | V001.Diameter = 3.1 * 'm'; |
---|
| 140 | V001.Lenght = 6 * 'm'; |
---|
| 141 | V001.Levelpercent_Initial = 0.7; |
---|
| 142 | |
---|
| 143 | SPECIFY |
---|
| 144 | |
---|
| 145 | INITIAL |
---|
| 146 | |
---|
| 147 | GUESS |
---|
| 148 | |
---|
| 149 | CONNECTIONS |
---|
| 150 | PID_LC.Output to valve_liquid.FlowFraction; |
---|
| 151 | valve_liquid.Outlet to LiquidProduct.Inlet; |
---|
| 152 | Feed.Outlet to V001.Inlet; |
---|
| 153 | V001.LI to PID_LC.Input; |
---|
| 154 | Heat_Duty.OutletQ to V001.InletQ; |
---|
| 155 | V001.OutletLiquid to valve_liquid.Inlet; |
---|
| 156 | |
---|
| 157 | OPTIONS |
---|
| 158 | Dynamic = true; |
---|
| 159 | TimeStep = 0.2; |
---|
| 160 | TimeEnd = 12; |
---|
| 161 | TimeUnit = 'h'; |
---|
| 162 | Integration = "original"; |
---|
| 163 | NLASolver( |
---|
| 164 | File = "sundials", |
---|
| 165 | RelativeAccuracy = 1e-3, |
---|
| 166 | AbsoluteAccuracy = 1e-3, |
---|
| 167 | MaxIterations = 100 |
---|
| 168 | ); |
---|
| 169 | DAESolver( |
---|
| 170 | File = "sundials", |
---|
| 171 | RelativeAccuracy = 1e-2, |
---|
| 172 | AbsoluteAccuracy = 1e-6, |
---|
| 173 | EventAccuracy = 1e-2 |
---|
| 174 | ); |
---|
| 175 | end |
---|