Design Lab chemical engineering
Design Lab chemical engineering
° > Title: Exp vent No 8B » tle: Simulate the b ler is » Used to control th ‘atch reactor where a proportional F ‘eedback contro he steam and cold fluid flow rate into the jac ket. ° Tent uid flow rate into » > = i] > cam 2 b > tr | Temp. es FF controller ° eee . Water eet % 4 Xs i . outlet cy team v Ws 3 4 v Es ° leet Water > Pov Ss a Ss 1. Consider the Batch reactor in which steam is initially fed into the jacket to heat ~~ up the system to temperature at which the consecutive reactions begin. » The output signal of the temperature controller goes to two split-anged > valves, a steam valve and a water valve. The instrumentation is all pneumatic, 3 so the controller output pressure P, goes from 3 to 15 psig, The valves will be adjusted so that the steam valve is wide open when the controller output psig and is closed at P. = 9 psig. The water valve will be pressure P: is at 15 and wide open at P:=3 psig. The reason for hooking up the closed at P. =0 psig valves in this manner is to have the correct fail-safe action in the event of an instrument air failure. The steam valve take air pressure to open it and atherefore it will fail closed and call this an ‘air-to-open’ (AO) valve. On the other hand, the water takes air pressure to close it and therefore it will fail open. This is ‘air-to-close’ (AC) valve. In case of emergency it is desired to remove the source of heat and go to full cooling. Controller output range(psig) 3 9 15 Steam valve fraction open Xs: 0(Closed) 1 (Open) Water valve fraction open Xy: 1(open) 0{Closed) The equations for the reaction liquid inside the tank and the vessel metal can be described as dc, “dt @ dCy “ae Ca ele (C3) aT ea ay Qu ide smoce ky Cy — pC, k268 Vee, (iii) Qu-h A(T — Tm) (iv) aTy Qu ~ dts Gath ou Car Vis ” ‘The equations for the jacket are different for the three pases of the batch cycle. A. With steam in the jacket(35psia supply pressure steam): v, @ (wi) iis it Ps ~ R(T, + 460) oe (viii) oz oe wo ee hed: oo GSUobbebd de ebb bbd ddd a Crs) P, (a) Q) = —NosAos(Ty ~ Tm) @® % i a Hs -he (x) re) eader press B. During filling with water (20 psié water hi A a (2) vy, Gil) J coral dv, ation wo (xii) aVjTy) SLE = FyoTjo + a (xiv) dt pe Q) = MowAo(Tm — T;) (xv) Fwo = CowXwV20 (avi) When the jacket is full of water: aT, _fwo a ; Fh (Tyo — he ue T)* Giver ey Sr ceriprenure tronsrrmcser 1° ange of $0 10 250°F, SOU out put ig at 50°F to 250° pneumatic pressure signal goes from 3 Pst past 50) (xvii) ie 200 ‘ack controller is used wth its output biased at 7PSIE(¢- its A propotional feedbi output pressure is 7PSIB when is zero error)- eae 7 + K, (Pst — Prr) (xviii) enerator. when the mes from a pneumatic function B Pst cor pstsignal is ramped slowly ts upto 200°F the loss of componenet B The setpoint signal process tempreture 8° downward to prevent too much I poet = 12 - RAMP(¢— f200) (xix)where RAMP=rate of P** change with time , psi/min t = batch time, min t290= time when process tempreture T’ reaches 200°F Algorithm write the algorithm and code in C++ or Matlab Code for obtaining the results. Plot the result in Excel for batch reactor and comment. Use the data in the table given below. Parameters for batch reactor 729.55 min-* ¥, RRP 6567.6 min~! Cy_ 400 gpm/psi?* 15,000 Btuflb- mol Ty 80°F 20,000 Btu/lb- mol A, 56.5.7 = 8746.4°R 2, — 40,000 Btu/lb- mot 15.70 2, ~ $0,000 Btu/lb- mot 0,80 Ib- mol A/ft? C, 1 Buu)b, °F 80°F ve 4a2sn ‘10 psi/psi p50 1b,,/fe? 112 Ib,,/min psi * Cy 0.12 Buf, °F 1000 Btu/h °F fh? Vg 942 400 Btu/h °F ft? Pu $12 Igy? 160 Btu/h °F fh? p, 62.3 Ibi? 56.5 Cc, 1 Btu/lb,, “F 939 Btu/lb, Program for reference: For reference see the following code in Fortran (Source: William L. Luyben, Process Modelling, Simulation and control for Chemical Engineers, 2nd ed. McGraw-Hill publishing company) % tt sti sti‘“‘Csi‘—‘s~> ~ ~> ~ ~ ~~» ~2 a) > > > ~ Program: REAL K1,K2,.KC ALPHAT 728.5488 ALPITAQ=fi7 987 C VAPOR PRESSURE CONSTANTS FOR STEAM AVP=-AT444 BVP~ 5.70036 C USE SMALL DELTA DURING STEAM PERIOD DFLTAw.002 Ke=2 TPRINT=1 € INITIAL CONDITIONS CA-O8 Cran rIME=| 1=¥0, TM=80, T2259. Pimsed DENS—18.2PJo144,/(1545.0(TI4460.)) TSET=126 START=! FWO=0, PULL: ty TI FWO WRITE(6,54) BELEN T{UrIMEy CAD COL XS) XW, T. + Qs QM’) 1 STEP IN TIMP © MAIN LOOP Fon EAC 100 KL-=ALPHA 1ePXP( 15000. K2=ALPHA2+EXP(-20000./((T +480. © TRANSMITTER pT =3.+(T-50.)+22./200. © CONTROLLER PCa7-+KCo(PSET PTT) JE(PC.GT.19.) PC=15. 3.) PC=3. J 99e(T 4460.19) 1.99)) 1e(XS GT.) XS IEEXS.L1.0.) X8=0, 1F(XW.GT.1.) XW=t IF(XW.LT.0.) XW = TEST FOR STEAM TF(START.LT 0.) GO TO 20 IF(P1.GE.35.) GO TO 40 WS=EXSe112.°SQRT(AS. PI) GOTO 41 40 WS=0. 41 CONTINUEVY SS DDS PPP A tN trl el ar rt el atl lala eB DERIVATIVES TIDOT=F WO. (R0. T3)/18.63+4Q) /(18.89462.3) TISTI4DELT AsTIDOT 50 CADOTS-K1eCA Gee OT KICA-KascB M=160.056.56(7-TM /60, TDOT= eIeoAsinne eta }/50.-QM /(42.4#50.) TMDOT=(QM-Q3)/(512.«.1260 42) INTEGRATION TIME=TIME+DELTA CA=CA+CADOT*DELTA ° CB+CRDOT*DELTA +TDOT*DELTA M+TMDOT+DELTA IE(T.GT.300.) sTOP IF(T.G IE(T.GY.200.) CAM IF(CAM.GT.0.) PSET=PSET-DELTA+RAMP CB= T. IF(TIME.GT.100.) GO TO 56 IE(TIME.LT.TFLAG) GO TO 100 XW,T.TM,TJ,FWO,QJ,QM .4F6.1.2E10.2) WRITE(6,55)TIME,CA.CB 55 FORMAT(1X,F5.1,2F7.3, TELAG=TFLAG+TPRINT GO TO 100 56 STOP END aResult IME CA CB XS XW T TM TJ FWO QJ am 0.0. 0.800 0.000 1.00 0.00 80.0 80.6 0.0 -O.17E-+06 0,00P-+00 0 0.799 0.001 1.00 0.00 86.3 211.9 265.0 0.0 -0.43E-+05 -0.19E +05 2.0 0.799 0.001 1.00 0.00 96.4 234.2 261.0 0.0 -0.27E+05 -G.21E+05 4.0 0.798 0,002 1.00 0.00 106.7 239.0 260.0 0.0 -0.22E+05 0.208 +05 4.0 0.797 0.003 1.00 0.00 116.7 240.8 262.0 0.0 -0.22E+05 -0.19F +09 5.0. 0.796 0.005 1.00 0.00 126.3 242.6 261.0 0.0 -0.19B-+05 -0.18F +05 6.0 0.794 0,006 1.00 0,00 135.7 243.8 265.0 0.0 .0.21E+05 -0.16F +05 7.0 0.792 0.008 0.97 0.00 144.7 244.9 260.0 0.0 -0.16E-+05 -0.15E+05 — ~~ ws — ~— ~~ “Se 3 8.0 0.780 0.011 0.80 0.00 1 a coke ae os = \ — ~— ~ ~ ~ ~~ ~ Sm ¢ ~ 9.0 0.787 0.014 0.62 0.00 162.1 246.7 10.0 0.783 0.017 0.46 0.00 170.6 247. 0.0 -0.12B +05 -0.12B+05 11.0 0.779 0.021 0.29 0.00 178.9 248.0 259.0 0.0 -0.10E+05 -0.105.+05 12.0 0.775 0.026 0.12 0.00 187.3 248.8 259.0 0.0 -0.96E+04 -0.93E +04 13.0 0.769 0.031 0.00 0.04 195.6 243.4 244.0 0.0 -0.54E-+03 0.72 +04 14.0 0.763. 0.037 0.00 0.20 203.2 232.6 212.7 11.9 0.17E+04 -0.44E+04 15.0 0.756 0.044 0.00 0.34 210.4 222.9 203.2 20.1 0.51E+04 -0.20B.4 04 17.0 0.741 0.059 0.00 0,53 219.7 159.1 31.8 0.23E-+05 0.89E+04 19.0 0.724 0.076 0.00 0.59 222.4 132.9 35.3 O.17E+05 0.13E+05 21.0 0.707 0.092 0.00 0,61 223.0 127.1 36.2 0.1SE+05 0.14B+05 29.0 0.691 0.108 0.00 0.61 222.9 125.8 36.2 O.L5E+05 0.15E-+05 25.0 0.675 0.123 0.00 0.60 222.5 125.5 86.5 30.0 O.1GE+05 0.158405 27.0 0.659 0.138 0.00 0.59 221.8 125. § 35.4 O.1SE+08 O.15E-+05 20.0 0644 0.152 0.00 0.58 220.9 125.1 86.7 34.5 0.14F+05 O.14E+05 31.0 0,630 0.166 0.00 0.55 219.6 124.9 86.9 33.2 0.14E+05 0.146405 33.0 0616 0.178 0.00 0.53 218.0 124.7 87.1 31.5 0.14E+05 0.14E 408 35.0 0.603 0.191 0.00 0.49 216.1 124.4 87.5 29.5 O.14E405 0.14F-405 37.0 0.591 0.202 0.00 0.45 214.0 124.1 87.9 27.1 O.14E+05 D.14E+05 3.0 0.570 0.213 0.00 0.41 211.5 123.8 AR.5 24.4 O.13E405 0.138-+05 41.0 0.568 0.223 0.00 0.36 208.9 123.6 89.3 21.4 0.13E-+05 0.138405 43.0 0.558 4.232 0.00 0.30 206.0 123.4 90.4 18.2 0.128405 0.126405 45.0 0.549 0.241 0.00 0.25 203.0 123.5 91.9 14.7 0.12E+05 0.126+05 Q 47.0 0.540 0.249 0.00 0.19 199.9 123.9 94.0 11.2 O.ME+05 0.11E+05 ma 49.0 0.581 0,257 0.00 0.13 196.8 124.9 97.2 7.7 0.10E+05 0.11E+05 N 51.0 0.523 0.264 0.00 0.07 193.9 126.8 101.9 4.4 0.946404 0.10E+05 £30 0.516 0.270 0.00 0.03 191.9 130.2 109.1 1.5 0.80E+04 0.92E +04 aS 55.0 0.509 0.277 0.00 0.00 189.3 135.8 119.6 0.0 0.62B+04 0.81E+04 57.0 0.503 0.2R2 0.00 0.00 188.3 142.5 120.0 0.0 D.51B+04 0.696404 ~ 9:0 0.496 0.288 0.00 0.00 188.1 148.5 137.0 0.0 O.43E+04 0.608404 c 62.0 0.490 0.294 0.00 0.00 188.7 159.9 143.9 0.0 0.3RE+04 0.53E-+04 3 S eww 6 9 re © c ¢ ‘