Introduction

Hydrogen plays an important role as an energy carrier for the sustainable development of societies. Currently, hydrogen is produced by reforming of hydrocarbons such as methane; but this process is associated with environmental pollution. As an alternative method, hydrogen can be produced from primary energy resources such as solar energy using photo-catalysts, and also by water electrolysis. At present, the efficiency of photochemical methods is low and water electrolysis is a promising technology for hydrogen production at small scales [1]. Among various electrolyzer systems, PEM electrolyzer has advantages comparatively due to higher energy efficiency, higher hydrogen production rate, more compact system design, higher purity of produced hydrogen, lower power consumption, possibility of direct hydrogen storage, more safety due to non-corrosive electrolytes and the possibility of integration with fuel cells [2]. The PEM electrolyzer system has several applications. The produced hydrogen by electrolyzer system can be used as fuel in vehicles and also to produce high-value chemicals such as ammonia and to fill a balloon as a lifting gas. The oxygen produced by the PEM electrolyzer system is used in submarines, anaerobic environments, military and space applications [3, 4].

Optimum design of flow field pattern in BP enhances the performance of PEM electrolyzer system. A few designs of flow field for PEM electrolyzer have been proposed with some advantages and disadvantages. The most common arrangements of flow field are spiral and parallel flow fields. In the parallel flow field, the distribution of flow is not uniform, but it has low pressure drop. Spiral flow field is utilized to eliminate the non-uniformity of reactants in parallel flow field. This pattern has longer channel length, while the channel width is constant. The turns in path cause pressure drop throughout the channel. Also, an increase in the length of channel leads to uniform distribution of reactant in flow field [5, 6]. Considering that the geometry of flow field pattern directly affects the distribution of reactant, efficiency, and thermal management, numerical modeling of PEM electrolyzer flow field is important. In this regard, numerical analyses of different flow fields of PEM electrolyzer are studied.

Several models have been proposed for analyzing PEM electrolyzers including zero-dimensional, one-dimensional, two-dimensional and three-dimensional models. Han et al. [7] developed zero-dimensional model of a PEM electrolyzer at the steady-state and non-isothermal condition. This model was developed to investigate the effect of different operating conditions and physical design parameters on the performance of PEM electrolyzer. They considered design parameters including operating temperature, pressure, exchange current density, electrode thickness, membrane thickness and interfacial resistance. Their results reveal that an increase in the exchange current density and temperature and a decrease in pressure, electrode thickness, and membrane thickness improve the performance of PEM electrolyzer. Abdin et al. [8] investigated the performance of PEM electrolyzer based on parameters which are related to the materials of construction and the configuration of its components. Their results show that the efficiency of PEM electrolyzer improves when electrolyzer operates at the higher cell current density due to the better performance of electro-catalysts. Kim et al. [9] developed a one-dimensional dynamic model for high-pressure PEM electrolyzer. They examined the mechanisms of water transfer, gas leakage, volume changes of gas in cathode and anode channels. They found that the system efficiency decreases by increasing pressure and current density because at higher current density, over-potentials increase and the rate of crossover rises that leads to deterioration of the cell performance. Nie et al. [10] applied three-dimensional simulation of flow field at anode channel to examine the distribution of temperature and velocity. They made simplifying assumptions including constant input temperature and uniform input velocity at steady-state condition. Their results indicate that the minimum flow channel velocity occurs at the middle of the channel and the maximum temperature takes place at the center of the channel. Ruiz et al. [11] performed a three-dimensional numerical analysis on a high-temperature PEM electrolyzer and examined the performance of three flow patterns, namely parallel, single serpentine and multi-serpentine. They concluded that multi-serpentine design has better performance in terms of hydrogen production and pressure drop.

Despite the fact that numerous studies have been done on the modeling of PEM electrolyzer cell, a few research has been carried out on the modeling of flow field pattern in BP and they only evaluated the distribution of velocity, temperature and pressure drop at anode side. There is no comprehensive study of flow pattern in PEM electrolyzer to examine the performance of cell in terms of distribution of current density, temperature, pressure drop and produced hydrogen concentration. In this regard, a three-dimensional numerical study was conducted to investigate a new flow field pattern at anode and cathode sides. The new model reveals an accurate and comprehensive information about transport phenomena including mass and heat transfer, electrodes kinetics, and potential fields within the PEM electrolyzer cell.

