1 Introduction

A fuel cell is a device which directly converts the energy in the reactants into electricity. The efficiency of energy conversion-production for the fuel cell is comparatively higher than internal combustion engines because there is no intermediate thermal conversion process similar to the internal combustion engines or gas turbines [1].

The increasing demand for electrical energy has resulted in increased production which in turn has increased harmful emissions, which is the core of the growing concern on the global warming [2]. The pollutants such as carbon dioxide, nitrous oxides, and sulphur dioxide which are produced form combusting hydrocarbon fuels are eliminated in the case of the fuel cells. Also the absence of intermediate mechanical conversion process makes a fuel cell a quiet device [3]. Compared to other types of fuel cells, proton exchange membrane (PEM) fuel cells have several other features such as low corrosion, low weight and compact size, which make them suitable for mobile and stationary applications. The operational temperatures of the PEM fuel cell range between 30 and 100 °C and dynamical response is faster than the solid oxide fuel cell which operates at temperatures over 700 °C [46].

The electrochemical model in [7] of the group of Ballard developers is adopted to develop a novel dynamic model to simulate and predict the transient response of the cell voltages, flow rates of hydrogen and oxygen, temperature of the cell, and temperatures/pressures of the anode and cathode channels under sudden changes in the load current of the PEM fuel cell [811]. The model incorporates the capacitance impact of charge double layer. A dimensional isothermal steady-state model is developed in [12] for the polymer electrolyte fuel cell with Nafion 117 membrane to measure the impact of water transport mechanisms on the performance of the fuel cell. While another attempt is carried in [13] to investigate and determine the conductivity of Nafion 117 membrane as the function of drawn current densities. The model in [1] is developed by [14] in order to produce a time dependent model for the fuel cell. The model has considered the heat transfer between the fuel cell body, gas channels, and cooling water, calculating the condensation and evaporation and modelling the water content, dragged water through membrane, water at the cathode. A non-linear dynamic model in [15] is developed for the PEM fuel cells, using electrochemical-thermodynamic and zero-dimensional fluid mechanics principles. The output voltage of the stack has been modelled based on load current and the fuel cell operating conditions such as temperature, air pressure and partial pressure of oxygen, humidity of the membrane. A non-isothermal one dimensional model of a PEM fuel cell in [16] is developed to investigate and examine the effect of design and operating conditions upon the performance, water management, and thermal response of the PEM fuel cells. In [17], it is proposed a simple dynamic electrical model of a PEM fuel cell by extending the static current–voltage behavior of the model to implicit the impact of the temperature on the performance of the fuel cell. The model performance has been validated using an experimental data of a 500 W commercial PEM fuel cell stack. A dynamic model of a 1.2 kW PEM fuel cells is developed in [18] that can be used for optimal operational strategies development and control design of the fuel cell based power systems. The model parameters are adjusted and validated with a 1.2 kW Ballard fuel cell stack. The proposed model contributes in predicting both steady and transient states under variable loads, also the impact of water flooding and purging hydrogen. A new dynamic model of 20 cells stack is presented in [19] that considers the impact of temperature and the two phases of water (gas and liquid) in the gas diffusion layer which plays significant role in the transporting water and reactants in order to investigate starting up and transient behavior of the model under different conditions of load current, temperature, and coolant flow rate. It is proposed a lumped model for the PEM fuel cells in [20] based on zero dimensional linear equations to determine the impacts of various operating and design parameters such as input temperature, pressure, stoichiometric ratio, thickness of membrane and gas diffusion layer on the performance of the fuel cell. While it is developed a three-dimensional multi-phase fuel cell model in [21] to predict the impacts of operating parameters such as operating pressure and temperature of the fuel cell, relative humidity of reactant gases, and air stoichiometric ratio on the performance of the PEM fuel cells operates under steady-state conditions. A mathematical model of a 750 W PEM fuel cell is developed in [22] to predict the behavior of the fuel cells under steady-state and transient conditions. The dynamics of the charge double layer capacitance, dynamics of anode and cathode channel are all integrated into a single model and the transient responses of the PEM fuel cell model for a resistive load and for short-long operation time are analyzed.

Although many fuel cell models are available in literatures, but most of these models estimate the output voltage of the fuel cell for a particular set of operating conditions and some often for a limited dynamic variations. The proposed model in this paper is a simplified zero-dimensional mathematical model for a self-humidifying 1 kW PEM fuel cell developed by modeling the major electric and thermodynamic variables and parameters. Consideration is given to changing environmental conditions, changes in the dynamical properties of the fluids in the supply-return manifolds and inside the anodes and cathodes of the fuel cell stack, properties such as pressure, temperature and flow rates.

Hence, the proposed model can determine the impact of: load current, changes in the pressure and temperature of the surroundings, stack operating temperature, water vapour across the membrane, relative humidity in the cathodes and anodes and the water content in the electrolyte membrane, thickness of the membrane and the size of membrane active area, and the volume of the cathode and anode up on the performance and output power of the fuel cell stack, the usage of pure oxygen or fresh air is considered as well. Thus, this model could be used by the interested researchers as a generic model and simulation platform of a self-humidifying PEM fuel cell with an output power varying from 50 W to 1 kW, extrapolation to higher powers is also possible.

The mathematical equations are modelled by using Matlab–Simulink tools in order to simulate the operation of the developed model with a commercially available 1 kW horizon PEM fuel cell stack (H-1000) which is used as an experimental device in running the test physically in order to validate and tune the developed model.

