Integration of Hydrogen Systems in Petroleum Refinery

Considering the importance of hydrogen in crude oil refining, it is necessary to ensure its most efficient use to satisfy refinery hydrogen requirements. Effective hydrogen management provides maximum utilization of hydrogen. The mass balance of streams containing hydrogen plays a key role in addressing the hydrogen-network optimization problem. The purpose of this work was to analyze the refinery hydrogen network, composed of hydrogen sources and sinks. Mass integration principles and techniques have been applied in the optimization of the refinery hydrogen network. The methodology of hydrogen network integration is presented in a case study of a local petroleum refinery. The main objectives are to provide different solutions for reducing the amount of hydrogen not properly used in the local refinery and which is mostly sent to the fuel system, as well as the operating costs. Hydrogen pinch analysis is applied for targeting the minimum hydrogen consumption of the hydrogen system. A superstructure-based mathematical model of the hydrogen network is developed to minimize the total operating costs. The non-linear programming optimization problem is solved by using optimization software GAMS. An additional hydrogen purification unit is introduced in the existing hydrogen network and the effect on the overall network is investigated. Network design with two hydrogen purification units has proved to be an optimal solution, with respect to the chosen objective function. These analyses and their results can assist the refinery to reduce and improve the efficiency of hydrogen management. The analyses covered only the existing equipment without additional investment.


Introduction
Strict requirements for limiting emissions of greenhouse gases and other pollutants are reflected in the petroleum refining industry.The quality and price of crude oil are an additional aggravating factor for refineries because high-sulfur crude oil predominates on the world market.The mass fraction of sulfur compounds in motor fuels is determined by Directive 2009/30/EC1 on fuel quality and is limited to 10 ppm.The presence of non-hydrocarbon compounds in petroleum (0.31 % m/m -5.13 % m/m) 2 significantly affects the crude oil processing.
The organic compounds of sulfur, nitrogen, oxygen, and aromatics concentrated in the fractions of heavier crude oil, represent a technological problem because the poisoned catalyst and sulfur are corrosive.
Therefore, hydro-treating processes are of great importance, especially in terms of improving the quality of the intermediates and final products, and in regard to the protection of the catalyst and process equipment.Trends of processing heavier crudes and higher crude prices create the need for effective and rational hydrogen consumption.It is necessary to analyze the hydrogen network distribution, and ensure the maximum utilization of hydrogen by system integration.

Hydrogen system in petroleum refinery
Hydrogen management in refineries involves collecting hydrogen from different sources, internal or external, as well as its distribution and use.The oil and product composition have a significant impact as product pattern on overall hydrogen balance.The characteristics of the process, process parameters, and purity of hydrogen are described in numerous books, specialized journals like Hydrocarbon processing, and articles.Highlighted here are several references: two books (Croatian editions) of Cerić and Janović related to oil refining, processes, and products 2,3 , and articles about creating value and increasing efficiency through refinery hydrogen management 4,5,6 .The processes of the hydrogen network system are hydrogen producers, hydrogen consumers, and hydrogen purification unit.Figure 1 gives an overview of the hydrogen network processes.
A significant internal source of hydrogen is through a process of catalytic reforming, which increases the quality of motor gasoline (higher octane number), when catalytic reformer hydrogen is generated by dehydrogenation of alkanes and cycloalkanes into aromatic hydrocarbons.The amount of hydrogen generated by catalytic reforming does not meet refinery needs so that hydrogen should be produced additionally.The process of steam reforming is the most common technology for hydrogen production involving raw materials for preparation, such as natural gas, LPG or light benzene 3 .By this method, hydrogen and partial oxidation may also be obtained from the refinery waste gases.Steam reforming and partial oxidation of hydrogen are obtained by an external source of hydrogen.The hydrogen generated from the mentioned processes is of different purity, and there exist various methods of purification.A good guide to selecting treatment techniques is in Table 1.
Methods of hydrogen purification are listed in the general literature of crude oil refining so they will not be elaborated in this paper.
The hydrogen consumers in crude oil processing are the hydro-treating, hydro-cracking, and isomerization units.A typical installation for the consumption of hydrogen is given in Figure 2.

