CHEMICAL ENGINEERING TRANSACTIONS VOL. 52, 2016 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Petar Sabev Varbanov, Peng-Yen Liew, Jun-Yow Yong, Jiří Jaromír Klemeš, Hon Loong Lam Copyright © 2016, AIDIC Servizi S.r.l., ISBN 978-88-95608-42-6; ISSN 2283-9216 A Novel Mathematical Method for the Simultaneous Optimization of Hydrogen Network and Reactor Yingjia Wang, Guilian Liu*, Xiao Tian School of Chemical Engineering and Technology, Xi’an Jiaotong University, Xi’an, Shaanxi Province, China, 710049 guilianliui@mail.xjtu.edu.cn In refinery, the hydrogen-consuming reactors have a great effect on the hydrogen network integration, their optimization should be considered simultaneously. This paper propose a new mathematical programming model for the optimization of the hydrogen network. The objective is to target the hydrogen-consuming reactor and hydrogen network with the optimal economic performance. In this model, the match between hydrogen source and hydrogen sink, sulfur content of the feed oil, hydrogen consumption and the operating conditions of the reactor are considered simultaneously. The latter includes the residence time, pressure, temperature and hydrogen to oil ratio. Based on this model, the overall optimization of the hydrogen network can be achieved easily, as well as the optimal hydrogen distribution network and the optimal operating conditions of the reactor. The hydrogen network of a refinery is optimized by the proposed method. 1. Introduction Nowadays, there is a worldwide trend towards processing heavier and high-sulfur crude oil. Refiners are being compelled to increase their hydro-processing levels to upgrade these crudes and satisfy market demand and environment regulations. Hydrogen is critical to convert poor quality crude oil into desired products, and its consumption is demonstrating a significant growth. Better hydrogen management through hydrogen network integration is needed for energy savings and economical benefit. Catalytic diesel oil hydrogenation is one of the main hydro-processing processes to facilitate the control of the product’s sulfur content. The hydrogen-consuming reactor is the key equipment, and its operating parameters have a great effect on the hydrogen network integrationt. To decrease the hydrogen consumption and the cost, the reactor operating parameters should be considered in the integration of a hydrogen network. Alves and Towler (2002) found that the pinch exists in the hydrogen network and developed the iterative hydrogen surplus method for targeting the pinch point and the minimum fresh hydrogen consumption. Zhao et al. (2006) – working on hydrogen distribution systems, Saw et al. (2011) generalizing on property based resource condervation, developed different graphical methods for solving the same problem without iteration. Foo and Manan (2006) improved Property Cascade Analysis (PCA) method to Gas Cascade Analysis (GCA) method to solve the gas integration problem with purification. Zhao et al. (2007) developed the graphical method addressing integration of hydrogen distribution networks with multiple impurities. Mao et al. (2015a, 2015b) developed an integration method for the hydrogen network with the coupling of sink and source streams considered. Except graphical methods, mathematical programming methods are also employed to solve hydrogen network. Van den Heever and Grossmann (2003) proposed an MINLP model for a hydrogen network consisting of five plants, four inter-connected pipelines and 20 customers. Ahmad et al. (2010) develop an approach for the design of flexible hydrogen networks. Umana et al. (2014) developed an integrated approach for refinery process and hydrogen network design. Zhou et al. (2013) presented a systematic modeling methodology for the optimal synthesis of sustainable refinery hydrogen networks accounting both the economic and environmental aspect. Deng et al. proposed two different superstructure-based mathematical programming models to synthesize the hydrogen network (2014a) and performed comparative analysis (2014b). Liao et al. (2016) revealed the impact of a purifier on the hydrogen network from three aspects. DOI: 10.3303/CET1652067 Please cite this article as: Wang Y., Liu G., Tian X., 2016, A novel mathematical method for the simultaneous optimization of hydrogen network and reactor, Chemical Engineering Transactions, 52, 397-402 DOI:10.3303/CET1652067 397 Although the hydrogen network can be integrated by these methods, the optimization of the hydrogen- consuming reactor's operating parameters is not considered. This work aims to integrate the hydrogen network with the hydrogen-consuming reactor to increase its economical performance. The relation among hydrogen consumption and operating parameters of reactor is deduced. A mathematical model is established with the constraints on the match between hydrogen source, hydrogen consumption and the operating conditions of the reactor considered. Based on this model, the hydrogen network and the operating parameters of the reactor a refinery is optimized simultaneously. 2. Relation among the hydrogen consumption and operating parameters of reactor Multiple reactions occur in the hydrogen-consuming reactor. In this work, the hydro-desulfurization reaction is mainly considered, while hydrogen consumption of the other reactions is taken as a constant. The hydrogen consumed in the reactor can be determined by Eq(1). H0 denotes the hydrogen consumed in other reactions. 0 0 ( ) / r oil S S S H f C C M H   (1) Based on the reaction kinetics, the hydro-cracking desulfurization reaction rate is related to the sulfur content in the reaction system, and is shown by Eq(2). According to the Arrhenius equation, the reaction rate constant, k, can be determined by Eq(3). Pre-exponential factor, 0 k , is relevant to the hydrogen pressure, the rate of hydrogen to oil, as shown by Eq(4). Based on Eqs(1) - (4), the relation among sulfur content and the operating parameters of reactor is deduced, as shown by Eq(5) n s dS kC d  (2)  0 exp /k k RT T  (3) 20 [P ] [H/ O] H k A    (4) 2 /1 1 0 C C ( 1) [P ] [H/ O] a E RTn n s s H n A e         (5) Since sulfur is mainly converted to H2S in the reactor, the hydrogen consumption of the reactor can be calculated by Eq(6). ( )( ) 1/ (1 ) 1/ (1 ) 0 0 0 ( 1) = n n oil s s r s f C C n k H H M t - - - + - + (6) 3. Mathematical Model 3.1 Problem statement In a hydrogen network with NC sources and NK sinks, sink SKq and source SRp are coupled as they are connected by a hydrogen-consuming reactor. Each hydrogen source with given flow rate (FSRi), and hydrogen concentration (CSRi) can be allocated to every hydrogen sink. For each sink, there are the limit on its inlet hydrogen concentration (CSKj) and total inlet flow rate, (FSKj). The objective is to target the hydrogen network with the minimum cost and the optimal operating parameters of the hydrogen-consuming reactor. 3.2 Objective function The objective is to minimize the total annual cost, O, which includes both the reactor investment cost and the hydrogen utility cost, as shown by Eq(7) Objective function: Min (O) (7) O a I b hus= ´ + ´ (8) Where b, hus, a and I denote the hydrogen price, hydrogen utility consumption, annualisation factor and total investment cost, respectively. And a is given by Eq(9). In this equation, i is the fractional interest rate per year, and n is the number of years. (1 ) (1 ) 1 n n i i a i      (9) 3.3 The reactor investment cost The space time of reactor is defined by Eq(10). The catalyst is set as loaded within 50 % of the reactor volume in this work. The height and volume of reactor are determined by Eq(11) and Eq(12), respectively. R V F   (10) 16H R (11) 2 V R H  (12) 398 Where H and R, are the height and radius, V, VR, and  are the volume of the reactor, the catalytic bed volume, space time of the reactor, respectively. The reactor cylinder wall thickness is calculated by Eq(13). 15CrMo stainless steel is chosen as the cylinder material. The welded joints coefficient, ϕ, is taken as 1 (double-welded butt joints, 100 % non-destructive testing). From the chemical equipment design manual, allowable stress, [σ]t, is taken as 100 MPa. And the designed thickness is shown by Eq(14). In this equation, C1 and C2 are the negative deviation and the steel corrosion allowance, and are taken as 0.9 mm and 1mm, respectively. 2[ ] c i t c P D P      (13) 2 1d C C C       (14) Where c P and i D denote the pressure and inner diameter of the column, respectively. Based on the chemical containers and equipment handbook, the mass per meter can be calculated by Eq(15). According to Eq(10) - Eq(15), the investment of the reactor can be calculated by Eq(16). 6 7850 ( ) 10G DN         (15) 3 3 3 0.622158 (3321.21 1.9)(166.11 1.9)in D      (16) Where D denotes the material price of reactor cylinder. 3.4 Constraints of the hydrogen network 3.4.1 Hydrogen sink constraints For every sink, the total flowrate and purity of the source matching it should be greater than its requirements, as shown by Eq(17) and Eq(18).  ,i j SKj i F F (17)               , , SK/ii j SR i j j i i F c F c (18) 3.4.2 Hydrogen source constraints The hydrogen in a source can either be supplied to sinks or be sent to the fuel gas. The total amount of gas supplied to the sinks should not be larger than that available from the source, i.e.  , ii j SR j F F (19) 3.4.3 Coupled stream constraints A pair of coupled sink and source streams, SKq and SRp, are connected by a hydrogen-consuming reactor, and their hydrogen content satisfies the mass balance shown by Eq(20).   ,i q q p pr SK SK SR SR H F C F C (20) For the hydrogen-consuming reactor, the inlet hydrogen, which is the coupled sink, is not affected by the reactor operating parameters, and its flowrate and concentration are generally constant. The coupled source is separated from the outlet stream of the reactor. Generally, its concentration is not affected by the reactor's operating parameters, as the separator can accommodate the variation of the inlet feed stream. However, its flowrate change along the reactor's operation parameters, and can be calculated by Eq(21)   p p ,i q q SK SK r SR SR F C H F C (21) 3.4.4 Reactor constraints To satisfy the requirement on the product composition, there is the limitation on the maximum allowable sulfur content of the reactor effluent. To obtain the proper product, there is the limitation on the minimum hydrogen consumption. With P denotes the minimum hydrogen consumption, this constraint is shown by Eq(22). ( )( ) 1/ (1 ) 1/ (1 ) 0 0 0 ( 1) n n oil s s s f C C n k H P M t - - - + - + ³ (22) 4. Case study In a refinery of China, there are 9 sources (SR3 is hydrogen utility) and 10 sinks, as shown in Table 1. By the hydrogen surplus method, the minimum hydrogen utility flow rate is identified to be 131.71 mol/s. For this system, the hydrogen sink constraints and hydrogen source constraints can be determined according to Eqs(17), (18), (19). Based on the flowchart of the system, it is identified that the hydrogen sink, SK2, and 399 hydrogen source, SR9, is coupled. They are connected by the catalytic cracking diesel oil reactor with 0.8 million annual processing ability. So the coupled streams constraint is shown by Eq(23), and the hydrogen source SR9 also accords with the hydrogen source constraints. Table 1: Data of current hydrogen system network Sources Purity, % Flow rate, mol/s Sinks Purity, % Flow rate, mol/s SR1 99.99 56.80 SK1 91.33 318.09 SR2 93.61 320.36 SK2 90.80 124.96 SR3 90.80 371.45 SK3 90.80 33.52 SR4 86.63 4.54 SK4 90.00 102.24 SR5 84.91 1,204.19 SK5 89.06 0.23 SR6 84.19 456.68 SK6 84.91 1,136.02 SR7 83.95 45.44 SK7 84.19 454.41 SR8 72.11 942.90 SK8 83.31 51.12 SR9 50.02 12.50 SK9 80.00 45.44 SK10 72.11 908.82 2 2 9 9 SK SK r SR SR F C H F C - = (23) For this reactor, when the temperature, pressure, the hydrogen to oil ratio are set as 643.15 K, 10 MPa and 1,000, respectively, the reaction kinetics is shown by Eq(24) 0.373 0.373 0 0.06665 s s C C      (24) Besides, the sulfur content in feedstock is 28,300 μg/g, the density of crude is 0.9260 g/cm3, and the flowrate of crude is 91.32 t/h. According to Eq(22), the reactor constraint is determined, as shown by Eq(25).    1/0.373 4 0.373 0 0 0 7.9271 10 0.06665 r s s H C C H P          (25) To satisfy requirement on the sulfur content of product, 30.772 μg/g, P is set as 112.41 mol/s. The objective function and all constraints are programmed in GAMs software, and the model is solved by MINOS solver. The results shows that the optimal space time in the reactor is 3.852 h, the hydrogen utility is 141.832 mol/s, and the annual cost is 63.77 million dollars per year. For the case, the optimal space time and corresponding annual cost is illustrated in Figure 1. The relation between annual cost and space time is almost linear. Furthermore, the variation of HUS and total cost along the Hr can be identified by this method, and are shown by Figure 2 and Figure 3, respectively. Figure 2 shows that increasing the hydrogen consumption of the reactor will result in the hydrogen utility consumption increases linearly. However, the relationship between the total cost and Hr is not linear; the growth rate increases as Hr increases, as shown by Figure 3. Therefore, lower hydrogen consumption is a better choice. 63 63.5 64 64.5 65 65.5 66 0 2 4 6 8 10 O /( $ /y ) /(h) 141.78 141.8 141.82 141.84 141.86 141.88 112.38 112.4 112.42 112.44 /(mol/s) r H H u s /( m o l/ s ) Figure 1: annual cost versus  diagram Figure 2: hydrogen utility versus Hr diagram According to Eqs(3) and (4), Eq(26) can be obtained. This equation shows that the reaction rate constant, k, refers the impact of temperature, pressure and hydrogen to oil ratio. Therefore, these parameters can be optimised simultaneously. So the reaction constraint is transformed to Eq(27). In addition, the boundary of k and τ are added, which are declared by Eq(27) and Eq(28), respectively. 2 / k ( 1) [P ] [H/ O] a E RT H n A e      (26)    1/0.373 4 0.373 0 0 7.9271 10 s s C C k P        (27) 400 0.001 0.4k  (28) 0.1 2  (29) With the objective function and all constraints programmed in GAMs software and the model solved by MINOS solver, the optimal space time is identified to be 1.314 h and the optimal k is 0.195. In this case, the hydrogen utility consumption is 141.832 mol/s, and the cost is 62.75 M$/y. 61.6 62.4 63.2 64 64.8 65.6 66.4 112.39 112.41 112.43 112.45 $/y $/y /(mol/s)rH Simultaneous Optimisation Single optimisation O /( $ /y ) 62.72 62.8 62.88 62.96 63.04 0.19 0.24 0.29 O /( $ /y ) k/( ) 1 h  Figure 3: the annual cost versus Hr diagram Figure 4: the annual cost versus k diagram Similar with that shown in Figure 2, the hydrogen network utility monotonically increases along that of the hydrogen consumption in the reactor. The variation trend of cost along Hr is also illustrated in Figure 3. This figure shows that the cost increases with Hr, and the growth rate first decreases and then increases. Besides, the relationship between the optimal space time and the annual cost is similar with Figure 1. The optimal k and annual cost is shown in Figure 4. As the optimal k increases, the annual cost increases slowly and then grows fast, which indicates that a lower k is better. SR1 SR7 SR9 SR2 SR6 SK1 318.09 (91.3) SK2 124.96 (90.8) SK4 102.24 (90.0) SK3 33.52 (90.8) 56.80 (99.99) 320.36 (93.61) 456.68 (84.19) 2.067 (50.02) 45.44 (83.95) SR3 141.873 (90.80) SR4 4.54 (86.63) SR5 1204.19 (84.91) SR8 942.90 (72.11) SK5 0.23 (89.06) SK6 1136.02 (84.91) SK8 51.12 (83.31) SK7 454.41 (84.19) SK9 45.44 (80.00) 28.540 222.154 SK10 908.82 (72.11) 28.260 60.4300.09514.90822.773 18.965 18.645 11.891 16.391 0.033 75.556 0.392 4.540 76.905 54.936 6.655 57.523 0.034 493.595 453.952 32.674 7.710 20.208 443.261 13.419 0.068 7.820 29.731 7.820 50.751 4.676 7.652 879.821 0.066 0.066 0.066 0.066 0.066 0.066 0.352 0.347 0.971 10.433 To the fuel gas system Figure 5: the optimal hydrogen distribution network for when the product sulfur content is limited to 4.66 μg/g For single optimisation and simultaneous optimization, the variation of costs are shown in Table 2. The results show that the simultaneous optimization is better than single optimization. When the hydrogen consumption is 112.43 mol/s, the cost decreases by 3.81 % to 63.01 M$. By this model, the hydrogen distribution network with the minimum cost can also be identified. That for the sulfur content of 4.66 μg/g is shown in Figure 5. 5. Conclusion This paper proposed a new mathematical programming model for the simultaneous optimization of the hydrogen network and the hydrogen-consuming reactor. This model can be applied to identify the minimum 401 annual cost which includes the investment cost for the reactor and the operation cost for the hydrogen utility, as well as, to determine the optimal space time, temperature, hydrogen pressure and the rate of the hydrogen to oil. The hydrogen network and the catalytic cracking diesel oil reactor of an refinery are optimized by the proposed model. When the hydrogen consumption of the reactor is set as 112.41 mol/s, the optimal space time is 3.852 h. The results also show that as the hydrogen consumption increases, the hydrogen utility is in nearly linear growth, while the growth rate of total cost increases. In the simultaneous optimization of space time and k, the optimal space time is identified to be 1.314 h and the optimal k is 0.195. The trend of hydrogen utility is similar to that with only space time optimized, while the growth rate of cost decreases first and then increases. Compared with that with only space time optimized, the results of the latter is more economical. When hydrogen consumption is set as 112.43 mol/s, the potential saving of total cost is 3.81 %. Based on the proposed method, multiple reactions/reactors can be considered with the operating parameters of each reactor optimized simultaneously. This will be studied in the future work. Table 2: The comparison between single optimization and simultaneous optimization Maximum sulfur content in product Hydrogen consumption Total cost (106$) Decrement rate (%)  is optimized Both  and k optimized 30.72 112.41 63.77 62.75 1.60 17.27 112.42 64.18 62.77 2.80 4.66 112.43 65.50 63.01 3.81 Acknowledgments Financial supports provided by 973 programs (2012CB720500) and the National Natural Science Foundation of China (21476180) are gratefully acknowledged. References Ahmad M.I., Zhang N., Jobson M., 2010. Modelling and optimisation for design of hydrogen networks for multi- period operation. Journal of Cleaner Production, 18, 889-899. Alves J.J., Towler G.P., 2002, Analysis of refinery hydrogen distribution systems. Industrial & Engineering Chemistry Research, 41, 5759–5769. Deng C., Pan H.M., Lee J.Y., Foo D.C.Y., Feng X., 2014a. Synthesis of hydrogen network with hydrogen header of intermediate purity. International Journal of Hydrogen Energy, 39(1), 3049-3062. Deng C., Pan H.M., Li Y.T., Zhou Y.H., Feng X., 2014b. Comparative analysis of different scenarios for the synthesis of refinery network. Applied Thermal Engineering, 70(2), 11620-1179. Foo D.C.Y., Manan Z.A., 2006. Setting the minimum utility gas flowrate targets Uusing cascade analysis technique. Industrial & Engineering Chemistry Research, 45, 5986-5995. Liao Z., Tu G., Lou J., Jiang B., Wang J. Yang Y., 2016. The influence of purifier models on hydrogen network optimization: Insights from a case study. International Journal of Hydrogen Energy, 41, 5243-5249 Mao J., Liu G., Wang Y., Zhang D., 2015a. Integration of the hydrogen network with the vacuum gas oil hydrocracking reaction. Chemical Engineering Transactions, 45, 85-90. Mao J., Shen R., Wang Y. Liu G., 2015b. An integration method for the refinery hydrogen network with coupling sink and source. International Journal of Hydrogen Energy, 40, 8989-9005. Saw S.Y., Lee L., Ming H.L., Foo D.C.Y., Chew I.M.L., Tan R.R., Klemeš, J.J., 2011. An extended graphical targeting technique for direct reuse/recycle in concentration and property-based resource conservation networks. Clean Technologies & Environmental Policy, 13, 347-357. Umana B., Shoaib A., Zhang N., Smith R., 2014. Integrating hydroprocessors in refinery hydrogen network optimisation. Applied Energy, 133, 169-182. Van den Heever, S.A., Grossmann I.E., 2003. A strategy for the integration of production planning and reactive scheduling in the optimization of a hydrogen supply network. Computers & Chemical Engineering, 27, 1813-1839. Vibhor A., Shenoy U.V., 2006. Unified conceptual approach to targeting and design of water and hydrogen networks. AIChE Journal, 52, 1071-1082. Zhao Z., Liu G., Feng X., 2006. New Graphical Method for the Integration of Hydrogen Distribution Systems. Industrial & Engineering Chemistry Research, 45, 6512-6517. Zhao Z., Liu G., Feng X., 2007. The integration of the hydrogen distribution system with multiple impurities. Chemical Engineering Research and Design, 85, 1295-1304. Zhou L., Liao Z.W., Wang J.D., Jiang B., Yang Y.R., Hui D., 2013. Optimal design of sustainable hydrogen networks. International Journal of Hydrogen Energy, 38(7), 2937-2950. 402