2 Irreversible losses of PEM fuel cell

The output power of the fuel cell depends on its current–voltage relationship at any operating point on the polarisation curve. The output voltage of the PEM fuel cell in turn depends on pressure and temperature of the reactants (i.e. fuel and air), mass flow rate of the reactants, and hence their concentrations at the electrodes, which determines the thermodynamic properties of the reactants inside the stack and hence the behaviour and response of the electrochemical reaction. The output voltage of the PEM fuel cell drops as the current is drawn from the fuel cell. The magnitude of output voltage of the fuel cell is less than the open circuit voltage due to three main irreversible losses: activation losses, ohmic losses and concentration losses.

A simplified models of relationships between the activation, ohmic, and concentration losses and the operating temperature, pressure, and concentration of oxygen are presented in various researches [8, 23]. To determine the impact of activation losses on the output voltage of the PEM fuel cell, the empirical electrochemical relationship developed by [8, 24] will be used in this study to determine the impact of temperature, concentration of oxygen, and drawn current upon the activation voltage losses, as presented by (1) and (2).

$$V_{\text{act}} = \zeta_{1} + \zeta_{2} T + \zeta_{3} T\ln (C_{{{\text{O}}_{ 2} }} ) + \zeta_{4} T\ln (I)$$
(1)

where T is the stack temperature in kelvin which is nearly equal to cell temperature; I is the total current drawn from the fuel cell; \(C_{{{\text{O}}_{ 2} }}\) is the concentration of oxygen at the catalyst interface; ζ n is the empirical parametric coefficient based on the experimental data, which may vary from one stack to another or cell to another depends on the geometrical design and the materials used in the construction of the PEM fuel cell [23]. The values of ζ n are determined from the experimental data table developed by [8, 24]

ζ 1 = −0.944 V

ζ 2 = 3.54 × 10−3 V/K

ζ 3 = 80 × 10−5 V/K

ζ 4 = −1.96 × 10−4 V/K

The value of \(C_{{{\text{O}}_{ 2} }}\) in (1) can be determined based on Henry’s Law [25].

$$C_{{{\text{O}}_{ 2} }} = \frac{{P_{{{\text{O}}_{ 2} }} }}{{5.08 \times 10^{6} \exp \left( {\frac{ - 498}{T}} \right)}}$$
(2)

where \(P_{{{\text{O}}_{ 2} }}\) is the pressure of oxygen in the cathode side.

Theoretically, for PEM fuel cell, the flow of electrons is equal to the flow of ions. The electronic resistivity depends on the materials of electrodes and bipolar plates, and it is almost considered to be approximately constant particularly over temperatures range from 50 to 90 °C of PEM fuel cell operation, and hence can be ignored. Ionic resistivity is more complicated and is not constant over operating temperature, because the resistance of the electrolyte to the conduction of ions depends on many factors which include materials characteristics of the membrane, water content and its distribution in the membrane, fuel cell temperature, and drawn current from the fuel cell [24]. Voltage drop due to ohmic losses is defined as the sum of electronic and ionic resistance losses.

$${{V_{\text{ohm}} = - I\left( {R_{\text{ions}} \,+ \,R_{\text{electrons}} } \right)}}$$
(3)

where R ions and R electrons are the ionic and electronic resistivity.

By ignoring electronic resistivity in order to determine the impact of membrane resistivity on the output voltage of the PEM fuel cell, Eq. (3) becomes

$${{V_{\text{ohm}} = \,- \,IR_{\text{ions}} }}$$
(4)

In [24, 26], it is developed an empirical model of ionic resistivity of membrane R ions as a function to the membrane specific resistivity R m, membrane active area A and thickness of membrane l. R m is function to cell temperature, current, membrane active area A, and λ which is semi-empirical variable representing water content in the membrane. The value of R m is not unique which changes from membrane to another based on the membrane dimensions and membrane preparation procedure, even in the same family of Nafion membrane.

$$R_{\text{ions}} = \frac{{R_{\text{m}} l}}{{A_{\text{fc}} }}$$
(5)
$$R_{\text{m}} = \frac{{181.6\left[ {1 + 0.03 \, \left( {\frac{I}{{A_{\text{fc}} }}} \right) + 0.062 \, \left( {\frac{T}{303}} \right)^{2} \left( {\frac{I}{{A_{\text{fc}} }}} \right)^{2.5} } \right]}}{{\left[ {\lambda - 0.634 - 3 \, \left( {\frac{I}{{A_{\text{fc}} }}} \right)} \right]\exp \left[ {4.18 \, \left( {\frac{T - 303}{T}} \right)} \right]}}$$
(6)

where A fc is the membrane active area of the fuel cell; λ is the number of water molecules in the structure of membrane. The value of λ is influenced by the membrane fabrication processes, operation time (i.e. time being in service), cell relative humidity, and the stoichiometric ratio of the supplied gases [24]. Values of λ are determined equal to zero for a dry membrane, 14 for saturated, and 23 for supersaturated membrane [12, 26].

During fuel cell operation, and when current is drawn from it, oxygen and hydrogen are consumed at the electrodes causing a reduction in the concentrations and the pressures of the reactants. Hence, the concentration losses occur as a result of the reduction in the concentration of the reactants at the surface of the electrodes particularly at high current demand. In addition, the failure in maintaining the required mass flow rate of reactants to the electrode interface will lead to drop in the concentrations and consequently causing drop in the cell voltage. The magnitude of change in the concentration of reactants depends on [7, 23, 27]: ① drawn current from the fuel cell; ② how fast the reactants gases can be replenished (flow rate of the reactants); ③ geometrical design of the flow channels; ④ diffusion characteristics of gas diffusion layer and the electrodes; ⑤ efficient recirculation of air around the cathode in order to remove the extra water.

