Tutorial The New PEMFC Model: Solution
Tutorial The New PEMFC Model: Solution
Introduction
The purpose of this tutorial is to demonstrate the use of the new Polymer Electrolyte
Membrane Fuel Cell (PEMFC) model in ANSYS Fluent 19.0 with water transport. The
PEMFC model is provided as an add-on module to the standard ANSYS licensed software
and does not require any additional license purchases. The PEMFC module comprises a UDF
library (containing a set of user-defined functions) and a pre-compiled scheme library
(containing the graphical and text user interface). The PEMFC module must be loaded and
activated before calculations can be performed.
This tutorial demonstrates how to do the following:
• Typical Geometry Creation in ANSYS SpaceClaim.
• Meshing approach.
• Loading of the PEMFC module into ANSYS Fluent.
• Setting parameters for the PEMFC model.
• Definition of new solid materials for the anode, cathode, and electrolyte.
• Setting up the appropriate boundary conditions and multigrid control parameters.
• Performing postprocessing to examine the distribution of current, voltage, temperature
and species concentrations throughout the fuel cell.
Prerequisites
This tutorial assumes that you are familiar with the ANSYS Fluent interface, and that you
have a good understanding of the basic setup and solution procedures. Some steps will not be
shown explicitly. In this tutorial, you will use the PEMFC model. If you have not used this
1
model before, then please refer to the Fuel Cell Modules Manual. The PEMFC add-on module
is installed with the standard installation of ANSYS FLUENT in the folder
C:\Program Files\ANSYS Inc\v190\fluent\fluent19.0.0\addons\pemfc (in Windows)
/usr/local/ansys_inc/v190/fluent/fluent19.0.0/addons/pemfc (in Linux)
Problem Description
2
Cathode Side Cathode Current Collector
Coolant
Oxidizer
Figure 3. PEMFC Fuel Cell – Porous Layers and Membrane Electrode Assembly.
3
A sketch of a small periodic part of a single counterflowing planar Polymer Electrolyte
Membrane Fuel Cell is shown in Figure 1. Various zones are explained in Figures 2 and 3.
The anode channel inlet is fed with 1.0•10-7 kg/s of humidified hydrogen at 343.15 K. The
split between hydrogen and water vapour is 60/40. The cathode channel inlet is fed with
1.4•10-6 kg/s of air at 343.15K. The species mass fraction composition is 21% of O2, 5% of
H2O vapour and the rest is assumed to be N2. The side boundaries are treated as symmetries.
Cathode and anode consist of two bent metal plates, each 100 mm long. The shape of these
plates allows the fuel cell to be cooled by a dielectric fluid on both sides.
The active electrolyte material, which has a very small thickness, is pressed between the
anode and the cathode layers. In this simulation, the outer walls of the anode and cathode
current collectors are adiabatic. The fuel and oxidizer travel through the porous anode and
cathode materials towards the catalysts, where the electrochemical reactions take place. Fuel
is reduced at the anode side:
H2 → 2H+ + 2e-
H+ ions travel across the membrane towards the cathode catalyst where oxidation takes place:
O2 + 2e- → O-
2H+ + O- → H2O
The PEMFC model is used for the calculation of the current, voltage, species, temperature and
potential distributions throughout the fuel cell.
Note: This geometry is only representative of a small portion of the real active zone in a
PEMFC. It is strongly recommended to use a similar simplification in all real cases prior to
modelling the entire cell or pack. The required meshing and the solution steering processes
are much quicker to establish on a smaller geometry. Typically, the entire cell or pack might
be constructed by reflecting and/or copying the simplified geometry. The manifolds can be
connected conformally or non-conformally too, if required.
4
Step 1: Geometry.
The geometry can be created in a variety of different tools. In this particular case, ANSYS
SpaceClaim R19.0 was used. Please note that the catalytic layers are often in the order of 10’s
of microns and, therefore, the appropriate length scales should be chosen in “SpaceClaim
Options” as shown below:
5
A sketch representing the cross-section of the fuel-cell channel can be created in accord with
the relevant user’s dimensions. In this case, the geometry has already been prepared in the
accompanying Workbench project. An example of a cross-sectional sketch is shown in Figure
5 below:
6
Extrusion of the sketch can be performed as shown in Figure 6 below:
Figure 6. Extrusion of the Sketch by means of Pull operation with “No merge” option.
7
Please ensure that the topology is shared by pressing “SharePrep” and then “Share”, the
entities that can be shared are highlighted in red. Once the green tick mark is pressed, the
proper shared connections will be established.
8
The flows of oxidant, fuel and coolant reach the cell from the upstream manifolds, where
some flow development has already taken place. Imposing the flat profiles at the inlet to the
active zone will inevitably lead to unrealistic sharp velocity and temperature gradients, thus
impairing the convergence. Therefore, it is strongly recommended to include the upstream
flow development sections by extruding the wetted surfaces as shown in Figure 9 below.
9
The importance of similar flow relaxation sections immediately downstream from the active
zone of a fuel cell should not be underestimated. The species are being transported into the
cathode flow channel from the cathode gas-diffusion layer (GDL) along its entire length and
this can cause reversed flow conditions. It is very hard to match the exact species
composition, temperature and their distributions if the reversed flow occurs at the outlet. Any
unrealistic and sudden changes are bound to create convergence difficulties. The reversed
flow can also occur if the flow rates are diminished or if the power harvested from the fuel
cell is suddenly increased. Therefore, it is strongly recommended to have similar flow
relaxation section downstream of the active zone.
10
Step 2: Mesh.
The mesh created for this fuel cell can be found in the Mesh tab of the enclosed Workbench
project. There are a few facts to consider:
• Typical length scales range from 10’s or μm in the catalytic layers to 10’s of cm along
the channel length. Such a disparity of 4 orders of magnitude is bound to create high
aspect ratios, especially in membrane, catalytic layers and micro-porous layers. This
should not be considered as a problem, although ANSYS Fluent is likely to warn
about the high aspect ratios. The meshing tool, however, might also note this fact.
• Hexahedral meshes with high aspect ratios are, typically, the only pragmatic choice
for the active zones in fuel cells. These can be created in WB Meshing or in ICEM
Meshing.
• It has been proven that the gradual expansion of meshes from the catalytic layers into
the micro-porous layers (MPL) and into the gas-diffusion layers (GDL) is of a
paramount importance for good convergence rates. This is especially true in those
regimes when the fuel cell operates at higher loads. Any sudden step changes should
be avoided.
Figure 11. Mesh distribution in the cross-sectional area of a fuel cell with gradual
expansion from the catalytic layers into MPLs.
11
• The flow in internal channels of active zones remains laminar in most situations.
Despite that fact, one should have a sufficient resolution across the gas channels and
avoid mesh size gap from GDLs into the channels, especially on the cathode side.
• There should be, at least, 3 layers of cells across catalysts.
• There should be, at least, 4 layers across membrane, especially, if a nonconformal
interface is present in the middle of a membrane.
• The mesh sizes and transitions should be tried on a small periodic section of a fuel cell
first e.g. in an example similar to the one considered in this document.
• It is advised to compress the mesh in the direction of the flow with a bidirectional bias
towards inlet and outlet where the gradients are sharpest and to avoid a sudden mesh
expansion within fluid channels on the boundaries of the active zone as shown in
Figure 12.
• Sweep method is one of the most efficient meshing methods for this application.
12
• Either the order of meshing needs to be recorded or the mesh controls should be
sufficient to ensure that a consistent meshing can be achieved regardless of the order
in which all constituent bodies are meshed.
• It is better to avoid the use of the nonconformal interfaces, however, these interfaces
can be placed on the surrounding boundaries of the active zone, in the middle of
membrane, at the wall between coolant channels and the current collectors.
• The nonconformal interface in the middle of a membrane can be the only practical
option in situations where the anode and cathode gas channels are positioned at an
angle to each other, thus making the economical meshes, with the high aspect ratios,
unachievable with fully conformal meshes. Non-conformal interfaces allow the mesh
count to be kept at feasible levels in such situations.
• Under no circumstances one should place non-conformal interface between membrane
and catalytic layers, across catalytic layers, between catalytic layers and MPLs.
• Once meshing has been completed, please check the mesh skewness and orthogonal
quality characteristics.
13
Figure 13. Mesh should capture the changing topology adequately.
Note: Some designs might have recesses in the GDL thickness in the streamwise direction.
Effectively, this is equivalent to having the backward and forward-facing steps in the gas
channels. The mesh resolution across the gas channels should be sufficient to resolve such
sudden changes in their diameter, without sudden jumps as shown in Figure 13. In addition,
more cells should be placed and compressed towards these regions in the streamwise
direction too.
14
Once the meshing has been completed, it is important to assign the Naming Selections too.
The naming should be descriptive and chosen such that all the entities are easily identifiable
from their names. The example is shown in Figure 14 below.
Figure 14. Choice of naming selections that reflect their affiliation to the relevant regions in
PEMFC.
Note: The use of the “mass_flow_inlet_anode” naming would be preferred over the use of the
“inlet_anode”, since the latter choice will automatically assign the “velocity inlet” type
instead of a “mass flow inlet” type which is more suitable in these type of applications.
15
Step 3: Set-Up in ANSYS Fluent.
This tutorial details and all subsequent instructions concentrate on a setup of the PEMFC
problem in a separate stand-alone ANSYS Fluent session.
Note: It is perfectly doable and in certain scenarios is clearly advantageous to continue the
process in ANSYS Workbench. Such scenarios, typically, include parametric studies and
design optimization.
There will be some messages related to the separation of the walls and interiors into
multiple zones as well as some messages related to the slitting of walls into coupled
walls. These messages can be ignored.
4. Assess the geometrical extend of the mesh and check whether any scaling is required or
not.
Setting Up Domain → Mesh → Scale...
16
a) The extents of the domain are correct and no scaling is required in this case.
b) Close the Scale Mesh panel.
5. Check and display the Mesh.
Note: Generally, it is a good idea to check the mesh after you read it into ANSYS Fluent
and/or after you manipulate it (i.e., scale, convert to polyhedral cells, merge, separate, fuse,
add zones, or smooth and swap.) This will ensure that the quality of the mesh has not been
compromised.
6. To visualize multiple fluid and solid zones in PEMFC, one needs to create the surface zone
that wraps the fluid region. This can be achieved by opening the Zone Surface menu from the
dropdown menu, selecting a fluid zone and specifying the new wrapping zone name as shown
in Figure 16.
Postprocessing → Surface → + Create → Zone…
17
7. The PEMFC model needs to be activated from the Text-User Interface (TUI) by issuing a
define models addon command and selecting number 9 from the list of available add-on
modules as shown in Figure 17 below.
Note: Option 3 has a legacy option for modelling PEMFC’s. However, it is strongly
recommended to use the new Option 9 which has been enriched with better physics, models
and submodels. The CFD setups cannot be transferred from Option 3 to Option 9. Such cases
need to be set from scratch again.
ANSYS Fluent lists the standard PEMFC libraries that it is going to use. By default, the
original libraries from the installation directory will be loaded as shown in Figure 18. One can
modify a part of the source code and compile the custom libraries. More information on how
to do this can be found in the User Guide.
18
In addition, the entire list of new solved quantities e.g. User-Defined Scalars (UDS) and
required storage variables, so-called, User-Defined Memories (UDM) is printed in the TUI
console as shown in Figure 19.
Please note that the activation of the PEMFC module switches on the solution of the Energy
and Species equations as shown in Figure 20.
19
(a) (b)
Figure 20. Available and switched models before (a) and after (b) an activation of the
PEMFC module.
20
The default under-relaxation factors are usually fine at lower and medium loads. They might
also work well at higher loads if the best meshing practices for PEMFC were followed and if
there was a gradual progression from the lower load to higher load scenarios. At higher loads,
the multiphase issues are bound to become more apparent as more current is drawn from the
fuel cell. In such cases a gentler under-relaxation might be required as shown below.
Figure 22. A choice of the additional PEMFC under-relaxation factors for situations with
challenging convergence.
21
Figure 23. A choice of the PEMFC model options and URFs.
Figure 24. A choice of the electrochemical & liquid-phase properties and parameters.
A good summary on how and where these parameters are being used can be found in
Solution 2054300 “Which parameter of PEM Fuel Cell panel belongs to which equation in the
documentation”:
https://support.ansys.com/AnsysCustomerPortal/en_us/Knowledge%20Resources/Solutions/FLUENT/2054300
22
Anode Settings:
Figure 25. A choice of the solid zones that belong to the anode current collector.
Figure 26. A choice of the fluid zones that belong to the anode flow channel.
23
Figure 27. A choice of the fluid zones that belong to the anode gas-diffusion layer.
Figure 28. A choice of the fluid zones that belong to the anode micro-porous layer.
24
Figure 29. A choice of the fluid zones that belong to the anode catalytic layer.
Membrane:
Figure 30. A choice of zones that belong to the cell membrane. ANSYS default and
recommendation: membrane to be treated as a solid.
25
Cathode Settings:
Figure 31. A choice of solid zones that belong to the cathode current collector.
Figure 32. A choice of fluid zones that belong to the cathode flow channel.
26
Figure 33. A choice of fluid zones that belong to the cathode gas-diffusion layer.
Figure 34. A choice of fluid zones that belong to the cathode micro-porous layer.
27
Figure 35. A choice of fluid zones that belong to the cathode catalytic layer.
Advanced Settings:
The Advanced Settings tab in the PEMFC model panel allow one to specify 3 things as shown
in Figure 36:
• Contact resistivity specification.
o Additional resistances might exist at the interfaces between porous regions and
on the borders between solid and porous regions. The panel lists the list of all
available walls and interfaces and permits one to specify an appropriate value
for the local contact resistivity in Ohms/m2. This option is not used in this
example. For more information, please see Solution 2048748: “Specification of
the contact resistivity in Fuel-Cell Module” at ANSYS Customer Portal.
https://support.ansys.com/AnsysCustomerPortal/en_us/Knowledge%20Resources/Solutions/
FLUENT/2048748
28
considered in this example and the option does not need to be used for a single
standalone cell.
• Specification of the cooling channels.
o To enable the use of the cooling channels three steps need to be performed:
▪ Coolant Channel Zone selection.
▪ A tick needs to be put into the “Enable Coolant Modeling” box.
▪ Coolant Density needs to be specified in kg/m3.
Once the coolant modeling box is enabled, ANSYS Fluent creates a new mixture material
pem+cool-mixture which gets enabled and used instead of the previously defined fc-mixture
The new mixture contains coolant as a species as shown in Figure 37.
Figure 36. Specification of the coolant channels and enabling their modelling.
29
Figure 37. Species mixture composition and appearance of the “coolant” species.
30
Reports Tab:
The Reports tab is used to specify the electric tabs from which the current is drawn (see
Figure 38). In addition, electrolyte projected area value needs to be specified.
31
The steps outlined in Figures 23-38 are sufficient to set-up the PEMFC model regions and
parameters. There are plenty of constituent parameters that need to be specified and these are
heavily dependent on the used fuel-cell materials. Please note that the set-up can be scripted
via a journal file, if a significant number of ANSYS standard parameters need to be
overwritten. Should one decide to follow the scripting route, then it would still make sense to
refer to the GUI panel to make sure that everything that needs to be specified was, in fact,
specified. Certain warning messages might appear when the GUI is used, once the “OK”
button was pressed in the PEMFC panel (see Figure 23). Examples of such warning messages
are shown in Figure 40 below. These messages are very clear and need to be addressed.
Figure 40. An example of warning messages that typically appear if the PEMFC zones are ill-
configured.
Please note that the default solver parameters have been used successfully in this example.
The geometry and the meshing strategies have been outlined above. The solution strategy
included a hybrid initialization and a gradual progression from the low values of power
generation to the extreme high values. Certain additional adjustments to the solver settings
might be required in those cases, where the high loads are considered from the start of the
simulation. More details on this can be found in the Solution 2042425 “Best Practice for the
new PEMFC model with improved water transport (R17 onwards)”:
https://support.ansys.com/AnsysCustomerPortal/en_us/Knowledge%20Resources/Solutions/FLUENT/2042425
32
Essential Boundary Conditions.
All thermal boundary conditions at walls are set as adiabatic, the inlet temperature at all the
inlets into the computational domain were set at a constant temperature of 343.15K. All the
relevant species compositions and mass flow rates can be easily assessed from the case file.
The most important aspect that needs to be mentioned in this section are the boundary
conditions for the set of additional equations that are being solved with the PEMFC model.
The Electric Potentials at tabs are best set to the fixed specified values in Volts as shown in
Figure 41. These are called potentiostatic boundary conditions. These are the most physical
and realistic boundary conditions that lead to a robust solution.
Alternatively, the current density can be set, if the “Specified Flux” boundary-condition type
is chosen. These boundary conditions are harder to impose as the current density is hardly
ever constant over the terminals’ surfaces. A spatial variation of the current density is not
known in advance and the prescription of the constant values makes such cases much more
difficult to converge, due to the unrealistic nature of such imposed boundary conditions.
The boundary conditions for the rest of solved user-defined scalars such as Protonic Potential,
Capillary Pressure and Water Content should be left as zero flux boundary conditions. The
Liquid Saturation can be set to zero value at inlets.
33
(a) – Anode tab – reference voltage is set to 0.
(b) – Cathode tab – reference voltage can be set to any value not exceeding the cell open
voltage.
Figure 41. Voltage specifications at terminals.
34
Mass-flow Inlets:
UDS boundary conditions at anode & cathode channel inlets:
Figure 42. Specifications of boundary conditions for UDS at channel inlets for anode and
cathode.
Note: Please make sure that the source terms and the fixed values are switched off in the
cooling channels at both sides.
Figure 43. Disabling the UDS sources and fixed values in the coolant channels.
35
Pressure Outlets for all channels.
The UDS’ values at all channel outlets should be left at zero flux default values.
Note: A particular attention should be paid to the possibility of the reversed flow. The
reversed flow should not be present in applications like this; however, if a change in the
workload or an alteration of the fuel/oxidant supplies occurs then the reversed flow might
take place. The same situation might occur temporarily in the initial stages of the simulation,
Ideally, the backflow species composition and temperature should not be drastically different
from the anticipated outflow characteristics.
Figure 44. Disabling the UDS sources and fixed values in the coolant channels.
36
The operating conditions should reflect the relevant value of the operating pressure.
Flow Initialization.
A number of different scenarios with different power output, flow rates and species
compositions have been tried in this case and all of them worked well by using the hybrid
initialization. However, there might be scenarios in more complex geometries where the
simulation diverges immediately from start. Should such situation occur, then it is strongly
recommended to use the Patch option in the Initialization panel to fix the known values of
species and temperature in those regions where they are known. It is best to use the values
that are equal or proportionate to the values specified at the relevant upstream inlets.
Figure 46. An example of patching H2 mass fraction to a specified value in anode channels.
37
Solution Stage.
Figure 47. Residual history with excellent convergence and default solver settings being
used.
At every iteration the module reports the open circuit voltage, the currently harvested voltage
and the related current density.
The case converges to machine accuracy within 750 iterations, even if all additional transport
equations are enabled from the start. However, the best practice would be to start a series of
simulations with a high voltage which just below the open circuit voltage, and then reduce the
voltage with regular decrements by say, 0.1V. The current density will rise and the power
input will increase, until the cell reaches its maximum possible output when its performance
suddenly drops to 0 as shown in Figure 48 below.
38
PEMFC Polarization Curve
1.3
1.2
1.1
1
0.9
Voltage, Volts
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2 2.25 2.5
Current Density, A/cm2
Figure 48. Fuel-Cell polarization curve: Solid line – with water transport,
dashed line – no liquid water transport considered/solved.
Note: In this tutorial, the polarization curve has been gathered by using the stand-alone
Fluent session. However, the polarization curve could be efficiently gathered and plotted in
ANSYS Workbench directly by having voltage as an input parameter and current as an output
parameter. The table of design points could be ordered from high to low voltage and the
solution for the preceding voltage can be set as the initial condition for the next voltage.
39
Figure 49 below shows a series of simulations that do not account for the liquid water
formation and transport. The plot shows a very good convergence behaviour where every 250
iterations the voltage was reduced by 0.1Volts. As the voltage drops, power increases, one can
notice that convergence becomes problematic. This is typically the point where multiphase
issues need to be accounted.
Figure 49. Solution convergence history for different loads – without water transport.
Whenever this happens it is worth going a couple of tests back and repeat the simulations with
the water transport as shown in Figure 50. Thus, gathering the entire polarization curve. The
further one looks to the right on the polarization curve – the more challenging the
convergence becomes.
Figure 50. Continued convergence history – with water transport included, the simulation
after 3000 iterations is representative of a voltage U=0.45Volts from the polarization curve
shown in Figure 48.
40
It is important to note that the fuel cell should not be starved of fuel or oxidant and, therefore,
the fuel utilization curves need to be plotted. In fact, some spare capacity should always exist
to avoid any local starvation. More details on how to check species utilization can be found in
Solution 2052412 “How can one calculate the fuel utilization form Polymer-Electrolyte
Membrane (PEM) fuel cells in ANSYS Fluent” from ANSYS Customer Portal:
https://support.ansys.com/AnsysCustomerPortal/en_us/Knowledge%20Resources/Solutions/FLUENT/2052412
Figure 51. Plot showing increasing fuel and oxidant utilization at increased power harvesting
increments.
41
Figure 52. Sporadic harmless jumps of UDS-2 at situations when there is no liquid water content in
the domain when a relevant equation is being solved.
ANSYS Fluent offers a lot of options to postprocess various variables associated with the
PEMFC model. There are plenty of interfaces and wall surfaces created in the model where
these quantities can be visualized. Occasionally, there might be a need to create a number of
cross-sectional cut-planes for postprocessing various contours of different variables and for
plotting the current density vectors.
42
Typically, the species concentrations, local temperature and velocities are being posprocessed. In fuel-
cell applications one also needs to assess the values of quantities listed in Figure 19.
Please note that the current density vectors are not defined by default and these need to be defined
manually first by specifying the custom vectors as shown in Figure 54 below.
43
The distribution of the current density vectors is shown in Figure 55 below.
Figure 55. Current Density Vector distribution coloured by the current density.
44
It is a good practice to check the mass balance in every simulation. However, it is important to note
that the standard check via
Postprocessing → Reports → Fluxes...
accounts only for gaseous species and is only sufficient if the liquid water transport modelling has not
included in a simulation. Figure 56 below shows that the gaseous mass fluxes are not balanced.
It must be noted that the net gas phase mass flux should be balanced to the amount of liquid-water that
is taken out of the system. To check this, please calculate a volume integral of "GDL Liquid
Removal" in both anode and cathode channels as shown in Figure 57 below.
Both reported values should match for the total mass balance to be satisfied.
45
REFERENCES:
o
https://ansysproducthelpqa.win.ansys.com/account/secured?returnurl=/Views/Secured/corp/v190/fl
u_am/flu_fcm.html
o Solution 2054300 “Which parameter of PEM Fuel Cell panel belongs to which
equation in the documentation”:
https://support.ansys.com/AnsysCustomerPortal/en_us/Knowledge%20Resources/Solutions/FLUENT/
2054300
o Solution 2042425 “Best Practice for the new PEMFC model with improved water
transport (R17 onwards)”:
https://support.ansys.com/AnsysCustomerPortal/en_us/Knowledge%20Resources/Solutions/FLUENT/
2042425
o Solution 2048748: “Specification of the contact resistivity in Fuel-Cell Module”.
https://support.ansys.com/AnsysCustomerPortal/en_us/Knowledge%20Resources/Solutions/FLUENT/
2048748
o Solution 2052412 “How can one calculate the fuel utilization form Polymer-
Electrolyte Membrane (PEM) fuel cells in ANSYS Fluent”
https://support.ansys.com/AnsysCustomerPortal/en_us/Knowledge%20Resources/Solutions/FLUENT/
2052412
o Solution 2054355 “Certain Aspects to Specifying Porosity of Various Layers in
PEMFC.”
o https://support.ansys.com/AnsysCustomerPortal/en_us/Knowledge%20Resources/Solutions/FLUENT/
2054355
46
APPENDIX:
Default Material properties:
47
Figure A3. Anode Micro-Porous Layer material properties.
48
The current example assumes that the cathode and anode sides share the same materials.
However, different catalytic materials on the anode can be used:
Figure A5. Cathode Catalyst Layer material properties, by default these are similar on the
anode and cathode sides.
49