Using the PEM Fuel Cell Model

26
Chapter 2. Using the PEM Fuel Cell Model The procedure for setting up and solving PEM fuel cell problems is described in detail in this chapter. Please refer to the following sections for more information: Section 2.1: Introduction Section 2.2: Geometry Definition for the PEM Fuel Cell Model Section 2.3: Installing the PEM Fuel Cell Model Section 2.4: Loading the PEM Fuel Cell Module Section 2.5: Setting Up the PEM Fuel Cell Module Section 2.6: PEM Fuel Cell Modeling Section 2.7: PEM Fuel Cell Boundary Conditions Section 2.8: Solution Guidelines for the PEM Fuel Cell Model Section 2.9: Postprocessing the PEM Fuel Cell Model 2.1 Introduction The FLUENT PEM Fuel Cell (PEMFC) model is comprised of several user-defined func- tions (UDFs) and a graphical user interface. The potential fields are solved as user- defined scalars. The liquid water saturation, s, and the water content, λ, are also solved as user-defined scalars. The electrochemical reactions occurring on the catalyst are mod- eled through various source terms while other model parameters are handled through the user interface. The PEMFC model can be used in parallel FLUENT as well. c Fluent Inc. January 4, 2005 2-1

description

PEM Fuel Cell Model

Transcript of Using the PEM Fuel Cell Model

Page 1: Using the PEM Fuel Cell Model

Chapter 2. Using the PEM Fuel Cell Model

The procedure for setting up and solving PEM fuel cell problems is described in detailin this chapter. Please refer to the following sections for more information:

• Section 2.1: Introduction

• Section 2.2: Geometry Definition for the PEM Fuel Cell Model

• Section 2.3: Installing the PEM Fuel Cell Model

• Section 2.4: Loading the PEM Fuel Cell Module

• Section 2.5: Setting Up the PEM Fuel Cell Module

• Section 2.6: PEM Fuel Cell Modeling

• Section 2.7: PEM Fuel Cell Boundary Conditions

• Section 2.8: Solution Guidelines for the PEM Fuel Cell Model

• Section 2.9: Postprocessing the PEM Fuel Cell Model

2.1 Introduction

The FLUENT PEM Fuel Cell (PEMFC) model is comprised of several user-defined func-tions (UDFs) and a graphical user interface. The potential fields are solved as user-defined scalars. The liquid water saturation, s, and the water content, λ, are also solvedas user-defined scalars. The electrochemical reactions occurring on the catalyst are mod-eled through various source terms while other model parameters are handled through theuser interface. The PEMFC model can be used in parallel FLUENT as well.

c© Fluent Inc. January 4, 2005 2-1

Page 2: Using the PEM Fuel Cell Model

Using the PEM Fuel Cell Model

2.2 Geometry Definition for the PEM Fuel Cell Model

Due to the fact that there are a number of different physical zones associated with thefuel cell, the following regions must be present in the fuel cell mesh:

• Anode flow channel

• Anode gas diffusion layer

• Anode catalyst layer

• Membrane layer

• Cathode catalyst layer

• Cathode gas diffusion layer

• Cathode flow channel

The following zones have to be identified, if present in the fuel cell mesh:

• Anode current collector

• Cathode current collector

• Coolant channel

2.3 Installing the PEM Fuel Cell Model

The PEM Fuel Cell (PEMFC) model is provided as an addon module with the standardFLUENT licensed software. A special license is required to use the PEMFC model.The module is installed with the standard installation of FLUENT in a directory calledaddons/fuelcells2.1 in your installation area. The PEMFC model consists of a UDFlibrary and a pre-compiled scheme library, which needs to be loaded and activated beforecalculations can be performed.

2-2 c© Fluent Inc. January 4, 2005

Page 3: Using the PEM Fuel Cell Model

2.4 Loading the PEM Fuel Cell Module

2.4 Loading the PEM Fuel Cell Module

The PEM Fuel Cell (PEMFC) module is loaded into FLUENT through the text userinterface (TUI). The module can only be loaded after a valid FLUENT case file has beenset or read. The text command to load the addon module is

