A New Optimization Strategy to Improve Design of Hydrogen Network Based Formulation of Hydrogen Consumers

This paper describes a shortcut model for formulating hydrogen consumers in hydrogen network based on inlet/outlet flow rate and inlet/outlet hydrogen purity. The formulation procedure is obtained using nonlinear regression of industrial data and represents the relationship between the flow rate and purity of outlet and inlet streams. The proposed model can estimate outlet flow rate and purity of hydrogen by changing inlet flow rate and purity of hydrogen. The shortcut model is used to achieve optimal operation of consumers and it optimizes hydrogen network design.


A New Optimization Strategy to Improve Design of Hydrogen Network Based Formulation of Hydrogen Consumers
Introduction Petroleum refineries consist of many processes with complex reactions involving hydrogen consumption or production.In hydrogen network, there are several hydrogen producers and hydrogen consumers.The outlet streams of hydrogen producers, such as catalytic reforming, off-gases of hydrogen-consuming processes are designated as hydrogen sources.The inlet streams of various hydrogen-consuming processes, such as hydrotreaters and hydrocrackers are defined as hydrogen sinks.In addition, between sinks and sources of hydrogen, for example, recovery units (compressors and purification units), there is a set of equipment that improves the exchange between the suppliers and the consumers.
Hydrogen management is an important practical aspect of refineries.Hydrogen management aims to achieve the optimal allocation of hydrogen resources in order to satisfy the demands of refinery processes.Many methodologies have been developed for refinery hydrogen management, which can be classified into two categories 1 : -Conceptual methods -Mathematical programming approaches based on network superstructures for design.
Conceptual methods, which are based on thermodynamic principles, were applied as graphical approach in the retrofit problem, which minimize utilities 1 .In the conceptual methods, Towler et al. 2 introduced value composite curve for hydrogen network and El-Halwagi and Sprigs 3 later developed source-sink mapping diagram for mass integration.Alves 4 used an analogy to pinch analysis for heat exchanger networks 5 .Later, some other conceptual methods and pinch-based approaches were developed by researchers 6,7,8 .
The synthesis of hydrogen networks based on the concept of mixing potential is discussed in Liao et al. 9 The authors introduced the concept of mixing potential to describe the disturbance resistance ability of each hydrogen-consuming process to large concentration fluctuations.The design of hydrogen networks with multiple contaminants based on the thermodynamic irreversibility of the hydrogen-consuming processes is addressed by Lou et al. 10 The hydrogen utility target is obtained by minimizing the entropy changes of each hydrogen-consuming process.Recently, Zhang et al. 11 proposed a graphical method for targeting the minimum fresh resource consumption of hydrogen networks by considering separation performance of purifiers.The method optimizes both the purity and the flow rates of feed and products for the purifier within feasible operating ranges.
Mathematical programming approaches for design and operation of hydrogen network were first proposed by Hallale et al. 12 They built up a superstructure with compressors and optimized it mathematically to maximize hydrogen recovery in hydrogen network.Later, many other mathematical pro-gramming approaches were developed 13,14,15 .Liu and Zhang 13 takes into account the integration of hydrogen purifiers within the hydrogen distribution network.For each hydrogen purifier to be included in the distribution system, one additional sink and two sources are embedded in the network superstructure.In addition, the influence of the feed proprieties and operating conditions of a hydrogen purifier on the overall network performance is investigated by Liao et al. 16 Zhou et al. 17 presents a mathematical program which incorporates equilibrium constraints (MPECs) for scheduling of hydrogen pipeline network between hydrogen producing and consuming units within a refinery.This developed model not only handles the multi-component and non-ideal nature of the hydrogen pipeline network, but also allows flow reversals and flow transitions inside the pipeline.Later, Lou et al. 18 introduced a framework to optimize hydrogen network of refineries under uncertainty.This framework considers a number of scenarios representing possible future environments.The integration of desulphurization processes within the hydrogen distribution network is addressed by Zhou et al. 19 Deng et al. 20 proposed a superstructure-based mathematical programming model for the synthesis of hydrogen network with intermediate hydrogen header.The comprehensive superstructure incorporates hydrogen utility, internal hydrogen sources and sinks, hydrogen headers, the fuel system, compressors, purifiers, and all feasible interconnections between them.Recently, Wei et al. 21investigated the disturbance resistance ability of hydrogen network with multiple impurities based on Monte Carlo simulation.
In these earlier works, the authors presented an optimal network design and the optimal process operation is not taken into account.A few researchers studied the modelling of purifiers based on the operating variables.For a given purifier, the operating variables usually include feed, product, and residual variables 22 .However, the modelling problem for hydrogen consumer's units are also effective in hydrogen network.Hallale and Liu 12 proposed an approach for the hydrogen consumer by exploiting the heat exchanger network synthesis.The approach identifies sources and sinks of hydrogen for the hydrogen consumer, which are analogous to hot and cold streams in heat exchanger networks.In addition, the sink and source data are determined by the make-up, the purge, and the recycle data.Often in this approach, the flow rate and purity of hydrogen source are assumed to be constant.Also, there is no exact relationship between the source and sink hydrogen for the hydrogen consumer.Wang et al. 23 proposed a mathematical model to determine the optimal hydrogen network.The authors assumed that changes in the hydrogen demand of a hydrogen sink vary with changes in the operational load, such as market demand and raw material.However, the main problem is that, changes in the hydrogen demand relate to other important issues, such as the prices of hydrogen sources, electricity, fuels, and etc.For this purpose, better optimization can be obtained using completive modelling for hydrogen units and more comprehensive objective function for hydrogen network.It is worth noting that none of these researches considers comprehensive model for hydrogen consumer processes.Operating variables play an important role in modelling of hydrogen consumer, such as the purity and flow rate of input and output for consumers.Therefore, the inlet/outlet variables are determined by any changing variable after optimization.
This paper describes a shortcut method, which uses formulation to hydrogen consumer units.This method is stablished on nonlinear regression correlation, which uses industrial operating data of hydrogen unit.

