openfcst: an open-source mathematical …cbalen/_downloads/ecs_trans...openfcst: an open-source...

26
OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a , A. Putz b , P. Wardlaw a , V. Zingan a , M. Bhaiya a , M. Moore a , J. Zhou a , C. Balen a and K. Domican a a Energy Systems Design Laboratory, Dept. of Mechanical Engineering, University of Alberta, Edmonton, AB T6G 2G8, Canada b Automotive Fuel Cell Cooperation, Burnaby, British Columbia V5J 5J8, Canada OpenFCST (open-source fuel cell simulation toolbox) is an open- source, finite element method based, multi-dimensional mathemati- cal modeling software for polymer electrolyte fuel cells. The aim of the software is to develop a platform for collaborative devel- opment of fuel cell mathematical models. The philosophy, struc- ture and main components of openFCST are presented. OpenFCST currently includes physical models for gas, electron, ion, ionomer- bound water and heat transport. It also contains eective transport media relations to estimate transport properties for gas diusion lay- ers, micro-porous layers and catalyst layers as well as several kinetic models for the fuel cell electrochemical reactions. OpenFCST has been structured as a toolbox such that it is easier for new users to integrate new physical models with existing framework. OpenFCST is used to analyze the impact of dierent kinetic models on a mul- tidimensional cathode model and to study the main dierences be- tween a macro-homogeneous and several agglomerate models. Fi- nally, openFCST is used to develop a three-dimensional model of a patterned catalyst layer. Results show that multi-step kinetic models improve fuel cell performance predictions, macro-homogeneous and ionomer-filled agglomerate models show similar performance for 100 nm radii agglomerates up to current densities of 2 A/cm 2 , and water-filled agglomerate models require negative surface charges to exist at the pore walls in order to provide results in-line with exper- imental data. Finally, a patterned catalyst layer with micro-pores is shown to improve electrode performance. Introduction Over the past two decades a myriad of polymer electrolyte fuel cell mathematical mod- els have been proposed in the literature (1). Fuel cell models with dierent mass, heat 10.1149/06403.0655ecst ©The Electrochemical Society ECS Transactions, 64 (3) 655-680 (2014) 655 ) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240 Downloaded on 2015-12-14 to IP

Upload: others

Post on 22-May-2020

13 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

OpenFCST: An Open-Source Mathematical Modelling Software for Polymer

Electrolyte Fuel Cells

M. Secanella, A. Putzb, P. Wardlawa, V. Zingana, M. Bhaiyaa, M. Moorea, J. Zhoua, C.

Balena and K. Domicana

aEnergy Systems Design Laboratory, Dept. of Mechanical Engineering, University of

Alberta, Edmonton, AB T6G 2G8, CanadabAutomotive Fuel Cell Cooperation, Burnaby, British Columbia V5J 5J8, Canada

OpenFCST (open-source fuel cell simulation toolbox) is an open-

source, finite element method based, multi-dimensional mathemati-

cal modeling software for polymer electrolyte fuel cells. The aim

of the software is to develop a platform for collaborative devel-

opment of fuel cell mathematical models. The philosophy, struc-

ture and main components of openFCST are presented. OpenFCST

currently includes physical models for gas, electron, ion, ionomer-

bound water and heat transport. It also contains effective transport

media relations to estimate transport properties for gas diffusion lay-

ers, micro-porous layers and catalyst layers as well as several kinetic

models for the fuel cell electrochemical reactions. OpenFCST has

been structured as a toolbox such that it is easier for new users to

integrate new physical models with existing framework. OpenFCST

is used to analyze the impact of different kinetic models on a mul-

tidimensional cathode model and to study the main differences be-

tween a macro-homogeneous and several agglomerate models. Fi-

nally, openFCST is used to develop a three-dimensional model of a

patterned catalyst layer. Results show that multi-step kinetic models

improve fuel cell performance predictions, macro-homogeneous and

ionomer-filled agglomerate models show similar performance for

100 nm radii agglomerates up to current densities of 2 A/cm2, and

water-filled agglomerate models require negative surface charges to

exist at the pore walls in order to provide results in-line with exper-

imental data. Finally, a patterned catalyst layer with micro-pores is

shown to improve electrode performance.

Introduction

Over the past two decades a myriad of polymer electrolyte fuel cell mathematical mod-

els have been proposed in the literature (1). Fuel cell models with different mass, heat

10.1149/06403.0655ecst ©The Electrochemical SocietyECS Transactions, 64 (3) 655-680 (2014)

655) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 2: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

and charge transport models, and electrochemical reaction mechanisms have been studied.

Multi-scale catalyst layer representations, such as ionomer- and water-filled agglomerate

models, have also been presented (2, 3). Even though a large number of mathematical

models have been proposed, a generally accepted mathematical fuel cell model does not

yet exist in the literature. Furthermore, direct comparison of different mathematical mod-

els has seldom been performed. Detailed quantitative assessments of the different terms

involved in physical models, such as the impact of electro-osmotic drag, back diffusion and

thermal osmosis in water transport across the membrane, have also rarely been reported.

A reference mathematical model and comparative studies are critical in order to assess the

validity of the different models proposed in the literature.

The development of a generally accepted fuel cell mathematical model and the direct

comparison of fuel cell mathematical models has remained elusive for several reasons. On

the one hand, many research groups use commercial software for fuel cell simulation. In

these cases, the governing equations in the numerical software are not usually discussed in

detail and the user-defined subroutines implemented by the research group that include any

new mathematical model are not shared with the community, thereby making it difficult to

compare results. Furthermore, given the cost of commercial computational fluid dynamics

licenses, it is likely only one commercial software is used by each research group.

On the other hand, several reseach groups have developed their own in-house fuel cell

numerical models as an alternative to using commercial software. Direct comparison be-

tween these numerical models has also been hampered by several reasons. Firstly, due to

the multi-physics, coupled nature of fuel cells, developing a detailed fuel cell model is a

time-consuming endeavour. As a result, most research groups have focused their attention

on a specific fuel cell physical process while usually neglecting other processes. Secondly,

in order to simplify the problem, a large portion of in-house numerical models are either

one-dimensional or analyze only one component of the cell, usually the cathode electrode.

It has been shown in the literature that, even at high stoichiometries when the gas concen-

tration in the channel is constant, in order to fully study the impact of these models on fuel

cell performance, the models need to be integrated in multi-dimensional models as land-

to-channel effects are important (4). This is a necessary, but time-consuming, endeavour.

Finally, the developed in-house software is not usually shared with the fuel cell community,

thereby making nearly impossible to reproduce the results by a different research group.

There is a need to develop a fuel cell numerical modelling framework that can be used

as a standard model. The numerical framework should allow for rapid implementation of

new physical models and, at the same time, it should be able to allow for easy integration

of these models into complete, multi-dimensional membrane electrode assembly simula-

tions. In this way, researchers interested in a single component, e.g. the cathode electrode,

could develop the model at the component level, while researchers working at the MEA

or stack level could integrate the new single component models into MEA simulations.

For the former to be possible, the numerical software should be designed such that each

physical process model and fuel cell component properties are compartmentalized, easy to

re-develop and can interact easily with the other components. The framework should also

ECS Transactions, 64 (3) 655-680 (2014)

656) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 3: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

be free-of-charge and open-source to prevent economic limitations to reduce the usability

of the code and to guarantee that researchers from other groups can reproduce the results

obtained using the fuel cell framework. Benchmark test results obtained with the simula-

tion software could then be used for testing the program. The objective of this article is to

introduce such framework.

In this article, openFCST, viz. open-source fuel cell simulation toolbox, the first free,

open-source, multi-dimensional fuel cell simulation software in the literature is presented.

Section 2 provides an overview of the main components that form the fuel cell simulation

toolbox. The philosophy for each component is outlined followed by a list of currently

available options for each module. Section 3 then explains how to obtain and install the

program and then provides three case studies where openFCST is used to assess the impact

of different kinetic, micro-scale models and patterned electrodes on fuel cell performance.

Structure of OpenFCST

OpenFCST is an integrated open-source tool for multi-dimensional fuel cell analysis and

design. It can be used to analyze mass transport, charge transport, heat transport, and

electrochemical reactions in multi-dimensional fuel cell models, i.e., in two and three di-