Integration of the hydrogen network
The high costs of hydrogen production and storage is a motive for the rational management of refinery hydrogen and optimization of the operation of existing plants included in the distribution network of hydrogen flows.Sound management of hydrogen flows is achieved by maximum utilization of hydrogen, reducing greenhouse gas emissions due to reduced use of fossil fuels.It has been estimated that for each ton of produced hydrogen, 9-12 tons of CO 2 is released.Process integration methodologies are very effective tools for process optimization.In general, these methodologies can be divided into two categories: the graphical approach based on thermodynamic principles (pinch technology), and mathematical programing approaches based on network superstructure for design.
Shariati et al. 7 has been investigating the different approaches for hydrogen management.Fiedler 8 provides an overview of the methodologies that combine several processes to reduce consumption of resources or emissions to the environment.One of them is the hydrogen pinch analysis for assessing the hydrogen resources on site.The method is based on construction of hydrogen composite curves in terms of stream purity versus flow rate.Hallale and Liu 9 have improved this methodology accounting for pressure, and therefore making the best use of the compressors in the refinery.They applied the mass integration principle to the problem of refinery hydrogen management.Alves and Towler 10 proposed hydrogen pinch analysis for targeting the minimum hydrogen consumption of the entire hydrogen system by using the pinch technique, such as, hydrogen surplus diagram.Very important is the hydrogen consumption analysis, which is stressed by Stratiev et al. 11 A popular and often used graphical method for network integration flows is hydrogen pinch analysis.Nelson and Liu 16 , Liu et al. 17 and the pinch analysis of the Energy Technology Centre (Canada) 18 cover the basic steps of the method, the final result of which is the identification of excess or lack of hydrogen.The graphic method gives a clear insight into the use of hydrogen in the process and any excess hydrogen.The greatest advantage of pinch analysis is its simplicity.However, the pinch analysis does not take into account the limitations present in real processes, such as the pressure limits.Physical flows are feasible only where the output pressure source is higher than the inlet pressure to the hydrogen consumer, otherwise, installation of compressors is required.The solution is to be found in the existing hydrogen system, if there is no intention of installing new compressors.The inability of pressure limit installation in the pinch analysis limits the application of the methods.Therefore, math-ematical methods based on a superstructure are developed, where the results of a pinch analysis are necessary for the graphic image of a solution that is not possible to have in a mathematical programming optimization.The advantage of the mathematical programming method is the possibility of considering a number of constraints and variables when searching for favorable solutions to the optimization problem.This is related primarily to the restrictions of pressure, unit capacity, operating, and investment costs of new equipment and pipelines.Jiao et al. 12,15,19 presented multi-objective optimization and modelling of the refinery hydrogen network with the deterministic optimization approach where MINLP solver is used.The mentioned authors improved the optimization method based on chance constrained programming.Jia 13 , and Jia and Zhang 14 improved hydrogen network optimization by taking into account the multiple component system.The basic steps of the mathematical programming in the integration of network flows are: 1. Superstructure development 2. Formulation of a mathematical model 3. Solving the presented model.
The first step is the development of process alternatives from which to choose the optimal solution.Firstly, identify the sources of hydrogen process units and consumers, and then generate all the possible ways to connect them.A mapping of these options is called superstructure (eng.Sink-source mapping diagram), Zhou et al. 20 In the development of the superstructure, the output current processing units are examined as potential sources of hydrogen for other units.The hydrogen purification units are considered to be consumers of lower purity hydrogen and high-purity hydrogen sources.Compressors are a special group considered as a single unit in which there is no change in hydrogen purity.However, they are seen as consumers of hydrogen lowpressure streams and sources of high-power hydrogen.
The next step of system integration represents hydrogen mathematical programming formulation optimization model.This is primarily related to the selection and definition of the objective function, which will be optimizing to minimize or maximize, while satisfying the set limits.The objective function can be: -Minimum of total annual cost (Zhou et al. 20 , Liao et al. 21) -Minimum consumption of fresh hydrogen (Liao et al. 22 ) -Minimum amount of hydrogen sent to the fuel system (Khajehpour et al. 23 ) -Minimum energy required to operate compressor and hydrogen network (Wu et al. 24 ).
The choice of the objective function depends on the model and its limitations.The model of the system is developed by setting up a mass balance for each process unit.The balance of hydrogen is put around the hydrogen branching streams, in places of mixing flows (Mixer) at the entrance of the processing units and separating flows (Splitter).After defining the model limits, it approaches solving the model.Restrictions may relate to the mass and energy balances, technical requirements, environmental requirements, and many others.In general, the optimization problem can be formulated as a linear programming problem, LP, mixed integer linear programming, MILP, nonlinear programming, NLP or mixed integer nonlinear programming, MINLP.If the objective function and constraints can be expressed by linear combinations of variables, it is a linear optimization problem.Otherwise, the optimization problem is nonlinear.There are many optimization software used to solve optimization problems.This work used the software system GAMS (General Algebraic Modeling System) 25 .The software is already built-in with algorithms called solvers 26 , developed to solve the set mathematical problems.
The recent articles by Yang et al. 27,28 improved graphical techniques for optimization and integration of the hydrogen purification system.In this case study, the hydrogen pinch analysis is applied for targeting the minimum hydrogen consumption of the hydrogen system.It developed the superstructure as well as the mathematical model for the optimization of the existing hydrogen network.The objective function is the minimum operating cost of the hydrogen system.