Nonlinear regression correlation
Hydrotreaters and hydrocrackers are the major consumers of hydrogen in a refinery, where hydrogen used in a series of reactions that convert organic sulfur and nitrogen compounds to hydrogen sulfide and ammonia.In addition, hydrogen is applied in a series of reactions that convert heavier oils to diesel fuel and naphtha.All of these reactions increase the products value of refinery.For a given consumer of hydrogen, the operation variables include feed variables, purity of hydrogen variables, the specific gravity of feed, the conversion of the units, pressure, temperature, recycle oil fraction, recycle gas flow, boiling point, density, etc. 24,25 To make a simple and relevant mathematical model for a consumer, which guarantees quick solution without loss of accuracy, nonlinear regression correlations are applied.Only variables of nonlinear regression correlations method, such as inlet/outlet feed variables, inlet/outlet purity of hydrogen variables are involved.The hydrogen consumers model is mainly used to calculate the mass balance around consumers.There are four variables including inlet/ outlet feed and inlet/outlet purity of hydrogen (see Fig. 1).Therefore, nonlinear regression correlations method between inlet/outlet feed and inlet/outlet purity of hydrogen, as written in Eqs. 1 and 2. , where F in,consumer , F out,consumer and Y in,consumer , Y out,consumer represent inlet/outlet feed and inlet/outlet purity of hydrogen to consumer process, respectively.The coefficients of model in Eqs. 1 and 2 can be obtained from actual operating data of consumers.The regression coefficients are obtained using nonlinear least squares estimation problem.More details about evaluation of parameters in nonlinear models by the least squares method 26 can be found in Appendix I.
For modelling the consumers, the following assumptions have been made to avoid complexities in the mathematical model: 1.The model for component mass balance has been considered only for hydrogen and the purity of hydrogen.
2. The outlet feed and purity of hydrogen to consumer process are approximated by the nonlinear expression.
3. There is only one outlet stream for a hydrogen consumer.
Typically, there are three gas streams from high-pressure separator, low-pressure separator and fractional column for a hydrogen consumer 24,25 .However, most of the time, the gas stream from high-pressure separator and fractional column is consumed by the consuming units or the hydrotreaters or hydrocrackers unit.For example, high-pressure separator is used as a recycle flow of the hydrotreaters or hydrocrackers, the makeup stream entering the consumer.Also, low-pressure separator and fractional column is consumed as the makeup stream entering the consumer, product to fractionation or the consuming units.
However, the purpose of this paper is to consider the outlet flow of consumer sent to the fuel system.Due to network conditions, both flows or one of two flows can be sent to the fuel system (high-pressure separator, low-pressure separator).The reason for this assumption is the hydrogen reuse and hydrogen recovery of consumer outflow streams and to obtain exact relationship between the flow rate and purity of outlet and inlet streams of the hydrogen consumer in the optimal hydrogen network structure.

Mathematical model Objective function
The main objective is to minimize the total annual cost (TAC), that is the sum of total operating costs and total capital costs.The cost of a hydrogen utility is assumed to be proportional to its flow rate, and is calculated by 13 : where e hydrogen is the price of hydrogen source, and F HPU is the flow rate for hydrogen producer utility.
The fuel value is obtained by heat value calculation 12 : ) where DH c is the standard heat of combustion, and e fuel is price of fuel system.The pipe installation cost only refers to new pipelines 15 : where u is superficial gas velocity, L is the length of piping and a pipe and b pipe are constants.
Sources are only feed sinks with higher pressures through compressors; hence, the compressors need power to noise pressure 27 : where power represents the power consumption of a compressor, F represents the flow rate of hydrogen and the compressor power cost is represented as 12 : The cost of new compressor is calculated by: where a comp and b comp are constants.
For the objective function given in Eq. ( 3), the following constraints are applicable.

