20.1. Using the PEMFC Text User Interface

All of the features for the PEMFC model that are available through the graphical user interface are also available through text user interface (TUI) commands. The TUI allows text commands to be typed directly in the Ansys Fluent console window where additional information can be extracted and processed for more advanced analysis.

Once the fuel cell module is loaded (see Loading the PEMFC Module), you can access the text user interface through the console window under define/models/pemfc/. A listing of the various text commands is as follows:

define/models/pemfc/advanced-setup/

Enters the advanced setup menu.

define/models/pemfc/advanced-setup/list-zones-briefly

Lists zone names and IDs.

define/models/pemfc/advanced-setup/contact-resistivity

Sets contact resistivity.

define/models/pemfc/advanced-setup/coolant-channel

Sets coolant channel.

define/models/pemfc/advanced-setup/stack-management/

Enters the stack setup menu.

define/models/pemfc/advanced-setup/stack-management/list-fc-units

Lists fuel cell units.

define/models/pemfc/advanced-setup/stack-management/list-zones-briefly

Lists zone names and IDs.

define/models/pemfc/advanced-setup/stack-management/create-fc-unit

Creates the fuel cell unit.

define/models/pemfc/advanced-setup/stack-management/modify-fc-unit

Modifies the fuel cell unit.

define/models/pemfc/advanced-setup/stack-management/delete-fc-unit

Deletes the fuel cell unit.

define/models/pemfc/advanced-setup/stack-management/set-stack-current-density

Sets the current density on the anode or cathode (in A/cm2) and modifies the current solution to assist convergence. This item is only available if the case contains valid data (for example, after initialization, iterating, or reading in data). For more information, see IV-Curve Calculations Using the Text Interface.

define/models/pemfc/advanced-setup/stack-management/set-stack-voltage

Sets the voltage difference in Volts between the anode and the cathode and modifies the current solution to assist convergence. This item is only available if the case contains valid data (for example, after initialization, iterating, or reading in data). For more information, see IV-Curve Calculations Using the Text Interface.

define/models/pemfc/advanced-setup/stack-management/reset-setup

Resets the stack setup in case mistakes are made.

define/models/pemfc/advanced-setup/stack-management/submit-setup

Submits the stack setup and makes the stack setup take effect.

define/models/pemfc/anode-setup/

Enters the anode setup menu.

define/models/pemfc/anode-setup/catalyst-layer

Sets the catalyst layer.

define/models/pemfc/anode-setup/current-collector

Sets current collector.

define/models/pemfc/anode-setup/electrolyte-layer

Sets the electrolyte layer.

define/models/pemfc/anode-setup/flow-channel

Sets the flow channel.

define/models/pemfc/anode-setup/list-zones-briefly

Lists zone names and IDs.

define/models/pemfc/anode-setup/micro-porous-layer

Sets the micro-porous layer.

define/models/pemfc/anode-setup/porous-electrode

Sets porous electrode.

define/models/pemfc/cathode-setup/

Enters the cathode setup menu.

define/models/pemfc/cathode-setup/catalyst-layer

Sets the catalyst layer.

define/models/pemfc/cathode-setup/current-collector

Sets the current collector.

define/models/pemfc/cathode-setup/electrolyte-layer

Sets the electrolyte layer.

define/models/pemfc/cathode-setup/flow-channel

Sets the flow channel.

define/models/pemfc/cathode-setup/list-zones-briefly

Lists zone names and IDs.

define/models/pemfc/cathode-setup/micro-porous-layer

Sets the micro-porous layer.

define/models/pemfc/cathode-setup/porous-electrode

Sets porous electrode.

define/models/pemfc/electrical-tabs-setup

Sets anode and cathode external contacts where electrical potential (UDS0) boundary conditions are applied.

define/models/pemfc/electrolyte-setup/

Enters the electrolyte setup menu.

define/models/pemfc/electrolyte-setup/catalyst-layer

Sets the catalyst layer.

define/models/pemfc/electrolyte-setup/current-collector

Sets current collector.

define/models/pemfc/electrolyte-setup/electrolyte-layer

Sets the electrolyte layer.

define/models/pemfc/electrolyte-setup/flow-channel

Sets the flow channel.

define/models/pemfc/electrolyte-setup/list-zones-briefly

Lists zone names and IDs.

define/models/pemfc/electrolyte-setup/micro-porous-layer