Case study -H 2 network in a local refinery
This work aimed at analyzing and optimizing the hydrogen system of a local refinery.After analyzing the current situation of the hydrogen flow distribution network, the system was integrated by using the pinch analysis, development and superstructure of a mathematical model.

Base case analysis
The distribution network of hydrogen flows in the local refinery consists of one indoor source of hydrogen, one PSA unit for purification of hydrogen streams, and six hydrogen-consuming processing units.Table 2 lists the labels of the units that will be used in the sequel, as well as the processes to which the label relates.
The first step in the analysis of the existing system is to collect data on the hydrogen flows, or setting up the balance flows of hydrogen.For this purpose, analysis of the plant process scheme was conducted, and the data on the required hydrogen flow rates and purity for smooth operation of hydrogen consumer units collected Distribution network of hydrogen flow in the local Oil Refinery is shown in Figure 3.The total flow rates are highlighted, and indicated by a volume fraction of hydrogen in each process stream.
The same data are shown in Table 3.Current consumption of hydrogen in the network is 194.6 Nm 3 h -1 , and the entire amount of hydrogen required is provided from the catalytic reforming plant.Purity of hydrogen production is 67 % vol.Half of the total produced hydrogen-rich electricity flow is sent to units NHT1, NHT3 I LNIS.Almost the same amount is sent to the PSA unit, in order to satisfy the requirements of units NHT2 and GHT for the required purity of hydrogen.The existing solution and all waste gases are sent to the fuel gas system, a total of 146.7 Nm 3 h -1 hydrogen volume fraction of 40.8 %, which is equivalent to 59.85 Nm 3 h -1 of pure hydrogen.
Data processing included a pinch analysis, superstructure development, and development of a mathematical model.Optimization was carried out in order to ensure maximum utilization of hydrogen in the network, with minimal operating costs.It is desirable to reduce the amount of waste gas by sending a certain amount of the waste stream to the PSA unit, if it is possible due to the cost of the network capacity and the hydrogen unit.This primarily refers to waste streams of large flow, thus, the waste stream of hydrogen from isomerization.

