원시데이터 수집 시스템
선정목록으로

AlphaPEM: An open-source dynamic 1D physics-based PEM fuel cell model for embedded applications

간접 관련 수소연료전지 · (7) MEA(막전극접합체) (5) 연료전지용 수분제어장치(가습기)(6) PEM(고분자전해질막)

기본 정보

저자
  1. Raphaël Gass
  2. Zhongliang Li
  3. Rachid Outbib
  4. Samir Jemeï
  5. Daniel Hissel
DOI
10.1016/j.softx.2024.102002
저널
SoftwareX
발행년도
2024
발행기관
Elsevier BV
피인용수
5
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1016/j.softx.2024.102002
토픽
Electrocatalysts for Energy Conversion
OpenAlex ID
W4405387237

평가 내용

관련도
간접 관련
사업분야
수소연료전지 · (7) MEA(막전극접합체)
부 분야
(5) 연료전지용 수분제어장치(가습기), (6) PEM(고분자전해질막)
R&D 측면
분석·모델링
확신도
0.90
근거 용어
PEM fuel cell, 1D physics-based model, internal states, embedded applications, real-time control
판단 근거
이 논문은 PEMFC(고분자전해질 연료전지)의 내부 상태를 실시간으로 모니터링하고 제어하기 위한 1차원 물리 기반 동적 모델링 소프트웨어(AlphaPEM)를 다루고 있습니다.
R&D 활용 포인트
코오롱인더스트리의 PEMFC 핵심 소재(막, MEA) 개발 시, 소재의 물성 변화가 전체 시스템의 전압 및 내부 상태(수분, 농도 등)에 미치는 영향을 시뮬레이션하여 최적의 소재 설계 및 제어 전략을 수립하는 데 활용 가능합니다.
평가 입력
본문 38,316자 중 30,032자 발췌

초록

International audience

본문 38,316자

