Network management through mathematical modeling can be applied to an existing fixed topology, or to develop a new hydrogen network design. Thus, the approach of this article is based on the evaluation of the model developed for initial hydrogen network projects, through the validation with networks presented in articles already published. New equipment is considered, and the problem then becomes MILP or MINLP. Although the focus is operational, the problem addressed here is broader and has a significant industrial interest. The primary purpose of managing hydrogen networks is their production with minimum slack. Excess hydrogen production must be minimized, first because hydrogen is not easy to handle or store, and second, because it is not economically viable since the excess must be burned as fuel and furnaces and other processes.
3.1. Problem Statement
The problem to be addressed in this paper can be stated as follows: (i) a set of sources
i ϵ hydrogen sources (
), (ii) a set of consumers j ϵ hydrogen consumers (
), and (iii) a set of purifiers
k ϵ hydrogen purifiers (
), considering the existing purifiers,
, and the new purifiers,
. In the case of nonlinear formulation, there is still a set of compressors
c ϵ hydrogen compressors (
) considering the existing compressors
and new compressors
.
Figure 1 shows the two superstructures considered in this problem for the linear formulation (
Figure 1a) and the nonlinear formulation (
Figure 1b).
For each source, the maximum and minimum flowrate, as well as the hydrogen composition, and the outlet pressure are given. For each consumer, the inlet flowrate demand, pressure, and composition, the outlet purge flow, pressure, and composition are given. For each purifier, the maximum flow capacity, the composition of purified flowrate and purge flowrate, the pressure of purification, and the hydrogen recovery are given. It is also considered a fuel system in which waste streams can be burned and used as fuel to the process. For the existing networks, also given are the existing lines (unit connections), the distance between the units if informed, and the existing compressors (capacity and pressures) and purifiers.
The optimization problem is subject to the material balances and process operating constraints. For the retrofit case, process modifications are allowed to reduce the total operating costs (the objective function), despite the investment costs due to the installation of new pipelines, compressors, and possibly new purifiers.
3.2. Mathematical Model: MILP Formulation
Figure 1a shows the superstructure and all the possible connections among these four units between sources and consumers, sources and purifiers (existing and new ones), as well as flows between consumers and the purifying units for sources
i and consumers
j. The first step for the modeling development is to define which units are involved in the hydrogen network, for instance, which units provide hydrogen, which units consume hydrogen and the existing purifiers, and the potential purifiers that should be considered in the model.
The optimization problem of hydrogen network design in this work can be summarized as follows: the superstructure is formed by a set of sources of hydrogen i, a set of hydrogen consumers j and set of units of hydrogen purification k, account for the existing and new purifiers. The hydrogen sources have their minimum and maximum flow according to their capacity () as well as their hydrogen purity (). The hydrogen-rich stream can be sent to the consumers j (), to purification units k (, or can be sent to the fuel system . The consumer’s units also have their known, and constant input required flows for the process (), as well as its hydrogen purity (), in addition to the outflows () and hydrogen purity (), according to the hydrogen consumption of each specific process. The outlet flows from the consumers can be sent to purification (), can be used as a source for other consumers () or can be sent to the fuel system () to be used as the burning fuel. The purifying units have a known hydrogen recovery ratio (), as well as the maximum inlet flow capacity () and the constant purities of the hydrogen product pure streams () and the composition for the stream of hydrogen not recovered stream . The purified hydrogen stream from the purification can be used as a source for the consumers () who need higher purity or can be referred to the fuel system (), if there is excess. The stream with the unrecovered hydrogen, , has a small hydrogen composition, and it is sent directly to the fuel system. In this work, some considerations were made to simplify the model. The flowrates are considered only a binary mixture of hydrogen and methane. The partial pressure of the hydrogen and the flowrate are constant at the entrance and exit of the consuming units.
3.2.1. Sources
The overall material balance for each source is represented by Equation (1):
where
is the total flow from each source
i,
is the hydrogen flow from the source
i to the consumer
j,
is the flow from the source
i for the purification unit
k, and
is the flow from source
i sent to the fuel system. The available flow rate is limited by the capacity of the hydrogen generating units according to the following inequality constraints:
3.2.2. Consumers
Equation (3) represents the overall material balance in the inlet of consumer units.
where
is the total flow directed to consumers,
is the flow from one consumer
j to another consumer
j′ and
is a flow rate from the purification unit
k for the consumer units
j. The index
j’ which is used for cases where there is a connection between consumers. In this case, as it is not allowed between the same unit,
j′ must be different from
j. The hydrogen balance is then defined by Equation (4):
where
are the volumetric fractions of hydrogen in the respective streams, consumer
j, sources
i, purifiers
k, and purge of the consumer unit
j. Besides, it is possible to calculate how much each consumer unit used hydrogen depending on the chemical process involved.
Equation (5) represents the overall material balance in the outlet of consumer units:
where
is the total flow out of consumers,
is the flow rate from the consumer unit
j for the purification unit
k, and
is the surplus flow of consumers directed to the fuel system.
3.2.3. Purification Units
The purification unit is used, so that process streams are purified, providing hydrogen in a given purity, such as 99.99% in the case of PSA units. The overall material balance in these units is expressed as:
where
the flow rate of the purifying unit
k stream rich in hydrogen routed to burning and
is the hydrogen flowrate not recovered by the purifying unit
k sent to the burner. The hydrogen balance for each purifier is described as follows:
where
is the fraction of hydrogen in the purge stream of purified
k. The total flow entering the purifier is limited by the capacity of the purifying unit.
Given the hydrogen recovery of the purification unit, it is possible to calculate how much hydrogen is sent to the purge stream, i.e., the hydrogen not recovered.
The total flow through the PSA (
) can then be defined as:
3.2.4. Logical Constraints
To consider the capital cost associated with new equipment, it is necessary to use constraint modeling, through logical propositions and disjunctions, so binary variables and logical inequality equations were included in the model with binary parameters. First, through the modeling of disjunctions, a binary variable z is associated with the existence of a particular flow
(e.g.,
,
,
, etc.). If the positive flowrate is greater than or equal to a small value
, e.g.,
, the corresponding binary variable z assumes the value of 1. On the other hand, if the flowrate is lower than
, the binary variable assumes the value of 0.
are the flowrates between the units involved. These conditions are ensured by the following constraints:
A binary variable
is associated with the installation of a compressor for the corresponding flow. For this case three events must hold simultaneously: (i) there is a non-zero flow, i.e.,
z = 1; (ii) there is no compressor previously installed identified by a binary parameter
uc (1 if there is an existing compressor, 0 otherwise); and (iii) there is a pressure difference between the current unit and destination unit that requires a compressor identified by a binary parameter
(1 if the current pressure unit is lower than the destination pressure unit, 0 otherwise).
If any of these three events is false, then there is no need to install a compressor (
= 0), which is ensured by the set of constraints described in the set of Equation (13).
A similar procedure was used to consider the investment cost of piping. A binary variable
is associated to the need of installing a new pipeline if two events hold: (i) there exists a non-zero flow in that connection, i.e.,
= 1; (ii) there is no pipeline previously installed identified by a binary parameter
(1 if there is a line, 0 otherwise).
If any of these two events do not hold, it must be ensured that no pipeline must be installed.
There is also the possibility of installing new purification units. In this case, it is enough that there is any flow entering or leaving this unit. In this case, a binary variable
is associated with the installation of a new purifying unit and the logical constraints can be expressed by:
The same procedure for installing new compressors was also done (constraints in Equations (12) and (13)) if it is necessary to install new compressors on streams involving a new PSA.
3.2.5. Operating Costs
Operating costs include the production of hydrogen, the cost of electricity used in compressors, the operating cost of the purifying units, and the economic value corresponding to the burning gas in the fuel system. The cost of hydrogen production is assumed directly proportional to the flowrate, and it is defined as follows:
where
is the cost of producing hydrogen. The electricity cost of the compressor is directly proportional to the power (
):
where
is the power of the compressor with the flowrate being compressed
is the intensive power estimated from the stream properties (
,
, z), the inlet and outlet pressure, and the compressor efficiency [
11].
where
is the heat capacity,
T is the stream temperature,
η the efficiency of the compressor,
and
are the outlet and inlet pressure, respectively,
and
are the densities at design conditions and standard conditions, respectively,
is the ratio of the heat capacity at constant pressure to that at constant volume. For a given connection, e.g.,
, the corresponding intensive power
is previously calculated as a model parameter. For the complete model, the total electricity cost is calculated by the following Equation (20). The indices
α and
β represents the possible connections involved (
i,j; j,k; k,j; j,j′; i,k; i-waste; j-waste; k-waste):
where
is the electricity cost. It is worth to note that each term is multiplied by the binary parameter
(1 if the pressure ratio is higher than one), for the cases in which the flowrate is not zero, but there is no need for compression. It does not matter if a new compressor is installed or an existing compressor is used, both consumes energy. Equation (20) will compute the energy cost correctly, and it takes into account the electricity used in existing and new compressors.
The cost of purifying unit is proportional to the feed flowrate:
where
is the cost of using the PSA purification units, new and existing ones.
The economy value corresponding to the burning of excess purge flows is corresponding to the cost of hydrogen and methane used as fuel and calculated as:
where
the cost per unit of energy,
is the gas flowrate, and
is the hydrogen composition. Assuming a binary mixture,
represents the methane composition. The parameters
and
are the standard heat of combustion of hydrogen and methane, respectively. For the complete model, taking into account the total contributions, the economic value corresponding to the total cost of fuel is calculated as follows:
The subscript
denotes all units sending streams to the fuel system (
i, j, k). Since it corresponds to a saving cost, this value must be subtracted from the total operating cost. The operating cost parameters assumed in this work are presented in
Table 1. The assumed values were the same used in example 1 [
11], a case study of this work, also chosen based on the reviewed articles.
3.2.6. Investment Costs
The capital cost includes the cost of new compressors (
), new purification units (
) and new pipelines
. Hallale and Liu [
11] describe the cost for the inclusion of new compressors for a particular flowrate, with a fixed cost with a binary variable and a variable cost associated with the flow:
W is calculated by Equation (18) and
is the binary variable associated with the installation of a compressor for the corresponding flow and multiplied the fixed part of the new compressor cost, so it is considered only when the compressor is installed. The complete equation for accounting the new compressor cost is given by Equation (25). The indices
α and
β represents the possible connections involved (
i,j; j,k; k,j; j,j′; i,k; i-waste; j-waste; k-waste).
The cost associated with the installation of new piping is described below, including a fixed part with a binary variable and a variable part dependent on flowrate. For these calculations, it is necessary to inform the distances between the already installed units of design.
With
where
L is the pipe length [m],
c and
d are constants,
is the gas surface velocity (usually 15–30 m/s; assumed an average value of 22.5 m/s in this work), and
D² is the equivalent square diameter [
11]. The binary variable
indicates the need to install the new pipeline. Equation (27) is replaced in Equation (26) in order to express the cost of piping as a function of the flowrate. The equation for the model (total cost of new piping) is represented by Equation (28). The indices α and β represents the possible connections involved (
i,j; j,k; k,j; j,j′
; i,k; i-waste; j-waste; k-waste). Each term is multiplied by
in order to consider only the cost of new piping.
There is also the possibility of installing new purification units. For this case, the cost of a PSA unit (purifier considered in this work) is a linear function of the unit flowrate (variable part) and include binary variable corresponding to the fixed installation cost:
where
and
are constants and
is the inlet flowrate of the PSA unit (MMscfd). The binary variable
is associated with the installation of a new purifying unit. The model equation is described as:
This cost is only considered for new purifying units. The capital cost parameters used in this work are presented in
Table 2. Different coefficients exist for calculating capital costs, including variations in temperature and materials involved. The most frequently used data in the reviewed papers were used, following Hallale and Liu [
11]. The objective is to facilitate the comparison of the results obtained.
3.3. Formulation of the Optimization Problem
Based on all the costs involved in managing the hydrogen network described in the previous section, annual operating and annual capital costs are defined as:
where
is the annualizing factor, and
is the considered operating time of the plant in one year. The annualizing factor is defined by:
where
n is the number of years of interest for the return on investment and
is the interest rate. The Total Annual Cost (
TAC) consists of the summation of the operating and investment cost:
For the retrofit case of existing networks, the economy saving used as economic criteria is calculated as:
where
are the operating cost of the actual and new networks, respectively. The payback time is defined by the ratio of the total investment cost and the economy saving, and the following equation can estimate it.
The MILP model formulated in this work is described by the set of constraints (1, 2, 3–17, 20, 21, 23, 25, 28, and 30—HNS LM (Hydrogen Network Synthesis—Linear Model)). For process optimization, different objective functions can be chosen to be minimized. In this case, operating cost (31) for the retrofit case was chosen. The proposed model has the advantage of being a linear model, for which quite robust solvers can be used. However, the main drawback is that a compressor is associated with each possible connection individually in order to avoid nonlinear material balances to identify the composition of the stream being compressed. For this case, streams cannot be mixed to use the same compressor, and the resulting network may end up with more compressor units than an alternative nonlinear model, in which streams are allowed to mix.
3.4. Mathematical Model: MINLP Formulation
A nonlinear model was also developed. In this model, the compressors are considered as independent units that may be used to connect units that need compression (see
Figure 1b). Different from the other units, the inlet and outlet pressure of each compressor are free variables. The maximum number of compressors to be considered is set in the superstructure modeling, and it is obtained in the model solution previously. In this model, streams are mixed to enter the compressor. Therefore, the hydrogen composition is unknown and must be treated as a variable. Besides, since no compressors are associated with each stream individually, the flowrates are only possible if the current origin pressure is higher than the destination pressure. For a particular flow
with upper bound
, the constraints (37) ensure that flow is only possible for this case (higher pressure to lower pressure):
Despite the possibility of generating networks with fewer compressors, the nonlinearity comes up with a more difficult problem to be solved that is very dependent on the initial guess, as will be discussed later.
In the MINLP model, the superstructure is a bit different from the one presented, as illustrated in
Figure 1b. In this case, the compressor is considered a unit of the network and, therefore, can have the same source (the compressor outlet) and consumer (the compressor inlet) functionality and must be present in the balance equations. The only nonlinearity in this model arises in the hydrogen balance in the inlet of the compressors because there is the merging of flows and, consequently, the product flow/purity. It is necessary to know the inlet composition because the outlet flow with this composition is sent to other units, and the hydrogen balances depend on this value.
The equations that describe the nonlinear model are described below. Equations (1), (3)–(9) of the linear model are replaced by the equations below, as compressors need to be considered in material balances. In sources, in addition to Equation (2), there is Equation (38), which describes the sum of flow rates from sources for consumers, purifiers, compressors (
) and for burning. Hydrogen from the source can be sent to all these units.
For consumers, global and component material balances are made, where
is the flowrate from the compressor to the consumers and
is the flow rate from consumers to compressors. The sum of the flowrate at the entrance of each consumer corresponds to the sum of the flowrate from the source, the purifier, another different consumer, and the compressor.
The same is true for the hydrogen balance, where in addition to flowrates, purities are considered. Here there is the purity of the compressor
.
The sum of the outlet flowrate of each consumer corresponds to the sum of the flowrate that the consumer forwards to the burn (waste), to the purification unit, to another different consumer, and the compressor if necessary.
The global material balance and for hydrogen is also applied for purifiers. The material balance corresponds to the sum of all flowrates at the entrance of the PSA, which include the flowrates from consumers, sources, and compressors. The purification unit, in turn, can send flow to consumers, compressors and can burn the excess (waste), which can be seen in Equation (42). Equation (43) corresponds to the hydrogen balance, considering the flows directed to the purifier and forwarded from the purifier. In addition to these equations, the purified flow rate must not exceed the PSA capacity (Equation (44)), and, through the recovery of the PSA, the flowrates that are sent for burning are obtained (Equation (45)).
where
is the flow rate from compressors to purifier,
is the flow rate from the purifiers to the compressors. Also, as the compressors are like units in the hydrogen network, material balances are made. The sum of the flow that enters the compressors is called
, which consists of the sum of the flows from sources, consumers, and purifiers.
Therefore, any flow that enters the compressor must be directed to the consumers and purifications units. If necessary, some part of the compressor flow that is not used can be sent directly for burning.
It is also necessary to carry out the hydrogen balance in the flows that make up
.
In the same manner as in the MILP model, a binary variable z is associated with each possible flowrate, including the flowrates involving the compressor units, e.g.,
,
,
,
,
, and
. The corresponding constraints are as described by Equation (10). Also, binary variables are associated with new pipelines (Equations (13) and (14)) and for new PSA (Equation (15)). The binary variable
are used to define if the compressor unit is installed assuming the value of 1, 0 otherwise. Differently from the MILP model,
is not defined over a pair of streams; it depends only on the compressor unit.
is associated with the flow of each compressor. Constraints (Equation (49)) is used to establish which compressors are used and their flow rates.
As the pressures vary in the nonlinear model, pressure restrictions must be included, which guarantees the compressor inlet and outlet pressures. They are formulated in the same format as the logical flow restrictions. For a given compressor unit, the inlet pressure is set as lower than the minimum pressure among the pressure of the mixed streams entering the compressor (Equation (50)). The outlet pressure is set as higher than the maximum pressure among the pressure of the streams, leaving the compressor according to the pressure of the stream destination (Equation (51)). It is important to mention that, due to the minimization of the energy cost associated with the compressor in the objective function, which is proportional to the pressure ratio (
), the inlet pressure is set as the minimum stream pressure entering the compressor
c, and the outlet pressure as the maximum stream pressure leaving the compressor
c.
where
and
are the compressor
c inlet and outlet pressures, respectively, the binary variable
is associated with flowrates (i.e.,
) and
is the maximum pressure of the network used to make the constraints (50) and (51) redundant for the corresponding non-existent connection (the corresponding binary is set to zero due to the zero flowrate).
The operating and capital costs are calculated in the same way as in the linear problem, as well as the logical flow restrictions. The cost of hydrogen production is obtained by Equation (17), Equation (52) represents the electricity cost, Equation (53) represents the purification cost, and cost of fuel is represented in Equation (54).
The subscript
denotes all units sending streams to the fuel system (
i, j, k, c). Equation (55) represents the cost of new compressors and Equation (56) the cost of new piping.
The indices α and β represents the possible connections involved (i,j; j,k; k,j; j,j′; i,k; i-waste; j-waste; k-waste; i,c; j,c; k,c; c,j; c,k; c-waste). The MINLP model formulated in this work is described by the set of constraints (1, 2, 11, 14, 15, 16, 17, 37–56). The objective function is described in Equation (31). This MINLP model will be named to facilitate the description of the results by HNS NLM (Hydrogen Network Synthesis—Nonlinear Model).
3.5. Virtual Compressors
The main difference between the MILP model and the MINLP model is how the compressors are treated. In MILP, the compressors are associated with each particular flowrate. In this case, the streams are not mixed. However, in the MINLP, the compressors are treated as independent units, not associated with a flowrate. Then the stream can be mixed to enter the compressor and split leaving the unit. Besides the class of the resulting model (either linear or nonlinear), the linear model may result in a network with more compressors and pipelines than the nonlinear model. Both the linear and the nonlinear formulation are capable of representing the hydrogen network, so what differentiates them is the issue of allowed linearity (which can be improved through this proposed technique), the linear model is simpler to solve, and the global optimum solution is guaranteed.
To overcome a large number of compressor units and further investment cost reduction, a strategy to reduce the use of this equipment was carried out through an algorithm based on non-real streams or virtual compressors, i.e., it is possible to rearrange the streams and compressors if the compressor capacities were not reached. This developed technique is one of the contributions of this work. Through it, the linear model becomes competitive, compared to the nonlinear model, due to its advantages.
There are two cases where it is possible to perform this unit reduction: (Option 1) when there are streams with different composition being compressed and forwarded to the same unit or (Option 2) when streams coming from the same unit are compressed and forwarded to different units, as can be seen in
Figure 2. In other words, it is possible to group streams and use the same compressor, thus decreasing the fixed part of the new compressor capital cost, since the variable part is flow dependent and does not change. It is worth nothing that the fixed cost of piping is also minimized due to the rearrangement of the streams.
For each option, the inlet pressure (in Option 1) and the outlet pressure (in Option 2) must be corrected according to the minimum and maximum pressure of the involved streams, respectively. In that case, the energy cost and the variable part of the investment cost must also be recalculated. It should be noted that using this procedure, the solution is not unique, and the best solution is that with the maximum total cost reduction. Despite eventually unfavorable pressure changes, the number of compressor units can be reduced. Therefore, when this procedure is performed, the investment cost is almost always reduced. In this work, since the number of possible rearrangements is small, this procedure was performed by enumeration.