Pinch analysis
Pinch analysis is determined by the minimum amount of hydrogen required for the operation of the network flows of hydrogen.Before the calculation, identified are the sources and consumers of hydrogen.Output current processing units are examined as potential sources of hydrogen from other units.Therefore, the distribution network of hydrogen flows consist of 7 hydrogen sources and 6 consumers.In addition to the process streams from cat-alytic reformer and PSA (2 sources), the output and the waste stream processing units (an additional 5 sources) respectively, are taken into account.Beside the fact that the units for the purification of hydrogen are sources of high purity hydrogen, they are observed as consumers of lower hydrogen purity as well.With 5 unit hydro-treater, it makes a total of 6 consumers.Information on sources and consumers are given in Table 5 according to the falling values of hydrogen volume in the process streams.
Profile demand and consumption of hydrogen in the network is obtained by creating a composite curve.
The composite curve points out the areas of excess hydrogen purity of 99.9 %, purity of less than 46 %, and the lack of hydrogen purity of 80.5 %.However, the real insight into the excess hydrogen is obtained by creating diagrams excess.The needs of the processing units of hydrogen consumers are met, and an excess of hydrogen is present in a concentration range of 46-80 vol.%.Since the present excess hydrogen purity is above 67 %, this means that the influence on the flow of the PSA unit, the hydrogen does not flow from the unit REF.By reducing the flow of excess hydrogen, sources should be reduced to zero.The flow of 99.9 % hydrogen from PSA units has been reduced from the initial 35.8Nm 3 h -1 at 35.0 Nm 3 h -1 .In this way is determined by the pinch area, as well as the flow of the PSA unit in which the network operates without excess and lack of hydrogen.Figure 5 highlights the excess hydrogen in an amount of about Nm 3 h -1 of F i g .

GHT
Flow rate (Nm 3 h -1 • 10 3 ) purity less than 46 %.Mathematical optimization discussed possibilities of purification of waste gas and ensured the maximum utilization of hydrogen in the network.

The superstructure of hydrogen distribution system
Development of optimization model is carried out on the basis of made superstructure.All the possible connections discussed in the network of processing units and hydrogen are shown in Figure 6.The application of the unit for hydrogen can be provided by supplying hydrogen from the plant for catalytic reforming or from PSA unit.As previously stated, each output current processing unit can be a source of hydrogen to another unit.Each waste stream of hydrogen can be sent to the PSA purification unit.

Model development
After creating the superstructure, they start to develop a mathematical model.For the needs of consumers of hydrogen sources the units for the purification of hydrogen are available.
-Sources of hydrogen are set and defined, wherein for each data source day the output flow of current, the output current pressure and the proportion of hydrogen in the stream.
-Hydrogen consumers are defined and set for each process unit defined by the amount of hydrogen required input through a minimal current flow of hydrogen and the minimum required purity hydrogen stream.
-The units for the purification of hydrogen are defined and set and for each unit data is provided on the proportion of hydrogen in the purified stream   and the proportion of hydrogen in the waste stream.
It is also known as output pressure of purified hydrogen-rich stream.Mathematical model of the network flow of hydrogen is developed by placing the balance of flows around each group of units.

Hydrogen sources
Balance of sources of hydrogen makes hydrogen flows from the source to all consumers of hydrogen and hydrogen purification units: whereby the total is FI i flow sources of hydrogen.
As previously noted, the indices i, j and k refer to the collection of sources of hydrogen, hydrogen consumers and collection units for the purification of hydrogen.Identification of FIJ i,j is the flow from the producer to the consumer of hydrogen for hydrogen and FIK i,k , to flow from the producer to the hydrogen unit for hydrogen purification.The output flow of hydrogen source is limited by the capacity of the plant.The limit is formulated by the expression: thus each source of hydrogen is determined by the lower and upper limit of the total current flow of rich hydrogen.

