Changeset 243 for trunk/sample/stage_separators/sample_columnReact.mso
 Timestamp:
 Apr 16, 2007, 2:19:39 PM (16 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/sample/stage_separators/sample_columnReact.mso
r213 r243 28 28 FlowSheet Startup_ReactiveDistillation 29 29 PARAMETERS 30 PP as Plugin(Brief="Physical Properties", 31 Type="PP", 30 PP as Plugin(Brief="Physical Properties", Type="PP", 32 31 Components = [ "acetic acid", "ethanol", "ethyl acetate", "water"], 33 32 LiquidModel = "UNIFAC", 34 VapourModel = "Ideal", 35 Derivatives = 1 33 VapourModel = "Ideal" 36 34 ); 37 35 NComp as Integer; … … 50 48 51 49 VARIABLES 50 Qcmin as heat_rate (Brief="Condenser Heat supplied"); 51 Qcmax as heat_rate (Brief="Condenser Heat supplied"); 52 Qrmin as heat_rate (Brief="Reboiler Heat supplied"); 53 Qrmax as heat_rate (Brief="Reboiler Heat supplied"); 54 Fmin as flow_mol; 55 Fmax as flow_mol; 56 Frmin as flow_mol; 57 Frmax as flow_mol; 58 52 59 Lreb_ad as Real; 53 60 Lrebmin as length; … … 69 76 zero to col.trays([6:col.NTrays]).Inlet; 70 77 78 71 79 EQUATIONS 72 "Equações do PID para controle de nível" 73 Lreb_ad*(LrebmaxLrebmin)=col.reb.LevelLrebmin; 74 PIDLreb.Ports.input=Lreb_ad; 75 Lcond_ad*(LcondmaxLcondmin)=col.cond.LevelLcondmin; 76 PIDLcond.Ports.input=Lcond_ad; 77 "Equações do PID para controle de temperatura" 78 Treb_ad*(TrebmaxTrebmin)=col.reb.OutletL.TTrebmin; 79 PIDTreb.Ports.input=Treb_ad; 80 Tcond_ad*(TcondmaxTcondmin)=col.cond.OutletL.TTcondmin; 81 PIDTcond.Ports.input=Tcond_ad; 82 83 col.sp.frac = 0.1; 84 85 col.sp.Outlet1.F = 0.5 * PIDLcond.Ports.output * 'mol/s'; 86 col.reb.OutletL.F = 1.736 * PIDLreb.Ports.output * 'mol/s'; 87 88 PIDTreb.Ports.setPoint= (367 * 'K'  Trebmin)/(TrebmaxTrebmin); 89 PIDTcond.Ports.setPoint= (344 * 'K'  Trebmin)/(TrebmaxTrebmin); 90 col.cond.Q = 10*'J/s'  (5 * PIDTcond.Ports.output) * 'kJ/s'; 91 92 #verificando a partida do refervedor 93 if time < 200 * 's' then 80 col.sp.frac = 0.09; 81 82 #verificando a partida do refervedor 83 if time < 400 * 's' then 94 84 col.reb.startup = 1; 95 85 else 96 86 col.reb.startup = 0; 97 87 end 98 88 99 89 if col.reb.startup then 90 col.cond.Q = 0 * PIDTcond.Ports.output * 'kJ/s'; 100 91 col.reb.Q = 0 * PIDTreb.Ports.output * 'kJ/s'; 92 93 PIDTreb.Ports.input = PIDTreb.Ports.setPoint; 101 94 else 102 col.reb.Q = 1e1 * PIDTreb.Ports.output * 'kJ/s'; 95 col.cond.Q = Qcmin+(QcmaxQcmin)*PIDTcond.Ports.output; 96 col.reb.Q = Qrmin+(QrmaxQrmin)*PIDTreb.Ports.output; 97 98 PIDTreb.Ports.input=Treb_ad; 103 99 end 104 105 "Reaction  Trays"106 col.trays.r = exp(7150*'K'/col.trays.OutletL.T)*107 (4.85e4*col.trays.C(1)*col.trays.C(2)  1.23e4*col.trays.C(3)*col.trays.C(4))*'l/mol/s';108 "Reaction  Reboiler"109 col.reb.r = exp(7150*'K'/col.reb.OutletL.T)*(4.85e4*col.reb.C(1)*col.reb.C(2)110  1.23e4*col.reb.C(3)*col.reb.C(4)) * 'l/mol/s';111 "Reaction  Condenser"112 col.cond.r = exp(7150*'K'/col.cond.OutletL.T)*(4.85e4*col.cond.C(1)*col.cond.C(2)113  1.23e4*col.cond.C(3)*col.cond.C(4)) * 'l/mol/s';114 115 100 116 101 SPECIFY … … 138 123 PIDLreb.Parameters.beta=1; 139 124 PIDLreb.Parameters.gain=1; 140 PIDLreb.Parameters.intTime=10 0*'s';125 PIDLreb.Parameters.intTime=10*'s'; 141 126 PIDLreb.Parameters.derivTime=1*'s'; 142 127 PIDLreb.Options.action=1; … … 144 129 PIDLreb.Options.autoMan=0; 145 130 PIDLreb.Ports.setPoint=(0.5 * 'm'  Lrebmin)/(LrebmaxLrebmin); 131 Lreb_ad*(LrebmaxLrebmin)=col.reb.LevelLrebmin; 132 PIDLreb.Ports.input=Lreb_ad; 133 col.reb.OutletL.F = Frmin + (FrmaxFrmin) * PIDLreb.Ports.output; 146 134 147 135 PIDLcond.Parameters.tau = 1*'s'; 148 PIDLcond.Parameters.tauSet=1*'s'; 149 PIDLcond.Parameters.bias = 0 ;136 PIDLcond.Parameters.tauSet=1*'s'; 137 PIDLcond.Parameters.bias = 0.5; 150 138 PIDLcond.Parameters.alpha=1; 151 139 PIDLcond.Parameters.gamma=1; … … 158 146 PIDLcond.Options.autoMan=0; 159 147 PIDLcond.Ports.setPoint=(0.5 * 'm'  Lcondmin)/(LcondmaxLcondmin); 148 Lcond_ad*(LcondmaxLcondmin)=col.cond.LevelLcondmin; 149 PIDLcond.Ports.input=Lcond_ad; 150 col.sp.Outlet1.F = Fmin + (FmaxFmin) * PIDLcond.Ports.output; 160 151 161 152 PIDTreb.Parameters.tau = 1*'s'; 162 PIDTreb.Parameters.tauSet=1*'s'; 153 PIDTreb.Parameters.tauSet=1*'s'; 163 154 PIDTreb.Parameters.bias = 0.2; 164 155 PIDTreb.Parameters.alpha=0.2; … … 166 157 PIDTreb.Parameters.beta=1; 167 158 PIDTreb.Parameters.gain=0.9; 168 PIDTreb.Parameters.intTime=10 *'s';159 PIDTreb.Parameters.intTime=100*'s'; 169 160 PIDTreb.Parameters.derivTime=1*'s'; 170 161 PIDTreb.Options.action=1; 171 162 PIDTreb.Options.clip=1; 172 163 PIDTreb.Options.autoMan=0; 173 174 PIDTcond.Parameters.tau = 1*'s'; 175 PIDTcond.Parameters.tauSet=1*'s'; 176 PIDTcond.Parameters.bias = 0.2; 164 PIDTreb.Ports.setPoint= (366 * 'K'  Trebmin)/(TrebmaxTrebmin); 165 Treb_ad*(TrebmaxTrebmin)=col.reb.OutletL.TTrebmin; 166 167 PIDTcond.Parameters.tau = 1*'s'; 168 PIDTcond.Parameters.tauSet=1*'s'; 169 PIDTcond.Parameters.bias = 0.5; 177 170 PIDTcond.Parameters.alpha=0.2; 178 171 PIDTcond.Parameters.gamma=1; … … 181 174 PIDTcond.Parameters.intTime=10*'s'; 182 175 PIDTcond.Parameters.derivTime=1*'s'; 183 PIDTcond.Options.action= 1;176 PIDTcond.Options.action=1; 184 177 PIDTcond.Options.clip=1; 185 178 PIDTcond.Options.autoMan=0; 179 PIDTcond.Ports.setPoint= (346 * 'K'  Tcondmin)/(TcondmaxTcondmin); 180 Tcond_ad*(TcondmaxTcondmin)=col.cond.OutletL.TTcondmin; 181 PIDTcond.Ports.input=Tcond_ad; 186 182 187 183 "Valores limites para normalizações" … … 194 190 Tcondmax=380*'K'; 195 191 Tcondmin=250*'K'; 192 Qcmin = 100 * 'kJ/s'; 193 Qcmax = 0 * 'kJ/s'; 194 Qrmin = 0 * 'kJ/s'; 195 Qrmax = 150 * 'kJ/s'; 196 Fmin = 0 * 'kmol/h'; 197 Fmax = 2 * 'kmol/h'; 198 Frmin = 0 * 'kmol/h'; 199 Frmax = 5 * 'kmol/h'; 196 200 197 201 col.cond.OutletV.F = 0 * 'kmol/h'; … … 206 210 col.cond.Across = 6 * 'l/m'; 207 211 208 col.trays.V = 0.0961 * 'm^3'; # 0.34* (3.14*0.6*0.6/4)209 col.trays.Ah = 0.04 * 'm^2'; #0.2 * 'm^2';212 col.trays.V = 0.0961 * 'm^3'; 213 col.trays.Ah = 0.04 * 'm^2'; 210 214 col.trays.lw = 0.457 * 'm'; 211 215 col.trays.hw = 0.05 * 'm'; 212 216 col.trays.Q = 0 * 'kW'; 213 217 col.trays.beta = 0.8; 214 col.trays.alfa = 5; 215 col.trays.Ap = 0.07 * 'm^2'; #0.24 * 'm^2'; # 3.14*0.6*0.6/4  15% 218 col.trays.alfa = 30; 219 col.alfacond = 100000; 220 col.trays.Ap = 0.07 * 'm^2'; 216 221 217 222 col.trays.Hr = 0 * 'kJ/mol'; … … 232 237 233 238 # reboiler 234 col.reb.OutletL.T = 300 * 'K';239 col.reb.OutletL.T = 300 * 'K'; 235 240 col.reb.Level = 0.1 * 'm'; 236 241 col.reb.OutletL.z([1:3]) = [0.4962, 0.4808, 0]; … … 242 247 243 248 OPTIONS 249 TimeStep = 100; 250 TimeEnd = 50000; 251 NLASolver = "sundials"; 244 252 DAESolver = "dassl"; 245 RelativeAccuracy = 1e2;246 TimeEnd = 20000;247 TimeStep = 100;248 TimeUnit = 's';249 # time = [0:200, 210:10:2000, 2100:100:20000];250 253 end
Note: See TracChangeset
for help on using the changeset viewer.