Physical problem description

Electrolysis is a process in which electricity is applied to dissociate water into hydrogen and oxygen. PEM electrolyzer includes polymer membranes, gas diffusion layers (GDLs), current collectors, flow channels, and catalyst layers (CLs). At anode side, water is decomposed into oxygen, ions, and electrons using a DC voltage which is greater than the thermodynamic voltage. Then, the ions pass through the membrane and combine with electrons at the cathode side that migrate from the external circuit and the evolutionary reaction of hydrogen occurs at the cathode side [7]. The anode and cathode reactions are as follows:

$${\text{H}}_{2} {\text{O}} \to 2{\text{H}}^{ + } + \frac{1}{2}{\text{O}}_{2} + 2{\text{e}}^{ - } \quad \left( {\text{Anode}} \right)$$
(1)
$$2{\text{H}}^{ + } + 2{\text{e}}^{ - } \to {\text{H}}_{2} \quad \left( {\text{Cathode}} \right)$$
(2)

The design of components of a PEM electrolyzer affects its performance and stability. The most important components are BPs. The BPs are expensive and multi-purpose compartments in PEM electrolyzer cell because they conduct and collect current. Also, flow channels are embedded in BPs, and the BPs are considered as mechanical support for MEA. In a PEM electrolyzer, the BPs have the highest mass and volume of cell and usually facilitate heat management in this system. In order to achieve the highest efficiency in the PEM electrolyzer, the optimal design of BPs is required. The arrangement of the flow fields in the BPs should have the following characteristics; proper management of the generated heat in the cell, proper distribution of water at the anode electrode, effective release of the produced gases from the cell surface to output, and uniform distribution of temperature at the cell surface [12]. In this regard, a spiral flow field is presented in this paper. The schematic of PEM electrolyzer with the new flow field is shown in Fig. 1.

Fig. 1
figure 1

Schematic view of new flow field pattern

In the current model, the path of channels is divided into two branches and connected to each other at the end in order to prevent channel obstruction. Spiral paths in the middle of channels are used to reduce the pressure drop. In this flow field, the reactant traverses more paths to reduce the current density in the spiral path before reaching the spiral path. The geometrical and operating parameters for the PEM electrolyzer are listed in Table 1.

Table 1 Geometrical and operating parameters of PEM electrolyzer

Governing equations

In this research, a three-dimensional model is considered for analyzing the new flow field of PEM electrolyzer. The following assumptions are considered in this model:

  1. 1.

    The numerical model is conducted at single-phase and non-isothermal conditions.

  2. 2.

    The flow within the channels is laminar, steady and incompressible.

  3. 3.

    GDLs, CLs, and membrane are uniform and homogeneous.

  4. 4.

    The electrical and ohmic potential losses in the solid sections of GDLs and CLs are ignored due to their high conductivity.

  5. 5.

    No contact resistance at the interfaces between different layers is considered.

  6. 6.

    Gas mixtures are assumed as ideal gas.

It should be noted that the operating temperature and pressure of the electrolyzer are considered 353 K and 1.5 bar, respectively. Water is in vapor phase at this condition, and the concentration of liquid water is negligible. In addition, two-phase flow at the anode side of electrolyzer is more important at high current densities because the amount of generated gas bubbles increases at high current density and if water assumed as liquid, two-phase flow will be appears. In other words, two-phase flow has a significant effect on the performance of cell at high current densities. Given the operating temperature of the model, water transfer from anode side to cathode side takes place mostly in vapor phase and the assumption of a single-phase in this region is reasonable. In order to solve the equations of mass, momentum, energy, and charge conservation based on the aforementioned assumptions, PEM electrolyzer has been modeled in a single domain. The advantage of single-domain model is that the boundary conditions are only specified at the external boundaries, and it is not required to determine the boundary conditions at the interface of different regions. Although this kind of modeling facilitates the solution of equations and improves the accuracy of results, it requires more computational time [13].