define −→ models −→addon-module

A list of FLUENT addon modules is displayed:

FLUENT Addon Modules:

1. MHD Model

2. Fiber Model

3. PEM Fuel Cell Model

4. SOFC Fuel Cell Model

Enter Module Number: [1] 3

Select the PEMFC model by entering the module number 3. During the loading processa scheme library containing the graphical and text user interface, and a UDF librarycontaining a set of user defined functions are loaded into FLUENT.

2.5 Setting Up the PEM Fuel Cell Module

The following describes an overview of the procedure required in order to use the PEMfuel cell model in FLUENT.

1. Start FLUENT.

2. Read the case file.

3. Scale the grid.

4. Use the PEM Model panel to define the fuel cell model parameters.

5. Define material properties.

6. Set the operating conditions.

7. Set the boundary conditions.

8. Start the calculations.

9. Save the case and data files.

10. Process your results.

c© Fluent Inc. January 4, 2005 2-3

Page 4: Using the PEM Fuel Cell Model

Using the PEM Fuel Cell Model

i The PEM Model panel greatly simplifies the input of parameters and bound-ary conditions, but it does not replace the boundary conditions interface.Therefore it is a good policy, to start the set up with the PEM Model paneland do the finishing steps for boundary conditions afterwards.

2.6 PEM Fuel Cell Modeling

In order to set PEM fuel cell model parameters and assign properties to the relevantregions in your fuel cell, you need to access the PEM fuel cell graphical user interface(the PEM Model panel) using:

Define −→ Models −→PEMFC

Here, you can identify the relevant zones for the current collectors, flow channels, gasdiffusion layers, catalyst layers, and the membrane. You can specify the following inputsusing the PEM Model panel. Optional inputs are indicated as such.

1. Enable either the single-phase or the multi-phase PEM model.

2. Set the appropriate options for the PEM model (optional).

3. Set the various parameters for the PEM model.

4. Select the appropriate zones and specify the properties on the anode side.

5. Select the appropriate zones and specify the properties of the membrane.

6. Select the appropriate zones and specify the properties on the cathode side.

7. Provide input for advanced features such as contact resistivities, coolant channelproperties, or stack management settings (optional).

8. Set solution controls such as under-relaxation factors (optional).

9. Provide input to assist reporting (optional).

2-4 c© Fluent Inc. January 4, 2005

Page 5: Using the PEM Fuel Cell Model

2.6 PEM Fuel Cell Modeling

2.6.1 Specifying the PEM Model Options

The Model tab of the PEM Model panel allows you to turn on or off various options whensolving a PEM fuel cell problem.

Figure 2.6.1: The Model Tab of the PEM Model Panel

Several PEM model options are available in the Model Tab of the PEM Model panelincluding:

• The Joule Heating option takes into account ohmic heating. This option includesthe I2R term in the energy source term from Equation 1.3-4 in the calculations.

• The Reaction Heating option takes into account the heat generated by the chemicalreactants. This option includes the hreaction term in the energy source term fromEquation 1.3-4 in the calculations. This accounts for the latent heat of formationof water vapor.

• The Butler-Volmer Rate option (the default) is used to compute the transfer currentsinside the catalyst layers. If this option is turned off, the Tafel approximation(Equation 1.2-6) is used, indicating high current density.

• The Membrane Water Transport option takes into account the transport of wateracross the membrane.

• The Multiphase option takes into account multiphase calculations. Use this optionif you are solving for approximate liquid transport in the gas diffusion layer of thefuel cell.

c© Fluent Inc. January 4, 2005 2-5

Page 6: Using the PEM Fuel Cell Model

Using the PEM Fuel Cell Model

Nearly all options are turned on by default. You may wish to override the default values,depending on the problem you wish to model. For instance, if you are not concernedwith the heat generated due to chemical reaction, then you may want to turn off theReaction Heating option.

2.6.2 Specifying the PEM Model Parameters

You can use the Parameters tab of the PEM Model panel to specify the electrochemistryparameters for the PEM model, reference diffusivities for the reactants, among othermodel parameters.