Hydrogen consumers
Balance sheet about hydrogen consumer units can be expressed by the equation: where FJ J means the total input flow in units of hydrogen consumers.Designation FKJ k, j is the flow of the units for the purification of hydrogen to the consumer.Equation 3 is determined by the balance sheet total about consumers of hydrogen.In order to fully define the model around the consumer of hydrogen it is necessary to set the balance of hydrogen: In this YJ j , YI i and YK k indicate the volume fraction of hydrogen in current consumer j hydrogen, hydrogen source, and the units for the purification of hydrogen too.Every consumer of hydrogen has a defined amount of hydrogen required for the smooth operation.Therefore, the introduced constraint which defines the total input current flow, is equal to or greater than the minimum required flow.The upper limit restrictions, the maximum inlet flow to consumers of hydrogen, is defined by the capacity of the unit., , j min j j max , , , , j min j min j j j max j max Hydrogen purifiers On a hydrogen unit for hydrogen purification wastewater load current and hydrogen source are used and re-used.The balance of hydrogen around the unit for treatment can be expressed by the following expression: The left side of the equation 7 consists of waste streams that are sent to the treatment plant.The FJK j, k denotes the current flow of hydrogen to the consumer unit for hydrogen purification, and FIK i,k the current flow from the producer to the hydrogen unit for hydrogen purification.The corresponding volume fractions of hydrogen in waste streams purification are marked as YLP i and YLP j .Distribution of purified hydrogen current consumers expressed the right side of the equation.FKJ k, j denotes the current flow of the units for the purification of hydrogen to the consumer, and YP k denotes volume content in the purified hydrogen stream.Recovery of hydrogen from the waste stream in units for the purification of hydrogen is defined by the so-called recovery factor: ( ) Total inbound flow of waste stream is limited by the capacity of the unit for hydrogen purification.
To simplify the mathematical model the following assumptions were taken: 1.The process stream is a binary mixture of hydrogen and methane.Pollutants present in the currents are not built into the mathematical model.
2. The partial pressure of hydrogen and hydrogen/feed at the entrance of the reactor and process unit consumers of hydrogen are permanent.
3. Recirculating stream of hydrogen for hydrogen units consumers are not taken into account.
Based on the given formulated equation a mathematical model and nonlinear programming will determine the distribution of sources and hydrogen units for the purification of hydrogen to consumers.Also, it will define the distribution of waste gases in the unit for treatment.Variables in solving optimization problems are defined by current flows of hydrogen purity.Optimization is carried out with respect to minimum operating costs of network operation flow of hydrogen.
The objective function is the minimum operating costs of hydrogen.Take into account the cost of production and purification of hydrogen, compression costs and the value of fuel gas: TOC = C production + C purification + C compression -C fuel gas (10)   The cost of each individual member is calculated by multiplying the total current flow and price per unit volume: The costs of compression, if the counted value of the binary logical variables is equal to 1, which is valid when the pressure at the consumer of hydrogen is greater than that at the outlet from a source of hydrogen or a hydrogen purification unit.If waste streams are not sent to a treatment, they are exploited in the fuel gas system.The objective function and the value of electricity are taken into account as energy sources: wherein the FLP is the total amount of fuel gas, consisting of waste streams with a hydrogen source, consumer and scrubbing units.
The optimization problem of network flow of hydrogen is by its nature a problem of nonlinear programming.Optimization is performed at the system GAMS, using solvers CONOPT3 (version 3.14S), according to an algorithm developed by the Rays Consulting and Development, Denmark. 22

Results
Based on the current state of the network of hydrogen in the local refinery shown in Figure 3, optimization was carried out with the aim of improving the operation of the network.Hydrogen network is optimized with maximum utilization of existing equipment, and if necessary network upgrades or modifies, in order to achieve maximum utilization of hydrogen.The following day 3 solutions: Optimized condition of the existing system of hydrogen (without introducing an additional process equipment) By optimizing the existing state, maximum utilization of hydrogen purification ensures a certain amount of waste gas, instead of sending it in a fuel gas system.This applies to the waste stream at the outlet of the isomerization unit, as indicated in Figure 7.In the purification it is sent 89 % of the total amount of waste gas LNIS units, 46.3 Nm 3 h -1 of 51.9 Nm 3 h -1 .The amount that is sent to the purification of the limited capacity of PSA units, in this case is used maximally.Purification and the amount of waste gas has resulted in reduction of the total amount of waste gas.The difference in amounts of fuel gas in an optimized state of the hydrogen system in relation to the current situation is of 28 %.
Ta b l e 6 -The labor cost of units in the hydrogen system 24

2.5
At the expense of purification of waste gas from the isomerization of 14 %, the flow of electricity produced hydrogen rich catalytic reforming decreased.But that could satisfy the requirement of hydrogen purity of 99.9 % at the exit of the unit for treatment, some current flow of hydrogen still provides the REF unit.Optimization confirmed the decision obtained by pinch analysis.The flow of hydrogen-rich stream produced by purification reduced from the initial 35.8Nm 3 h -1 at 35.0 Nm 3 h -1 .Reducing the flow stream rich in hydrogen, the REF and SG units resulted, of course, lowering the cost of production.