본문 펼치기
## Highlights AlphaPEM: an open-source dynamic 1D physics-based PEM fuel cell model for embedded applications Raphaël Gass, Zhongliang Li, Rachid Outbib, Samir Jemei, Daniel Hissel - AlphaPEM is a 1D, physics-based, dynamic, biphasic PEM fuel cell system model. - It is designed for embedded application and has a speed-accuracy trade-off. - AlphaPEM is open-source, user-friendly, modular, and coded in Python. - It provides real-time access to the cell’s internal states and voltage. - AlphaPEM can automatically calibrate the model’s undetermined parameters. ## AlphaPEM: an open-source dynamic 1D physics-based PEM fuel cell model for embedded applications Raphaël Gass <sup>a,b,∗</sup>, Zhongliang Li <sup>a</sup>, Rachid Outbib <sup>b</sup>, Samir Jemei <sup>a</sup>, Daniel Hissel <sup>a,c</sup> _aUniversité de Franche-Comté, UTBM, CNRS, institut FEMTO-ST, FCLAB, Belfort, France_ _bAix Marseille Univ, CNRS, LIS, Marseille, France_ _cInstitut Universitaire de France, France_ Abstract The urgency of the energy transition requires improving the performance and longevity of hydrogen technologies. AlphaPEM is a dynamic one-dimensional (1D) physics-based PEM fuel cell system simulator, programmed in Python and experimentally validated. It offers a good balance between accuracy and execution speed. The modular architecture allows for addition of new features, and it has a user-friendly graphical interface. An automatic calibration method is proposed to match the model to the studied fuel cell. The software provides information on the internal states of the system in response to any current density and can produce polarization and EIS curves. AlphaPEM facilitates the use of a model in embedded conditions, allowing real-time modification of the fuel cell’s operating conditions. _Keywords:_ Proton exchange membrane fuel cell (PEMFC), Modelling, Control-command, Automatic calibration Metadata <u>C1</u> <u>Current code version</u> <u>v1.0</u> C2 Permanent link to code/repository used for this https://github.com/gassraphael/AlphaPEM <u>code version</u> <u>C3</u> <u>Permanent link to Reproducible Capsule</u> <u>N/A</u> <u>C4</u> <u>Legal Code License</u> <u>GNU General Public License v3.0</u> <u>C5</u> <u>Code versioning system used</u> <u>git</u> C6 Software code languages, tools, and services Python <u>used</u> <u>C7</u> <u>Operating environments</u> <u>Linux, Mac, Windows</u> <u>C8</u> <u>Link to developer documentation/manual</u> <u>https://github.com/gassraphael/AlphaPEM</u> <u>C9</u> <u>Support email for questions</u> <u>raphael.gass@femto-st.fr</u> Table 1: Code metadata 1. Motivation and significance The use of physics-based software simulating PEM fuel cells allows the description of their internal states where sensors cannot be placed, such as the concentration of hydrogen within the catalytic layer of each cell, or the amount of liquid water present in the gas diffusion layer. This information is valuable because fuel cells are complex and ∗Corresponding authors. Website: https://gassraphael.github.io/ _Email addresses:_ `raphael.gass@univ-reunion.fr` (Raphaël Gass ), `zhongliang.li@univ-fcomte.fr` (Zhongliang Li) _Preprint submitted to SoftwareX_ _January 28, 2026_ difficult converters to operate, and the information provided by non-intrusive sensors do not allow for the precise control of the internal states of fuel cells. Therefore, the use of a model is essential for increasing the accuracy of realtime observation of internal physical states and for deploying specific control based on these observations to enhance the efficiency, power density, and lifetime of fuel cells. In the current literature, a lack of physics-based PEM fuel cell models that are open to the community is observed. While some commercial software such as COMSOL Multiphysics®[1–3], Ansys Fluent®[4–7], or Wolfram Mathematica®[8, 9] allow such modeling, they are not open-source, require expensive licenses and offer limited possibilities for source code modification. The open-source publication of software is, however, a valuable aid to the community, as it not only prevents each research team from having to develop their own simulator from scratch, which is time-consuming, but also improves each software by subjecting it to international critique and allowing for collaborative development, thus enhancing and accelerating research. In this context, a research team from the Institute of Energy and Climate Research, IEK-3, has developed openFuelCell2, an open-source computational fluid dynamics toolbox for simulating fuel cells, based on the open-source library OpenFOAM®[10–13]. However, all these approaches yield very precise models which are computationally expensive. They are incompatible with embedded applications, which is the objective of this work. To the authors’ knowledge, only two research teams have published PEM fuel cell models for control-command applications as open-source software, both programmed in Matlab. First, Pukrushpan et al. released a 0D dynamic and isothermal model of the fuel cell system in 2004, which includes the auxiliaries and requires very little computational power [14, 15]. The aim of this pioneering model was to be used in embedded applications while considering the dynamics of the auxiliaries. However, a physical model that accounts for spatial variations within each component of the fuel cell system would enable more precise diagnosis of the internal states and better support control to optimize these states. Nevertheless, this work has paved the way for the construction of more detailed models. More recently, in 2019, Vetter et al. published a simple and compact software simulating the fuel cell in one-dimensional (1D) steadystate, non-isothermal conditions with two phases of water [16, 17]. Although the inclusion of one spatial dimension increases the model’s accuracy, the lack of dynamic modeling and consideration of the auxiliaries makes this software incomplete for real-time use in embedded applications. However, it is important to note that this software is primarily intended as a simulation base for more accurate PEM fuel cell models, making it valuable for the community. This paper introduces AlphaPEM, the first open-source, isothermal, two-phase, 1D dynamic model for PEM fuel cell systems. It is designed for real-time model-based diagnosis and control implementation within embedded systems, balancing precision and execution speed. It simulates the dynamic evolution of internal states of the fuel cell, its auxiliaries, and the resultant voltage based on the operating conditions and imposed current density. This software package is written in Python for its readability and ease of writing. It is deployed in open-source with GNU General Public License v3.0 [18]. It builds upon the authors’ previous works, including a critical review of the underlying physics [19] and an experimentally validated numerical resolution approach [20]. An extract of the equations from this multi-physics model is provided in Appendix A. The modular design of the code allows for easy addition of new features, such as incorporating heat transfer within the fuel cell. Despite the complex physics involved, the code is well-written following the informatics standards [21] and documented to facilitate its uptake and continuous improvement by the community. AlphaPEM is implemented as a Python class to ease its open-source distribution, leveraging SciPy’s classical solver for ordinary differential equations (ODEs). The finite difference problem is solved using SciPy’s ‘solve_ivp‘ function [22], employing the implicit ’BDF’ method due to the stiff nature of the problem arising from nonlinearities and coupled variables in the ODE system. The AlphaPEM software package quickly simulates the internal states and voltage dynamics of PEM fuel cell systems for all current densities and operating conditions imposed on it. In particular, it is possible to apply a step current density or use current profiles to generate polarization curves or electrochemical impedance spectroscopy (EIS) curves. The package includes databases from various real fuel cells [6, 23–25] to facilitate its adoption and allows users to freely insert characteristics of other fuel cells. An automated program for calibrating undetermined parameters is included in AlphaPEM. These parameters are calibrated using the genetic algorithm ’geneticalgorithm2’ [26], a maintained fork of the widely-used open-source Python program ’geneticalgorithm’ [27]. A graphical user interface is also included to facilitate initial use before delving into the code. Finally, AlphaPEM can be used to compare the results of similar models or assist in the calibration of undetermined parameters in more precise models for which computational time does not allow for accurate calibration within a reasonable timeframe. 2 2. Software description AlphaPEM is an open-source framework for PEM fuel cell systems modelling, programmed in Python. It is designed for the control and command of embedded systems. Its results reveal the dynamics of the cell internal states and voltage, as well as the balance of plant dynamics, which are vital information for fuel cell management systems. To use AlphaPEM, it is necessary to install a certain number of packages beforehand. 1 g i t clone h t t p s : / / github . com / g a s s r a p h a e l / AlphaPEM . g i t _#_ _clone_ _the_ _r e p o s i t o r y_ 2 cd AlphaPEM _#_ _na v ig a te_ _to_ _the_ _p r o j e c t_ _d i r e c t o r y_ 3 python3 −m venv env _#_ _c r e a t i o n_ _of_ _a_ _new_ _python_ _environment_ 4 source env / bin / a c t i v a t e _#_ _a c t i v a t i o n_ _of_ _the_ _environment_ 5 pip i n s t a l l −− upgrade pip _#_ _update_ _the_ _Python_ _package_ _manager_ _pip_ 6 pip i n s t a l l numpy scipy m a t p l o t l i b _#_ _re q ui r ed_ _packages_ 7 pip i n s t a l l colorama g e n e t i c a l g o r i t h m 2 _#_ _re q ui r ed_ _packages_ 8 python3 −m pip i n s t a l l g i t + h t t p s : / / github . com / RedFantom / t t k t h e m e s _2.1._ _Software architecture_ The software architecture of AlphaPEM consists of five directories, each containing several Python files. The root of the software package contains the ’main.py’ and ’GUI.py’ files. One of these two files must be run to operate the simulator, as they both control the entire software. The ’main.py’ file is used for the standard operation of AlphaPEM for programmers. The ’GUI.py’ file, which is optional, provides a graphical user interface (GUI) for AlphaPEM to facilitate its use without delving into the program’s details. All basic functionalities are included in the GUI without requiring any modifications to other files. However, the GUI does not allow for the calibration of undetermined parameters. The program’s results are saved in the ’/results’ directory. Next, the directory ’/model’ contains all the Python files related to the model’s physics, such as ’dif_eq.py’, which includes the system of differential equations to be solved. The file ’AlphaPEM.py’ contains a class of the same name that represents PEM fuel cell simulators. An object of the AlphaPEM class takes as arguments the set of parameters defining a given fuel cell system, its operating conditions, the imposed current density, and the computing parameters. It returns the evolution of the voltage and all internal states over time. A ’control.py’ file is also present, which contains the instructions for dynamically controlling the operating conditions of the fuel cell using the information provided by the model. The ’/modules’ directory contains all the Python files that serve as modules for other files. Indeed, to improve the readability of the previous programs, some of the less essential instructions have been written as separate functions and placed in these module files. Each of these module files is named to directly refer to the file it is associated with. For example, ’flows_modules.py’ is used in ’flow.py’. Additionally, a file named ’transitory_functions.py’ is present in this directory and is used in most other programs in the package. It contains a set of mathematical functions that have physical significance for the model, such as the saturation pressure of water vapor. Finally, the directory ’/calibration’ contains all the information necessary for calibrating the undetermined parameters of the model. The file ’parameter_calibration.py’ includes the program for performing the calibration, the file ’experimental_values’ contains the experimental information of the fuel cell system that the simulator must represent, the file ’run.sh’ contains the instructions to send to the computing cluster to perform the calibration, and the directory ’/calibration/results’ contains the calibration results. Figure 1 represents the structure of AlphaPEM, highlighting the dependencies between the Python files. Each box represents a Python file, with an associated number indicating its location within the software package. An arrow from file A to file B indicates that information from file A are imported into file B. The colors associated with certain boxes and their outgoing arrows improve readability and specifically indicate where these files are imported. This is necessary due to the program’s complex overall structure. The boxes that remain black indicate no ambiguity regarding the destination of their arrows. To further enhance readability, the arrows conventionally point from bottom to top or are horizontal. Thus, the files most frequently used by other parts of the program are located towards the bottom of the diagram, while the files executed by the user to start the program are at the top. 3 parameter_calibration main GUI 5 1 1 calibration_modules GUI_modules 4 4 AlphaPEM 3 3 dif_eq control 3 3 3 3 cell_voltage flows 3 auxiliaries display_modules main_modules dif_eq_modules flows_modules main_modules 4 4 4 4 4 4 4 4 auxiliaries_modules experimental_values 5 4 2 2 transitory_functions 4 settings current_densities Location in the software repository: 1 / 2 /configuration 3 /model 4 /modules 5 /calibration settings_modules 4 Figure 1: The main structure of AlphaPEM (the reader is referred to the colored web version of this article for improved readability). _2.2._ _Software functionalities_ The usage of the software package AlphaPEM is illustrated by the graphical user interface present in the file ’/GUI.py’ and displayed in figure 2. All the features offered by this GUI are accessible through the files ’/main.py’ and ’/configuration/settings.py’. A fuel cell is characterized by the operating conditions under which it is run (temperature, pressures, stoichiometries and humidities at both anode and cathode), its accessible physical parameters (such as the active area), and its undeterminated physical parameters (such as the tortuosity of the GDL). All these parameters can be adjusted by the user, and predefined configurations based on existing cells can be selected in the ’Fuel cell:’ dropdown menu. Other adjustable parameters exist, here hidden in the GUI to avoid overloading the display. On one hand, the current density parameters allow for the adjustment of the shape of the step current density, or the current density required to create polarization or EIS curves. On the other hand, the computing parameters enable modification of numerical settings, such as the number of points in the numerical model placed in the gas diffusion layer, or the purge times of the stack. Next, different simulation options can be selected from the ’Model possibilities’ menu. It is possible to configure the auxiliaries of the studied fuel cell system as follows: a ’no auxiliaries’ system, where matter flows are instantly adjusted to the correct operating conditions at the fuel cell inlet and all gases are evacuated without recirculation; a ’forced-convective cathode with anodic recirculation’ system, where the remaining humidified hydrogen at the fuel cell outlet is re-injected at the inlet; or a ’forced-convective cathode with flow-through anode’ system, where the anode configuration resembles that of the cathode, with humidified fuel inserted in excess at the inlet and directly evacuated at the outlet. Depending on the selected configuration, the physical modeling of auxiliaries is adjusted, impacting the boundary conditions of the fuel cell system’s cells, as detailed in previous work [20]. 4 Additional options include enabling or disabling control over the operating conditions, choosing the presence or absence of an anode purge, selecting a synthetic or detailed display of results, and displaying results either only at the end of the simulation or with frequent updates during the calculation. Finally, once these choices are made, the user can generate the model results, which include the internal states (discussed section 3.2) and the voltage of the fuel cell stack, either from a current density step, or a current density producing a polarization curve or an EIS curve. The GUI limits the simulation possibilities to these three types of current densities, but from the source code, it is possible to use any physically acceptable function. Figure 2: AlphaPEM graphical user interface. To enable AlphaPEM to simulate a new fuel cell, it is necessary to calibrate certain undetermined physical parameters so that the software results can correspond to the actual cell. Indeed, there are several physical parameters dependent on the specific fuel cell used that are difficult to obtain without the manufacturer’s information, such as the porosity of the gas diffusion layers. These parameter values can be approximated using experimental data from the fuel cells. To do this, the user can perform automated calibration of the undetermined parameters using the AlphaPEM Python file ’/calibration/parameter_calibration.py’. This functionality is not available from the GUI. It is necessary to input the experimental values of polarization curves under different operating conditions in the file ’/calibration/experimental_values’ (at least three curves), as well as the operating conditions and accessible physical parameters of the studied fuel cell system in the file ’/modules/calibration_modules’. This automated calibration uses a genetic algorithm. The parameters of this algorithm have been adjusted for this specific optimization problem to achieve a good balance between the accuracy of the calibration and execution speed. These parameters are shown in table 2. Only the population size and the maximum number of iterations can be 5 modified to match the available computing capacity. It is preferable to have the population size between 100 and 200 individuals and to choose a number that is a multiple of the number of available CPU cores to utilize them fully, as the calculations are parallelized for each member of the same population. The number of iterations should be as large as possible, typically around 1000 to 1500 generations for effective calibration. It is worth noting that the calibration can be resumed from where it previously stopped, allowing multiple computation sessions to finally achieve a satisfactory result. Finally, it is preferable to use a computing cluster with many CPU cores for calibration. As an example, the authors successfully performed a calibration with a maximum error of 1.06% between the experimental and simulated data, after two weeks of calculations on a server equipped with 80 Intel(R) Xeon(R) Gold 6338 CPU cores @ 2.00GHz. <u>Parameters</u> <u>Values</u> Number of iteration 1500 Population size 160 Mutation probability 0.33/ _nb_ _ _undetermined_ _ _parameters_ Elit ratio 1/ _population_ _ _size_ Parents portion 0.2 Crossover type ’one_point’ Mutation type ’uniform_by_x’ <u>Selection type</u> <u>’roulette’</u> Table 2: Optimised genetic algorithm parameters for AlphaPEM. 3. Illustrative examples _3.1._ _Polarization curves and parameters calibration_ To enable AlphaPEM to simulate the internal states and voltage of a given fuel cell system, it is necessary to provide the simulator with a number of physical parameters to adjust it to the real machine. Some of these parameters are easily accessible, such as the dimensions of each cell, but another part is inaccessible unless the manufacturers have shared them, which is rarely the case. These undetermined physical parameters can be calibrated by AlphaPEM using at least three experimental polarization curves, as discussed section 2.2. Once calibration is done, curves like those in figure 3 can be obtained. The quantity ∆ _Umax_ corresponds to the maximum deviation between the experimental and simulated curves. After this calibration, other polarization curves can be simulated by AlphaPEM for all realistic operating conditions. For an estimation of AlphaPEM’s execution speed, the simulator requires less than 35 seconds to simulate one of the polarization curves depicted in figure 4 on a mobile workstation equipped with an 11th generation Intel Core i9 processor boasting 16 cores operating at 2.60GHz and 32 GiB of RAM. In this instance, computation occurs at intervals of 0.1 _A_ . _cm_ <sup>−2</sup> . Thus, optimizing execution speed can be achieved by reducing the precision of the polarization curve. 6 1.0 0.9 0.8 0.7 0.6 0.5 0.4 Exp. - P = 2.0 bar Sim. - P = 2.0 bar - Umax = 1.12 % Exp. - P = 2.25 bar Sim. - P = 2.25 bar - Umax = 0.97 % Exp. - P = 2.5 bar Sim - P = 2.5 bar - Umax = 1.73 % 0.0 0.5 1.0 1.5 2.0 2.5 3.0 Current density ifc (A. cm 2) Figure 3: Polarization curves generated by AlphaPEM simulating a single fuel cell system from EH Group [24] under various operating conditions. _3.2._ _Fuel cell system internal states_ Once AlphaPEM is calibrated, it is possible to simulate the temporal evolution of the internal states of a given fuel cell. Thus, it is possible to dynamically track at different points within a cell the concentration of water vapor _Cv_, the liquid water saturation `s`, the water content dissolved in the membrane λ, as well as the concentrations of hydrogen _CH_ 2 and oxygen _CO_ 2 . Similarly, the temporal evolution of cell voltage _Ucell_ and various auxiliary variables can be monitored: pressures _P_, relative humidities Φ, mass flows _W_, and throttle areas _Abp_ . For instance, figure 4 illustrates the temporal evolution of _Ucell_, _Cv_ and `s` for the same fuel cell system previously mentioned in figure 3, stimulated by two current density steps. Further curves, details and explanations of the observed evolutions are provided in the authors’ previous work [20]. For an estimation of AlphaPEM’s execution speed, the simulator requires less than 20 seconds to simulate the 1000second temporal evolution depicted in figure 4 on a mobile workstation equipped with an 11th generation Intel Core i9 processor boasting 16 cores operating at 2.60GHz and 32 GiB of RAM. 7 1.5 1.0 0.5 0.0 16 15 14 13 12 11 ifc 0 200 400 600 800 1000 Time t (s) (a) Current density evolution Cv, agc Cv, agdl Cv, acl Cv, ccl Cv, cgdl Cv, cgc Cv, sat 0 200 400 600 800 1000 Time t (s) (c) Vapor evolution 0.95 0.90 0.85 0.80 0.75 0.70 0.65 0.16 0.12 0.08 0.04 0.00 Ucell 0 200 400 600 800 1000 Time t (s) (b) Voltage evolution sagdl sacl sccl scgdl 0 200 400 600 800 1000 Time t (s) (d) Liquid water evolution Figure 4: Internal states generated by AlphaPEM simulating a single fuel cell system from EH Group [24] under two current density step stimulations. 4. Impact The current energy transition is generating a growing demand for PEM fuel cells with higher power densities and longer lifespans [28–30]. In this context, physics-based modeling plays a crucial role in improving the dynamic control of fuel cells, thereby enhancing their performance and longevity [31, 32]. However, creating such models is a lengthy and complex task for researchers, as it requires integrating numerous scientific disciplines, including electrochemistry, fluid mechanics, thermodynamics, computational physics, and mathematics. Therefore, it is essential to provide the scientific community with a clear and robust foundational model on which future research can build to advance the field more rapidly. Thus, following the work of Pukrushpan et al. [14] and Vetter et al. [16], who were the first to disseminate simplified PEM fuel cell models, AlphaPEM is introduced as the first open-source software package modeling dynamically and in 1D fuel cell systems for embedded applications, offering a good compromise between accuracy and execution speed. AlphaPEM simulates the internal states of fuel cell systems, providing real-time access to information inaccessible by sensors. This is promising for enriching fuel cell control strategies, paving the way for better performance and longevity. Additionally, AlphaPEM is designed with a modular architecture, facilitating the addition of extensions by the community. It is thus easy to incorporate heat transport physics, cell degradation modeling, spatial dimension extension to 1D+1D, and the simulation of cell stacks, to more accurately reflect reality while maintaining sufficient 8 execution speed. These points align with the authors’ future research ambitions. The contributions of AlphaPEM thus advance the development of fuel cell systems by facilitating their analysis, control, and improvement. 5. Conclusions The work presents AlphaPEM, an open-source, user-friendly, and modular software package in Python, designed for PEM fuel cell modeling for embedded applications. This framework is based on a 1D finite difference, dynamic, biphasic, and isothermal model of PEM fuel cell systems. It employs a solver using an implicit numerical method to solve the system of differential equations. This model has been experimentally validated in previous studies. In practice, AlphaPEM provides real-time access to the internal states and the voltage of the fuel cell systems and can generate polarization and EIS curves. It can also automatically calibrate the model’s undetermined parameters to fit any real fuel cell system. This simulator, therefore, paves the way for improving the real-time control of the operating conditions of fuel cell systems to enhance their performance and longevity. Thermal modeling and spatial extension will be developed in future versions. Acknowledgements This work has been supported by French National Research Agency via project DEAL (Grant no. ANR-20-CE050016-01), the Region Provence-Alpes-Côte d’Azur, the EIPHI Graduate School (contract ANR-17-EURE-0002) and the Region Bourgogne Franche-Comté. Appendix A. Extract of the model equations AlphaPEM is based on a multi-physics model with numerous equations that are coupled, nonlinear, and complex to express. These equations have been presented and discussed in the authors’ previous work [20], and an extract of them is provided in table A.3. <u>Dynamical models</u> <u>Matter flow expressions</u> <u>Dissolved water in the membrane</u> <u>�λ</u> _mem_, _T fc_ _<u>mem</u>_ <u>,</u> _<u>acl</u>_ _S_ p, _acl_ = 2 _kO_ 2 _Hcl_ + _S sorp_, _acl_ + _S p_, _acl_ _S sorp_, _acl_ = γ _sorp_ (λ _acl_, <u>ρ</u> _<u>mem</u>_ <u>ε</u> _<u>mc</u>_ _Meq_ _<u>d</u>_ <u>λ</u> _dtacl_ = − _<u>d</u>_ <u>λ</u> _<u>acl</u>_ _<u>J</u>_ <u>λ,</u> _<u>mem</u>_ <u>,</u> _<u>acl</u>_ _S sorp_, _acl_ = _S_ γ p, _sorpacl_ =(λ 2 _aclk_, _O T_ 2 _fc_ <u>�λ)</u> _mem_ <sup><u>ρ</u></sup> _M_ <sup><u>mem</u></sup> eq, _T_ - _fc_ λeq� ( _HCclRTvH_, _acl fcmem_, `s` <sup>_C_</sup> _acl_ <sup>_O_</sup> <sup>2</sup>, <sup>,</sup> _T_ <sup>_ccl_</sup> �λeq( _Cv_, _acl_, `s` _acl_, _T fc_ ) − λ _acl_ _M_ eq _Hmem_ + _Hcl_ _i fcF_ <sup>λ</sup> <sup>_acl_</sup> <sup>,</sup> <sup>_mem_</sup> <sup>−</sup> <sup><u>2ρ</u></sup> _M_ <sup>_<u>mem</u>_</sup> _eq_ _<u>fcF</u>_ <sup>λ</sup> <sup>_mem_</sup> <sup>,</sup> <sup>_ccl_</sup> <sup>−</sup> <sup><u>2ρ</u></sup> _M_ <sup>_<u>mem</u>_</sup> _eq_ _J_ λ, _mem_, _acl_ = <sup><u>2</u></sup> 22 <sup><u>.5</u></sup> 22 _Hmem_ + _Hcl_ _J_ λ, _mem_, _ccl_ = <sup><u>2</u></sup> 22 <sup><u>.5</u></sup> _i fcF_ <sup>λ</sup> <sup>_mem_</sup> <sup>,</sup> <sup>_ccl_</sup> <sup>−</sup> <sup><u>2ρ</u></sup> _M_ <sup>_<u>mem</u>_</sup> _eq_ <sup>_D_</sup> <sup>(λ</sup> <sup>_mem_</sup> <sup>,</sup> <sup>_ccl_</sup> <sup>)</sup> _H_ <sup><u>λ</u></sup> <sup>_<u>ccl</u>_</sup> _mem_ <sup><u>−λ</u></sup> + <sup>_<u>mem</u>_</sup> _Hcl_ <sup><u>2</u></sup> 22 <sup><u>.5</u></sup> _i fcF_ <sup><u>2</u></sup> 22 <sup><u>.5</u></sup> _i fcF_ <u>ρ</u> _<u>mem</u>_ _Meq_ _<u>d</u>_ <u>λ</u> _dtmem_ = _<u>J</u>_ <u>λ,</u> _<u>mem</u>_ <u>,</u> _<u>acl</u>_ - _<u>J</u>_ <u>λ,</u> _<u>mem</u>_ <u>,</u> _<u>ccl</u>_ _Hmem_ <sup><u>ρ</u></sup> _M_ <sup>_<u>mem</u>_</sup> _eq_ <sup>_D_</sup> <sup>(λ</sup> <sup>_acl_</sup> <sup>,</sup> <sup>_mem_</sup> <sup>)</sup> <sup><u>λ</u></sup> _H_ <sup>_<u>mem</u>_</sup> _mem_ <sup><u>−</u></sup> + <sup><u>λ</u></sup> _H_ <sup>_<u>acl</u>_</sup> _cl_ <sup><u>ρ</u></sup> _M_ <sup>_<u>mem</u>_</sup> _eq_ <sup>_D_</sup> <sup>(λ</sup> <sup>_mem_</sup> <sup>,</sup> <sup>_ccl_</sup> <sup>)</sup> _H_ <sup><u>λ</u></sup> <sup>_<u>ccl</u>_</sup> _mem_ <sup><u>−λ</u></sup> + <sup>_<u>mem</u>_</sup> _Hcl_ - _<u>HclRTHmem</u>_ <sup>_CH_</sup> <sup><u>2,</u></sup> <sup>_acl_</sup> _<u>memHcl</u>_ <u>,</u> _<u>ccl</u>_ + _S sorp_, _ccl_ + _S p_, _ccl_ _S sorp_, _ccl_ = γ _sorp_ ( _i fc_ λ _ccl_, _T fc_ ) <sup><u>ρ</u></sup> - _M_ <sup><u>mem</u></sup> eq _S_ p, _ccl_ = <u>ρ</u> _<u>mem</u>_ <u>ε</u> _<u>mc</u>_ _Meq_ _<u>d</u>_ <u>λ</u> _dtccl_ = _<u>J</u>_ <u>λ,</u> _<u>mem</u>_ <u>,</u> _<u>ccl</u>_ _M_ eq �λeq( _Cv_, _ccl_, `s` _ccl_, _T fc_ ) − λ _ccl_ <u>2</u> _<u>FHi fc</u>_ _<u>cl</u>_ <sup>+</sup> <sup>_kH_</sup> <sup><u>2</u></sup> �λ _mem_, _T fc_ Table A.3: Extract of the differential equations and the associated matter transport expressions in the fuel cell derived from the author’s previous work [20] References [1] C. Bao, W. G. Bessler, Two-dimensional modeling of a polymer electrolyte membrane fuel cell with long flow channel. Part I. Model development, Journal of Power Sources 275 (2015) 922–934, semble être un excellent document sur la modélisation 2D. L’idée est exactement la même que la mienne en 1D+1D, sauf qu’il y a une connection entre les points à l’intérieur de la pile. Source 26 de l’article 2021 de Ling Xu afin d’obtenir une équation expérimentale décrivant l’équilibre de l’eau au niveau de la membrane. `[doi:10.1016/j.jpowsour.2014.11.058](https://doi.org/10.1016/j.jpowsour.2014.11.058)` . [2] M. Mayur, S. Strahl, A. Husar, W. G. Bessler, A multi-timescale modeling methodology for PEMFC performance and durability in a virtual fuel cell car, International Journal of Hydrogen Energy 40 (46) (2015) 16466–16476, article conseillé par Zhongliang qui traite d’un modèle 2D. Zhongliang le trouve très cohérent. Il y a aussi de bonnes considérations de dégradation sur la membrane. Un modèle simple a été employé pour prouver la faisabilité du modèle. `[doi:10.1016/j.ijhydene.2015.09.152](https://doi.org/10.1016/j.ijhydene.2015.09.152)` . [3] COMSOL: Multiphysics Software for Optimizing Designs. 9 [4] B. Xie, G. Zhang, Y. Jiang, R. Wang, X. Sheng, F. Xi, Z. Zhao, W. Chen, Y. Zhu, Y. Wang, H. Wang, K. Jiao, “3D+1D” modeling approach toward large-scale PEM fuel cell simulation and partitioned optimization study on flow field, eTransportation 6 (2020) 100090, article intéressant qui montre une faible pente dans la courbe de pola alors que du 3D+1D est utilisé comme modèle. Donne des informations sur les paramètres de la MPL. `[doi:10.1016/j.etran.2020.100090](https://doi.org/10.1016/j.etran.2020.100090)` . [5] H. Wu, Mathematical Modeling of Transient Transport Phenomena in PEM Fuel Cells, Ph.D. thesis, modélisation 3D de la pile. Ca utilise le CFD (Computational Fluid Dynamic) et c’est très compliqué. C’est un modèle dynamique 3-D, avec considérations de la thermique et avec 2 phases, sans vieillissement (2009). [6] L. Fan, G. Zhang, K. Jiao, Characteristics of PEMFC operating at high current density with low external humidification, Energy Conversion and Management 150 (2017) 763–774, ce document a été relativement bien cité, il a l’air bien fiable. Jiao est co-auteur. Il m’est utile pour confirmer la valeur de constantes, d’équations et m’apporte une nouvelle équation : la viscosité dynamique de l’eau fonction de la température. Il me permet aussi d’avoir une très bonne expression de la surtension. “sufficient external humidification is necessary to prevent the polymer electrolyte dehydration at low current density, while at high current density, the water produced in cathode CL is enough to humidify the polymer electrolyte” Takalloo et al. [17] indicated that the external humidification at anode inlet was more necessary than the cathode inlet, because the cathode could produce water and should avoid from flooding. En fonction de l’humidité relative d’entrée, les flux d’eau entre GDL et GC ont une direction différente, et cette direction peut varier le long du GC ! J’ai aussi ici des informations utiles sur les vitesses en jeu et leur répartition spatiale. `[doi:10.1016/j.enconman.2017.08.034](https://doi.org/10.1016/j.enconman.2017.08.034)` . [7] Ansys Fluent | Fluid Simulation Software. [8] J. O. Schumacher, J. Eller, G. Sartoris, T. Colinart, B. C. Seyfang, 2+1D modelling of a polymer electrolyte fuel cell with glassy-carbon microstructures, Mathematical and Computer Modelling of Dynamical Systems 18 (4) (2012) 355–377, article conseillé par Zhongliang sur la modélisation 2+1D. `[doi:10.1080/13873954.2011.642390](https://doi.org/10.1080/13873954.2011.642390)` . [9] Wolfram Mathematica: Modern Technical Computing. [10] S. B. Beale, H.-W. Choi, J. G. Pharoah, H. K. Roth, H. Jasak, D. H. Jeon, Open-source computational model of a solid oxide fuel cell, Computer Physics Communications 200 (2016) 15–26. `[doi:10.1016/j.cpc.2015.10.007](https://doi.org/10.1016/j.cpc.2015.10.007)` . [11] S. Zhang, S. Hess, H. Marschall, U. Reimer, S. Beale, W. Lehnert, openFuelCell2: A new computational tool for fuel cells, electrolyzers, and other electrochemical devices and processes, Computer Physics Communications 298 (2024) 109092. `[doi:10.1016/j.cpc.2024.109092](https://doi.org/10.1016/j.cpc.2024.109092)` . [12] S. Zhang, S. Hess, S. Beale, openFuelCell2 (Sep. 2023). [13] OpenFOAM (Jun. 2024). [14] J. T. Pukrushpan, H. Peng, A. G. Stefanopoulou, Control-Oriented Modeling and Analysis for Automotive Fuel Cell Systems, Journal of Dynamic Systems, Measurement, and Control 126 (1) (2004) 14–25. `[doi:10.1115/1.1648308](https://doi.org/10.1115/1.1648308)` . [15] J. T. Pukrushpan, A. G. Stefanopoulou, H. Peng, University of Michigan Fuel Cell Stack Simulation package (2002). [16] R. Vetter, J. O. Schumacher, Free open reference implementation of a two-phase PEM fuel cell model, Computer Physics Communications 234 (2019) 223–234, excellent article offrant un logiciel open-source 1D. Cependant ni les auxiliaires ni le temps ne sont modélisés. `[doi:](https://doi.org/10.1016/j.cpc.2018.07.023)` `[10.1016/j.cpc.2018.07.023](https://doi.org/10.1016/j.cpc.2018.07.023)` . [17] J. Schumacher, R. Vetter, R. Herrendörfer, PEMFC-1DMMM (2020). [18] GNU, GNU General Public License (Jun. 2007). [19] R. Gass, Z. Li, R. Outbib, S. Jemei, D. Hissel, A Critical Review of Proton Exchange Membrane Fuel Cells Matter Transports and Voltage Polarisation for Modelling, Journal of The Electrochemical Society (2024). `[doi:10.1149/1945-7111/ad305a](https://doi.org/10.1149/1945-7111/ad305a)` . [20] R. Gass, Z. Li, R. Outbib, S. Jemei, D. Hissel, An advanced 1D physics-based model for PEM hydrogen fuel cells with enhanced overvoltage prediction, International Journal of Hydrogen Energy 97 (2025) 1108–1125. `[doi:10.1016/j.ijhydene.2024.11.374](https://doi.org/10.1016/j.ijhydene.2024.11.374)` . [21] Numpy, Style guide (2024). [22] SciPy, Scipy.Integrate.Solve_ivp (2024). [23] B. Xie, M. Ni, G. Zhang, X. Sheng, H. Tang, Y. Xu, G. Zhai, K. Jiao, Validation methodology for PEM fuel cell three-dimensional simulation, International Journal of Heat and Mass Transfer 189 (2022) 122705, article conseillé par mon reviewer 2 de mon article review pour discuter d’une autre manière de modéliser les flux d’eau liquide dans la pile. `[doi:10.1016/j.ijheatmasstransfer.2022.122705](https://doi.org/10.1016/j.ijheatmasstransfer.2022.122705)` . [24] EH Group Clean Energy Generation. [25] Baltic FuelCells. [26] D. Pascal, Geneticalgorithm2 (2024). [27] R. Solgi, Geneticalgorithm (2020). [28] K. Jiao, J. Xuan, Q. Du, Z. Bao, B. Xie, B. Wang, Y. Zhao, L. Fan, H. Wang, Z. Hou, S. Huo, N. P. Brandon, Y. Yin, M. D. Guiver, Designing the next generation of proton-exchange membrane fuel cells, Nature 595 (7867) (2021) 361–369, cet article est orienté vers l’amélioration de la densité de puissance de la pile PEMFC. `[doi:10.1038/s41586-021-03482-7](https://doi.org/10.1038/s41586-021-03482-7)` . [29] E. Union, Clean Hydrogen Joint Undertaking. Strategic Research and Innovation Agenda 2021 – 2027 (2022). [30] I. Amamiya, S. Tanaka, Current Topics Proposed by PEFC Manufacturers, Etc. – Current Status and Topics of Fuel Cells for FCV. [31] Fei Gao, B. Blunier, A. Miraoui, A. El Moudni, A Multiphysic Dynamic 1-D Model of a Proton-Exchange-Membrane Fuel-Cell Stack for Real-Time Simulation, IEEE Trans. Ind. Electron. 57 (6) (2010) 1853–1864. `[doi:10.1109/TIE.2009.2021177](https://doi.org/10.1109/TIE.2009.2021177)` . [32] J. Luna, S. Jemei, N. Yousfi-Steiner, A. Husar, M. Serra, D. Hissel, Nonlinear predictive control for durability enhancement and efficiency improvement in a fuel cell power system, Journal of Power Sources 328 (2016) 250–261, le compresseur est plutôt finement modélisé. Il calcule assez précisément l’efficacité globale du système pile à combustible, avec les auxiliaires. Il y a aussi une discussion sur la dégradation du platine. `[doi:10.1016/j.jpowsour.2016.08.019](https://doi.org/10.1016/j.jpowsour.2016.08.019)` . 10