mensional models. It has been develop in C++ taking advantage of object oriented and

generic programming. It takes advantage of several open-source pre-processing, finite el-

ement and post-processing tools. OpenFCST contains a build-in mesh generator. It can

also import quadrilateral/hexahedral meshes generated with the open-source pre-processor

Salome. The physics and material databases in openFCST, to be discussed below, allow

the user to setup the fuel cell governing equations for some of the most important physical

processes that take place in a fuel cell. OpenFCST already implements the weak forms

for many governing equations that are then solved using the finite element open-source li-

braries deal.II (5). In order to analyze numerical solutions, openFCST can output results

to VTK/VTU so that they can easily be read with the open-source post-processors like Par-

aview (6) and/or Visit. OpenFCST is not only an analysis tool, it is also integrated with

the design and optimization package Dakota (7). Therefore, it can be used for design and

optimization as well as parameter estimation.

Object-oriented programming is used in order to increase the reliability and reusability

of the software. Reliability is achieved by the use of objects that encapsulate the majority

of the necessary data making it only accessible to the advanced users. Reusuability is

achieved by the extensive use of abstract classes defining a clear interface between objects

in the program. Each physical process model and fuel cell component are implemented in

different namespace and classes. OpenFCST has been structured into the following main

sub-sections, each with its own namespace:

• Linear application classes, i.e., namespace FuelCell::Application

• Wrapper application classes, i.e., namespace FuelCell::Application

• Geometry classes, i.e., namespace FuelCellShop::Geometry

ECS Transactions, 64 (3) 655-680 (2014)

657) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 4: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

• Equation classes, i.e., namespace FuelCellShop::Equation

• Layer classes, i.e., namespace FuelCellShop::Layer

• Kinetics classes, i.e., namespace FuelCellShop::Kinetics

• Material classes, i.e., namespace FuelCellShop::Material

• Post-processing classes and Response/functional evaluation classes, i.e., namespace

FuelCellShop::PostProcessing.

For each one of these sub-sections, an abstract class has been developed to provide

a common interface for objects of each sub-type. This common interface serves several

purposes: a) to allow users to, without developing new routines, be able to switch between

implementations of objects of the same sub-type, b) to enable developers to implement new

classes for a specific sub-type easily by providing a standard template and examples, and c)

to make sure developers can integrate their code into openFCST without the need to modify

any other sub-routine. The software structure enables the easy extension of openFCST.

Linear Applications

Linear application classes are the heart of openFCST. These classes use Equation,

Layer, Kinetics, Material and Post-processing class objects in order to build and solve the

underlying partial differential equations that describe the physical processes of the problem

at hand, and output the solution in a convenient format that can be analyzed in ParaView,

such as VTU format (6). OpenFCST uses the continuous Galerkin finite element method

(CG FEM) to solve the fuel cell governing equations. This method for solving partial

differential equations can be summarized in the following steps:

1. Discretization of the n-dimensional physical domain, Ω, into the set Th of disjoint

non-overlapping elements K, known commonly as either mesh or grid,

2. introduction of the finite element space Vp

hconsisting of continuous scalar-valued

polynomial functions vh of degree p > 0 such that for each element K ∈ Th : vh =Ns∑

i=1

vh,iψi(x) where vh is either the test or solution approximation function, Ns = (p +

1)dim is the number of support points, vh,i are the values of vh at the support points, and

ψi(x) are basis functions which are compactly supported on K and elements adjacent

to K,

3. linearization of governing equations if needed,

4. derivation, using the continuous Galerkin method, of the global and then element-

wise weak formulation of the linearized problem,

ECS Transactions, 64 (3) 655-680 (2014)

658) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 5: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

5. assemble of the global linear system of equations using the finite element-wise weak

form of the PDEs,

6. solution of the global linear system of equations using the numerical methods of

linear algebra, and

7. post-processing of the solution.

A concise introduction to the CG finite element method can be found in references (8).

Linear application classes are directly responsible for steps 1, 2, 5 and 6. Steps 3 and 4 are

performed by the Equation, Layer, Kinetics, Material objects inside the application. Step 7

is performed by Post-processing objects inside the linear application.

Linear applications contain the following main routines/member functions:

• declare_parameters: This member function is used to identify a parameter in the

parameter file.

• initialize: This member function is used to read the parameter file and initialize

all object including the object that generates the mesh and Equation, Layer, Kinetics,

Material objects.

• assembly: This member function is used to build, i.e. assemble, the global matrix

of equations. The main functionality of this routine is already developed within

openFCST such that the user is only responsible for identifying the element-wise

matrix. This matrix is provided using member functions cell_matrix for the terms

in the weak form of the partial differential equation evaluated inside the element, and

bdry_matrix for the terms evaluated at the boundaries of the domain (usually for

Neumann boundary conditions). These are the only member functions that the user

needs to implement.

• residual: This member function is used to build the right-hand side of the linear

system of equations. Furthermore, it provides the L2-norm of the vector. Again, the

main functionality of the routine is already developed in openFCST and the user is

only responsible with providing the element-wise vector. This vector is provided in

member function cell_residual.

• solve: This member function is used to implement the linear solver. A default solver

class is already implemented.

• data_out: This member function is used to compute additional output information.

By default the application returns only the solution variables. In order to analyze fuel

cell operation, it is sometimes convenient to output additional data such as current

density, relative humidity and overpotential. This function can be used to output such

quantities.

ECS Transactions, 64 (3) 655-680 (2014)

659) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 6: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

declare_parameters

initialize

assemble

Loop over all finite elements

and callcell_matrix

bdry_matrix

residual

Loop over all finite elements

and callcell_residual

bdry_residual

solve

data_out + estimate

VTU file

and

current density

Text input file

Figure 1: Workflow of a Linear application

The execution flow of openFCST is as follows. First, declare_parameters is called

to make sure the input file contains all the necessary information and to provide default

data for any missing variables, then initialize is used to read the input file provided

by the user and setup the problem computational domain, effective transport properties,

and solver parameters. Then, the system of equations is constructed and solved using

assembly, residual and solve. Finally, the solution is output to file. A summary of the

workflow in openFCST is given in Figure 1.

In order to develop a new fuel cell mathematical model in openFCST, a linear applica-

tion needs to be developed. Most fuel cell models are non-linear. The linearized version

of the problem is therefore implemented. An in-depth openFCST tutorial showing how

the cathode application used in this article was developed is provided in the openFCST

website. In order to make developing new applications as simple as possible, most of the

ECS Transactions, 64 (3) 655-680 (2014)

660) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 7: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

functionality of a linear application has already been developed within openFCST. The user

will need to take care mainly of four tasks:

1. Select the Equation, Layer, Kinetics, Material and Post-processing class objects that

are necessary for the application,

2. create an appropriate input file,

3. read the input file and initialize the computational mesh, boundary conditions, and

all object in the application,

4. use Equation and Layer objects in cell_matrix, bdry_matrix, cell_residual

and bdry_residual to create the element-wise linear system of equations, and

5. select the quantities the user would like to visualize during post-processing.

Wrapper Applications

Wrapper applications are used to implement adaptive refinement, nonlinear and tran-

sient problems. Solving the aforementioned cases, generally involves solving a linear prob-

lem iteratively. Wrapper applications use a linear application in order to solve the required

linear problem. Wrapper applications contain a linear application and mainly implement

three additional routines/member functions:

• declare_parameters: This member function is used to identify parameters in the

parameter file for the wrapper class as well as the embedded linear application.

• initialize: This member function is used to read the parameter file and initialize

the wrapper class as well as the embedded linear application.

• solve: This member function is used to implement the iterative loop necessary to

solve the problem.

The cathode application described below contains a system of non-linear partial differ-

ential equations (PDE). In order to solve the model, a Newton-Raphson algorithm is used.

Using this algorithm, a linearized version of the non-linear PDE is obtained using variation

methods and solved iteratively in order to obtain an updated solution δu such that

R(un) ≈ R(un−1) +δR(un−1)

δuδu = 0 [1]

where un−1 is the solution at the previous iteration and the next solution is given by un =

un−1 + δu. The problem is solved iteratively until the nonlinear equation is satisfied, i.e.