Figure 2.6.2: The Parameters Tab of the PEM Model Panel

There are various parameters under Electrochemistry in the PEM Model panel. For boththe anode and the cathode, you can also set the following parameters or leave the defaultvalues.

• The Ref. Current Density corresponds to jrefan

([H2]ref )γan andjrefcat

([O2]ref )γcat, the reference ex-

change current density from Equation 1.2-3 and Equation 1.2-4 where the referenceconcentration has units of 1 kgmol/m3.

• The Concentration Exponent corresponds to γ, the concentration dependance fromEquation 1.2-3.

• The Exchange Coefficient corresponds to α, the transfer coefficient from Equa-tion 1.2-3.

• The Open-Circuit Voltage corresponds to Voc in Equation 1.2-8.

Moreover, the following parameters can also be set here:

2-6 c© Fluent Inc. January 4, 2005

Page 7: Using the PEM Fuel Cell Model

2.6 PEM Fuel Cell Modeling

• The Reference Diffusivities correspond to Di from Equation 1.3-5, the species massdiffusivity.

• The Saturation Exponent for Pore Blockage corresponds to rs from Equation 1.5-1for multiphase PEM calculations.

2.6.3 Specifying Anode Properties

You can use the Anode tab of the PEM Model panel to specify zones and properties ofthe current collector, the flow channel, the diffusion layer, and the catalyst layer for theanode portion of the PEM fuel cell.

Specifying Current Collector Properties for the Anode

Figure 2.6.3: The Anode Tab of the PEM Model Panel With Current CollectorSelected

1. Select the Anode tab of the PEM Model panel.

2. Select Current Collector under Anode Zone Type.

3. Select a corresponding zone from the Zone(s) list. If you are modeling a fuel cellstack, then you must pick all zones of a particular type as a group.

4. Select a Solid Material from the corresponding drop-down list. Solid materials canbe customized using the Materials panel.

5. Specify a value for the Effective Electrical Conductivity. The solid electrical conduc-tivity value is the diffusivity of the solid phase potential in the solid zones.

c© Fluent Inc. January 4, 2005 2-7

Page 8: Using the PEM Fuel Cell Model

Using the PEM Fuel Cell Model

Specifying Flow Channel Properties for the Anode

Figure 2.6.4: The Anode Tab of the PEM Model Panel With Flow ChannelSelected

1. Select the Anode tab of the PEM Model panel.

2. Select Flow Channel under Anode Zone Type.

3. Select a corresponding zone from the Zone(s) list.

2-8 c© Fluent Inc. January 4, 2005

Page 9: Using the PEM Fuel Cell Model

2.6 PEM Fuel Cell Modeling

Specifying Diffusion Layer Properties for the Anode

Figure 2.6.5: The Anode Tab of the PEM Model Panel With Diffusion LayerSelected

1. Select the Anode tab of the PEM Model panel.

2. Select Diffusion Layer under Anode Zone Type.

3. Select a corresponding zone from the Zone(s) list. If you are modeling a fuel cellstack, then you must pick all zones of a particular type as a group.

4. Select a Solid Material from the corresponding drop-down list. Solid materials canbe customized using the Materials panel.

5. Specify a value for the Porosity.

6. Specify a value for the Viscous Resistance.

7. Specify a value for the Effective Electrical Conductivity. The solid electrical conduc-tivity value is the diffusivity of the solid phase potential in the solid zones.

8. Specify a value for the Contact Angle for multiphase PEM calculations (θc inEqua-tion 1.4-4).

c© Fluent Inc. January 4, 2005 2-9

Page 10: Using the PEM Fuel Cell Model

Using the PEM Fuel Cell Model

Specifying Catalyst Layer Properties for the Anode

Figure 2.6.6: The Anode Tab of the PEM Model Panel With Catalyst LayerSelected

1. Select the Anode tab of the PEM Model panel.

2. Select Catalyst Layer under Anode Zone Type.

3. Select a corresponding zone from the Zone(s) list. If you are modeling a fuel cellstack, then you must pick all zones of a particular type as a group.