섹션 본문 17문단 · 20,188자

(제목 없음)

1The urgency of the energy transition requires improving the performance and longevity of hydrogen technologies.Al-phaPEM is a dynamic one-dimensional (1D) physics-based PEM fuel cell system simulator, programmed in Python and experimentally validated.It offers a good balance between accuracy and execution speed.The modular architecture allows for addition of new features, and it has a user-friendly graphical interface.An automatic calibration method is proposed to match the model to the studied machine.The software provides information on the internal states of the system in response to any current density and can produce polarization and EIS curves.AlphaPEM facilitates the use of a model in embedded conditions, allowing real-time modification of the fuel cell's operating conditions.

Motivation and significance

2The use of physics-based software simulating PEM fuel cells allows the description of its internal states where sensors cannot be placed, such as the concentration of hydrogen within the catalytic layer of each cell, or the amount of liquid water present in the gas diffusion layer.This information is valuable because fuel cells are complex and difficult machines to operate, and the information provided by sensors external to the cells do not allow for the precise control of the internal states of fuel cells.Therefore, the use of a model is essential for increasing the accuracy of real-time observation of internal physical states and for deploying specific control based on these observations to enhance the efficiency, power density, and lifetime of fuel cells.In the current literature, a lack of physics-based PEM fuel cell models that are open to the community is observed.While some commercial software such as COMSOL Multiphysics® [1][2][3], Ansys Fluent® [4][5][6][7], or Wolfram Mathematica® [8,9] allow such modeling, they are not open-source, require expensive licenses and offer limited possibilities for source code modification.The open-source publication of software is, however, a valuable aid to the community, as it not only prevents each research team from having to develop their own simulator from scratch, which is time-consuming, but also improves each software by subjecting it to international critique and allowing for collaborative development, thus enhancing and accelerating research.In this context, a research team from the Institute of Energy and Climate Research, IEK-3, has developed openFuelCell2, an open-source computational fluid dynamics toolbox for simulating fuel cells, based on the open-source library OpenFOAM® [10][11][12][13].However, all these approaches yield very precise models which are computationally expensive.They are incompatible with embedded applications, which is the objective of this work.To the authors' knowledge, only two research teams have published PEM fuel cell models for control-command applications as open-source software, both programmed in Matlab.First, Pukrushpan et al. released a 0D dynamic and isothermal model of the fuel cell system in 2004, which includes the auxiliaries and requires very little computational power [14,15].The aim of this pioneering model was to be used in embedded applications while considering the dynamics of the auxiliaries.However, a physical model that does not account for spatial variations within each component of the fuel cell system is not sufficient to precisely diagnose the internal states and support control to optimize these states.Nevertheless, this software has paved the way for future, more detailed models.More recently, in 2019, Vetter et al. published a simple and compact software simulating the fuel cell in one-dimensional (1D) steadystate, non-isothermal conditions with two phases of water [16,17].Although the inclusion of one spatial dimension increases the model's accuracy, the lack of dynamic modeling and consideration of the auxiliaries makes this software incomplete for real-time use in embedded applications.However, it is important to note that this software is primarily intended as a simulation base for more complex PEM fuel cell models, making it valuable for the community.This paper introduces AlphaPEM, the first open-source, isothermal, two-phase, 1D dynamic model for PEM fuel cell systems.It is designed for real-time model-based diagnosis and control implementation within embedded systems, balancing precision and execution speed.It simulates the dynamic evolution of internal states of the fuel cell, its auxiliaries, and the resultant voltage based on the operating conditions and imposed current density.This software package is written in Python for its readability and ease of writing.It is deployed in open-source with GNU General Public License v3.0 [18].It is based on the authors' previous works, including a critical review of the physics at stake [19] and an experimentally validated formulation for numerical resolution [20].The modular design of the code allows for easy addition of new features, such as incorporating heat transfer within the fuel cell.Despite the complex physics involved, the code is well-written following the informatics standards [21] and documented to facilitate its uptake and continuous improvement by the community.AlphaPEM is implemented as a Python class to ease its open-source distribution, leveraging SciPy's classical solver for ordinary differential equations (ODEs).The finite difference problem is solved using SciPy's 'solve_ivp' function [22], employing the implicit 'BDF' method due to the stiff nature of the problem arising from nonlinearities and coupled variables in the ODE system.The AlphaPEM software package simulates the internal state dynamics of fuel cells in multiple static and dynamic processes, such as those involving step current densities, polarization curves, or electrochemical impedance spectroscopy (EIS) curves.It can also adapt to any current density input.The package includes databases from various real fuel cells [6,[23][24][25] to facilitate its adoption and allows users to freely insert characteristics of other fuel cells.An automated program for calibrating undetermined parameters is included in AlphaPEM.These parameters are calibrated using the genetic algorithm 'geneticalgorithm2' [26], a maintained fork of the widely-used open-source Python program 'geneticalgorithm' [27].A graphical user interface is also included to facilitate initial use before delving into the code.Finally, AlphaPEM can be used to compare similar models or assist in the calibration of more complex models.

