Model Description and References
This model describes the dynamic behaviour of a proton exchange membrane fuel cell (PEMFC). The model includes components describing the electrical, fluidic, and thermal properties of the cell.Electric model
The basic electrical performance is modelled after a basic Thévenin circuit, with a constant voltage generator and a simple resistor. This may be sufficient for analyses focusing on mass balances, where voltage behaviour is not important. In the basic version, activation and mass_transport voltage losses are modelled with short circuits (i.e. no losses at all).
More complex behaviour can be simulated by replacing the v_source, ohmic, activation and mass_transport components with more detailed objects, with the restriction they must inherit from OnePort. While there is no way to enforce this strictly, it would be appropriate to follow the naming convention and e.g. use activation to implement Butler-Volmer kinetics, mass_transport to implement Warburg elements, and so on. More complex setups can be nested defining new classes inheriting from OnePort.
Other relevant behaviours can be simulated by adding elements in parallel to the circuit. In particular, it is possible to:
- Add a capacitor in parallel to activation, to simulate a charge double layer;
- Add a current generator or a resistance between pin_p and pin_n, to simulate crossover current.
Mass balances
The mass balances in anode and cathode are implemented by two Manifolds. Both are fed the reaction rate given by the circuit current, multiplied by the number of cells and divided by 2F.
Each Manifold is configured with the appropriate stoichiometric coefficients nu and molar masses M, consistently with their medium.
The default mediums are pure hydrogen on the anode and 3-component moist air on the cathode (oxygen, nitrogen, water). These can be replaced in child classes, in which cases the Manifolds may require adaptation.
The model can work with flow inversion, but it is recommended to switch it off in the outer system definition as it may mask underlying modelling issues.
Thermal balance
The heat generated by the reaction is calculated automatically by the Manifolds based on the enthalpies of entering and exiting flows. The heat balance is also fed a negative contribution equal to the stack's power production, as this exported energy will not contribute toward increasing the heat holdup.
A heat capacitor simulates heat holdup. A thermalConductor connects the stack to its coolant pipe.
The heat network is connected to a heatPort, which may be connected to other external units such as radiating or convection heat exchange, or to a FixedTemperature if the temperature transients are not of interest.
NB! If you use a FixedTemperature, remember to still attach a boundary to the coolant outlet, or the simulation will not converge, as the coolant volume will expand with temperature with no volume to do so. The flow will be minimal but not zero.
Rainbow and black-sheep elements
The replaceable nature of circuit elements and Manifolds makes it possible to simulate more complex stacks. In the default implementation, only one cell is modelled, with the stack voltage being obtained by simply multiplying its voltage by Ncell; similarly, the manifolds are assumed to have uniform, zero-dimensional compositions.
Rainbow stacks, i.e. stacks with cells with different properties simulated in parallel, can be implemented by replacing the elements of the model with custom submodels that implement Ncell elements within themselves, presumably with different parameters. E.g. a ohmic could be replaced by an element containing Ncell resistors of different value.
Note that rainbow stacks do not need to be implemented for every aspect at the same time: for example, we may replace activation with an array of Butler-Volmer elements, but leave v_source as a single generator, depending on the purpose of the simulation.
The arrays of new elements could also require connection with the manifolds, e.g. if an advanced nernst element were to need the composition at anode and cathode; proper connections will have to be devised in that case.
Black-sheep simulations are similar to rainbow simulations, but only one cell is simulated on its own, whereas the other Ncell-1 cells are aggregated. This is useful if we want to simulate the effect of a defective cell without increasing excessively the number of equations.
Limitations
The presence of a lumped heatCapacitor and of a central subtraction of electricPower from the heat balance makes it difficult to implement a rainbow stack with different temperatures for each cell.
Governing Equations
p_H2 = (anode.port_a.p + anode.port_b.p)/2;
p_O2 = (cathode.port_a.p + cathode.port_b.p)/2*cathode.medium.X[Media.MoistAir.Oxygen];
T_stack = heatPort.T;
phi = cathode.medium.phi;
eta_stack_HHV = min(multiSensor.power/(max((anode_in.m_flow + anode_out.m_flow), 1e-10)*H2HHV)*100, eta_max);
eta_stack_LHV = min(multiSensor.power/(max((anode_in.m_flow + anode_out.m_flow), 1e-10)*H2LHV)*100, eta_max);
| Quantity | Description |
phi | check mol/mass fraction |
eta_stack_HHV | Higher heating value efficiency of fuel cell stack |
eta_stack_LHV | Lower heating value efficiency of fuel cell stack |
Parameters
| Name | Type | Unit | Default | Description |
N_cells | Integer | 1 | 42 | Number of cells in the stack |
A_el | Modelica.Units.SI.Area | m2 | 0.41 | Area of the fuel cell electrode (m^2) |
G_cool | Modelica.Units.SI.ThermalConductance | W/K | 8000 | Thermal conductance of coolant in FC stack (W/K) |
Interfaces and Connections
| Name | Kind | Type | Unit | Description |
anode_out | Connection | Modelica.Fluid.Interfaces.FluidPort_b | Pa; kg/s; J/kg | - |
anode_in | Connection | Modelica.Fluid.Interfaces.FluidPort_a | Pa; kg/s; J/kg | - |
cathode_in | Connection | Modelica.Fluid.Interfaces.FluidPort_a | Pa; kg/s; J/kg | - |
cathode_out | Connection | Modelica.Fluid.Interfaces.FluidPort_b | Pa; kg/s; J/kg | - |
pin_p | Connection | Modelica.Electrical.Analog.Interfaces.PositivePin | V; A | Positive electrical terminal |
pin_n | Connection | Modelica.Electrical.Analog.Interfaces.NegativePin | V; A | Negative electrical terminal |
heatPort | Connection | Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | K; W | - |
coolant_in | Connection | Modelica.Fluid.Interfaces.FluidPort_a | Pa; kg/s; J/kg | - |
coolant_out | Connection | Modelica.Fluid.Interfaces.FluidPort_b | Pa; kg/s; J/kg | - |