||R(un)||L2< ǫ where ǫ is a threshold value, usually 10−8.

Dividing linear and wrapper applications allows the same linear application to be used

with a variety of wrapper solvers and it allows users to experiment with different wrapper

ECS Transactions, 64 (3) 655-680 (2014)

661) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 8: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

solvers. For example, openFCST contains three Newton-Raphson algorithms which can be

used depending on the convergence behaviour of the PDE. Further, wrapper applications

can be nested within one another such that it is possible to perform adaptive refinement

on a nonlinear problem or solve a transient linear or nonlinear problem. The division of

linear and wrapper classes enhances collaboration within research groups. For example,

assessing the performance of novel iterative nonlinear solver might not be of interest to the

fuel cell community. It might be of interest, however, to the mathematics community. The

division of applications allows mathematicians to test new iterative algorithms by solving

a challenging, applicable problem.

Equation Classes

assembly and residual in linear applications are in charge of assembling the weak

form of the linearized form of the PDE that govern the fuel cell problem. These two

routines loop over every element in the computational domain and ask cell_matrix,

bdry_matrix, cell_residual, and bdry_residual to provide the element-wise weak

form of the PDE. When developing a new fuel cell model, it is likely that the user would

like to focus on one new physical process, while the majority of mathematical models for

the other processes would remain the same. The Equation classes have been developed

to encapsulate the element-wise weak form of different PDEs commonly used in fuel cell

mathematical models such as Fick’s law, Ohm’s law and, a water management model, so

that including already existing physics into a model is easy by simply reusing the Equa-

tion objects already available. Using the Equation classes, cell_matrix, bdry_matrix,

cell_residual, and bdry_residual are implemented by simply calling the appropriate

Equation classes for each fuel cell computational domain as illustrated in the aforemen-

tioned openFCST tutorial.

OpenFCST currently contains Equation classes for the following physics: a) Fick’s law,

b) Ohm’s law, c) membrane water transport model with back-diffusion, electro-osmotic

drag, and thermal-osmosis, d) a thermal model, e) reaction and water sorption production/-

consumption, and f) incompressible Navier-Stokes fluid flow equations. For each case, the

weak form of the PDE was obtained using the continuous Galerkin method. Then, the fi-

nite element test and solution approximation functions are used to discretize the equations.

Finally, the integrals are evaluated using Gauss-Legendre quadrature formulas. The result

of this process is the element-wise matrix and right-hand side of the PDE. The user can

use several finite element approximation functions, such as first order Lagrange elements

or higher-order elements, provided by the deal.II libraries (5).

For example, for the case of charge conservation equation in the gas diffusion electrode,

the strong PDE along with appropriate boundary conditions is given by

∇ ·(

σe f f

GDL∇φS

)

= 0 in Ω, [2]

φS = φ0S on ΓD,

σe f f

GDL∇φS · n = fN on ΓN ,

ECS Transactions, 64 (3) 655-680 (2014)

662) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 9: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

where ΓD and ΓN are the Dirichlet and Neumann portions of the boundary Γ = ∂Ω, respec-

tively.

A discrete form of the weak formulation can be obtained as follows:

∀K ∈ Th find φS ,h ∈ Vp

hsuch that ∀vh ∈ V

p

h: [3]

Ω

∇vh · σe f f

GDL∇φS ,hdΩe −

ΓN

vh fNdΓ = 0

Note that since vh = 0 on ΓD, the boundary integral over Dirichlet boundary is not included.

In each element, substituting the solution and test function by its approximate functions,

the element-wise discrete form of the weak PDE is(∫

Ωe

∇ψi ·(

σe f f

GDL∇ψ j

)

dΩe

)

φS , j =

Γe

ψi fNdΓe. [4]

where φS , j is the unknown electrical potential at the nodes of the finite element mesh, ψi

and ψ j are the finite element approximation functions for test and solution functions, Ωe is

the element domain and, Γe is the boundary of the element.

As it was mentioned above, all integrals arising in the weak formulations, e.g. in-

tegrals in equation [4], are evaluated using Gauss-Legendre quadrature formula. Then,

cell_matrix implements the volume integral and bdry_residual implements the bound-

ary integral of the weak formulation [3]. For example, cell_matrix implements

Kei j =

q

∇ψi(xq) ·(

σe f f

GDL(xq)

)

∇ψ j(xq)wqdet(J) [5]

where wq are the integration weights for the appropriate Gauss-Legendre quadrature for-

mula, det(J) is the determinant of the Jacobian of the coordinate transformation used to

map the domain to an isoparameteric domain (8) and ψi(xq) means the approximation func-

tion evaluated at the coordinates of the quadrature points. bdry_residual implements the

term in the right-hand side.

All Equation classes inherit the common interface provided by EquationBase. Using

this interface, all Equation classes interact with the rest of openFCST objects in a prede-

fined manner allowing users to swap Equation objects easily and to develop new math-

ematical models. A new Equation class should contain the following four routines: a)

assemble_cell_matrix, b) assemble_cell_residual, c) assemble_bdry_matrix,

and d) assemble_bdry_residual.

Layer Classes

Fuel cells contain at least three layers, i.e. gas diffusion layer, catalyst layer and mem-

brane. Each one of these layers is a porous composite material made up of at least two

pure materials. For example, most gas diffusion layers are made up of carbon fibers, binder

and PTFE. One difficulty when implementing fuel cell mathematical models in commercial

ECS Transactions, 64 (3) 655-680 (2014)

663) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 10: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

software is that users have to specify a very large number of transport parameters for each

layer. Furthermore, most transport properties in these layers are nonlinear, i.e. they depend

on solution variables such as temperature and saturation. As a result, it is difficult to study

the effect of different fuel cell layer representations with the same mathematical model.

OpenFCST contains a suite of classes, known as Layer classes, in order to obtain the

effective properties of different types of gas diffusion layers, micro-porous layers, cata-

lyst layers and membranes. A common interface for each type of Layer object has been

developed. Users can select, from the input file, any available object of the given com-

mon interface type without any change to the software. A common interface has been

developed for the following classes: a) GasDiffusionLayer, b) MicroPorousLayer, c)

CatalystLayer, d) MembraneLayer, e) Channel, and f) SolidLayer. The common

interface can also be used by users to develop new Layer classes, which would then seam-

lessly merge with openFCST without any changes to the other types of classes. In addition

to several objects providing transport properties for commercial GDLs, MPLs and mem-

branes, openFCST also contains Layer classes that read all effective properties from a file

and Layer classes that compute the transport properties based on the properties of the pri-

mary materials and their composition in the layer using known correlations in the literature

such as Bruggemann and percolation theory. The latter layers are used for design and

optimization.

Layer objects are also used to encapsulate micro-scale simulations. CatalystLayer

objects, for example, are used in order to obtain, in addition to effective transport proper-

ties, the average current density in the element. Several researchers have suggested that

the catalyst layer contains a microscopic structure that can be idealized by a spherical ag-

gregate of carbon particles with the reactant being consumed as it is transported into the

sphere. Different mathematical models for the micro-scale have been proposed, the most

common being ionomer-filled (2) and water-filled agglomerates (3), with the main differ-

ence being how proton transport is idealized. Several objects inheriting the interface from

a CatalystLayer have been developed to implement the different types of agglomerates

so that macro-homogeneous, ionomer-filled and water-filled models can now be compared

using the same macro-scale parameters. When Equation classes request information on the

current density, a sub-problem is solved inside the Layer object and the current is returned

as described in reference (9). This framework allows openFCST to explore any type of

sub-scale problem.

Transport properties are necessary in order to implement the governing equations in the

Equation classes. For example, coefficient σe f f

GDLin equation [2] needs to be obtained in or-

der to assemble the element-wise matrix. Linear applications contain the necessary Layer

objects which are then passed to the Equation classes in cell_matrix, bdry_matrix,

cell_residual, and bdry_residual to calculate the element-wise matrices.

Kinetics Classes

The electrochemical reactions in a fuel cell are commonly approximated by either a

ECS Transactions, 64 (3) 655-680 (2014)

664) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 11: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

CatalystLayer

Figure 2: Catalyst layer object schematic with embedded Material and Kinetic objects

Tafel or a Butler-Volmer kinetic model. It is well known in the literature that both hydro-