Software description

3AlphaPEM is an open-source framework for PEM fuel cell systems modelling, programmed in Python.It is designed for the control and command of embedded systems.Its results reveal the dynamics of the cell internal states and voltage, as well as the balance of plant dynamics, which are vital information for fuel cell management systems.

4To use AlphaPEM, it is necessary to install a certain number of packages beforehand.The software architecture of AlphaPEM consists of 5 directories, each containing several Python files.The root of the software package contains the 'main.py'and 'GUI.py'files.These two files must be run to operate the simulator, as they control the entire software.The 'main.py' file is used for the standard operation of AlphaPEM.The 'GUI.py' file, optional, provides a graphical user interface (GUI) of AlphaPEM to facilitate its use without delving into the program's details.All basic functionalities are included without requiring any modifications to other files.However, this interface lacks the flexibility offered by 'main.py',which allows the modification of AlphaPEM's behavior as desired.Additionally, it does not allow for the calibration of undetermined parameters.The program's results are saved in the '/results' directory.The directory '/configuration' contains the files 'settings.py'and 'current_densities.py'.The file 'settings.py'includes both the physical parameters of the model, encompassing the characteristics of the studied cell, and the computing parameters, such as the maximum spatial step of the solver.It is used in most programs of the package.The file 'current_densities.py'contains the temporal evolution of the current densities to be imposed on the simulator.Next, the directory '/model' contains all the Python files related to the model's physics, such as 'dif_eq.py',which includes the system of differential equations to be solved.The file 'AlphaPEM.py'contains a class of the same name that represents PEM fuel cell simulators.An object of the AlphaPEM class takes as arguments the set of parameters defining a given fuel cell system, its operating conditions, the imposed current density, and the computing parameters.It returns the evolution of the voltage and all internal states over time.A 'control.py'file is also present, which contains the instructions for dynamically controlling the operating conditions of the fuel cell using the information provided by the model.The '/modules' directory contains all the Python files that serve as modules for other files.Indeed, to improve the readability of the previous programs, some of the less essential instructions have been written as separate functions and placed in these module files.Each of these module files is named to directly refer to the file it is associated with.For example, 'flows_modules.py' is used in 'flow.py'.Additionally, a file named 'transitory_functions.py'is present in this directory and is used in most other programs in the package.It contains a set of mathematical functions that have physical significance for the model, such as the saturation pressure of water vapor.Finally, the directory '/calibration' contains all the information necessary for calibrating the undetermined parameters of the model.The file 'parameter_calibration.py' includes the program for performing the calibration, the file 'ex-perimental_values' contains the experimental information of the fuel cell system that the simulator must represent, the file 'run.sh'contains the instructions to send to the computing cluster to perform the calibration, and the directory '/calibration/results' contains the calibration results.