Sets the micro-porous layer.

define/models/pemfc/electrolyte-setup/porous-electrode

Sets porous electrode.

define/models/pemfc/enable-fc-model?

Enables/disables the PEMFC model.

define/models/pemfc/model-options

Sets the PEMFC model options.

define/models/pemfc/model-parameters

Sets the PEMFC model parameters.

define/models/pemfc/reports

Allows you to enable writing data relevant to the fuel cell (cell voltage, mean and minimum values of H2 mole fractions in anode fluid zones, mean and minimum values of O2 mole fractions in cathode fluid zones, and total current generated in anode and cathode catalyst zones) to output files and set the monitoring frequency.

20.1.1. IV-Curve Calculations Using the Text Interface

For valid case and data files, there are two text commands available to assist in the IV-curve calculation. These commands are set-stack-voltage (aliased as ssv) and set-stack-current-density (aliased as ssc), available from the PEMFC text command menu: /define/models/pemfc/advanced-setup/stack-management/.

For fuel cells, you either prescribe the voltage and obtain the total current delivered by the fuel cell as a result, or you specify the total current (via flux boundary conditions multiplied by the area) and obtain the voltage as part of the solution. The details of this IV-relation are specific for each single fuel cell and depend on mass and heat transport, electrochemistry and inlet conditions, outlet conditions, operating conditions, and any other parameter or material property involved in the calculation. The IV-curve is important for applications, because its product is the power delivered by the system.

As described earlier in this manual, you would start a new simulation from fairly static conditions, that is, high voltage/low current (which implies low species transport and low heat generation). After convergence, you typically may be interested in solutions for new electric boundary conditions, that is, either for a new cell/stack voltage or current.

In such cases, simply going to the Boundary Conditions task page and changing the value of the electric potential (uds-0) boundary condition, typically allows only small changes, most notably for stacks. Otherwise the solution will not converge. This is where the set-stack-voltage and set-stack-current-density commands are important.

In addition to changing the boundary conditions (either to a prescribed voltage or current density), these commands process the current data in order to estimate the solution for the new boundary conditions. Because these commands modify the data, you are prompted to save your data, if you have not already done so.

Before going into details of the commands, here are some general remarks about electric potential boundary conditions.

For fixed voltage boundary conditions, both external contacts have a fixed value for the electric potential (uds-0). The anode value will typically be zero, but it does not have to be. The cathode value will be larger than the anode value and the difference (- ) is the positive cell/stack voltage.

For a fixed current boundary condition, one external contact has to have a fixed value and the other flux boundary conditions. As described earlier in the manual, typically, the anode will have a fixed (zero) value, and the cathode will be floating, however, you can also set the cathode to a fixed zero potential, yielding a floating negative anode potential.

The set-stack-voltage command sets the effective stack voltage, that is, the difference (- ). For fixed voltage boundary conditions for the previous solution, boundary conditions on both boundaries are of type fixed value and then the cathode value will be changed accordingly. In the case of fixed current boundary conditions for the previous solution, the flux boundary condition will be changed to a fixed value boundary condition, and the value adjusted accordingly with respect to the other fixed value boundary condition.

The set-stack-current-density command sets the current density on one boundary to the desired value. Note that the input will be in , not as you would normally have to enter in the Boundary Conditions task page. The reason for this is that average current densities reported in the text command interface are also in , and this makes it easier to choose the conditions you would like to prescribe next. Also, flux boundary conditions entered in the Boundary Conditions dialog box would have to have a positive sign on the anode side, and a negative sign on the cathode side. The input for the text interface command is just a positive number, signs are automatically accounted for.

For fixed current boundary conditions for the previous solution, the set-stack-current-density command changes the respective flux boundary condition accordingly. In the case of fixed voltage boundary conditions for the previous solution, the cathode side is chosen to be changed from a fixed value to a flux boundary condition with the new flux.

The two commands may be mixed in an IV-curve calculation. For the type of boundary condition setups currently described in this manual, boundary condition changes will consistently happen on the cathode side. However, if anode flux boundary conditions had been chosen initially, switching to fixed voltage boundary conditions by set-stack-voltage command and then back to fixed current boundary conditions by the set-stack-current-density command will then have flux boundary conditions on the cathode side. In this case, using the set-stack-current-density command exclusively will preserve the anode flux boundary condition setting.