1. Introduction
Polymer electrolyte membrane fuel cells (PEMFCs) play an important role in the transition to climate-neutral mobility, especially for heavy-duty applications. In an electrochemical process, the gaseous fuel hydrogen on the anode side and oxygen on the cathode side react to form water, generating electric energy. The main components of a fuel cell stack are bipolar plates (BPP), usually made of metal or graphite composite, the gas diffusion layer (GDL), and the catalyst-coated membrane (CCM). The GDL consists of the substrate and microporous layer (MPL). The GDL ensures a good oxygen supply from the channel to the reaction layer and helps to remove liquid water. To manufacture the CCM, a proton exchange membrane (PEM) is coated on both sides with a catalyst layer (CL). The reactions take place at the so-called three-phase boundary of reactant gases, where an ion-conducting phase and a catalyst particle are connected to an electron-conducting phase.
Computational fluid dynamic (CFD) methods describing fluid flows, sources, and sinks have become standard tools in the design phase of fuel cell bipolar plates, cf. [
1,
2], which serve to provide a homogeneous distribution of reactant gases and coolant fluid. Design variations for optimisation can be performed in a relatively short time, contributing to a reduction in the overall development costs. More sophisticated models that allow electrochemical processes within PEMFCs to be described are well-documented in the literature [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48]. Such advanced tools can lead to a deeper understanding of fundamental processes within a fuel cell. Typical tasks for these kinds of models include simulating the current density distribution, membrane humidification, and detailed and realistic reactant concentration distributions, including possible locations of starvation and liquid water accumulation. The differences between such detailed 3D PEMFC models for use within CFD software predominantly consist of the modelling depth, e.g., the consideration of liquid water transport phenomena, modelling electrochemical reactions and the membrane, the type of basic CFD software used (open-source or commercial), and whether the model is freely available. One of the first CFD models employing a Tafel-like equation for calculating local current density effects was published by Dutta et al. [
3,
4] in 2000, using ANSYS
® Fluent (version 4.48). Generally, theoretical models that describe the relevant chemistry and physics resemble the equations used in more recent models, including the present one. Nevertheless, the underlying CFD codes are not open source, and numerical stability sometimes hampers practical applications. Readers interested in the historical development of such models are referred to the review of Weber and Newman [
5]. In their review, Kone et al. provided a brief overview of the pioneering and more recently published CFD models, focusing on 3D multiphase flow [
6]. Of course, more extensive and very recent reviews covering such models can be found in the relevant literature, e.g., the review article of Jahnke et al. [
7]. Some of the relevant publications are summarised below and supplemented by the latest publications. Berning et al. [
8,
9] describe a 3D multiphase and multicomponent model for the commercial CFD code CFX (version 4.3, 2002) [
10]. This model is implemented using a set of custom-written user subroutines and accounts for a fully three-dimensional transport mechanism on the anode and cathode sides, as well as a two-phase model that includes phase change. As the model was developed using custom-written user subroutines, it is not available free of charge. Other improved models have been developed for the commercial software ANSYS
® Fluent [
11], as evidenced in the work of Schwarzet al. [
12,
13,
14] (based on [
15]) and Wang et al. (2006, Fluent version 6.0.12) [
16], although these are not yet generally practically usable, because the custom-written code has not been published, e.g., on GitHub. The authors focused on different topics. Schwarz et al. described an improved PEMFC model by implementing a multiple thin-film agglomerate model. This enabled transport mechanisms (diffusion, liquid water, and ionomer) to move through the pore structure of the CL to be modelled. Wang et al. adapted the former models of Wang and co-workers [
17,
18,
19] to include non-isothermal effects. With these additions, their model now captured the interactions between two-phase flow and thermal transport. Mazumder and Cole described a 3D mathematical model of PEM fuel cells for the commercial CFD code CFD-ACE+ [
20,
21]. They considered the effect of liquid water on cell performance. They also explained the challenges involved in modelling two-phase effects within fuel cells. However, this CFD software appears to be discontinued; the latest release was published in 2022 by the ESI Group [
22].
In addition to custom-written user subroutines, most commercial CFD code now offers manufacturer-provided add-on modules for modelling fluid mechanical and electrochemical processes within PEM fuel cells. These models can be directly used (via software licensing) without the need for additional custom-written code. Scholz et al. [
23,
24] developed the most recent version of the PEMFC add-on module for ANSYS
® Fluent. This model enabled a non-isothermal three-dimensional modelling of most of the relevant processes, such as the Butler–Volmer equations, the Springer-based membrane model [
25], and liquid water effects. Windarto and Lim recently published one of the latest articles on the Fluent PEMFC module, in which they conducted a validation using experimental data. A similarly extensive PEMFC model is available in the software AVL FIRE
TM [
27,
28,
29,
30] (versions: n/a, FIRE
® v2014, FIRE
TM M 2020 R1, FIRE
TM M 2023 R2). Regarding performance and steady-state modelling, it provides functionality that is fairly comparable to the Fluent model and, in some aspects, even slightly more extensive. However, the AVL FIRE
TM model has undergone significant development in recent years, incorporating the most relevant degradation effects of PEM fuel cells. These include chemical degradation models for ionomer degradation, carbon corrosion, platinum dissolution, particle detachment and agglomeration, and particle size redistribution. This significantly enhances the value to the model. D’ Adamo et al. [
31,
32] present a numerical model and the associated simulation results, which were obtained using the Siemens Simcenter STAR-CCM+ software (version 2020.2) [
33]. In this model, the electrochemical reaction is modelled at the interface between the electrode and the membrane. The Springel model for the membrane is included, as are multi-phase and non-isothermal effects. Another widely used model in the field of PEM fuel cells is the Fuel Cell and Electrolyzer Module of the versatile COMSOL Multiphysics
® [
34] simulation environment. Several validation studies have been conducted for this model, e.g., the work of Mohanty et al. [
35] (version 5.4) or Mojica et al. [
36], which demonstrated good agreement.
The main disadvantages of these commercial tools are the high licensing costs and the lack of unrestricted user-defined code modification. Open-source CFD codes, such as OpenFOAM [
37,
38], offer advantages in this respect. The source code is completely accessible under the GNU General Public Licence [
37]. An additional plus is the high degree of parallelisation, which is independent of available parallel processor licences. Several toolboxes and models have been published for modelling fuel cells in OpenFOAM. One of the most well-known models is the openFuelCell project [
39,
40,
41] for modelling solid oxide fuel cells (SOFC). This model has been adapted to high-temperature PEMFC [
42] and later to low-temperature PEMFC, published 2023 by Weber et al., for use with OpenFOAM
® v2112 [
43]. The model of Weber et al. describes the electrochemistry by an activation overpotential using a two-dimensional Tafel equation, which is applied only to the cathode side. Liquid water transport in porous media is also considered. The authors of the present paper conducted some simulation tests on this model to evaluate its usability. Unfortunately, the model showed inconsistencies in the mass balance; so, it was not analysed further. In 2023, an improved version of the openFuelCell project was published as openFuelCell2 [
44,
45]. This toolbox was developed to simulate electrochemical devices, such as fuel cells and electrolysis cells. The electrochemical modelling is more advanced than the model by Weber et al. It involves modelling the electronic and proton transport through the relevant parts of the fuel cell. Furthermore, the well-known Springer model is employed to describe water transport through the membrane, while liquid water transport is modelled in porous structures and gas channels. However, the model does not explicitly include a coolant flow field, which directly impacts the thermal management of the fuel cell. An extension of the PEM fuel cell model of openFuelCell2 is described by Bulgarini et al. [
46]. Their implementation takes into account the reduction in catalytic activity due to platinum oxide (PtOx) formation.
Another toolbox for modelling low-temperature PEMFC in OpenFOAM is the work of Kone et al. [
47], published in 2018 for use with OpenFOAM-4.x. This model is also based on the original openFuelCell project. It enables 3D modelling of the fluid (single-phase) and thermal processes of a fuel cell, while the electrochemical reaction is described in 2D. Kone et al. have also published an advanced toolbox that considers liquid water transport [
48]. Compared with the OpenFuellCell2 model, the electrochemical model by Kone et al. is simpler, as it does not explicitly consider the water transport through the membrane. Thus, each of the aforementioned OpenFOAM models has its respective advantages. However, in their present state, none of them completely fulfill the requirements for modelling the relevant physics and chemical reactions of fuel cells and managing numerical stability.
In the following, the new OpenFOAM ZSW PEMFC toolbox developed starting from the Kone model [
47] is presented in detail and compared to the original model. Furthermore, it is validated against experimental performance data obtained using a short stack featuring a design relevant for automotive applications. Additionally, the results are compared to data obtained for the same cell employing the commercial CFD software ANSYS
® Fluent. The Fluent PEMFC module was used as a second simulation model for comparison, as it is a widely used CFD tool in academia and industry. The authors are fully aware that it is just one among several commercially available up-to-date CFD fuel cell models. It was chosen because the authors have it available and are familiar with it. Furthermore, a good database of reference data is accessible to the authors, which could be employed for the study. This does not express a preference for this model over any of the other commercially available models.
4. Conclusions
This paper describes the further development of an existing toolbox for simulating transport and electrochemical processes within LT-PEM fuel cells, using the open-source CFD code OpenFOAM (version OpenFOAM-7.x). Compared to the original model by Kone et al. [
47], the main improvements are a more detailed electrochemical modelling through the implementation of the Butler–Volmer equation on both the anode and cathode sides, a more precise thermal model obtained by adding explicit modelling of the coolant channel, and a more realistic representation of membrane resistance including a correction of the water balance. Furthermore, the user-friendliness has been enhanced by incorporating the OpenFOAM utilities fvOption and postProcessing.
The model was validated using experimental data obtained from a fuel cell stack representative for automotive applications. The OpenFOAM ZSW PEMFC toolbox realistically reproduces the experimentally measured polarisation curves, with only minor deviations at higher current densities. While the model provides a reasonable representation of the current density distribution, minor differences are still evident. Nevertheless, significant improvements and a better consistency with the experimental data were achieved compared to the original toolbox developed by Kone et al. Compared to the PEMFC module of the commercial CFD software ANSYS® Fluent, very similar results were obtained with the new model for the cases considered here.
The original scope of the present work was to analyse and further develop the single-phase model of Kone et al. When further development for this work began, this model was the only available toolbox for simulating LT-PEMFC in OpenFOAM, and it provided a good starting point. To avoid any numerical issues, the liquid phase models were disregarded during the initial development stages. The authors explicitly acknowledge that more advanced models are described in the literature for several aspects (cf.
Section 1). Furthermore, the significant influence of the liquid phase effects on the operation of fuel cells is undeniable. However, the present model aims to combine advanced numerically stable electrochemical modelling of PEM fuel cells with an open-source approach. The aim of this work was to strike a balance between sophisticated modelling and the availability of an open-source code base, while ensuring numerical stability, in order to create a practical and usable performance model for the open-source CFD code OpenFOAM. Nevertheless, the implementation of several more advanced models, such as a 3D representation of the membrane and two-phase modelling, is pending, and the current model does not account for the effect of ageing. Furthermore, the predictability of current density in particular requires further attention. A comparison with the openFuelCell2 model [
44], which was recently published for use in OpenFOAM, is planned for the future. Depending on the outcome, further development will focus on the most promising model. The ZSW PEMFC toolbox, including an example intended for code validation and a tutorial case, is available for use on GitHub (
https://github.com/EC-SIM/OpenFoamZSWPemfcToolbox under the GPL-3.0 open-source license; accessed date: 27 June 2024). It is suitable for both scientific tasks and as a design tool for fuel cells.