Software functionalities

5The usage of the software package AlphaPEM is illustrated by the graphical user interface present in the file '/GUI.py'and displayed in figure 2. All the features offered by this GUI are accessible through the files '/main.py'and '/configuration/settings.py'.A fuel cell is characterized by the operating conditions under which it is run, its accessible physical parameters (i.e., its dimensions), and its indeterminate physical parameters (such as the tortuosity of the GDL).All these parameters can be adjusted by the user, and predefined configurations based on existing cells can be selected in the 'Fuel cell:' dropdown menu.Other adjustable parameters exist, here hidden in the GUI to avoid overloading the display.On one hand, the current density parameters allow for the adjustment of the shape of the step current density, or the current density required to create polarization or EIS curves.On the other hand, the computing parameters enable modification of numerical settings, such as the number of points in the numerical model placed in the gas diffusion layer, or the purge times of the stack.Next, the user can select different simulation options.The configuration of the auxiliaries of the studied fuel cell system can be chosen, the presence or absence of control over the operating conditions, the presence or absence of an anode purge, the display of results in a synthetic or detailed format, and a display of results either at the end of the simulation or updated frequently during the calculation.Finally, once these choices are made, the user can generate the model results, which include the internal states and the voltage of the fuel cell system, either from a current density step, or a current density producing a polarization curve or an EIS curve.The GUI limits the simulation possibilities to these three types of current densities, but from the source code, it is possible to use any physically acceptable function.Additionally, the user can perform automated calibration of the undetermined parameters using the Python file '/calibration/parameter_calibration.py'.This functionality is not available from the GUI.For this, it is necessary to input the experimental values of polarization curves under different operating conditions in the file '/calibration/experimen-tal_values' (at least three curves), as well as the operating conditions and physical parameters of the fuel cell system studied in the file '/modules/calibration_modules'.This automated calibration uses a genetic algorithm.The parameters of this algorithm have been adjusted for this specific optimization problem to achieve a good balance between the accuracy of the calibration and execution speed.These parameters are shown in table 2. Only the population size and the maximum number of iterations can be modified to match the available computing capacity.It is preferable to have the population size between 100 and 200 individuals and to choose a number that is a multiple of the number of available CPU cores to utilize them fully, as the calculations are parallelized for each member of the same population.The number of iterations should be as large as possible, typically around 1000 to 1500 generations for effective calibration.It is worth noting that the calibration can be resumed from where it previously stopped, allowing multiple computation sessions to finally achieve a satisfactory result.Finally, it is preferable to use a computing cluster with many CPU cores for calibration.As an example, the authors successfully performed a calibration with a maximum error of 1.06% between the experimental and simulated data, after two weeks of calculations on a server equipped with 80 Intel(R) Xeon(R) Gold 6338 CPU cores @ 2.00GHz.