4. Select a Solid Material from the corresponding drop-down list. Solid materials canbe customized using the Materials panel.

5. Specify a value for the Porosity.

6. Specify a value for the Viscous Resistance.

7. Specify a value for the Effective Electrical Conductivity. The solid electrical conduc-tivity value is the diffusivity of the solid phase potential in the solid zones.

8. Specify a value for the Surface-to-Volume Ratio (η in Equation 1.3-5). This is thespecific surface area of the catalyst medium.

9. Specify a value for the Contact Angle for multiphase PEM calculations (θc inEqua-tion 1.4-4).

2-10 c© Fluent Inc. January 4, 2005

Page 11: Using the PEM Fuel Cell Model

2.6 PEM Fuel Cell Modeling

Specifying Boundary Conditions for the Anode

For each case of the anode’s current collector, diffusion layer, and catalyst layer, youassign a solid material and/or set the porosity and the viscous resistance. These settingsrepresent setting a boundary condition. With the Collective Boundary Conditions optionturned on (the default setting), this boundary condition is applied to all selected zonesin the Zone(s) list. If you want to set the boundary conditions for each zone individuallyusing the corresponding Boundary Conditions panel, you should turn off the CollectiveBoundary Conditions option.

2.6.4 Specifying Membrane Properties

You can use the Membrane tab of the PEM Model panel to specify zones and propertiesof the membrane portion of the PEM fuel cell.

Figure 2.6.7: The Membrane Tab of the PEM Model Panel

1. Select a corresponding zone from the Zone(s) list. If you are modeling a fuel cellstack, then you must pick all membrane zones as a group.

2. Select a Solid Material from the corresponding drop-down list. Solid materials canbe customized using the Materials panel.

3. Specify a value for the Equivalent Weight.

4. Specify a value for the Protonic Conduction Coefficient (β in Equation 1.5-4). Thisis used to calculate the membrane phase electric conductivity.

5. Specify a value for the Protonic Conduction Exponent (ω in Equation 1.5-4).

c© Fluent Inc. January 4, 2005 2-11

Page 12: Using the PEM Fuel Cell Model

Using the PEM Fuel Cell Model

Specifying Boundary Conditions for the Membrane

When you assign a solid material to the membrane, you are setting a boundary condi-tion. With the Collective Boundary Conditions option turned on (the default setting), thisboundary condition is applied to all selected zones in the Zone(s) list. If you want toset the boundary conditions for each zone individually using the corresponding BoundaryConditions panel, you should turn off the Collective Boundary Conditions option.

2.6.5 Specifying Cathode Properties

You can use the Cathode tab of the PEM Model panel to specify zones and properties ofthe current collector, the flow channel, the diffusion layer, and the catalyst layer for thecathode portion of the PEM fuel cell.

Specifying Current Collector Properties for the Cathode

Figure 2.6.8: The Cathode Tab of the PEM Model Panel With Current Col-lector Selected

1. Select the Cathode tab of the PEM Model panel.

2. Select Current Collector under Cathode Zone Type.

3. Select a corresponding zone from the Zone(s) list. If you are modeling a fuel cellstack, then you must pick all zones of a particular type as a group.

4. Select a Solid Material from the corresponding drop-down list. Solid materials canbe customized using the Materials panel.

5. Specify a value for the Effective Electrical Conductivity. The solid electrical conduc-tivity value is the diffusivity of the solid phase potential in the solid zones.

2-12 c© Fluent Inc. January 4, 2005

Page 13: Using the PEM Fuel Cell Model

2.6 PEM Fuel Cell Modeling

Specifying Flow Channel Properties for the Cathode

Figure 2.6.9: The Cathode Tab of the PEM Model Panel With Flow ChannelSelected

1. Select the Cathode tab of the PEM Model panel.

2. Select Flow Channel under Cathode Zone Type.

3. Select a corresponding zone from the Zone(s) list. If you are modeling a fuel cellstack, then you must pick all zones of a particular type as a group.

c© Fluent Inc. January 4, 2005 2-13

Page 14: Using the PEM Fuel Cell Model