Optimized network flows of hydrogen with an extra unit for hydrogen purification (introduction unit PSA2)
Due to capacity limitations of the existing PSA unit, the network is upgraded by introducing additional purification unit, PSA2.In local refinery this unit is already installed, but not operational.Investment costs are therefore minimal and relate to the replacement of individual pieces of equipment.Specifications for additional unit for purifying the hydrogen PSA2 are given in Table 7, as well as for the first PSA unit.
When comparing the solutions proposed for construction of the systems of hydrogen, an optimized state of the existing system of hydrogen will be considered as a reference.Increased capacity for hydrogen purification unit by introduction of PSA2 allows the purification of the total amount of waste streams from the unit.The entire amount of waste streams from isomerization is sent to the purification of the PSA unit 1, while the waste flow from REF, NHT 1 and GHT units is sent to the purification of the PSA unit 2. In order to be able to meet the requirement of hydrogen purity from 99.9 % at the exit of PSA purification unit 2, the REF of the unit provides 50.3 Nm 3 h -1 , for a difference of 68.7 Nm 3 h -1 in the previous solution.Reducing the flow of electricity produced in the hydrogen-rich REF unit is 27 %.Fuel gas make up only waste flows from the scrubbing units, which can not be exploited for further purification.
Optimized network flow of hydrogen with only 1 unit for hydrogen purification, PSA2 (unit PSA1 off) We analyzed and the operation of the network in which the hydrogen flows to the PSA unit 1 switches off and all meets the needs of the hydrogen purification when the unit on is only PSA2.The choice of PSA unit 2 makes a better solution as compared to PSA1, with respect to the capacity sufficient for the purposes of purification, all waste electricity, higher value of recovery factors and lower proportion of hydrogen in the waste stream after treatment (Table 7).The solution obtained by optimization is shown in Figure 9.The decision in which the system works exclusively with hydrogen PSA unit 2, has realized further reduce of hydrogen production unit at REF.In relation to the optimized state of the existing system of hydrogen the difference is 20 %, and compared to the performance of the network with 2 PSA units, it is 10.4 %.The amount of waste gas is also lower compared to both solutions, but the significant difference is that the volume fraction of hydrogen in the effluent stream from the PSA2 units is well below 27 %.This achieves a significantly better yield of hydrogen in the network and not in the fuel gas system.The costs of operation of the network with a single PSA unit were higher compared to the network with two PSA units, due to higher cost of compression.

Comparison of the results
Results of analyzed performance of hydrogen systems are compared in tables and graphs.According to the information provided, shown in Figures 10 and 11, can be seen the reduction of the total quantity of hydrogen produced in the catalytic reforming of the hydrogen system embodiments, the present state (solutions 2 and 3), in relation to the optimized state of the existing system of hydrogen (solution 1).
It is expected for the operation of the network with 2 PSA unit to be more cost effective solution, given the better specifications of PSA2 units compared to PSA1 unit.However, the implementation of network flow of hydrogen with two units for the purification of hydrogen proved to be an optimal solution with regard to the selected objective function.The flow of electricity in the amount of 148.6 Nm 3 h -1 with a unit for catalytic reforming is sufficient to meet all of the units for hydrogen.The entire amount of waste gas from the hydrogen consumer unit is sent to the treatment plant.Fuel gas (total of 85.8 Nm 3 h -1 ) makes only waste flows from scrubbing units that can not be exploited for the further purification.The maximum utilization of hydrogen is provided within the network while providing the minimum cost of network operations.

F i g . 1 0 -Comparison of the individual members of the operating costs for all 3 solutions
Flow rate (Nm 3 h -1 • 10 3 )

3.5
The annualized operating costs (Table 8) turned out to be the lowest for the performance of the network flow of hydrogen in which hydrogen in the system introduced additional units for the purification of hydrogen (solution 2).The base of calculation is 300 working days (7,200 hours).By reducing the total amount of fuel gas, carbon dioxide emissions are being reduced.This solution of network performance hydrogen flows in local refinery provided a good integration of hydrogen, from an economic and environmental point of view.