Polarization curves and parameters calibration

6To enable AlphaPEM to simulate the internal states and voltage of a given fuel cell system, it is necessary to provide the simulator with a number of physical parameters to adjust it to the real machine.Some of these parameters are easily accessible, such as the dimensions of each cell, but another part is inaccessible unless the manufacturers have shared them, which is rarely the case.These undetermined physical parameters can be calibrated by AlphaPEM using at least three experimental polarization curves, as discussed section 2.2.Once calibration is done, curves like those in figure 3 can be obtained.The quantity ∆U max corresponds to the maximum deviation between the experimental and simulated curves.After this calibration, other polarization curves can be simulated by AlphaPEM for all realistic operating conditions.For an estimation of AlphaPEM's execution speed, the simulator requires less than 35 seconds to simulate one of the polarization curves depicted in figure 4 on a mobile workstation equipped with an 11th generation Intel Core i9 processor boasting 16 cores operating at 2.60GHz and 32 GiB of RAM.In this instance, computation occurs at intervals of 0.1 A.cm −2 .Thus, optimizing execution speed can be achieved by reducing the precision of the polarization curve.

Fuel cell system internal states

7Once AlphaPEM is calibrated, it is possible to simulate the temporal evolution of the internal states of a given fuel cell.Thus, it is possible to dynamically track at different points within a cell the concentration of water vapor C v , the liquid water saturation s, the water content dissolved in the membrane λ, as well as the concentrations of hydrogen C H 2 and oxygen C O 2 .Similarly, the temporal evolution of cell voltage U cell and various auxiliary variables can be monitored: pressures P, relative humidities Φ, mass flows W, and throttle areas A bp .For instance, figure 4 illustrates the temporal evolution of U cell , C v and s for the same fuel cell system previously mentioned in figure 3, stimulated by two current density steps.Further curves, details and explanations of the observed evolutions are provided in the authors' previous work [20].