Continuity equation

$$\nabla \cdot \left( {\varepsilon \rho \vec{u}} \right) = 0$$
(3)

In the above equation, \(\vec{u}\), ρ, and ε are the velocity, density, and porosity coefficients, respectively.

Momentum equation

$$\nabla \cdot \left( {\varepsilon \rho \vec{u}\vec{u}} \right) = - \varepsilon \nabla p + \nabla \cdot \left( {\varepsilon \mu \nabla \vec{u}} \right) + S_{\text{u}}$$
(4)

where p is pressure, μ is viscosity, and \(S_{\text{u}}\) is the source term of the momentum equation. In porous areas, the apparent velocity is used at the interface between the porous region and the flow channels. Therefore, source term appears in the momentum equation at the porous regions [14].

$$S_{\text{u}} = - \frac{\mu }{K}\varepsilon^{2} \vec{u}$$
(5)

where K is the permeability of the porous regions. It should be noted that in the porous medium the relationship between porosity and permeability is calculated using Carman–Kozeny equation as follows [15]:

$$K = \frac{{d_{\text{f}}^{2} \varepsilon^{3} }}{{180 \left( {1 - \varepsilon } \right)^{2} }}$$
(6)

Species conservation

$$\nabla \cdot \left( {\varepsilon \vec{u}C_{\text{k}} } \right) = \nabla \cdot \left( {D_{\text{k}}^{\text{eff}} \nabla C_{\text{k}} } \right) + S_{\text{k}}$$
(7)

where \(C_{\text{k}}\) and \(D_{\text{k}}^{\text{eff}}\) are molar concentrations of kth species, and effective diffusion coefficient of kth component that is function of temperature and pressure in flow channels as follows [16]:

$$D\left( T \right) = D_{0} \left( {\frac{T}{{T_{0} }}} \right)^{{\frac{3}{2}}} \left( {\frac{{p_{0} }}{p}} \right).$$
(8)

In porous regions of PEM electrolyzer, the diffusion coefficient is corrected using Bruggeman corrective equation which is defined as follows [15]:

$$D_{\text{k}}^{\text{eff}} = \varepsilon^{1.5} D_{\text{k}}$$
(9)

where Dk is diffusion coefficient of species. In Eq. (7), \(S_{\text{k}}\) is source term of specious equation that appears due to electrochemical reactions and it is defined for various specious as follows [11]:

Source term for hydrogen

$$S_{\text{k}} = \frac{{j_{\text{c}} M_{{{\text{H}}_{2} }} }}{2F}\left( {H_{2} } \right)$$
(10)

Source term for oxygen

$$S_{\text{k}} = \frac{{j_{\text{a}} M_{{{\text{O}}_{2} }} }}{4}\left( {O_{2} } \right)$$
(11)

Source term for water

$$S_{\text{k}} = - \frac{{j_{\text{a}} M_{{{\text{H}}_{2} O}} }}{2F}\left( {H_{2} O} \right)$$
(12)

where j, M, and F are current density, molecular mass and Faraday constant, respectively.

Charge equation

$$\nabla \left( {\sigma_{\text{e}}^{\text{eff}} \nabla \varphi_{\text{e}} } \right) + S_{{\varphi_{\text{e}} }} = 0$$
(13)
$$\nabla \left( {\sigma_{\text{s}}^{\text{eff}} \nabla \varphi_{\text{s}} } \right) + S_{{\varphi_{\text{s}} }} = 0$$
(14)

where φe and φs are electrical potential in membrane and solid phase, respectively, \(\sigma_{\text{e}}^{\text{eff}}\) and \(\sigma_{\text{s}}^{\text{eff}}\) are the effective conductivity coefficient of membrane and the effective electrical conductivity coefficient of solid phase which are defined using Eq. (15).

$$\sigma_{\text{k}}^{\text{eff}} = \varepsilon^{1.5} \sigma_{\text{k}} .$$
(15)