gen evolution and oxygen oxidation reactions are multi-step reactions with a varying rate

determining step (10, 11, 12). OpenFCST includes several kinetic models in addition to

the standard Tafel kinetics model. Furthermore, a common interface has been developed so

that new kinetic models can be integrated. Kinetics classes have a common interface spec-

ified in class BaseKinetics. Objects of Kinetics class can be initialized from the input

file. Further, the common interface allows users to easily develop new kinetic models and

integrate them within openFCST.

CatalystLayer objects contain the Kinetic class object necessary to estimate the cur-

rent density inside the layer. Furthermore, it is possible to implement new Kinetics objects

that can be used to study other reactions such as carbon corrosion. To date, openFCST

contains four Kinetics objects implementing: a) Tafel model, b) Butler-Volmer model, c)

dual path HOR model (10), and d) double trap ORR model (9, 12).

Material Classes

In order to evaluate effective transport properties using percolation theory for example,

Layer classes require information about the pure materials that form the composite mate-

rial. In order to obtain effective gas transport properties, it is also necessary to know the

properties of the gases in the porous media. Layer classes usually contain Material objects

which are used in order to obtain the physical properties of pure materials. Material objects

do not appear in the Linear application but instead they are usually embedded inside the

Layer classes. A schematic of a CatalystLayer object is shown in Figure 2, highlighting the

composition of a Layer class and its interaction with materials.

In openFCST, Material classes are divided into several subgroups such as PureGas,

PureSolid, PureLiquid and CatalystBase. Each group has a common interface and different

objects belonging to the same subgroup can be easily exchanged so that different types of

gases and catalysts can be studied.

Post-Processing and Response/Functional Evaluation Classes

Post-processing and Response/functional evaluation classes are used to evaluate new

ECS Transactions, 64 (3) 655-680 (2014)

665) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 12: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

quantities on the computational domain and to evaluate functionals, i.e. integral quantities,

based on the solution, respectively. Available PostProcessing classes are used to com-

pute relative humidity, overpotential, current density, agglomerate effectiveness and oxide

coverages. These classes are used directly in the Linear application in the data_out sub-

routine. Response/functional evaluation classes available in openFCST include classes to

compute the overall current density at anode and cathode, water cross-over, reversible heat

generation, irreversible heat generation, Ohmic heat generation and heat generation due to

water phase change.

Using OpenFCST

In this section, first information on how to install openFCST is provided. Then, three

problems are solved to illustrate the main advantages of openFCST. First, a cathode model

with multiple kinetic models is solved. Then, a macro-homogeneous and an agglomerate

model are compared. These examples are chosen to illustrate the importance of being able

to study different models under the same framework. Finally, a three-dimensional patterned

electrode is studied. The openFCST cathode application instead of MEA application is se-

lected for simplify, in order to analyze a case that a new user to openFCST can quickly

reproduce. The input data files used to obtain the results presented in the article will be

included in openFCST release 0.2 (tentatively scheduled for November 2014).

Getting Started

OpenFCST is developed on a Linux OS environment in order to guarantee free access

to the software. In order to start using openFCST, access to a Linux OS environment, such

as openSUSE or Fedora, and the required packages to compile C++ code, such as GNU

Make, GNU GCC, GNU OpenMPI compiler, CMake, and BLAS and LAPACK libraries,

are needed. Once in a Linux OS environment, openFCST can be downloaded, free-of-

charge, from the following website: www.openfcst.org. The program can be installed

from a bash terminal by simply typing:

$./fcst\_install --cores=5

where the argument cores indicates the number of cores to be used during compilation.

Once the command is issued, openFCST will be installed in the computer (this might take

up to two hours depending on the computer hardware). If any problems occur during

installation, openFCST developers maintain a mailing list to provide the necessary help

at [email protected]. More information regarding compilation is given in a

README file inside openFCST.

Once the program has been installed, the functionality of openFCST can be tested using

the command run_tests. The program will obtain the polarization curve for test cathode

and MEA problems and check that the solution matches previously obtained solutions. This

ensures that the program is fully functional. When developing new routines, run_tests

ECS Transactions, 64 (3) 655-680 (2014)

666) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 13: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

can be used to validate openFCST. The team of openFCST developers maintains a testing

website where the program is tested nightly for compilation and solution errors.

The learning curve for using open-source codes is usually steep, especially for users

with minimal programming experience. The openFCST developing team has tested the

openFCST installation script in openSUSE, Ubuntu and Fedora, different operating sys-

tems, however, behave differently and installing the program might be time-consuming.

The team of openFCST developers is willing to help users installing the program. As it

is well known in the open-source literature, developing a critical number of users in key

to achieving a wide spread use of the software, users, therefore, are encouraged to post

questions and answers to the openFCST mailing list.

Example 1: Analyzing Kinetic Models on a Macro-homogeneous PEMFC Cathode

In this section, the cathode electrode model available in openFCST is used to study the

effect of different kinetic models proposed in the literature in predicting fuel cell perfor-

mance. Even though openFCST also contains a complete MEA model, the cathode model

is selected for illustrative purposes as it contains less input parameters, a line-by-line tuto-

rial on how the application was develop is available in the openFCST website, it already

contains the main physical phenomena to highlight the effects of different ORR kinetic

models, and finally, it can provide results match faster than a complete MEA model, i.e.

in the order of seconds. The cathode model was described in detail in reference (13). The

mathematical model is an across-the-channel, two-dimensional, steady-state cathode elec-

trode model based on the following assumptions:

• Constant temperature and pressure,

• transport of reactants from the gas channels to the catalyst layer occurs only by dif-

fusion of oxygen gas to the ionomer covering the catalyst surface and then by disso-

lution to the reaction site,

• oxygen gas transport in the GDL, MPL and the CL is modeled using Fick’s first law

assuming nitrogen as the solvent instead of the Maxwell-Stefan equations to reduce

the nonlinearity of the system of equations, and

• water transport and its effect on membrane conductivity and potential for cathode

flooding are not considered.

Using the assumptions above, the gas diffusion and catalyst layers are governed by the

following set of equations (13)

R(~u) =

∇ · (ctotDe f f

O2∇xO2

) − 14F∇ ·~i = 0

∇ · (σe f fm ∇φm) − ∇ ·~i = 0

∇ · (σe f f

S∇φS ) + ∇ ·~i = 0

[6]

where R represents the residual and ~u the vector of unknowns, namely the oxygen molar

fraction xO2, the ionomer membrane electrical potential φm and the solid phase electrical

ECS Transactions, 64 (3) 655-680 (2014)

667) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 14: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

Table I: Electrochemical parameters

Parameter Model Value

ire f

0, [A /cm2] Ref. (15) (lcd) 1.69278 × 10−10 exp

(

−80987.618.314

( 1Tc− 1

303.15))

Ref. (15) (hcd) 2.83792 × 10−7 exp(

−28920.958.314

( 1Tc− 1

303.15))

Ref. (16) 2.47 × 10−8 exp(

−670008.314

(1 − Tc

353.0))

Eeq, [V] Ref. (15) (lcd/hcd) (70650 + 8Tcln(Tc) − 92.84Tc)4.184

2F+ ln(50.5) 8.314Tc

2F

Ref. (16) 1.23 − 0.9 × 10−3(Tc − 298) + 2.303·8.314Tc

4Flog10

(

pO2

pre f

O2

)

αc Ref. (15) (lcd) 1.0

Ref. (15) (hcd) 0.5

Ref. (16) 1.0

γO2Ref. (15) (lcd/hcd) 1.0

Ref. (16) 0.54

cre f

O2, [mol/cm3] Ref. (15) lcd/hcd 1.6 × 10−5

Ref. (16) 3.2 × 10−6

potential φS . These equations are solved for in the appropriate domains, i.e. oxygen and

solid potential in all domains and electrolyte potential in the CL only. The physical prop-

erties of the GDL, MPL and CL, oxygen diffusion coefficient, De f f

O2, proton conductivity,

σe f fm , and electron conductivity, σ

e f f

S, are related to the material composition as previously

described in reference (13). The volumetric current density is given by the appropriate

kinetic model, i.e. either a Tafel model

∇ ·~i = Avire f

0

cO2,g|l

