RCAIDE.Library.Methods.Powertrain.Converters.Fuel_Cells.Proton_Exchange_Membrane.compute_fuel_cell_performance

compute_fuel_cell_performance#

compute_fuel_cell_performance(fuel_cell_stack, state, bus, coolant_lines, t_idx, delta_t)[source]#

Computes the performance of a PEM fuel cell stack.

Parameters:
  • fuel_cell_stack (RCAIDE.Components.Energy.Converters.Fuel_Cell_Stack) – The fuel cell stack object containing cell properties and configuration

  • state (RCAIDE.Framework.Mission.Common.State) – Container for mission segment conditions

  • bus (RCAIDE.Components.Energy.Distribution.Electric_Bus) – The electric bus to which the fuel cell stack is connected

  • coolant_lines (list) – List of coolant line components for thermal management

  • t_idx (int) – Current time index in the simulation

  • delta_t (float) – Time step size [s]

Returns:

  • stored_results_flag (bool) – Flag indicating that results have been stored for potential reuse

  • stored_fuel_cell_stack_tag (str) – Tag identifier of the fuel cell stack with stored results

Notes

This function implements a detailed electrochemical model for PEM fuel cells that accounts for activation losses, ohmic losses, and concentration losses. It iteratively determines the current density required to match the power demand from the electric bus.

The function also models the compressor-expander module (CEM) that supplies air to the fuel cell, accounting for parasitic power losses.

Temperature effects are considered through a thermal model that updates the stack temperature based on heat generation.

Major Assumptions
  • Uniform temperature distribution across all cells

  • Hydrogen is supplied at constant pressure

  • Air composition is standard atmospheric (21% oxygen)

  • Water management is ideal (no flooding or membrane dehydration)

Theory

The PEM fuel cell voltage is calculated as:

\[V_{cell} = E_{cell} - \eta_{act} - \eta_{ohmic} - \eta_{conc} - degradation\]
where:
  • E_{cell} is the Nernst potential

  • η_{act} is the activation loss

  • η_{ohmic} is the ohmic loss

  • η_{conc} is the concentration loss

  • degradation accounts for cell degradation over time

The thermal model uses:

\[\frac{dT}{dt} = \frac{Q_{gross}}{m_{stack} \cdot c_p}\]

where Q_{gross} is the heat generated by the stack.

References

[1] O’Hayre, R., Cha, S. W., Colella, W., & Prinz, F. B. (2016). Fuel Cell Fundamentals (3rd ed.). John Wiley & Sons.

See also

RCAIDE.Library.Methods.Powertrain.Converters.Fuel_Cells.Proton_Exchange_Membrane.evaluate_PEM, RCAIDE.Library.Methods.Powertrain.Converters.Fuel_Cells.Proton_Exchange_Membrane.evaluate_CEM

evaluate_PEM(fuel_cell_stack, fuel_cell_conditions, t_idx)[source]#

Determines the fuel cell state of the PEM fuel cell

Parameters:#

i: float

The current density to evaluate the cell voltage at (A/cm^2)

stack_temperature: Temperature

Temperature of the fuel cell

P_H2_input: Pressure

Pressure of the hydrogen stream

FC_air_p: Pressure

Pressure of the hydrogen air entering the fuel cell

RH: float

Relative humidity of the air and hydrogen streams (0-1)

air_excess_ratio: float

Air excess ratio (above stoichometric)

thermo_state_in: ThermoState

Conditions of air entering the compressor

degradation: float

The voltage drop due to degradation (V) optional, defaults to 0 V

Returns:#

float:

Hydrogen Mass flow (kg/s)

float:

Net Power (W)

float:

Gross power (W)

float:

Gross heat (W)

float:

Compressor Power (W)

float:

mdot_air_in (kg/s)

evaluate_CEM(fuel_cell_stack, fuel_cell_conditions, t_idx)[source]#

Evaluates the power required by the CEM (compressor-expander module)