The membrane proton conductivity coefficient is a function of temperature and water content as follows [17]:

$$\sigma_{\text{e}} \left( T \right) = 100 \times { \exp }\left[ {1268\left( {\frac{1}{303} - \frac{1}{T}} \right)} \right] \times \left( {0.005139\lambda - 0.00326} \right)$$
(16)

where λ is membrane water content. In the PEM electrolyzer, the membrane is completely considered to be hydrated and water content is in the range of 14–21 [18].

In Eqs. (13) and (14), \(S_{{\varphi_{\text{e}} }}\) is the source term to take into account electrolyte phase flow transfer and \(S_{{\varphi_{\text{s}} }}\) is the source term for solid phase flow transfer which are stated as follows [17]:

$$S_{{\varphi_{\text{e}} }} = - j_{\text{a}} , j_{\text{c}}$$
(17)
$$S_{{\varphi_{\text{s}} }} = j_{\text{a}} , - j_{\text{c}}$$
(18)

The current density at anode and cathode sides is obtained from as follows [15]:

$$j_{\text{c}} = a j_{{0.{\text{c}}}}^{\text{ref}} { \exp }\left( {\frac{{ - \alpha_{\text{c}} }}{RT}F\eta } \right)$$
(19)
$$j_{\text{a}} = a j_{{0.{\text{a}}}}^{\text{ref}} \left( {\frac{{C_{{H_{2} O}} }}{{C_{{H_{{2{\text{O}},{\text{ref}}}} }} }}} \right)^{{\gamma_{\text{a}} }} { \exp }\left( {\frac{{ - \alpha_{\text{a}} }}{RT}F\eta } \right)$$
(20)

where \(\alpha\) is charge transfer coefficient, \(j_{0}^{\text{ref}}\) is exchange current density, and \(\eta\) is activation over-potential which is defined as follows [17]:

$$\eta \left( {x \cdot y} \right) = \varphi_{\text{s}} + \varphi_{\text{e}} + \varphi_{\text{oc}}$$
(21)
$$\varphi_{\text{oc}} = 1.23 - 0.9 \times 10^{ - 3} \left( {T - 298.15} \right)$$
(22)

Energy equation

$$\nabla \cdot \left( {\rho \varepsilon C_{\text{P}} \vec{u}T} \right) = \nabla \cdot \left( {k^{\text{eff}} \nabla T} \right) + S_{\text{e}}$$
(23)

where CP is specific heat capacity and keff is effective thermal conductivity. Also, Se is the source term of energy equation that is calculated as follows [17]:

Anode catalyst layer

$$S_{\text{e}} = j_{\text{a}} \eta_{\text{a}} + \sigma_{\text{s}}^{\text{eff}} \left( {\nabla \varphi_{\text{s}} } \right)^{2} + \sigma_{\text{e}}^{\text{eff}} \left( {\nabla \varphi_{\text{e}} } \right)^{2} - T\frac{{{\text{d}}\varphi_{\text{oc}} }}{{{\text{d}}T}}$$
(24)

Cathode catalyst layer

$$S_{\text{e}} = j_{\text{c}} \eta_{\text{c}} + \sigma_{\text{s}}^{\text{eff}} \left( {\nabla \varphi_{\text{s}} } \right)^{2} + \sigma_{\text{e}}^{\text{eff}} \left( {\nabla \varphi_{\text{e}} } \right)^{2}$$
(25)

Solid phase

$$S_{\text{e}} = \sigma_{\text{s}}^{\text{eff}} \left( {\nabla \varphi_{\text{s}} } \right)^{2}$$
(26)

Membrane

$$S_{\text{e}} = \sigma_{\text{e}}^{\text{eff}} \left( {\nabla \varphi_{\text{e}} } \right)^{2} .$$
(27)

Boundary conditions

The boundary conditions in this model include inlet, outlet, wall, and electrical boundary conditions which are briefly described here.

Inlet boundary condition

The specific mass flow rate is considered as inlet boundary condition to flow channels. The characteristic of this boundary condition is that determination of mass flow rate causes the overall pressure changes in the response of resolving of internal region.