cre f

O2

γ

exp

(

−αcF

RT(φs − φm)

)

[7]

where cO2,g|l is given as

cO2,g|l =pxO2

HO2,N

[8]

with the parameters provided in Table I, or a double-trap model

∇ ·~i = j∗e−∆G∗RD/kTθOH − j∗e−∆G∗

−RD/kTθPt [9]

where θi represent the coverages and the kinetic parameters are given in reference (14). The

input data file to openFCST is given in the Appendix.

The four kinetic models are readily available in openFCST. Solving the problem with

one kinetic model over another is achieved simply by changing two lines in the input file

of the program shown in the Appendix section, namely “Kinetics type” and “Method for

kinetics parameters (ORR)”.

Figure 3 shows the predicted cathode polarization curve and Tafel plot for the four

ORR kinetic models at 80 degrees Celsius, 1 atmosphere and 70% relative humidity. Cor-

rected and uncorrected experimental data for a parallel channel fuel cell operated at high

ECS Transactions, 64 (3) 655-680 (2014)

668) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 15: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

stoichiometry is also shown for reference at the same operating conditions. Due to the

simplifying assumptions between model and experimental data, the models are only accu-

rate to about 1 A/cm2 when oxygen dilution via water vapour, two-phase flow, membrane

losses and thermal effects start to dominate the behaviour of the cell. Nevertheless, by

implementing all four kinetic models on the same mathematical cathode model, with the

same parameters, the key differences between the four models can be observed. Results

show that double-trap and a Tafel model using the low current density data in reference

(15) provide results that approximate the experimental data. The other two kinetic models

on the other hand, either over-predict or under-predict performance substantially. Similar

results where highlighted with a full MEA model in reference (9). These results highlight

the advantage of using the same fuel cell mathematical model in order to study the effec-

tiveness of several models in the literature. The results also highlight the robustness of the

software that is able to provide a solution even under mass transport limited conditions as

shown for the electrode model with double-trap kinetics.

The Tafel plot in Figure 3b also highlights the main differences between the two models.

The two Tafel plots obtained with data from reference (15) at low and high current density

show the different apparent transfer coefficient and exchange current density used. The

Tafel model from reference (16) is also shown to have an apparent transfer coefficient of

one. For the case of the double-trap model, a varying Tafel slope is observed. At very low

current densities, a Tafel slope similar to that of the Tafel model with the low current density

data reported in reference (15) is observed. However, the Tafel slope quickly increases at

about 0.85V. Note that a sharp transition does not occur. At current densities near 1 A/cm2

mass transport limitation effects further increase the Tafel slope.

The advantage of multi-dimensional mathematical modelling of fuel cells is that cur-

rent density distributions inside the electrolyte can be analyzed. Figure 4 shows the current

density distribution inside the cathode catalyst layer at 1 A/cm2 for both double-trap and

Tafel model. In order to better compare the current density distribution, both plots use the

same scale. Comparing the current density distribution for each case, it is clear that even

though their predicted performance is not remarkably different, the difference is about 50

mV, the current distribution is. The Tafel model predicts that the majority of the reaction

will take place at the membrane-catalyst layer interface (left boundary) while more than

half the catalyst layer will be inactive. The double trap model on the other hand shows

that the membrane-catalyst layer interface will be the area where the largest reaction will

take place, but the reactivity of this layer is not as large and instead the reaction is much

more uniformly distributed throughout the layer. Based on the Tafel model predictions, a

catalyst layer with only half the thickness, and thereby loading, should be able to achieve

similar performance as the given layer that simulates a platinum loading of 0.4 mg/cm2.

The double-trap model on the other hand predicts a decrease in performance. Experimental

evidence support the double trap model predictions. Finally, the figure clearly shows that

the current distribution is not one-dimensional, thereby highlighting the need for, at least,

two-dimensional models.

ECS Transactions, 64 (3) 655-680 (2014)

669) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 16: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

0 0.5 1 1.5 2 2.5 30.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Current density, A/cm2

Ce

ll v

olt

ag

e,

VPolarization curve at 80C, 70% RH and 1atm (absolute)

Double trap

Parthasarathy LCD

Parthasarathy HCD

Neyerlin

Experimental data

Experimental data (iR free)

(a)

10−4

10−3

10−2

10−1

100

101

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Current density, A/cm2

Cell v

olt

ag

e, V

Tafel plot at 80C, 70% RH and 1atm (absolute)

Double trap

Parthasarathy LCD

Parthasarathy HCD

Neyerlin

Experimental data

Experimental data (iR free)

(b)

Figure 3: Polarization (left) and Tafel (right) plots for the four different kinetic models in

Table I.

Figure 4: Predicted volumetric current density in A/cm3 in the cathode catalyst layer at

current density of 1.0 A/cm2 using a double-trap kinetic model (left) and a Tafel model

with the low current density (lcd) kinetic parameters from ref. (15)

ECS Transactions, 64 (3) 655-680 (2014)

670) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 17: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

Example 2: Analyzing a PEMFC Cathode Using a Macro-Homogeneous, an Ionomer-

Filled Agglomerate, and a Water-Filled Agglomerate Model Using Double-Trap Kinetics

As a second example of the capabilities within openFCST, three different agglomerate

models are compared here using the cathode model discussed in the previous section. In

order to study an agglomerate model with non-linear reaction order with respect to oxygen,

a 1D ionomer-filled agglomerate model with a thin film was developed in reference (9).

The micro-scale mathematical model considers both oxygen and proton transport inside the

agglomerate. The current density produced in the catalyst layer is obtained by upscaling

the current generated in each agglomerate core. In this model, the macro-scale equations

are the same as in the previous example, i.e., equation [6], where the volumetric current

density term, i.e., ∇ ·~i, in A/(cm3CL) is obtain as

∇ ·~i =1

43π (1 − ǫV)

(

ragg + δagg

)3

∫ ragg

0

4πr2 i(r, ~u) dr. [10]

with i(r, ~u) obtained by solving the following micro-scale problem:

~∇ ·(

σe f fm~∇φm

)

= i

~∇ ·(

De f f

O2

~∇cO2

)

= i4F.

[11]

where i is given by the double-trap model in equation [9].

A water-filled model was also proposed by Wang et al. in reference (3). In this model,

the agglomerate is assumed to be filled with water and surrounded by an ionomer film. The

film thickness is calculated based on the total volume of agglomerate in the catalyst layer.

The thin film thickness for ionomer and water-filled models is, therefore, different. In the

water-filled model case, the current density, i(r, ~u), is obtained by solving the micro-scale

problem:~∇ · [D

e f f

H+(~∇cH+ +

FRT

cH+~∇φm)] = i

F

~∇2φm = −Fεε0

(cH+ − c−)

~∇ ·(

De f f

O2

~∇cO2

)

= i4F.

[12]

where De f f

H+is the effective diffusivity of protons in the electrolyte (Nafion in the film and

water in the core), cH+ is the proton concentration in the electrolyte, i is given by the double-

trap model in equation [9] and c− is the concentration of negative charges in the electrolyte.

The latter parameter, as it will be discussed later, has a large influence on the results. In

Nafion, c− is taken to be the concentration of S O−3

groups. In the agglomerate core, negative

charges might be present at the carbon particle walls due to a departure from the potential of

zero charge at different potentials. The value c− would then be a function of the interfacial

area between electronic conductor (carbon and platinum) and the electrical potential of the

solid phase. In this case, this value will be kept constant and it will be changed from a

value equivalent to the negative charges in Nafion to a value of zero. In the future, a more

detailed pore level model such as those proposed by in references (17) and (18) could be

ECS Transactions, 64 (3) 655-680 (2014)

671) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 18: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

used instead to predict the average current instead of the spherical model proposed here. An

implementation of the model proposed in reference (17) is currently under development.

Figure 5 compares the predicted performance using a macro-homogeneous, ionomer-

filled and water-filled agglomerate model with the double trap kinetic model presented in

the previous section. The agglomerate radius and agglomerate porosity are assumed to be

100 nm and 20%, respectively. The figure shows the same trends for macro-homogeneous

and ionomer-filled agglomerate models for up to 1 A/cm2 with only small differences even

at 2 A/cm2. The water-filled agglomerate model, on the other hand, cannot reproduce