Conclusion
Hydrogen management is very important in oil refineries, primarily for economy and indirectly for environmental protection.Integration of refinery hydrogen system ensured the efficient and rational management of hydrogen and process optimization.In this paper two methodologies: graphical approach based on thermodinamical principes (pinch technology) and mathematical programing approaches based on network superstructure for design are proposed for hydrogen distribution system in local refinery.For the application of the above methodology is made balance of hydrogen flows and its purity.Lack of information about the flow impeded determining the balance of hydrogen flows with high reliability.To determine the balance of hydrogen flows with greater reliability further measurements are needed.The proposed methods are applied to a hydrogen network with seven sources and six sinks and it was shown that satisfactory results can be achieved without a special investment.It should be noted that the existing network there is no external source of fresh hydrogen.
The minimum consumption of hydrogen is determined by pinch analysis.development of a mathematical model based on the superstructure   carried out optimization of the network and minimization of its operational costs.For the hydrogen network optimization is used optimization program system GAMS.The algorithm for solving the optimization problem is defined by selecting solvers CONOPT, suitable for solving problems of nonlinear programming.Analyzed and compared the performance of three hydrogen systems: optimized condition of the existing hydrogen system, optimized conditions with two units for treatment and networks with a single unit for treatment.Due to the given objective function, network design flows of hydrogen with two units for the purification of hydrogen proved to be an optimal solution.Provided is the maximum utilization of hydrogen within the network purifying waste gas processing units, instead of sending it in a fuel gas system.Fuel gas makes up waste flows only from the scrubbing units that can not be exploited for the further purification, a total of 85.8 Nm 3 h -1 .Compared with the existing state of the flow of hydrogen to be sent to a fuel gas system, it has been reduced by approximately 51 %.If compared with the optimized state of the hydrogen system, the difference is 30 %.On account of flue gas, scrubbing reduced production flow on the unit for catalytic reforming.It provides a current flow of hydrogen-rich 148.6 Nm 3 h -1 , which is 24 % less compared to the current situation and 11 % less compared to the optimized state of the hydrogen system.
Base on a case study is shown that the present techniques can be applied to any refinery system with appropiate data.Through reduction of the amount of fuel gas and reduction of electricity production rich in hydrogen unit for catalytic reforming, the pollutant emissions at the refinery are reduced.This has achieved the economic and environmental contribution of integration of hydrogen systems.

C
-commpresion cost of gas mixture, £/Nm 3 C CH 4  -value of CH 4 in the fuel gas, £/Nm 3 C H 2 -value of H 2 in the fuel gas, £/Nm 3 C i -cost of hydrogen production, £/Nm 3 C k -cost hydrogen purification, £/Nm 3 F, V -flowrate, Nm 3 h -1 FI i -flowrate of hydrogen sources, Nm 3 h -1 FIJ i,j -flowrate of hydrogen from sources, to sinks, Nm 3 h -1 FIK i,k -flowrate of hydrogen from sources, to purifiers, Nm 3 h -1 FILP i -waste streams of hydrogen sources, Nm 3 h -1 FJ j -total inlet flow to purifiers, Nm 3 h -1 FJK j,k -flowrate of hydrogen from consumer to purifier, Nm 3 h -1 FJLP j -waste streams of hydrogen from consumers, Nm 3 h -1 FKJ k,j -flow rate of hydrogen from purifiers to consumer, Nm 3 h -1 FKLP k -waste streams of hydrogen from purifiers, Nm 3 h -1 FLP -total flow rate of waste gas, Nm Fig. 1

F i g . 1 -
Processes of hydrogen network systemTa b l e 1 -Characteristics of the hydrogen purifiers

F i g . 2 -
Typical process of hydrogen consumption in a refinery

F i g . 5 -
Excess hydrogen flow diagram Ta b l e 5 -Data of hydrogen stream used for the pinch analysis SOURCES SINKS Units Flowrate, Nm

L i s t o f s y m b o l s
Ta b l e 2 -Process units of hydrogen system in RNS