Outlet boundary condition

Outlet pressure is considered as outlet boundary conditions for anode and cathode channels. The relative static pressure at external boundary condition enters as a determinant parameter. An appropriate value for this parameter is necessary to prevent return flow and to minimize convergence problems.

Wall

A non-slip condition is considered for velocity and zero flux is selected for other variables at wall sides of the PEM electrolyzer. Constant temperature or zero flux conditions can be used for channel walls.

Electrical boundary condition

The voltage of current collectors is conventionally considered zero for cathode side, and the voltage is considered close to the Nernst voltage for anode side.

Solution procedure

The governing equations along with boundary conditions are solved using control volume method. The velocity and pressure fields are solved using Simple algorithm. In Navier–Stokes equations, there are velocity variables in different directions as well as pressure variables. The velocity variables are calculated from Navier–Stokes equations in different directions and the pressure is obtained from the continuity equation. However, the pressure variable is implicitly related to the continuity equation, so that the projection methods are used to derive the relationship between pressure and velocity. The discretization of transitional equations is carried out by forward method and the discretization of momentum, specious and energy equations are done by second order forward method. Also, the charge equation is discretized based on first order forward method. Other equations are discretized by central difference method with two-order of magnitude accuracy. An iterative process is used to solve the equations, and this process is continued until convergence accuracy of 10−6 is reached. Figure 2 shows grid independence diagram for the presented model. The horizontal axis represents the number of computational cells and the vertical axis represents the current density. It is concluded that the variation of current density is very small for number of cells more than 786,307. Therefore, the number of computational cells is set at 786,307.

Fig. 2
figure 2

The result of grid independency study at specific voltage of 1.9 V

Results and discussion

In order to verify the numerical modeling of PEM electrolyzer especially in terms of mass transfer phenomena in different regions of PEM electrolyzer, the polarization curve that is obtained in this study is compared with experimental results of Debe et al. [19]. As shown in Fig. 3, there is an acceptable agreement between the results of numerical model and experimental data at low and medium current densities; however, at high current densities, the results of numerical modeling indicate smaller quantities of current density because the generated ohmic heat increases by enhancing current density and it leads to increase in source term of electrical potential in energy equation. Ultimately, the excessive increase in the source term causes the deviation.

Fig. 3
figure 3

Comparison of polarization curve between the present numerical model and experimental data [19]

The distribution of hydrogen concentration in anode channel at specific voltage of 1.9 V is shown in Fig. 4. The obtained results indicate that hydrogen concentration along the channel decreases because pressure drop and water consumption increase. At the channel inlet, more water is available and the diffusion rate of reactant in this region is higher and water quickly reaches to the CLs and more hydrogen is produced by electrolysis. Therefore, the hydrogen concentration is higher at the inlet of channel. Also, at stagnation points where the produced hydrogen and water concentration is low, no electrochemical reaction occurs. Therefore, concentration of hydrogen is close to zero at stagnations point. As illustrated in Fig. 4, stagnation points are observed at the end of the flow field. Maximum concentration of hydrogen at voltage of 1.9 V and operating temperature of 353 K and pressure of 1.5 bar for this new flow field pattern is 2.47 × 10−3 mol m−3.

Fig. 4
figure 4

Hydrogen concentration contour in anode channel at temperature of 353 K and pressure of 1.5 bar and voltage of 1.9 V

In PEM electrolyzer cell, the current density is usually enhanced with more availability of reactant. This means that more local current density reaches where more water is available. The distribution of current density at membrane–catalyst interface at anode side is illustrated in Fig. 5. It is concluded that current density is higher at vertical paths of flow field because the availability of water is more in these routes, and it decreases due to water consumption toward the channel output. Also, shear stress is generated in the rotation points of path which causes more water to reach at the reaction surface and more electrochemical reactions occur. Therefore, the local current density considerably increases at these points. The minimum and maximum of current density for this new flow field pattern at temperature of 353 K and pressure of 1.5 bar for specific voltage of 1.9 V are 8000 and 10,600 A m−2, respectively.

