20.2. Using the Fuel Cell and Electrolysis Text User Interface

All of the features for the Fuel Cell and Electrolysis Model (sometimes referred to as the Resolved Electrolyte 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 Fuel Cell and Electrolysis Module), you can access the text user interface through the console window under define/models/resolved-MEA-fc/. A listing of the various text commands is as follows:

define/models/resolved-MEA-fuelcells/

Enters the fuel cell model menu.

define/models/resolved-MEA-fuelcells/advanced-setup/

Enters the advanced setup menu.

define/models/resolved-MEA-fuelcells/advanced-setup/contact-resistivity

Sets contact resistivity.

define/models/resolved-MEA-fuelcells/advanced-setup/coolant-channel

Sets coolant channel.

define/models/resolved-MEA-fuelcells/advanced-setup/list-zones-briefly

Lists zone names and IDs.

define/models/resolved-MEA-fuelcells/advanced-setup/stack-management/

Enters the stack setup menu.

define/models/resolved-MEA-fuelcells/advanced-setup/stack-management/create-fc-unit

Creates the fuel cell unit.

define/models/resolved-MEA-fuelcells/advanced-setup/stack-management/delete-fc-unit

Deletes the fuel cell unit.

define/models/resolved-MEA-fuelcells/advanced-setup/stack-management/list-fc-units

Lists the fuel cell units.

define/models/resolved-MEA-fuelcells/advanced-setup/stack-management/list-zones-briefly

Lists zone names and IDs.

define/models/resolved-MEA-fuelcells/advanced-setup/stack-management/modify-fc-unit

Modifies the fuel cell unit.

define/models/resolved-MEA-fuelcells/advanced-setup/stack-management/reset-setup

Resets the stack setup in case mistakes are made.

define/models/resolved-MEA-fuelcells/advanced-setup/stack-management/set-stack-current-density

Sets the current density on the anode or cathode and modifies the current solution to assist convergence. Note: Input here is in units of A/cm2. This 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/resolved-MEA-fuelcells/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 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/resolved-MEA-fuelcells/advanced-setup/stack-management/submit-setup

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

define/models/resolved-MEA-fuelcells/advanced-setup/stack-management/suggest-setup

Suggests the stack setup, invoking the automatic stack setup.

define/models/resolved-MEA-fuelcells/anode-setup/

Enters the anode setup menu.

define/models/resolved-MEA-fuelcells/anode-setup/catalyst-layer

Sets the catalyst layer.

define/models/resolved-MEA-fuelcells/anode-setup/current-collector

Sets the current collector.

define/models/resolved-MEA-fuelcells/anode-setup/electrolyte-layer

Sets the electrolyte layer.

define/models/resolved-MEA-fuelcells/anode-setup/flow-channel

Sets the flow channel.

define/models/resolved-MEA-fuelcells/anode-setup/list-zones-briefly

Lists zone names and IDs.

define/models/resolved-MEA-fuelcells/anode-setup/porous-electrode

Sets the porous electrode.

define/models/resolved-MEA-fuelcells/cathode-setup/

Enters the cathode setup menu.

define/models/resolved-MEA-fuelcells/cathode-setup/catalyst-layer

Sets the catalyst layer.

define/models/resolved-MEA-fuelcells/cathode-setup/current-collector

Sets the current collector.

define/models/resolved-MEA-fuelcells/cathode-setup/electrolyte-layer

Sets the electrolyte layer.

define/models/resolved-MEA-fuelcells/cathode-setup/flow-channel

Sets the flow channel.

define/models/resolved-MEA-fuelcells/cathode-setup/list-zones-briefly

Lists zone names and IDs.

define/models/resolved-MEA-fuelcells/cathode-setup/porous-electrode

Sets the porous electrode.

define/models/resolved-MEA-fuelcells/electrolyte-setup/

Enters the ectrolyte setup menu.

define/models/resolved-MEA-fuelcells/electrolyte-setup/catalyst-layer

Sets the catalyst layer.

define/models/resolved-MEA-fuelcells/electrolyte-setup/current-collector

Sets the current collector.

define/models/resolved-MEA-fuelcells/electrolyte-setup/electrolyte-layer

Sets the electrolyte layer.

define/models/resolved-MEA-fuelcells/electrolyte-setup/flow-channel

Sets the flow channel.

define/models/resolved-MEA-fuelcells/electrolyte-setup/list-zones-briefly

Lists zone names and IDs.

define/models/resolved-MEA-fuelcells/electrolyte-setup/porous-electrode

Sets porous electrode.

define/models/resolved-MEA-fuelcells/enable-fc-model?

Enables/disables fuel cell model.

define/models/resolved-MEA-fuelcells/model-options

Sets the model options.

define/models/resolved-MEA-fuelcells/model-parameters

Sets the model parameters.

define/models/resolved-MEA-fuelcells/reports

Sets electrolyte project area and external contacts.

define/models/resolved-MEA-fuelcells/select-model

Selects a model.

define/models/resolved-MEA-fuelcells/set-default

Sets the default.

20.2.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 Fuel Cell and Electrolysis text command menu: /define/models/resolved-MEA-fc/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.