Hydrogen sources constraints
The sources of hydrogen are the streams containing hydrogen, which can be sent to the consumers 12 .The total amount of gas sent to the hydrogen network must equal the amount available from the source: Hydrogen sink constraints The sink constraints are described as follows.
Flowrate balance: Hydrogen balance: where F sin k,,j is the hydrogen demand of sink, y i is the hydrogen purity of sources j and y sin k,,j is the hydrogen purity of sink.

Hydrogen compressor constraints
The constraint on the compressors can be described as follows: The amount of gas fed to the compressor must be equal to the amount leaving it as well its gas purity.

Flowrate balance:
The amount of pure hydrogen entering the compressor must be equal to the amount leaving.Hydrogen balance: The amount of gas fed to compressor must never exceed its maximum capacity.

Capacity limit:
, max, i comp comp F F ≤ ∑ (15)   Hydrogen purifier constraints Purifiers are interception units that upgrade the hydrogen purity of sources.Hydrogen purifiers may receive gas from several sources and produce a product stream and a residue stream which can be sent to other sinks 13 .
The feed stream flow rate and the feed purity are defined as: resid pur resid pur in pur in pur where R is hydrogen recovery which depends on the purifier variables and is expressed by: , in pur in pur prod pur This correlation can be obtained either by theoretical deduction or by experimental study.The theoretical results can be found in the work of Liu and Zhang 13 , while the experimental results are usually provided by the purifier manufacturer.

Case study
In this section, a case study is presented to demonstrate the application and effectiveness of the proposed new methodology.This case study is taken from Sardashti et al. 27 To show the effectiveness of the present work, the hydrogen network is developed with and without the use of the proposed methodology for case study, and the results are compared.The existing hydrogen distribution network used in this study is shown in Fig. 2.
The existing network has the following hydrogen-consuming processes: Kero & Diesel Hydro Treating (KDHT), Heavy Naphta Hydro Treating (HNHT) and Hydrocracker (HC).The hydrogen was supplied by Import, Catalytic Reformer (CCR) and H 2 plant.Three out of four compressors normally work to increase pressure and send the hydrogen into the consumer processes.The process data of sources, sinks, and compressors are listed in Tables 1 -3.
As shown in Fig. 2, the units PSA-I, and PSA-II are the purification systems.Operating parameters of purifiers are listed in Table 4.

Case 1
The objective is to determine the minimum total annual cost of the hydrogen network.The objective function is subjected to the equations and con-  3) -( 21).Case 1 is proposed based on the approach developed by Hallale and Liu 12 .All related equipment is considered, including hydrogen supply devices, hydrogen consumption devices, compressors and purifiers.All possible connections from hydrogen producers to consumers are also considered.Case 1 is optimized using NLP model, and the optimal flow rates and purities for the hydrogen network are shown in Fig. 3.The costs of electricity, fuel, and hydrogen are assumed 0.08 $ kW h -1 , 0.004 $ MJ -1 and 0.08 $ m -3 , respectively.Annual operating hours are 8200 h and the annual interest percentage is 0.5.The cost parameters a pipe and b pipe are 3.2 and 11.42, respectively.Fig. 3 represents the result of the optimal flow rates and purities for the hydrogen network.The op-timal stream H 2 plant and CCR plant are 36300 N m 3 h -1 and 43800 N m 3 h -1 , respectively.The optimization results of Case 1 are summarized in Tables 6-8.It shows that for Case 1 the obtained total annual cost is 12 % less than that of the existing network.