Parameters:#

FC_air_p: float

Air pressure after the humidifier entering the fuel cell (bar)

thermo_state_in: ThermoState

Air thermostate entering the compressor

mdot_air_in: float

Mass flow of air entering the fuel cell and compressor (kg/s)

air_excess_ratio: float

Oxygen excess ratio (above stoichometric)

p_drop_hum: float

The pressure drop (bar) through the humidifier

pressure_drop: float

The pressure drop (bar) through the fuel cell

Returns:#

float:

The power required to run the CEM at the given operating conditions (W)

calculate_voltage(i, fuel_cell_stack, fuel_cell_conditions, t_idx)[source]#

Calculates the output voltage of the fuel cell by subtracting the activation, ohmic, and concentration voltage losses from the reversible Nernst voltage, E_cell.

Parameters:#

i: float

The current density to evaluate the cell voltage at (A/m^2)

stack_temperature: float

Temperature of the fuel cell (K)

P_H2_input: float

Pressure of the hydrogen stream (bar)

P_air: float

Pressure of the incoming air (bar)

RH: float

Relative humidity of the air and hydrogen streams (0-1)

air_excess_ratio: float

Air excess ratio (above stoichometric)

pressure_drop: float

Pressure drop of the fuel cell at the rated current density (bar)

degradation: float

The percent of maximumm degradation to evaluate divided by 100 optional, defaults to 0 (0% of fuel_cell.maximum_deg)

Returns:#

float:

Output voltage of the fuel cell (V)

set_rated_current_density(fuel_cell_stack, rated_current_density, rated_power_density)[source]#

Sets the rated cd and pd of the fuel cell system

Parameters:#

rated_CD: float

The current density (A/cm2) to set

rated_power_density: float

The power density (W/cm2) to set

calculate_P_drop_hum(fuel_cell_stack, i)[source]#

Calculates the pressure drop across the humidifier for the rated current

Parameters:#

i: float

Current Density (Acm2) to calculate the pressure drop

Returns:#

float

The Humidifier pressure drop in bar

calculate_P_drop_stack(fuel_cell_stack, i)[source]#

Calculates the pressure drop across the stack for the rated current

Parameters:#

i: float

Current Density (Acm2) to calculate the pressure drop

Returns:#

float

The stack pressure drop in bar

calculate_P_O2(fuel_cell_stack, P_air, stack_temperature, RH, air_excess_ratio, P_drop, i)[source]#

Calculate the partial pressure of oxygen at the fuel cell cathode

Parameters:#

P_air: float

The input air pressure to the fuel cell (bar)

stack_temperature: float

The fuel cell stack temperature (K)

RH: float

The relative humidity of the oxygen stream (0-1)

air_excess_ratio: float

The oxygen excess ratio (above stoichometric)

P_drop: float

The pressure drop (bar) across the fuel cell cathode

i: float

The current density (Acm2) to calculate the partial pressure at

Returns:#

float

The oxygen partial pressure (bar)

calculate_P_H2(fuel_cell_stack, P_H2_input, stack_temperature, RH, i)[source]#

Calculate the partial pressure of hydroen at the fuel cell anode

Parameters:#

P_H2_input: float

The input hydrogen pressure to the fuel cell (bar)

stack_temperature: float

The fuel cell stack temperature (K)

RH: float

The relative humidity of the oxygen stream (0-1)

i: float

The current density (Acm2) to calculate the partial pressure at

Returns:#

float

The hydrogen partial pressure (bar)

calculate_E_cell(fuel_cell_stack, stack_temperature, P_H2, P_O2)[source]#

Calculates the reversible Nernst Voltage of the cell

Parameters:#

stack_temperature: float

The fuel cell stack temperature (K)

P_H2: float

The hydrogen partial pressure (bar)

P_O2: float

The oxygen partial pressure (bar)

Returns:#

float

The reversible cell potential (V)