experimental tends when negative charges are not assumed to be distributed in the agglom-

erate core.

Figures 6 and 7 show the current produced and local agglomerate effectiveness for an

ionomer-filled and water-filled (with 25% cS O−3

charge) catalyst layer producing 1A/cm2.

The catalyst layer level current distribution for both types of agglomerate models is simi-

lar. The ionomer-filled agglomerate model distribution however seems to be slightly more

distributed. The effectiveness plot shows a very different picture. Ionomer-filled agglom-

erates show 80-90% effectiveness, while water-filled agglomerates effectiveness is below

50% due to proton transport limitations in the core. These limitations require larger over-

potentials in the layer to drive the reaction and as a result to a lower performance, as seen

in Figure 5.

The micro-scale models presented require several oversimplifications with respect to

recently proposed, more complex pore level models in the literature. None of the more

recently proposed models have been integrated into a multi-dimensional simulation. It is

only by integration of such models into a complete, multi-dimensional electrode model that

the interactions between pore-level scales and macro-scales can be assessed. OpenFCST

provides the required tools to proceed with such integration.

Example 3: Patterned Electrode

Patterned electrodes have been recently fabricated in our laboratory using a materi-

als inkjet printer (19). In order to study the effect of the patterning geometries, three-

dimensional simulations of patterned electrodes are being performed using openFCST. The

patterned CCM geometry and computational domain (shaded box) is illustrated in Figure

8 where the computational domain dimensions are 20 µm by 20 µm and 10.41 µm in height

and the catalyst layer coverage is 98%, i.e. a pattern spacing of about 1 µm. The same

application used for Examples 1 and 2 is used in this case, however openFCST is com-

piled to work in three dimensions and the Nafion loading is increased to 40%wt. The

geometry is generated using the mesh generator Salome. The pore space is simulated as

a GDL with a given diffusion coefficient equation equal to the diffusivity of oxygen in

nitrogen, i.e. 0.2741 cm2/s. The reactive catalyst layer pattern is simulated using the

macro-homogeneous layer properties in Example 1 with a double trap kinetics model. On

the top boundary, an oxygen mole fraction and solid phase potential are specified as 0.05

and 0.5V, respectively, and at the bottom domain the electrolyte potential is set to zero.

ECS Transactions, 64 (3) 655-680 (2014)

672) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 19: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

0 0.5 1 1.5 2 2.5 30.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Current density, A/cm2

Cell v

olt

ag

e, V

Polarization curve at 80C, 70% RH and 1atm (absolute)

Double trap macro−homogeneous

Ionomer filled agglomerate

Water filled agglomerate (no charge)

Water filled agglomerate (25% cSO3−

)

Water filled agglomerate (50% cSO3−

)

Water filled agglomerate (75% cSO3−

)

Experimental data

Experimental data (iR free)

Figure 5: Polarization curve for cathode electrodes with different micro-structural modeling

assumptions, i.e., macro-homogeneous, ionomer-filled and water-filled agglomerates.

Figure 6: Current density distribution in an ionomer-filled (left) and water-filled agglomer-

ate (right) catalyst layer with 25% c−S O3charge.

ECS Transactions, 64 (3) 655-680 (2014)

673) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 20: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

Figure 7: Effectiveness distribution in an ionomer-filled (left) and water-filled agglomerate

(right) catalyst layer with 25% c−S O3charge.

Figure 8: Schematic of a patterned electrode developed by inkjet printing technology.

Patterned and non-patterned electrode simulations were performed. For both electrodes,

it was assumed that the amount of platinum per unit volume is 400 mg/cm3. In order to

maintain the same platinum loading, the volume of the catalyzed electrode was maintained

constant. In the non-patterned case, the catalyst layer thickness was reduced from 10.41

µm to 10 µm in order to maintain the total amount of platinum in the layer For a cell volt-

age of 0.5 V, the predicted current densities for non-patterned and patterned electrodes are

2.17 and 2.64 A/cm2, respectively. The pattern substantially improves the performance of

the electrode in this case due to improved oxygen transport. Figure 9a shows the oxygen

mole fraction in the pore space and in the catalyzed pattern. Due to the enhanced mass

transport inside the pore space, oxygen mole fractions are substantially increased along

the pore-catalyzed pattern interface including near the membrane, an area that otherwise

would be oxygen starved. The figure also shows the computational mesh superimposed on

the results. Adaptive refinement is used to refine the areas with largest gradients. It is easy

to identify the pore/catalyzed pattern inteface due to the high level of mesh refinement, i.e.

large number of small cells. Figure 9b shows the volumetric current production inside the

catalyzed region of the electrode. The highest reaction rate is observed at the pore/mem-

brane interface where the oxygen concentration and electrolyte potential are highest. The

reaction rate decreases far from the membrane and from the pore-catalyzed zone interface.

ECS Transactions, 64 (3) 655-680 (2014)

674) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 21: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

0.01

0.02

0.03

0.04

x_O_2

0.00488

0.05

(a)

2000

3000

4000

5000

6000

Volumetric_current_density

1.78e+03

6.1e+03

(b)

Figure 9: Oxygen concentration in the catalyst layer pattern and pore space (left) and vol-

umetic current production in the catalyzed pattern (right).

Example 4: Other Examples in the Literature

OpenFCST has been used for many other applications such as the optimization of a

cathode electrode (13, 20) and an anode electrode (21), analysis and optimization of a

membrane electrode assembly (22), parameter estimation of agglomerate parameters (23),

analysis of a multi-scale framework to study different types of micro-scale models (9), and

more recently, to study non-isothermal effects on a membrane electrode assembly (24).

Conclusion and Future Work

OpenFCST is an open-source fuel cell simulation package created in order to develop

new mathematical models for fuel cells and to validate and benchmark existing mass,

charge, heat and electrochemical transport and reaction models. OpenFCST release 0.1

(released on September 2013) contains cathode and a membrane electrode assembly math-

ematical models. These mathematical models can be used with a variety of catalyst layer,

kinetic and transport sub-models in order to study their impact. Furthermore, the software

is modular in order to allow new users to develop new sub-models for the different compo-

nents of the cell. In this article, a cathode model is used to illustrate the advantages of using

openFCST to analyze different models. The results highlight that: a) multi-dimensional

models are necessary to analyze fuel cell operation, b) the ORR kinetic model can have

a tremendous influence in fuel cell performance predictions, c) macro-homogeneous and

ionomer-filled agglomerate models only appear to have significant differences in perfor-

mance for large agglomerate radii, and d) pore-level assumptions can have a tremendous

impact on the macro-scale model predictions as illustrated by the water-filled model pa-

rameters.

OpenFCST is in active development. Release 0.2 (to be released in November 2014)

will contain the proposed double-trap kinetic model, an enhanced post-processing inter-

face, a thermal model, and the multi-scale framework. The software will be release with

the input files necessary to reproduce the results from the articles discussed above, includ-

ing this article. The developers are currently working on a two-phase flow equation class

and a multi-component mass transport class. The membrane electrode assembly model

ECS Transactions, 64 (3) 655-680 (2014)

675) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 22: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

in openFCST has been compared to experimental performance data in references (9, 23).

Further validation, however, is still necessary. Experimental data for water cross-over, tem-

perature distribution in the cell and, performance under low oxygen concentration, to name

but a few, should also be used to validate the proposed mathematical models. Much work

remains in order to fully characterize a fuel cell. The aim of openFCST is not to provide

a final package for fuel cell simulation since such aim would imply that all physics in the

fuel cell are known, but to develop a collaborative tool to share new insight among the fuel

cell community.

Acknowledgements

The authors would like to thank Guido Kanschat for developing and providing access to

the application framework. The authors would also like to thank the Natural Sciences and

Engineering Research Council of Canada (NSERC), the Automotive Fuel Cell Cooperation

(AFCC), and the Catalyst Research for Polymer Electrolyte Fuel Cell network (CarPE-FC)

for their financial support.

References

1. Weber, A. Z. and Newman, J. Chemical Reviews 104(10), 4679–4726 October (2004).

2. Sun, W., Peppley, B. A., and Karan, K. Electrochimica Acta 50(16-17), 3347–3358

(2005).