8For an estimation of AlphaPEM's execution speed, the simulator requires less than 20 seconds to simulate the 1000second temporal evolution depicted in figure 4 on a mobile workstation equipped with an 11th generation Intel Core i9 processor boasting 16 cores operating at 2.60GHz and 32 GiB of RAM. )

Impact

9The current energy transition is generating a growing demand for PEM fuel cells with higher power densities and longer lifespans [28][29][30].In this context, physics-based modeling plays a crucial role in improving the dynamic control of fuel cells, thereby enhancing their performance and longevity [31,32].However, creating such models is a lengthy and complex task for researchers, as it requires integrating numerous scientific disciplines, including electrochemistry, fluid mechanics, thermodynamics, computational physics, and mathematics.Therefore, it is essential to provide the scientific community with a clear and robust foundational model on which future research can build to advance the field more rapidly.Thus, following the work of Pukrushpan and Vetter, who were the first to disseminate simplified PEM fuel cell models [14,16], AlphaPEM is introduced as the first open-source software package modeling dynamically and in 1D fuel cell systems for embedded applications, offering a good compromise between accuracy and execution speed.AlphaPEM simulates the internal states of fuel cell systems, providing real-time access to information inaccessible by sensors.This enriches fuel cell control strategies, paving the way for better performance and longevity.Additionally, AlphaPEM is designed with a modular architecture, facilitating the addition of extensions by the community.It is thus easy to incorporate heat transport physics, cell degradation modeling, spatial dimension extension to 1D+1D, and the simulation of cell stacks, to more accurately reflect reality while maintaining sufficient execution speed.These points align with the authors' future research ambitions.The contributions of AlphaPEM thus advance the development of fuel cell systems by facilitating their analysis, control, and improvement.