Using the PEM Fuel Cell Model

Specifying Diffusion Layer Properties for the Cathode

Figure 2.6.10: The Cathode Tab of the PEM Model Panel With Diffusion LayerSelected

1. Select the Cathode tab of the PEM Model panel.

2. Select Diffusion Layer under Cathode Zone Type.

3. Select a corresponding zone from the Zone(s) list. If you are modeling a fuel cellstack, then you must pick all zones of a particular type as a group.

4. Select a Solid Material from the corresponding drop-down list. Solid materials canbe customized using the Materials panel.

5. Specify a value for the Porosity.

6. Specify a value for the Viscous Resistance.

7. Specify a value for the Effective Electrical Conductivity. The solid electrical conduc-tivity value is the diffusivity of the solid phase potential in the solid zones.

8. Specify a value for the Contact Angle for multiphase PEM calculations (θc inEqua-tion 1.4-4).

2-14 c© Fluent Inc. January 4, 2005

Page 15: Using the PEM Fuel Cell Model

2.6 PEM Fuel Cell Modeling

Specifying Catalyst Layer Properties for the Cathode

Figure 2.6.11: The Cathode Tab of the PEM Model Panel With Catalyst LayerSelected

1. Select the Cathode tab of the PEM Model panel.

2. Select Catalyst Layer under Cathode Zone Type.

3. Select a corresponding zone from the Zone(s) list. If you are modeling a fuel cellstack, then you must pick all zones of a particular type as a group.

4. Select a Solid Material from the corresponding drop-down list. Solid materials canbe customized using the Materials panel.

5. Specify a value for the Porosity.

6. Specify a value for the Viscous Resistance.

7. Specify a value for the Effective Electrical Conductivity. The solid electrical conduc-tivity value is the diffusivity of the solid phase potential in the solid zones.

8. Specify a value for the Surface-to-Volume Ratio (s in Equation 1.3-5). This is thespecific surface area of the catalyst medium.

9. Specify a value for the Contact Angle for multiphase PEM calculations (θc in Equa-tion 1.4-4).

c© Fluent Inc. January 4, 2005 2-15

Page 16: Using the PEM Fuel Cell Model

Using the PEM Fuel Cell Model

Specifying Boundary Conditions for the Cathode

For each case of the cathode’s current collector, diffusion layer, and catalyst layer, youassign a solid material and/or set the porosity and the viscous resistance. These settingsrepresent setting a boundary condition. With the Collective Boundary Conditions optionturned on (the default setting), this boundary condition is applied to all selected zonesin the Zone(s) list. If you want to set the boundary conditions for each zone individuallyusing the corresponding Boundary Conditions panel, you should turn off the CollectiveBoundary Conditions option.

2.6.6 Setting Advanced Properties for the PEM Fuel Cell

You can use the Advanced tab of the PEM Model panel to specify the contact resistivityfor any material interface in the geometry, set parameters for coolant channels, and definefuel stack units for managing stacks of fuel cells.

Setting Contact Resistivities for the PEM Fuel Cell

Figure 2.6.12: The Advanced Tab of the PEM Model Panel for Contact Re-sistivities

1. Select the Advanced tab of the PEM Model panel.

2. Select Contact Resistivity under Advanced Setup.

3. Select any number of corresponding interfaces from the Available Zone(s) list. Thesezones are face zones over which a jump in electrical potential is caused by imperfectconduction.

4. Specify a value for the Resistivity for each specified zone.

2-16 c© Fluent Inc. January 4, 2005

Page 17: Using the PEM Fuel Cell Model

2.6 PEM Fuel Cell Modeling

5. To simplify the input, you can choose to use the resistivity value of the first selectedzone for all others as well by turning on the Use First Value for All option.

Setting Coolant Channel Properties for the PEM Fuel Cell

Figure 2.6.13: The Advanced Tab of the PEM Model Panel for the CoolantChannel

1. Select the Advanced tab of the PEM Model panel.

2. Select Coolant Channel under Advanced Setup.

3. Select any number of corresponding zones from the Zone(s) list.

4. Specify a value for the Density.