calculate_activation_losses(fuel_cell_stack, stack_temperature, P_O2, i)[source]#

calculation of activation losses for both high temperature and low temperature fuel cells

Parameters:#

stack_temperature: float

Stack Temperature (K)

P_O2: float

Oxygen Partial Pressure (bar)

i: float

Current density to evaluate activation losses (A/cm2)

Returns:#

float:

Activation voltage loss (V)

calculate_ohmic_losses_LT(fuel_cell_stack, stack_temperature, i)[source]#

Calculation of ohmic losses for low temperature fuel cells

Parameters:#

stack_temperature: float

Stack Temperature (K)

i: float

Current density to evaluate activation losses (A/cm2)

Returns:#

float:

Ohmic voltage loss (V)

calculate_ohmic_losses_HT(fuel_cell_stack, stack_temperature, i)[source]#

Calculation of ohmic losses for high temperature fuel cells

Parameters:#

stack_temperature: float

Stack Temperature (K)

i: float

Current density to evaluate activation losses (A/cm2)

Returns:#

float:

Ohmic voltage loss (V)

calculate_concentration_losses_LT(fuel_cell_stack, stack_temperature, P_O2, RH, air_excess_ratio, P_drop, i)[source]#

Calculation of concentration losses for low temperature fuel cells

Parameters:#

stack_temperature: float

Stack Temperature (K)

P_O2: float

Oxygen partial pressure (bar)

RH: float

Relative humidity of the oxygen stream (0-1)

air_excess_ratio: float

Oxygen excess ratio (above stoichometric)

P_drop: float

Pressure drop across the fuel cell stack (bar)

i: float

Current density to evaluate activation losses (A/cm2)

Returns:#

float:

Concentration voltage loss (V)

calculate_limiting_current_density_LT(fuel_cell_stack, stack_temperature, P_O2, RH, air_excess_ratio, P_drop, i, **kwargs)[source]#

Calculation of the limiting current density for LT-PEM

Parameters:#

stack_temperature: float

Stack Temperature (K)

P_O2: float

Oxygen partial pressure (bar)

RH: float

Relative humidity of the oxygen stream (0-1)

air_excess_ratio: float

Oxygen excess ratio (above stoichometric)

P_drop: float

Pressure drop across the fuel cell stack (bar)

i: float

Current density to evaluate activation losses (A/cm2)

Returns:#

float:

limiting current density (A/cm^2)

calculate_concentration_losses_HT(fuel_cell_stack, stack_temperature, P_O2, RH, air_excess_ratio, P_drop, i)[source]#

Calculation of concentration losses for high temperature fuel cells

Parameters:#

stack_temperature: float

Stack Temperature (K)

P_O2: float

Oxygen partial pressure (bar)

RH: float

Relative humidity of the oxygen stream (0-1)

air_excess_ratio: float

Oxygen excess ratio (above stoichometric)

P_drop: float

Pressure drop across the fuel cell stack (bar)

i: float

Current density to evaluate activation losses (A/cm2)

Returns:#

float:

Concentration voltage loss (V)

calculate_limiting_current_density_HT(fuel_cell_stack, stack_temperature, P_O2, RH, air_excess_ratio, P_drop, i)[source]#

Calculation of the limiting current density for HT-PEM

Parameters:#

stack_temperature: float

Stack Temperature (K)

P_O2: float

Oxygen partial pressure (bar)

RH: float

Relative humidity of the oxygen stream (0-1)

air_excess_ratio: float

Oxygen excess ratio (above stoichometric)

P_drop: float

Pressure drop across the fuel cell stack (bar)

i: float

Current density to evaluate activation losses (A/cm2)

Returns:#

float:

limiting current density (A/cm^2)

evaluate_max_gross_power(fuel_cell_stack, fuel_cell_conditions, t_idx)[source]#
evaluate_power_func(i, fuel_cell_stack, fuel_cell_conditions, t_idx)[source]#