Conclusions

10The work presents AlphaPEM, an open-source, user-friendly, and modular software package in Python, designed for PEM fuel cell modeling for embedded applications.This framework is based on a 1D finite difference, dynamic, biphasic, and isothermal model of PEM fuel cell systems.It employs a solver using an implicit numerical method to solve the system of differential equations.This model has been experimentally validated in previous studies.In practice, AlphaPEM provides real-time access to the internal states and the voltage of the fuel cell systems and can generate polarization and EIS curves.It can also automatically calibrate the model's undetermined parameters to fit any real fuel cell system.This simulator, therefore, paves the way for improving the real-time control of the operating conditions of fuel cell systems to enhance their performance and longevity.Thermal modeling and spatial extension will be developed in future versions.

p y t h o n 3

11−m venv env # c r e a t i o n o f a new p y t h o n e n v i r o n m e n t s o u r c e env / b i n / a c t i v a t e # a c t i v a t i o n o f t h e e n v i r o n m e n t p i p i n s t a l l numpy s c i p y m a t p l o t l i b c o l o r a m a PyQt5 P y S i d e 2 g e n e t i c a l g o r i t h m 2 [ f u l l ] t t k t h e m e s # r e q u i r e d p a c k a g e s 2.1.Software architecture

Figure 1 Figure 1 :

12Figure 1: The main structure of AlphaPEM (the reader is referred to the colored web version of this article for improved readability).

Figure 2 :

13Figure 2: AlphaPEM graphical user interface.

14P = 2.0 bar -U max = 1.12 % Exp.-P = 2.25 bar Sim.-P = 2.25 bar -U max = 0.97 % Exp.-P = 2.5 bar Sim -P = 2.5 bar -U max = 1.73 %

Figure 3 :

15Figure 3: Polarization curves generated by AlphaPEM simulating a single fuel cell system from EH Group [24] under various operating conditions.

Figure 4 :

16Figure 4: Internal states generated by AlphaPEM simulating a single fuel cell system from EH Group [24] under two current density step stimulations.

Table 2 :

17Optimised genetic algorithm parameters for AlphaPEM.

참고문헌 18건

  1. GNU GENERAL PUBLIC LICENSE Elsevier eBooks · Elsevier BV · 2007 10.1016/b978-1-59749-099-3.50024-0
  2. University of Michigan Fuel Cell Stack Simulation package 2002
  3. Two-dimensional modeling of a polymer electrolyte membrane fuel cell with long flow channel. Part I. Model development Journal of Power Sources · Elsevier BV · 2014 10.1016/j.jpowsour.2014.11.058
  4. Control-Oriented Modeling and Analysis for Automotive Fuel Cell Systems Journal of Dynamic Systems Measurement and Control · ASM International · 2004 10.1115/1.1648308
  5. 2+1D modelling of a polymer electrolyte fuel cell with glassy-carbon microstructures Mathematical and Computer Modelling of Dynamical Systems · Taylor & Francis · 2012 10.1080/13873954.2011.642390
  6. A Multiphysic Dynamic 1-D Model of a Proton-Exchange-Membrane Fuel-Cell Stack for Real-Time Simulation IEEE Transactions on Industrial Electronics · Institute of Electrical and Electronics Engineers · 2009 10.1109/tie.2009.2021177
  7. Open-source computational model of a solid oxide fuel cell Computer Physics Communications · Elsevier BV · 2015 10.1016/j.cpc.2015.10.007
  8. A multi-timescale modeling methodology for PEMFC performance and durability in a virtual fuel cell car International Journal of Hydrogen Energy · Elsevier BV · 2015 10.1016/j.ijhydene.2015.09.152
  9. Mathematical Modeling of Transient Transport Phenomena in PEM Fuel Cells 2009
  10. Nonlinear predictive control for durability enhancement and efficiency improvement in a fuel cell power system Journal of Power Sources · Elsevier BV · 2016 10.1016/j.jpowsour.2016.08.019
  11. Characteristics of PEMFC operating at high current density with low external humidification Energy Conversion and Management · Elsevier BV · 2017 10.1016/j.enconman.2017.08.034
  12. Free open reference implementation of a two-phase PEM fuel cell model Computer Physics Communications · Elsevier BV · 2018 10.1016/j.cpc.2018.07.023
  13. “3D+1D” modeling approach toward large-scale PEM fuel cell simulation and partitioned optimization study on flow field eTransportation · Elsevier BV · 2020 10.1016/j.etran.2020.100090
  14. Designing the next generation of proton-exchange membrane fuel cells Nature · Nature Portfolio · 2021 10.1038/s41586-021-03482-7
  15. Validation methodology for PEM fuel cell three-dimensional simulation International Journal of Heat and Mass Transfer · Elsevier BV · 2022 10.1016/j.ijheatmasstransfer.2022.122705
  16. openFuelCell2: A new computational tool for fuel cells, electrolyzers, and other electrochemical devices and processes Computer Physics Communications · Elsevier BV · 2024 10.1016/j.cpc.2024.109092
  17. A Critical Review of Proton Exchange Membrane Fuel Cells Matter Transports and Voltage Polarisation for Modelling Journal of The Electrochemical Society · Institute of Physics · 2024 10.1149/1945-7111/ad305a
  18. An advanced 1D physics-based model for PEM hydrogen fuel cells with enhanced overvoltage prediction International Journal of Hydrogen Energy · Elsevier BV · 2024 10.1016/j.ijhydene.2024.11.374