It has been claimed that oxygen starvation occurs when the partial pressure of oxygen falls below a critical level at any location in the air channel of the cathode leading to a rapid drop in the cell voltage, which in severe cases can cause a hot spot, or even burn on the surface of a membrane [28]. The impact of concentration losses upon the output voltages of the hydrogen–oxygen PEM fuel cell when useful current is drawn is determined by [27].

$$V_{\text{con}} = \frac{3RT}{4F}{ \ln }\left( {1 - \frac{i}{{i_{\text{m}} }}} \right)$$
(7)

where R is the universal gas constant (R = 8.31447 kPa m3/kmol K); F is the Faraday’s constant (96485 Coulombs/mol). In case of the fuel cell is supplied with fresh air rather than pure oxygen which is the most common, Eq. (7) can be re-derived to describe the impact of concentration losses upon the output voltage of the hydrogen-air PEM fuel cell when useful current is drawn from it as

$$V_{\text{con}} = \frac{3RT}{4F}\ln \left( {1 - \frac{i}{{i_{\text{m}} }}} \right) - 1.5607\frac{RT}{4F}$$
(8)

The output voltage of the PEM fuel cell is subject to various losses, and could be expressed by

$$V_{\text{fc}} = n\left( {E_{\text{oc}} + V_{\text{act}} + V_{\text{ohm}} + V_{\text{con}} } \right)$$
(9)

where n is the number of cells connected in series in the stack; E OC is the open circuit voltage of the PEM fuel cell. It has been derived previously for a liquid state of water produced by the fuel cell and given by [29].

$$\begin{aligned} E_{\text{oc}} = 1.228 - [0.85 \times 10^{ - 3} (T - 298.15)] + \hfill \\ \, \left[ {4.3086 \times 10^{ - 5} T\ln \left( {P_{{{\text{H}}_{2} }} (P_{{{\text{O}}_{ 2} }} )^{{\frac{1}{2}}} } \right)} \right] \hfill \\ \end{aligned}$$
(10)

3 Mathematical modelling of gases flow in PEM fuel cell

The stack of PEM fuel cells must be operated with other components in order to form an integrated fuel cell power system. These components are mainly divided into four systems as it has been reported by [30]: hydrogen supply system, air supply system, cooling system, humidification system.

In this research, horizon fuel cell stack system (H-1000) is adopted as an experimental prototype, which is designed by the manufacturer to be self-humidified fuel cell stack. Therefore, water will not be added to the streams of supplied hydrogen and air in order to humidify the fuel cells [31]. Hydrogen supply system consists of a tank of pressurised pure hydrogen, inlet flow control valve, outlet purge valve. While air supply system consists of air supply fans, and connection main supply manifolds. Figure 1 shows the mechanical components and flow variables associated with the horizon fuel cells stack system.

Fig. 1
figure 1

Mechanical components and flow variables

A fuel cell stack model can be subdivided into five interacting sub-models: stack voltage model, manifold flow model, anode flow model, cathode flow model, and membrane hydration model. It is assumed that all the gases inside the stack of the fuel cells will behave as an ideal gas; also the properties of gases leaving the specific volume are the same as those inside that volume. The dimensions of the horizon fuel cell stack are relatively small, hence the distances between the supply-return manifolds and anodes–cathodes of the fuel cell are small, therefore it is assumed the impact of heat radiation or conduction between anodes–cathodes and supply-return manifolds are very small and can be ignored. Hence, the temperature of gases in the anodes–cathodes and also along the supply-return manifolds will be uniform and equal to the stack temperature. Moreover, because of the small size of the stack, it is assumed that the flow of gases within any cross sections in the stack has approximately zero flow fractions.

The dynamic behaviour of the PEM fuel cell associated with the variations in temperature and heat dissipation of the stack are noticeably slower than the dynamics associated with the changes in pressures or flow rates of the reactants as reported by [28]. However, this research will focus mainly on the dynamic behaviour of the PEM fuel cell associated with the changes in pressures or flow rates of the reactants, hence the slower dynamics associated with variations of temperature and heat dissipation are assumed to be neglected. Thus, it has been assumed that the average stack temperature and relative humidity inside the cathode and anode are well regulated and maintained for all the stages of modelling, analysis, and control design.

The rate of changes in mass flow inside the stack system are governed by mass conservation principles, while the rate of changes in the pressures are governed by energy conservation principles [28, 32]. Also, the values of the parameters used in our model are either drawn from freely available literature or determined. These values are based on the dimensions and properties of the horizon fuel cell stack system as presented in Appendix 1.

3.1 Air fan flow calculations

The horizon fuel cell stack system is designed to have four fans installed at the exit outlet of the return manifolds of cathodes. The fans are configured as ducted inlet, free outlet, working as suction devices at the outlet of the return manifolds of cathodes. The rotational speed of four axial fans and the frequency of purging for outlet hydrogen valve are controlled by a controller device in order to maintain enough operational pressure at the cathode and anode, and also to provide sufficient flow of air and hydrogen leading to maintain certain level of stack temperature and retaining the continuity of electrochemical reaction [31].