Fig. 5
figure 5

Current density contours at membrane–catalyst interface at anode side at temperature of 353 K and pressure of 1.5 bar at specific voltage of 1.9 V

The amount of pressure drop along spiral flow field path at anode channel for specific voltage of 1.9 V is shown in Fig. 6. The results indicate that the pressure is high at the channel entrance, but the pressure drop occurs along the flow channel path. Pressure drop rises by moving the reactant through the channel due to the friction along the channel path and local drops that are caused by redirection of flow channel. Also, it is concluded that in addition to the vertical and horizontal routes that affect the pressure drop, the presence of a spiral path is the main reason of the pressure drop in channel. The larger pressure drop within the anode channel indicates that more power is required for water electrolysis. The pressure drop in this new flow field pattern at operating temperature of 353 K is about 107 kPa.

Fig. 6
figure 6

Pressure contour at anode channel at temperature of 353 K at specific voltage of 1.9 V

The electrochemical reactions and kinetics of charge transfer in PEM electrolyzer cell depend on distribution of temperature. The electrochemical reactions are accompanied with entropy generation and heat releases due to ohmic resistance that leads to increase of temperature in the cell. In this regard, evaluation of temperature distribution in PEM electrolyzer cell is important. Temperature contours at membrane–catalyst interface at anode side at voltage of 1.9 V and operating pressure of 1.5 bar is illustrated in Fig. 7. It is observed that new flow field pattern has uniform temperature distribution in the range of 372–385 K along the channel path. The results indicate that the temperature at the beginning of the channel is higher because availability of water in this region is larger and more electrochemical reactions occur and it leads to more water dissociation to hydrogen and oxygen. Considering that water electrolysis is an exothermic reaction, the temperature at the channel entrance is higher.

Fig. 7
figure 7

Temperature contour at membrane–catalyst interface at anode side at pressure of 1.5 bar at specific voltage of 1.9 V

Temperature uniformity index is defined to determine the uniformity of temperature distribution in PEM electrolyzer cell as follows:

$$U_{\text{T}} = \frac{{\int_{\text{A}} {\left| {T - T_{\text{avg}} } \right|{\text{d}}A} }}{{\int_{\text{A}} {T_{\text{avg}} {\text{d}}A} }}$$
(28)

where Tavg is average surface temperature, T is surface temperature, and UT is temperature uniformity index that indicates the normalized deviation of temperature on surface from the average temperature. When UT equals to zero, the temperature distribution is fully uniform. The uniformity index at the membrane–catalyst interface at anode side is calculated as 0.02. The results indicate that the proposed flow pattern is acceptable in terms of temperature distribution.

The PEM electrolyzer characteristics are investigated using the polarization curve which shows the voltage of electrolyzer against current density. This curve is the most common tool for describing and comparing the performance of the electrolyzer with other types. As illustrated in Fig. 8, by increasing the voltage from 1.18 to 2 V the current density varies from 0 to 1 A cm−2 at temperature of 353 K and operating pressure of 1.5 bar. The dominant over-potential in the PEM electrolyzer is ohmic over-potential.

Fig. 8
figure 8

Polarization curve at temperature of 353 K and pressure of 1.5 bar

Conclusions

In this study, a single-phase, steady-state and non-isothermal modeling of a PEM electrolyzer is performed. The results of numerical modeling are compared with experimental data to ensure the accuracy of the model. Then, the PEM electrolyzer with spiral flow field has been modeled. The distribution of hydrogen concentration at anode channel, the distribution of current density at membrane-catalyst interface at anode side and the distribution of pressure at anode channel are investigated. The results show that the model has a good uniformity in terms of distribution of current density and temperature. A non-uniformity is observed at 90° bends due to stagnation of water and decrease in velocity. Also, it is found that the concentration of produced hydrogen along the channel’s path decreases due to the decrease in velocity, the increase in pressure drop and water consumption. The maximum amount of current density at operating temperature of 353 K and operating pressure of 1.5 bar for voltage of 1.9 V is about 10,600 A m−2.