5. Specify a value for the Heat Capacity.

6. Specify a value for the Thermal Conductivity.

7. Specify a value for the Viscosity.

8. To enable the coolant channel, turn on the Enable Coolant Channel(s) option.Amongst other settings, this will change the mixture to include the coolant species,which is otherwise absent.

c© Fluent Inc. January 4, 2005 2-17

Page 18: Using the PEM Fuel Cell Model

Using the PEM Fuel Cell Model

Managing Stacks for the PEM Fuel Cell

Figure 2.6.14: The Advanced Tab of the PEM Model Panel for Stack Man-agement

The FLUENT PEM fuel cell model allows you to model fuel cell stacks as well as individualfuel cells. In the Advanced tab of the PEM Model panel, you can define fuel cell units foreach fuel cell in a stack. A fuel cell unit consists of the anode catalyst, membrane, andcathode catalyst sections of that portion of that cell.

1. Select the Advanced tab of the PEM Model panel.

2. Select Stack Management under Advanced Setup.

3. Since a fuel cell unit consists of the anode catalyst, membrane, and cathode catalyst,select the corresponding zones from the Zone(s) list.

4. Create a new fuel cell unit by clicking the Create button. The new fuel cell is listedunder Fuel Cell Unit(s) with a default name.

5. Edit a preexisting fuel cell unit by selecting it in the Fuel Cell Unit(s) list. Thezones in this fuel cell unit are automatically selected in the Zone(s) list. You canthen modify the zones that comprise the fuel cell unit and/or change its name inthe Name field and click Modify to save the new settings.

6. Remove a preexisting fuel cell unit by selecting it in the Fuel Cell Unit(s) list andclicking the Delete button.

2-18 c© Fluent Inc. January 4, 2005

Page 19: Using the PEM Fuel Cell Model

2.6 PEM Fuel Cell Modeling

2.6.7 Specifying the Solution Controls

You can use the Controls tab of the PEM Model panel to influence the solution process.

Figure 2.6.15: The Controls Tab of the PEM Model Panel

The saturation source term rw in Equation 1.4-2 usually requires under-relaxation. Youcan change the default value for the under-relaxation factor by changing the value forSaturation Source.

If you are only interested in the basic flow field throughout the fuel cell, you can turn offthe Electrochemistry option in order to suppress most effects of the PEM fuel cell model.To turn off all effects of the PEM fuel cell model, you should also turn off the MembraneWater Transport and Multiphase options in the Model tab of the PEM Model panel.

c© Fluent Inc. January 4, 2005 2-19

Page 20: Using the PEM Fuel Cell Model

Using the PEM Fuel Cell Model

2.6.8 Reporting on the Solution

You can use the Reports tab of the PEM Model panel to set up parameters that will beuseful in reporting data relevant to the fuel cell.

Figure 2.6.16: The Reports Tab of the PEM Model Panel

The Membrane-Electrode-Assembly Projected Area field requires the projected area of theMembrane Electrolyte Assembly (MEA) and is only used to calculate the average currentdensity. The assembly consists of the membrane and the catalyst layers above and belowthe membrane. The value of the projected area can be computed from the ProjectedSurface Areas panel.

Reports −→Projected Areas...

The External Contact Interface(s) fields requires the face zones that act as external contactsurfaces for the anode and the cathode.

These inputs are used to report cell voltage. For potentiostatic boundary conditions, thisis the difference between the provided values, but for galvanostatic boundary conditions,the cell voltage is part of the solution.

2-20 c© Fluent Inc. January 4, 2005

Page 21: Using the PEM Fuel Cell Model

2.7 PEM Fuel Cell Boundary Conditions

2.7 PEM Fuel Cell Boundary Conditions

The following boundary conditions need to be defined for the PEM fuel cell simulationbased on your problem specification:

• Anode Inlet

– Mass flow rate

– Temperature

– Direction specification method

– Mass fractions of h2, h2o, and n2.

– The coolant must be set to zero if coolant channels are enabled.

– UDS-2 must be set to 0

• Cathode Inlet

– Mass flow rate

– Temperature