3. Wang, Q., Eikerling, M., Song, D., and Liu, Z. Journal of Electroanalytical Chemistry

573, 61–69 (2004).

4. Kulikovsky, A., Divisek, J., and Kornyshev, A. Journal of the Electrochemical Society

146(11), 3981–3991 November (1999).

5. Bangerth, W., Hartmann, R., and Kanschat, G. deal.II Differential Equations Anal-

ysis Library, Technical Reference.

6. Henderson, A. ParaView Guide, A Parallel Visualization Application. Kitware Inc.,

(2007).

7. Eldred, M., Giunta, A., van Waanders, B. B., S.F. Wojtkiewicz, J., Hart, W., and Alleva,

M. Technical Report 2001-3796, Sandia National Laboratory, (2003).

8. Becker, E. B., Carey, G., and Oden, J. Finite Elements: An Introduction, volume 1.

Prentice-Hall, Englewoods Cliffs, (1981).

9. Moore, M., Wardlaw, P., Dobson, P., Boisvert, J., Putz, A., Spiteri, R., and Secanell,

M. Journal of The Electrochemical Society 161(8), E3125–E3137 (2014).

ECS Transactions, 64 (3) 655-680 (2014)

676) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 23: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

10. Wang, J. X., Springer, T. E., and Adzic, R. R. Journal of the Electrochemical Society

153(9), A1732–A1740 (2006).

11. Wang, J. X., Zhang, J., and Adzic, R. R. Journal of Physical Chemisty A 111(49),

12702–12710 (2007).

12. Wang, J., Uribe, F., Springer, T. E., Zhang, J., and Adzica, R. R. Faraday Discuss.

140, 347–362 (2008).

13. Secanell, M., Carnes, B., Suleman, A., and Djilali, N. Electrochimica Acta 52(7),

2668–2682 (2007).

14. Moore, M., Putz, A., and Secanell, M. Journal of the Electrochemical Society 160(6),

F670–F681 (2013).

15. Parthasarathy, A., Supramaniam, S., Appleby, A. J., and Martin, C. R. Journal of the

Electrochemical Society 139(9), 2530–2537 (1992).

16. Neyerlin, K. C., Gu, W., Jorne, J., and Gasteiger, H. A. Journal of the Electrochemical

Society 154(10), A1955–A1963 (2006).

17. Sadeghi, E., Putz, A., and Eikerling, M. Journal of the Electrochemical Society

160(10), F1159–F1169 (2013).

18. Zenyuk, I. and Litster, S. Journal of Physical Chemistry C 116(18), 9862–9875.

19. Shukla, S., Domican, K., and Secanell, M. In ECS Transactions (submitted), 226th

Meeting, Cancun, Mexico, (2014).

20. Secanell, M., Karan, K., Suleman, A., and Djilali, N. Electrochimica Acta 52(22),

6318–6337 June (2007).

21. Secanell, M., Karan, K., Suleman, A., and Djilali, N. Journal of the Electrochemical

Society 155(2)(5), B125–B134 (2008).

22. Secanell, M., Songprakorp, R., Suleman, A., and Djilali, N. Energy and Environmental

Sciences 1(3), 378–388 (2008).

23. Dobson, P., Lei, C., Navessin, T., and Secanell, M. Journal of the Electrochemical

Society 159(5), B1–B10 (2012).

24. Bhaiya, M., Putz, A., and Secanell, M. Submitted to Electrochimica Acta, (2014).

ECS Transactions, 64 (3) 655-680 (2014)

677) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 24: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

Appendix

In order to make openFCST accessible to users, most openFCST variables can be mod-

ified directly via an input data file. Geometry, type of finite element, layer porosity and

kinetic model parameters can all be modified via an input data file.

Below is the data input file used to produce the results in Section . In order to study

different kinetic models only two lines need to be modified, i.e. Kinetics type and

Method for kinetics parameters (ORR). Kinetics type identifies the type of ki-

netic model while Method for kinetics parameters (ORR) identifies the parameters

that should be used. The latter is stored in the catalyst. In order to study different agglom-

erate models, the variable Catalyst layer type is modified from HomogeneousCL to

MultiScaleCL and agglomerate type and parameters are then specified in the MultiScaleCL

subsection.######################################################################

#

# Sample i n p u t d a t a f i l e

#

######################################################################

###############

s u b s e c t i o n Gr id g e n e r a t i o n

s e t Type of mesh = CathodeMPL # Cathode | CathodeMPL | F i l e

s e t I n i t i a l r e f i n e m e n t = 2

s e t Re f inemen t = a d a p t i v e # g l o b a l | a d a p t i v e

s e t S o r t C u t h i l l −McKee = f a l s e

s e t S o r t by component = t r u e

####

s u b s e c t i o n I n t e r n a l mesh g e n e r a t o r p a r a m e t e r s

####

s u b s e c t i o n Dimens ions

s e t Cathode c u r r e n t c o l l e c t o r wid th [ cm ] = 0 . 1 # [cm ]

s e t Cathode c h a n n e l wid th [ cm ] = 0 . 1 # [cm ]

s e t Cathode CL t h i c k n e s s [ cm ] = 1 . 0 e−3 #[cm ]

s e t Cathode MPL t h i c k n e s s [ cm ] = 5 . 0 e−3 #[cm ]

s e t Cathode GDL t h i c k n e s s [ cm ] = 2 . 5 e−2 #[cm ]

end

####

s u b s e c t i o n M a t e r i a l ID

s e t Cathode CL = 4

s e t Cathode GDL = 2

end

####

s u b s e c t i o n Boundary ID

s e t c_CL /Membrane = 1

s e t c_BPP /GDL = 2

s e t c_Ch /GDL = 3

s e t c_GDL /CL = 255

end

end

####

end

###############

s u b s e c t i o n System management

s e t Number o f s o l u t i o n v a r i a b l e s = 3

s u b s e c t i o n S o l u t i o n v a r i a b l e s

s e t S o l u t i o n v a r i a b l e 1 = o x y g e n _ m o l a r _ f r a c t i o n

s e t S o l u t i o n v a r i a b l e 3 = e l e c t r o n i c _ e l e c t r i c a l _ p o t e n t i a l

s e t S o l u t i o n v a r i a b l e 2 = p r o t o n i c _ e l e c t r i c a l _ p o t e n t i a l

end

s u b s e c t i o n E q u a t i o n s

s e t E q u a t i o n 1 = F i c k s T r a n s p o r t E q u a t i o n − oxygen

s e t E q u a t i o n 3 = E l e c t r o n T r a n s p o r t E q u a t i o n

s e t E q u a t i o n 2 = P r o t o n T r a n s p o r t E q u a t i o n

end

ECS Transactions, 64 (3) 655-680 (2014)

678) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 25: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

end

###############

s u b s e c t i o n D i s c r e t i z a t i o n

s e t Element = FESystem [ FE_Q ( 2 ) ^ 3 ] # FESystem [ FE_Q(3) −FE_Q ( 1 ) ^ 2 ] # FESystem [ FE_Q ( 1 ) ^ 3 ] # System of t h r e e f e

s u b s e c t i o n M a t r i x

s e t Q u a d r a t u r e c e l l = −1

s e t Q u a d r a t u r e f a c e = −1

end

s u b s e c t i o n R e s i d u a l

s e t Q u a d r a t u r e c e l l = −1

s e t Q u a d r a t u r e f a c e = −1

end

end

###############

s u b s e c t i o n A d a p t i v e r e f i n e m e n t

s e t Number o f R e f i n e m e n t s = 2

s e t Outpu t i n i t i a l s o l u t i o n = f a l s e

s e t Outpu t i n t e r m e d i a t e s o l u t i o n s = f a l s e

s e t Outpu t i n t e r m e d i a t e r e s p o n s e s = t r u e

s e t Outpu t f i n a l s o l u t i o n = t r u e

s e t Outpu t s o l u t i o n f o r t r a n s f e r = f a l s e

s e t Read i n i n i t i a l s o l u t i o n from f i l e = f a l s e

end

###############

s u b s e c t i o n Newton

s e t Assemble t h r e s h o l d = 0 . 0

s e t Debug l e v e l = 0

s e t Debug r e s i d u a l = f a l s e

s e t Debug s o l u t i o n = f a l s e