Case 2
The results of optimization of Case 2 are shown in Fig. 4.This case, which is comprised of Eqs. ( 1) - (21), is solved at the condition of minimum total annual cost.In this strategy, the obtained model for each consumer is considered.Case 2 is optimized using NLP model, and the results of comparison with the existing case and Case 1 are summarized in Tables 6 -8.
There are three consumers of the hydrogen plant (HP, KDHT and HNHT): LP OFF GAS stream and HP OFF GAS stream is produced by HC unit and LP OFF GAS stream is produced by KDHT and HNHT units.LP OFF GAS streams from consumers is mixed during the operating periods and sent to fuel system.In this optimization method, numerous sets of operation details, inlet/outlet feed and inlet/outlet purity of hydrogen experimental data, have been used in formulation of hydrogen consumer units.The data for 1 month of the refinery were used for validation of Eqs. ( 1) and ( 2) to obtain model parameters.The regression coefficients are given in Table 5.The actual outlet hydrogen of each consumer and outlet hydrogen purity under different inlet hydrogen and inlet hydrogen purity can be obtained from the refinery, from which the relationship between outlet hydrogen and outlet hydrogen purity with inlet hydrogen and inlet hydrogen purity can be deduced, as shown in Table 5.All the relationships are nonlinear, as indicated by the standard deviation and the residual of each consumer, which is very small, is shown in Table 5. Optimal amount of CCR plant and hydrogen plant are obtained at 48000 and 33900 N m 3 h -1 , respectively.The total annual cost is 40.896M$ y -1 .The results are illustrated in Tables 6-8.
Case (1): This case is a hydrogen optimization problem, which has not been used in the consumer shortcut model.The flow rates and purities for the existing hydrogen network are optimized.The optimal hydrogen network is shown in Fig. 3.This net-  work has two streams, which are sent to consumers (KDHT and HNHT) by compressor C1.The optimized network has less hydrogen sources and uses more network off-gas streams compared to the existing network.LP OFF GAS stream has been sent to compressor C2 and also HP OFF GAS stream has been sent to PSA II purifier.Further information can be found in Tables 6 to 8. Case (2): In this case, the model is modified by consumer shortcut model in order to evaluate the hydrogen network structures efficiently.The goal is to find the optimal hydrogen network, optimal flow rates and purities of consumers.In this case, LP OFF-GAS and HP OFF-GAS have been changed in order to compare the results with the obtained results in Case 1.
Three important privileges of Case 2 with respect to Case 1: The total annual cost of Case 2 is 40.896M$ y -1 , which is less than the minimum obtained cost in Case 1 (decreased by about 8 %).The hydrogen network structure of Case 2 is close to real network and more optimal than Case 1, because for refinery, it is impossible to send two streams from compressor C1 to consumers (KDHT and HNHT).The outlet pressure of C1 is 19800 kPa and inlet pressures of consumers are 5500 kPa.Hence, refinery enforces the use of pressure relief, and it is unreasonable, uneconomical and costly to work in such conditions.
By comparing Case 2 with Case 1, it can be found that the outlet hydrogen flow rate and purity of HP OFF-GAS are increased to 10400 and 85 %, respectively.Outlet hydrogen purity of LP OFF-GAS is increased from 65 % to 68 %.

Conclusion
The increasing demand for hydrogen, the upgrading of heavy crude to more valuable products, and the market for heavy crude oils requires the use of units for hydrocracking which have made the consumer processes a key solution for refinery hydrogen management.In hydrogen networks, the consumers play a decisive role in optimal process.To achieve better performance of consumers, a shortcut model has been proposed to tackle the problem.Shortcut model parameters are obtained using nonlinear regression of industrial data and are established based on the relationship between the flow rate and purity of outlet and inlet streams of consumers.Results of the proposed model have been presented and compared for the hydrogen network.Savings of 3.467 M$ y -1 could be achieved without addition of new equipment to the plant and just by using optimal process.This methodology achieves not only optimal design for the hydrogen network, but also optimal process.

Appendix I
The shortcut model for the hydrogen consumers involves mass balance around consumers and evaluation of the model coefficients by the least squares method.The least squares method consists of minimization of errors between the industrial data and the predicted model.
The problem under consideration is to adjust parameters a j of the mathematical model f (x i , a i ), which is nonlinear in x i the adjusted X i experimental data coordinate, and nonlinear in the M parameters a j according to experimental data According to the least squares principle for the 'best' parameter estimate, the sum S must be minimal: a is the calculated value with the model equation and current values of the parameters a j using the experimental value of X i .The parameters a j are components of the column vector a: Here, the main idea is to minimize the total sum squared errors, which is carried out by GAMS solver.

F i g . 2 -Ta b l e 3 -
Existing refinery hydrogen network27 Ta b l e 1 -Hydrogen sources data for case study27 Hydrogen sinks data for case study27 Sinks Flow rate (N m 3 h -1 ) Purity (%) Pressure (kPa)

Ta b l e 4 -
Purifiers data for case study27

FeedF i g . 3 -
Optimum network design for Case 1

F i g . 4 -1 a 2 a 1 '
Optimum network design for Case 2 Ta b l e 5 -Data for model parameters Consumer a s are the standard deviations or their estimates).

s
is the standard deviation of the residual R i .

N
o m e n c l a t u r e C -Cost, $ C p -Heat capacity at constant pressure, J kg -1 K -1 D -Pipe diameter, m F -Flow rate, m 3 h -1 p -Pressure, kPa R -Hydrogen recovery ratio, -T -Temperature, K UP, LO -Upper and lower bounds of flow rate can be sent to new equipment, m 3 h -1 y -Hydrogen purity, % G r e e k l e t t e r s DH c -Heat of combustion, J m -3 e -Cost of hydrogen, $ m -3 g -Ratio of heat capacity at constant pressure to that at constant volume,r -Density, kg m -3 h -Compressor efficiency, -S u b s c r i p t s i -Sources j -Sinks