– Direction specification method

– Mass fractions of o2, h2o, and n2.

– The coolant must be set to zero if coolant channels are enabled.

– UDS-2 must be set to 0

• Coolant Inlet (if any)

– Mass flow rate

– Temperature

– Direction specification method

– Coolant mass fraction set to 1

– UDS-2 must be set to 0

• Pressure Outlets (all)

Realistic backflow conditions.

• Terminal Anode

– Temperature (or flux if known)

– UDS-0 set to ground voltage

• Terminal Cathode

– Temperature (or flux if known)

– UDS-0 is set to the voltage of the cathode (if solving to constant voltage), orthe UDS-0 flux is set to the current density in SI units (if solving for constantcurrent).

c© Fluent Inc. January 4, 2005 2-21

Page 22: Using the PEM Fuel Cell Model

Using the PEM Fuel Cell Model

2.8 Solution Guidelines for the PEM Fuel Cell Model

For potentiostatic boundary conditions, after initialization, steady state solutions arecalculated easily for cell voltages close to the open-circuit voltage. The same can besaid for galvanostatic boundary conditions and low electric current. By lowering the cellvoltage or by raising the average electric current, you can calculate subsequent stationarysolutions.

In the event of convergence problems, it is recommended to change the multigrid cy-cle to F-cycle with BCGSTAB (bi-conjugate gradient stabilized method) selected as thestabilization method for all equations. For the user-defined scalar equations, it may benecessary to reduce the tolerance of the multigrid-cycles to 1× 10−3.

2.9 Postprocessing the PEM Fuel Cell Model

You can perform post-processing using standard FLUENT quantities and by using user-defined scalars and user-defined memory allocations. By default, the FLUENT PEMfuel cell model defines several user-defined scalars and user-defined memory allocations,described in Table 2.9.1 and Table 2.9.2.

Table 2.9.1: User-Defined Scalar Allocations

UDS 0 Solid Phase Potential (Volts)UDS 1 Membrane Phase Potential (Volts)UDS 2 Liquid SaturationUDS 3 Water Content

2-22 c© Fluent Inc. January 4, 2005

Page 23: Using the PEM Fuel Cell Model

2.9 Postprocessing the PEM Fuel Cell Model

Table 2.9.2: User-Defined Memory Allocations

UDM 0 Current Density Vector (x-component) (A/m2)UDM 1 Current Density Vector (y-component) (A/m2)UDM 2 Current Density Vector (z-component) (A/m2)UDM 3 Current Density Vector magnitude (A/m2)UDM 4 Volumetric Heat Source due to Ohmic Heating (W/m3)UDM 5 Volumetric Heat due to Reaction (W/m3)UDM 6 Surface Overpotentials (Volts)UDM 7 Water Vapor Phase Change Source Term (kg/m3-s)UDM 8 Osmotic Drag CoefficientUDM 9 Water ActivityUDM 10 Water ContentUDM 11 Protonic Conductivity (1/ohm-m)UDM 12 Mass Source due to Back Diffusion (kg/m3-s)UDM 13 Transfer Current (kg/m3)UDM 14 Osmotic Drag Sources (kg/m3-s)

You can obtain this list by opening the Execute On Demand panel and pulling down theFunction drop-down list.

Define −→ User-Defined −→Execute On Demand...

and access the execute-on-demand function called list pemfc udf.

Alternatively, you can type list pemfc udf in the text user interface and the listing willappear in the console window.

c© Fluent Inc. January 4, 2005 2-23

Page 24: Using the PEM Fuel Cell Model

Using the PEM Fuel Cell Model

2.10 User-Accessible Functions

As noted in Section 1.5: Properties, you can directly incorporate your own formulationsand data for the properties of the fuel cell membrane using the pem user.c source codefile.

The following listing represents a description of the contents of the pem user.c sourcecode file:

• real heat apportionment factor(cell t c, Thread *t): A fraction of the en-ergy released in the chemical reaction for the formation of water is released as heat.This function gives this fraction of the maximal available energy of this reaction.