s e t Debug u p d a t e = f a l s e

s e t Max s t e p s = 20

s e t R e d u c t i o n = 1 . e−20

s e t T o l e r a n c e = 1 . e−8

end

###############

s u b s e c t i o n Fue l c e l l d a t a

##############################################################

s u b s e c t i o n O p e r a t i n g c o n d i t i o n s

s e t Temper a tu r e c e l l = 353 .15 #[K]

s e t Cathode p r e s s u r e = 101325 #[ Pa ] ( 1 . 0 atm )

s e t Cathode r e l a t i v e h u m i d i t y = 0 . 7

s e t Anode p r e s s u r e = 101325 #[ Pa ] ( 1 . 0 atm )

s e t Anode r e l a t i v e h u m i d i t y = 0 . 7

s e t V o l t a g e c e l l = 0 . 5

end

##############################################################

s u b s e c t i o n Cathode gas d i f f u s i o n l a y e r

s e t Gas d i f f u s i o n l a y e r t y p e = DesignFibrousGDL

s e t M a t e r i a l i d = 2

s u b s e c t i o n DesignFibrousGDL

s e t P o r o s i t y = 0 . 6

s e t A n i s o t r o p i c t r a n s p o r t = t r u e

s e t Method e f f e c t i v e t r a n s p o r t p r o p e r t i e s i n p o r e s = Tomadakis

s e t Method e f f e c t i v e t r a n s p o r t p r o p e r t i e s i n s o l i d = P e r c o l a t i o n

s e t P o r o s i t y t h r e s h o l d X = 0 .118

s e t P o r o s i t y ne twork c o n s t a n t X = 0 .785

s e t P o r o s i t y gamma network c o n s t a n t X = 0 . 0

s e t P o r o s i t y t h r e s h o l d Y = 0 .118

s e t P o r o s i t y ne twork c o n s t a n t Y = 0 .521

s e t P o r o s i t y gamma network c o n s t a n t Y = 0 . 0

s e t E l e c t r i c a l c o n d u c t i v i t y X = 16 .03 # [ S / cm ]

s e t S o l i d ne twork t h r e s h o l d X = 0 . 0

s e t S o l i d ne twork c o n s t a n t X = 1 . 5

s e t E l e c t r i c a l c o n d u c t i v i t y Y = 272 .78 #[ S / cm ]

s e t S o l i d ne twork t h r e s h o l d Y = 0 . 0

s e t S o l i d ne twork c o n s t a n t Y = 1 . 0

end

end

##############################################################

s u b s e c t i o n Cathode m i c r o p o r o u s l a y e r

s e t Micro p o r ous l a y e r t y p e = DesignMPL

s e t M a t e r i a l i d = 3

s u b s e c t i o n DesignMPL

s e t P o r o s i t y = 0 . 4

s e t A n i s o t r o p i c t r a n s p o r t = t r u e

s e t Method e f f e c t i v e t r a n s p o r t p r o p e r t i e s i n p o r e s = P e r c o l a t i o n

ECS Transactions, 64 (3) 655-680 (2014)

679) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP

Page 26: OpenFCST: An Open-Source Mathematical …cbalen/_downloads/ECS_Trans...OpenFCST: An Open-Source Mathematical Modelling Software for Polymer Electrolyte Fuel Cells M. Secanell a, A

s e t P o r o s i t y t h r e s h o l d X = 0 .118

s e t P o r o s i t y ne twork c o n s t a n t X = 2 . 0

s e t P o r o s i t y t h r e s h o l d Y = 0 .118

s e t P o r o s i t y ne twork c o n s t a n t Y = 2 . 0

s e t Method e f f e c t i v e t r a n s p o r t p r o p e r t i e s i n s o l i d phase = P e r c o l a t i o n

s e t E l e c t r i c c o n d u c t i v i t y X = 88 .84

s e t F i b r e ne twork t h r e s h o l d X = 0 .118

s e t F i b r e ne twork c o n s t a n t X = 2 . 0

s e t E l e c t r i c c o n d u c t i v i t y Y = 88 .84

s e t F i b r e ne twork t h r e s h o l d Y = 0 .118

s e t F i b r e ne twork c o n s t a n t Y = 2 . 0

end

end

##############################################################

s u b s e c t i o n Cathode c a t a l y s t l a y e r

s e t M a t e r i a l i d = 4

s e t C a t a l y s t t y p e = P l a t i n u m

s e t C a t a l y s t s u p p o r t t y p e = Carbon Black

s e t E l e c t r o l y t e t y p e = Naf ion

s e t K i n e t i c s t y p e = D o u b l e T r a p K i n e t i c s

# O p t i o n s : " T a f e l K i n e t i c s | B u t l e r V o l m e r K i n e t i c s | D o u b l e T r a p K i n e t i c s | D u a l P a t h K i n e t i c s "

####

s u b s e c t i o n M a t e r i a l s

s u b s e c t i o n P l a t i n u m

s e t Method f o r k i n e t i c s p a r a m e t e r s (ORR) = D o u b l e _ t r a p

# O p t i o n s : " Given | P a r t h a s a r a t h y | P a r t h a s a r a t h y _ h c d | D o u b l e _ t r a p | N e y e r l i n "

end

s u b s e c t i o n Carbon Black

s e t D e n s i t y [ g / cm^3] = 1 . 2 5

end

s u b s e c t i o n Naf ion

s e t Method t o compute p r o t o n c o n d u c t i v i t y = NRE211 # O p t i o n s a r e : C o n s t a n t | S p r i n g e r |NRE211 | Iden11 ( assuming lambda = 12)

end

end

####

s e t C a t a l y s t l a y e r t y p e = HomogeneousCL

# O p t i o n s : [ DummyCL | Mul t iSca leCL | HomogeneousCL ]

s u b s e c t i o n Conven t iona lCL

s e t P l a t i n u m l o a d i n g on s u p p o r t (%wt ) = 4 : . 4 6

s e t P l a t i n u m l o a d i n g p e r u n i t volume (mg / cm3 ) = 4 :400

s e t E l e c t r o l y t e l o a d i n g (%wt ) = 4 : 0 . 3 0

s e t Method t o compute a c t i v e a r e a = g i v e n

s e t A c t i v e a r e a [ cm ^ 2 /cm^3] = 4 : 2 . 0 e5

s e t Method e f f e c t i v e t r a n s p o r t p r o p e r t i e s i n p o r e s = P e r c o l a t i o n

s e t P o r o s i t y t h r e s h o l d = 0 .25884

s e t P o r o s i t y ne twork c o n s t a n t = 2 . 0

s e t P o r o s i t y gamma network c o n s t a n t = 0 . 0

s e t Method e f f e c t i v e t r a n s p o r t p r o p e r t i e s i n s o l i d phase = P e r c o l a t i o n

s e t S o l i d ne twork t h r e s h o l d = 0 .118

s e t S o l i d ne twork c o n s t a n t = 2 . 0

s e t Method e f f e c t i v e t r a n s p o r t p r o p e r t i e s i n e l e c t r o l y t e phase = Iden11

end

s u b s e c t i o n Mul t iSca leCL

s e t Average c u r r e n t i n c e l l = f a l s e

s u b s e c t i o n M i c r o S c a l e

s e t M i c r o s c a l e t y p e = IonomerAgg lomera teNumer i ca l

s u b s e c t i o n Agglomera teBase

s e t Rad ius o f t h e a g g l o m e r a t e [nm] = 100

s e t Agglomera te p o r o s i t y = 0 . 1 7

end

s u b s e c t i o n Numer ica lAgg lomera t eBase

s e t D a t a b a s e name = marc

end

end

end

end

end

###############

s u b s e c t i o n Outpu t V a r i a b l e s

s e t num_ou t pu t_va r s = 1

s e t O u t p u t _ v a r _ 0 = c u r r e n t

end

###############

s u b s e c t i o n Outpu t

s u b s e c t i o n Data

s e t Outpu t f o r m a t = v t u

end

end

ECS Transactions, 64 (3) 655-680 (2014)

680) unless CC License in place (see abstract). ecsdl.org/site/terms_use address. Redistribution subject to ECS terms of use (see 129.128.138.240Downloaded on 2015-12-14 to IP