The rotational speed of the fan has significant impact upon the generated air flow and the performance of the fan [33, 34]. The governing equations of pressure rise and flow rate of supply air can be determined based on the pressure-flow performance curve at rated voltage as presented in Fig. 2 for axial fan model (Delta FFB-0912-EHE) used in the horizon fuel cell stack system [35]. Equation (11) determines the relationship between the rise in the pressure and the flow rate of air through the fan.

Fig. 2
figure 2

Pressure-flow performance curve for delta axial fan [35]

$$\Delta P_{\text{f}} = \left\{ \begin{array}{lll} - 6. 0W_{\text{f}} + 1 6. 9 &{ 0} \le W_{\text{f}} \le 1.5 \hfill \\ - 1. 6W_{\text{f}} + 1 0. 3 { }&1. 5 { < }W_{\text{f}} \le 1. 7 5\hfill \\ 7. 5 { }\;&1. 7 5< W_{\text{f}} \le 2.25 \hfill \\ - 4. 0W_{\text{f}} + 1 6. 5 { }&2. 2 5< W_{\text{f}} \le 2. 5\hfill \\ - 1 0. 4 8 4W_{\text{f}} + 32.71 \, &2. 5< W_{\text{f}} \le 3. 1 2\hfill \\ \end{array} \right. \,$$
(11)

where W f is the air flow rate through the fan; ∆P f is the rise in the pressure of air generated by the fan, which represents the velocity (or dynamic) pressure at the fan outlet corresponds to its kinetic energy. Velocity pressure is always positive in the direction of airflow which represents the pressure required to accelerate the air from zero velocity to a certain value. Total pressure of air stream P t is the algebraic sum of the fan static pressure and velocity pressure, as defined by a simplified Bernoulli’s theorem [36].

$$P_{\text{t}} = P_{\text{sf}} + \Delta P_{\text{f}}$$
(12)

In order to get the desired value of air flow rate inside the fuel cell stack, the pressure of supply air to the supply manifolds of cathode will be equivalent to the sum of ambient pressure of air at sea level (101.325 kPa) and ∆P f of axial fans as designed for the horizon fuel cell stack as given below:

$$P_{\text{sm,in,ca}} = 101.325 + \Delta P_{\text{f}}$$
(13)

3.2 Thermodynamic properties of gases flow in PEM fuel cell

In thermodynamics, when the flow system is specified to be in steady-state, hence there will be no change in the properties of the flowing fluid through any section of the entire flow passage. While when the flow system is described to be in steady flow, there will be no change in the mass flow rate through all cross sectional areas of the flow passage, hence the mass flow rate is assumed as a constant, irrespective of changes in direction or elevation of the flow or in the cross sectional area of the flow system [37].

$$W = \rho_{1} A_{1} V_{1} = \rho_{2} A_{2} V_{2} = \ldots = \rho_{x} A_{x} V_{x}$$
(14)

where W is the mass flow rate; ρ is the density; A is the flow area; V is the velocity of the fluid.

Static properties of the fluid represent the properties of the fluid when there is no relative motion between the fluid and the measuring device. High velocity fluid may produce a significant change in the static properties of the fluid. For high velocity flows, if the potential energy of the fluid is negligible; hence the summation of the static enthalpy and kinetic energy represents stagnation enthalpy (h°), which represents the total energy of the flowing fluid per unit mass [38].

The properties of the fluid when its velocity brought to rest (i.e. zero velocity) adiabatically and in isentropic manner are called stagnation properties. During isentropic stagnation process, the kinetic energy of the fluid will be converted to enthalpy, which results an increase in the pressure and temperature of the fluid. If the entropy of the fluid remains constant and the fluid flows with approximately zero fraction, then its enthalpy can be expressed as [37, 38]:

$$h^{\circ} = c_{\text{p}} T^{\circ} = c_{\text{p}} T + \frac{{V^{2} }}{2} = h + \frac{{V^{2} }}{2}$$
(15)
$$c_{\text{p}} = \frac{k}{k - 1}R_{\text{s}}$$
(16)

where c p is the specific heat of the fluid; R s is the specific constant of the fluid. For an ideal gas dh = c pdT, h˚−h = c p(T). With a datum temperature of 0 K, yields with (h = c p T) [37]. For a steady state flow of fluid flowing adiabatically through a flow system with constant passage flow area, where there were no heat or work interactions and no changes in the potential energy or elevation of the fluid, hence the stagnation enthalpy of the fluid remains constant during a steady state flow process (\(h_{1}^{\circ}\) = \(h_{2}^{\circ}\)).

$$h_{1}^{\circ} = h_{1} + \frac{{V_{1}^{2} }}{2} = h_{2} + \frac{{V_{2}^{2} }}{2} = h_{2}^{\circ}$$
(17)

When the flowing fluid is brought to complete stop; then stagnation enthalpy at state 2 will be equal to the fluid static enthalpy at this state as given below:

$$h_{1} + \frac{{V_{1}^{2} }}{2} = h_{2} = h_{2}^{\circ}$$
(18)

The density of the fluid varies as it moves down towards downstream side of the flow system, from the definition of stagnation properties, total temperature (stagnation temperature T°), total pressure (stagnation pressure P°), and total density (stagnation density ρ°) of the fluid at a certain point can be determined as given below [37, 38]:

$$T^{\circ} = T + \frac{{V^{2} }}{{2 \, c_{\text{p}} }}$$
(19)
$$P^{\circ} = P + \frac{{\rho V^{2} }}{2}$$
(20)
$$\rho^{\circ} = \rho \left( {\frac{{T^{\circ} }}{T}} \right)^{{\frac{1}{k - 1}}}$$
(21)
$$\frac{{P^{\circ} }}{P} = \left( {\frac{{T^{\circ} }}{T}} \right)^{{\frac{k}{k - 1}}}$$
(22)

where T, P and ρ are static properties of temperature, pressure and density of the fluid, respectively; T°, P°, and ρ° are the properties of temperature, pressure, and density of the fluid under isentropic stagnation state; k is the constant of specific heats ratio (c p/c v) for air at temperature 15 °C which is equal to 1.4 for dry air and 1.409 for hydrogen; V 2/2c p is the dynamic temperature of the fluid which is equivalent to the temperature rise during such process. For low-speed flows, the static temperature and stagnation temperature are approximately the same [38].

In case of fluid flows through a continuous flow system have a non-consistent passage area such as diffuser or nozzle. Due to high rates of flow through the system, there will be no significant heat transfer between the fluid and the surroundings, and the flow may be considered to be adiabatic. Also if it is assumed that the flow is frictionless with negligible elevation impact, then the flow can be considered to be isentropic. Hence under these conditions, the stagnation enthalpy will remain constant along the flow passage, as presented in (23) [37].

$$h_{1}^{\text{o}} = h_{2}^{\text{o}} = \ldots = h_{x}^{\text{o}} = {\text{Constant}}$$
(23)

The change in the flow area of the nozzle will change the pressure of the fluid and hence flow velocity. If the flow is assumed to be steady and unidirectional, and the gas is assumed to behave in an adiabatic and isentropic manner, hence stagnation enthalpy will remain constant at any point through the nozzle. Then, the velocity of the fluid at any point in the nozzle is determined below [37]:

$$V = \sqrt {2 \, (h^{\text{o}} - h)} = \sqrt {2 \, c_{\text{p}} (T^{\text{o}} - T)}$$
(24)

By substituting (16) and (22) in (24) and rearranging, yields with,

$$V = \sqrt {2 \left( {\frac{k}{k - 1}} \right)R_{\text{s}} T^{\text{o}} \left[ {1 - \left( {\frac{P}{{P^{\text{o}} }}} \right)^{{\frac{k - 1}{k}}} } \right]}$$
(25)

Since the flow of the fluid is assumed to be adiabatic and isotropic, and the stagnation enthalpy remains constant; hence the stagnation temperature and pressure will remain constant as well. Thus velocity of the fluid in (25) can be determined in terms of initial stagnation temperature and pressure. For steady flow flowing through constant passage area with constant temperature, then (14) can be represented as

$$\rho_{1} V_{1} = \rho_{2} V_{2} = \frac{{P_{1} }}{{R_{\text{s}} T}}V_{1} = \frac{{P_{2} }}{{R_{\text{s}} T}}V_{2}$$
(26)
$$P_{1} V_{1} = P_{2} V_{2}$$
(27)

Due to the lack of experimental data and the difficulties to measure the variation of pressures, densities, and temperatures of the flowing reactants in the supply-return manifolds, anodes, and cathodes of the fuel cell stack, gases are assumed to behave as an ideal gas with constant specific heats and zero flow fractions. Moreover, and particularly in the supply-return manifolds of the stack, gases are assumed to subject to the isentropic stagnation state. Equations (19), (20), (21), (25), and (27) will be used to determine the pressure, temperature, and velocity of gas leaving the supply manifold of anode and cathode of the fuel cell stack. While under assumption of steady flow, the mass flow rate of gas entering the supply manifold is assumed to be equal to the mass flow rate of gas leaving it.

3.3 Cathode flow model

The dimensions of the horizon fuel cell stack are relatively small and the distances between the supply-return manifolds and anodes–cathodes of the fuel cells are small as well. Hence, it is assumed that the multiple cathodes in the stack are all lumped as one stack cathode volume, which represents the sum of volumes of each individual cathode’s volume in the stack. And the supply manifold of cathode s m lumps all the volumes of passages and connections between the inlet of air and the cathodes, while return manifold r m lumps all the volumes of passages and connections between the cathodes of the fuel cells and the exit of air of the fuel cell stack.

The flow rate of supplied air to the manifold of cathode W sm,in is equal to W f, while the pressure of supplied air P sm,in is equal to 101.325 + ∆P f as determined in (11) and (13). The temperature of air exit the supply manifold of cathode is assumed to be equal to the temperature of supplied air which is equal to the ambient temperature. While the temperature of air at any cross section in the cathode is assumed to be equal to the exit air of cathode, which is considered to be equal to stack temperature T st.

The rate flow of gas passes through a nozzle is a function of the upstream and downstream pressure of the nozzle. Thus, the mass flow rate of fluid between two volumes can be determined by using linearized nozzle equation given in [30, 32]. Hence, the mass flow rate of air flows between the exit of supply manifold and the cathode is determined as

$$W_{\text{sm,out,ca}} = K_{\text{sm,out,ca}} \left( {P_{\text{sm,out,ca}} - P_{\text{ca,in}} } \right)$$
(28)

where P ca,in is the pressure of air enter the cathode; W sm,out,ca is assumed to be equal to W sm,in,ca under condition of steady flow; K sm,out,ca is the nozzle constant of supply manifold outlet which represents the ratio of mass flow rate of air to the pressure. K sm,out,ca for the horizon fuel cell stack is determined and presented in Appendix 1. The mass of a mixture of gases is equal to the sum of masses of individual components in the mixture [38]. The principle of mass conservation states that the rate of change of fluid mass inside the volume is equal to the net rate of fluid mass flows into the volume. Hence, the rate of change in the mass of air inside the cathode of the fuel cell is determined as below [15].

$$\frac{{\text{d} m_{\text{ca}} }}{{\text{d} t}} = \frac{{\text{d} m_{{{\text{O}}_{ 2} }} }}{{\text{d} t}} + \frac{{\text{d} m_{{{\text{N}}_{ 2} }} }}{{\text{d} t}} + \frac{{\text{d} m_{\text{w,ca}} }}{{\text{d} t}}$$
(29)
$$\frac{{\text{d} m_{{{\text{O}}_{ 2} }} }}{{\text{d} t}} = W_{{{\text{O}}_{ 2} , {\text{in}}}} - W_{{{\text{O}}_{ 2} , {\text{out}}}} - W_{{{\text{O}}_{ 2} , {\text{rct}}}}$$
(30)
$$\frac{{\text{d} m_{{{\text{N}}_{ 2} }} }}{{{\text{d}}t}} = W_{{{\text{N}}_{ 2} , {\text{in}}}} - W_{{{\text{N}}_{ 2} , {\text{out}}}}$$
(31)
$$\frac{{\text{d} m_{\text{w,ca}} }}{{\text{d} t}} = W_{\text{w,gen}} - W_{\text{w,mbr}} - W_{\text{w,out}}$$
(32)

where m ca is the mass of gases inside the cathode; \(m_{{{\text{O}}_{ 2} }}\), \(m_{{{\text{N}}_{ 2} }}\) and m w are mass of oxygen, nitrogen, and water vapour respectively in the cathode; W w,gen is the mass flow of produced water as a result of electrochemical reaction; \(W_{{{\text{O}}_{ 2} , {\text{rct}}}}\) is the mass flow of reacted oxygen in the cathode; W w,mbr is the mass flow of water vapour across the electrolyte membrane. Mass flow rate of air enter the cathode and mass flow rate of air exit the cathode are determined by the equations given below:

$$W_{\text{ca,in}} = W_{{{\text{O}}_{ 2} , {\text{in}}}} + W_{{{\text{N}}_{ 2} , {\text{in}}}}$$
(33)
$$W_{\text{ca,out}} = W_{{{\text{O}}_{ 2} , {\text{out}}}} + W_{{{\text{N}}_{ 2} , {\text{out}}}} + W_{\text{w,out}}$$
(34)

By substituting (30)–(34) in (29) and rearranging, yields with

$$\frac{{\text{d} m_{\text{ca}} }}{{\text{d} t}} = W_{\text{ca,in}} - W_{\text{ca,out}} - W_{{{\text{O}}_{ 2} , {\text{rct}}}} + W_{\text{w,gen}} - W_{\text{w,mbr}}$$
(35)

Using ideal gas law,

$$\frac{{\text{d} P}}{{\text{d} t}} = \frac{RT}{V}\frac{{\frac{{\text{d} m}}{{\text{d} t}}}}{M} = \frac{RT}{V}\frac{W}{M}$$
(36)

where M is the molar mass of gas; W is the mass flow rate of flowing gas.

$$\frac{{{\text{d}}P_{\text{ca}} }}{{{\text{d}}t}} = \frac{{RT_{\text{st}} }}{{V_{\text{ca}} }}\left( {\frac{{W_{\text{ca,in}} }}{{M_{\text{air,in}} }} - \frac{{W_{\text{ca,out}} }}{{M_{\text{ca,out}} }} - \frac{{W_{{{\text{O}}_{ 2} , {\text{rct}}}} }}{{M_{{{\text{O}}_{ 2} }} }} + \frac{{W_{\text{w,gen}} - W_{\text{w,mbr}} }}{{M_{\text{w}} }}} \right)$$
(37)
$$\frac{{{\text{d}}P_{\text{ca}} }}{{{\text{d}}t}} = \frac{{{\text{d}}P_{\text{ca,in}} }}{{{\text{d}}t}} - \frac{{{\text{d}}P_{\text{ca,out}} }}{{{\text{d}}t}} + \frac{{RT_{\text{st}} }}{{V_{\text{ca}} }}\left( {\frac{{W_{\text{w,gen}} - W_{\text{w,mbr}} }}{{M_{\text{w}} }} - \frac{{W_{{{\text{O}}_{ 2 ,} {\text{rct}}}} }}{{M_{{{\text{O}}_{ 2} }} }}} \right)$$
(38)

where M air, \(M_{{{\text{O}}_{ 2} }}\) and M w are the molar mass of air, oxygen and water vapour respectively; V ca is the volume of cathode.

\(W_{{{\text{O}}_{ 2} , {\text{rct}}}}\) and W w,gen are determined by [27]

$$W_{{{\text{O}}_{ 2} , {\text{rct}}}} = M_{{{\text{O}}_{ 2} }} \frac{{nI_{\text{st}} }}{4F}$$
(39)
$$W_{\text{w,gen}} = M_{\text{w}} \frac{{nI_{\text{st}} }}{2F}$$
(40)

where the molar mass of oxygen is 32 × 10−3 kg/mol; the molar mass of water is 18.02 × 10−3 kg/mol; I st is the current drawn from the stack. For steady flow, the rate of change in the mass of flowing fluid through specific area would be zero (i.e. dm/dt = 0), hence dP/dt = 0 [39], then by taking Laplace transform for (30) and rearranging, yields with

$$P_{\text{ca,out}} = P_{\text{ca,in}} + \frac{{RT_{\text{st}} }}{{V_{\text{ca}} }}\left( {\frac{{m_{\text{w,gen}} - m_{\text{w,mbr}} }}{{M_{\text{w}} }} - \frac{{m_{{{\text{O}}_{ 2} , {\text{rct}}}} }}{{M_{{{\text{O}}_{ 2} }} }}} \right)$$
(41)

From (39) and (40), if at any specific second of time, the mass flow rate of reacted oxygen \(W_{{{\text{O}}_{ 2} , {\text{rct}}}}\) and produced water in the cathode are equal to the mass of that component m at that time, which can be substituted in (41) to determine the value of air pressure at the exit of cathode. Since it is assumed that the multiple cathodes in the stack are all lumped as one stack cathode volume, and the flow of air supplied to the cathode is mainly consists of 21 % of oxygen and 79 % of nitrogen Hence, the partial pressure of oxygen in the cathode is assumed to be approximately equal to 21 % of the average sum of input and output air pressure of cathode as determined below.

$$P_{{{\text{O}}_{ 2} }} = 0.21\left( {\frac{{P_{\text{ca,in}} + P_{\text{ca,out}} }}{2}} \right)$$
(42)

3.4 Membrane hydration model

Water content in the membrane and the mass flow rate of water across the membrane are assumed to be uniform over the two sides of membrane, the mass flow rate of water vapour across the membrane is given by [28, 30]

$$W_{\text{w,mbr}} = M_{\text{w}} A_{\text{fc}} n\left( {n_{\text{d}} \frac{i}{F} - D_{\text{w}} \frac{{\varphi_{\text{ca}} - \varphi_{\text{an}} }}{l}} \right)$$
(43)

where i is current density of the fuel cell (i.e. i = I st/A fc); n d is the electro-osmotic drag coefficient which represents the number of water molecules dragged with each proton of hydrogen transported form anode to the cathode side; D w is the diffusion coefficient; φ ca and φ an are the relative humidity in the cathode and anode; l is the thickness of the membrane. The difference in relative humidity between the cathode and anode leads to back diffusion of water molecules from cathode to anode as presented in the second term of (43), and the coefficients D w and n d are function to the membrane water content λ.

In [30], it is reported that the value of water content in the electrolyte membrane varies between 0 and 14 which is equivalent to the relative humidity of 0 %–100 % respectively. The electro-osmotic drag coefficient n d is determined by

$$n_{\text{d}} = 0.0029\lambda^{2} + 0.05\lambda - 3.4 \times 10^{ - 19}$$
(44)

In [24], it is reported that water content in membrane is influenced by the procedure of membrane preparation, age of the membrane (i.e. time in service), relative humidity and membrane water activity, and stoichiometric ratio of the supplies gases. The amount of water content λ is determined in [12, 26] as

$$\lambda = \, \left\{ \begin{array}{ll} 0.043 + 17.81a - 39.85a^{2} + 36. 0a^{3} &{ 0 < }\,a \le 1\hfill \\ \hfill \\ 1 4+ 1. 4 (a - 1 ) &{ 1 < }\,a \le 3\hfill \\ \end{array} \right.$$
(45)
$$a = \frac{{C_{\text{w}} RT}}{{P_{\text{sat}} }}$$
(46)

where a is the water activity in the membrane; C w is the molar concentration of water in the electrolyte membrane; P sat is the water saturation pressure. Since it has been assumed that the temperature and relative humidity are constant, λ m is constant as well and its value will be presumed to be equal to 7.0 which represent the moist status of the membrane. Moreover, the impact of back diffusion of water will be ignored, and (43) can be re-presented as

$$W_{\text{w,mbr}} = \frac{{M_{\text{w}} nn_{\text{d}} }}{F}I_{\text{st}}$$
(47)

3.5 Anode flow model

Since the distances between the supply-return manifolds and anodes–cathodes of the fuel cells are small, it is assumed that multiple anodes are all lumped as one stack anode volume, which represents the sum of volumes of each individual anode’s volume in the stack. And the supply manifold s m of anode lumps all the volumes of passages and connections between hydrogen supply outlet and the anodes, while return manifold r m lumps all the volumes of passages and connections between anode exit outlet and the exit outlet of hydrogen of the stack. It is also assumed that the impact of back diffusion of water molecules from cathode to anode is null. Thus, anode chamber will be occupied by hydrogen gas only.

Mass flow rate between two volumes can be determined via using linearized nozzle equation given in [30, 32], then the mass flow rate of hydrogen at the exit of the supply manifold of anode is determined by

$$W_{\text{sm,out,an}} = K_{\text{sm,out,an}} \left( {P_{\text{sm,out,an}} - P_{\text{an,in}} } \right)$$
(48)

where P an,in is the pressure of hydrogen enter the anode; W sm,out,an is assumed to be equal to W sm,in,an under condition of steady flow; K sm,out,an is the nozzle constant of supply manifold outlet of anode, which represents the ratio of mass flow rate of hydrogen to the pressure, and its value is determined and presented in Appendix 1. The rate of change in the mass of hydrogen inside the anode of the fuel cell is determined as

$$\frac{{{\text{d}}m_{\text{an}} }}{{{\text{d}}t}} = W_{\text{an,in}} - W_{\text{an,out}} - W_{{{\text{H}}_{ 2} , {\text{rct}}}}$$
(49)

where W an,in and W an,out are the mass flow rate of hydrogen entering and leaving the anode; \(W_{{{\text{H}}_{ 2} , {\text{rct}}}}\) is the mass flow of the reacted hydrogen as a result of electrochemical reaction as determined by [27]

$$W_{{{\text{H}}_{ 2} , {\text{rct}}}} = M_{{{\text{H}}_{ 2} }} \frac{{nI_{\text{st}} }}{2F}$$
(50)

where \(M_{{{\text{H}}_{ 2} }}\) is the molar mass of pure hydrogen. For steady flow, the rate of change in mass of flowing hydrogen through any specific area in the anode would be zero (i.e. d\(m_{{{\text{H}}_{ 2} }}\) /dt = 0) [39], then (49) can be represented as

$$W_{\text{an,out}} = W_{\text{an,in}} - W_{{{\text{H}}_{ 2} , {\text{rct}}}}$$
(51)

By substituting (51) in (36), and rearranging, yields with,

$$\frac{{{\text{d}}P_{\text{an,out}} }}{{{\text{d}}t}} = \frac{{{\text{d}}P_{\text{an,in}} }}{{{\text{d}}t}} - \frac{{RT_{\text{st}} }}{{V_{\text{an}} M_{{\text{H} 2}} }}W_{{{\text{H}}_{ 2} , {\text{rct}}}}$$
(52)

Taking Laplace transform for (52), yields with,

$$P_{\text{an,out}} = P_{\text{an,in}} - \frac{{RT_{\text{st}} }}{{V_{\text{an}} M_{\text{H2}} }}m_{{{\text{H}}_{ 2} , {\text{rct}}}}$$
(53)

where V an is the volume of anode.

From (50), if at any specific second of time, the mass flow rate of reacted hydrogen \(W_{{{\text{H}}_{ 2} , {\text{rct}}}}\) in the anode is equal to the mass of that component m at that time, which can be substituted in (53) to determine the value of gas pressure at the exit of the anode. Since it is assumed that the multiple anodes in the stack are all lumped as one stack anode volume. Hence, the pressure of hydrogen in the anode is assumed to be approximately equal to the average sum of input and output anode pressure as determined below.

$$P_{{{\text{H}}_{ 2} }} = \frac{{P_{\text{an,in}} + P_{\text{an,out}} }}{2}$$
(54)

The flow of hydrogen is necessary to maintain a minimum pressure difference between anode and cathode and also providing sufficient hydrogen to the reaction. A purge valve is installed at the exit outlet of return manifold of anode in order to remove the produced water from the cathode and also to reduce the anode pressure if necessary. However, flow rate of hydrogen can be controlled based on the feedback pressure difference between cathode and anode as presented by [40].

The derived and developed equations above are implemented via using Matlab–Simulink tools in order to determine the pressures of hydrogen and oxygen in the anode and cathode respectively, yields with determining the output voltage of the PEM fuel cell stack. And the horizon PEM fuel cell stack is used as a prototype device in running the test physically in the laboratory in order to validate and tune the developed mathematical model with the output results of the test.

4 Initial validation of developed model of PEM fuel cell

The horizon PEM fuel cell stack was tested under standard pressure and 23 °C operating room temperature. The stack was operated for about 25 min under different levels of load current varied between 1 and 17 A in steps of 1 A, with ab approximate holding time of one and a half minutes. One Temperature sensor is installed at the exit outlet of the fan in order to measure the temperature of the stack.

Different values of efficiency (83, 84, 85 and 86 %) are adopted for the developed model in order to find the best tuning value between the tested stack and the developed model. It was found that at various load current, the best value of efficiency for the developed model that enables the model to perform and produce output voltages close to the stack output voltages was at 84 % with 0.78 V average of deviation between the real test output voltages and output voltages of the developed model as shown in Fig. 3.

Fig. 3
figure 3

Output voltages of horizon fuel cell stack and mathematical developed model of PEM fuel cell under various drawn current load

The green line represents the output voltages as given in the data sheet of a 1 kW horizon PEM fuel cell stack, for operating condition defined at sea level and 25 °C room ambient temperature. The blue line represents output voltages of the tested stack for about 25 min continuous operation at 23 °C room temperature under different levels of load current varied between 1 and 17 A in step of 1 A, with an approximate holding time of one and a half minutes. The red line represents output voltages of mathematical developed model based on the adopted operational variables from the real test of the horizon stack, with 84 % model tuning efficiency constant.

It is clear that the performance and output voltages of the mathematical model developed baased on the Horizon fuel cell stack is fairly close to the performance and output voltages of the tested Horizon stack operated under varied levels of load current, which provides initial satisfaction about the validity and accuracy of the proposed developed model in this paper.

Further testing experiments are already carried out in order to enhance the accuracy of the proposed developed model with the changes in the operational variables. The results of the these new running tests and their data analysis will be presented and discussed in a separate journal paper, in order to avoid prolongation.

5 Conclusion

A simplified zero-dimensional mathematical model of PEM fuel cell has been developed based on a 1 kW horizon PEM fuel cell stack by modelling the major electric and thermodynamic variables and parameters involved in the operation of the PEM fuel cell with the association of the influence of the environment and conditions of the fuel cell operation. A 1 kW horizon PEM fuel cell stack has been used as a prototype device in running the test physically in order to validate and tune the developed mathematical model with the output results of the test. Initial test results are presented in this work.