• real Get P sat(real T): Returns the value of the water vapor saturation pressureas a function of temperature (Equation 1.5-10).

• real Water Activity(real P, real T, cell t c, Thread *t): Returns the valueof water activity (Equation 1.5-8).

• real Water Content (real act): Returns the value of the membrane water con-tent at the membrane catalyst interface (Equation 1.5-7).

• real Osmotic Drag Coefficient(real P, real T, cell t c, Thread *t): Re-turns the value of the osmotic drag coefficient (Equation 1.5-5).

• real Membrane Conductivity(real lam, cell t c, Thread *t): Returns thevalue of the membrane’s protonic conductivity (Equation 1.5-4).

• real Water Content Diffusivity(real lam, real T, real mem mol density,

cell t c, Thread *t): Returns the value of the water content diffusivity in themembrane(Equation 1.5-6).

• real Gas Diffusivity(cell t c, Thread *t, int j spe): Returns the valueof the gaseous species diffusivities in the channels, gas diffusion layers and catalysts(Equation 1.5-2).

• real Saturation Diffusivity(real sat, real cos theta, real porosity, cell t

c, Thread *t): Returns the value of diffusivity of the liquid saturation. It com-prises the term

ρlKs3

µl

dpcds

(2.10-1)

from Equation 1.4-1.

• real Anode AV Ratio(cell t c, Thread *t): Returns the value of the surface-to-volume ratio s used in Equation 1.3-5 for the anode catalyst.

2-24 c© Fluent Inc. January 4, 2005

Page 25: Using the PEM Fuel Cell Model

2.10 User-Accessible Functions

• real Cathode AV Ratio(cell t c, Thread *t): Returns the value of the surface-to-volume ratio s used in Equation 1.3-5 for the cathode catalyst.

• real Anode J Ref(cell t c, Thread *t): Returns the value of the anode reac-tion reference current density jrefan used in Equation 1.2-3.

• real Cathode J Ref(cell t c, Thread *t): Returns the value of the cathodereaction reference current density jrefcat used in Equation 1.2-4.

• real Open Cell Voltage(cell t c, Thread *t): Returns the value of the open-circuit voltage Voc used in Equation 1.2-8.

2.10.1 Compiling the Customized PEM Fuel Cell Source Code

This section includes instructions on how to compile a customized PEM fuel cell user-defined module. Note that you can also refer to the file INSTRUCTIONS-CLIENT thatcomes with your distribution (see addons/fuelcells2.1).

i It is assumed that you have a basic familiarity with compiling user-definedfunctions (UDFs). For an introduction on how to compile UDFs, pleaserefer to the separate UDF manual.

You will first want to use a local copy of the fuelcells2.1 directory in the addons

directory before you recompile the PEM fuel cell module.

Compiling the Customized Source Code Under UNIX1. Make a local copy of the fuelcells2.1 directory. Do not create a symbolic link.

2. Change directories to the fuelcells2.1/src directory.

3. Make changes to the pem user.c file.

4. Edit the makefile. You must edit the makefile located in the src/ directory andmake sure that the FLUENT INC variable correctly refers to the current FLUENTinstallation directory. Be careful not to leave any trailing spaces when you makeyour changes.

5. Change directories to the fuelcells2.1/ directory.

6. Issue the following make command:

make -f Makefile-client FLUENT_ARCH=your_arch

where your arch is lnx86 on LINUX, or ultra on the Sun operating system, etc.

c© Fluent Inc. January 4, 2005 2-25

Page 26: Using the PEM Fuel Cell Model

Using the PEM Fuel Cell Model

Compiling the Customized Source Code Under Windows1. Open Visual Studio .NET at the DOS prompt.

2. Make sure that the $FLUENT INC environment variable is correctly set to the currentFLUENT installation directory.

3. Make a local copy of the fuelcells2.1 folder. Do not create a shortcut.

4. Enter the fuelcells2.1

src folder.

5. Make changes to the pem user.c file.

6. Return to the fuelcells2.1 folder.

7. Issue the following command in the command window:

nmake /f makefile_master-client.nt

2-26 c© Fluent Inc. January 4, 2005