5.3.1
Petri-Net Firing
The firing of the Petri-Net uses the following equation:
Mn= M0+ AT
X
(5.11)
Where Mn is the final marking, M0 is the initial marking, AT is the incidence matrix for
the module, andP is the transition firing count vector.
For each individual Petri-Net module contained within the ‘Degradation’ transition of the global Petri-Net, there is a corresponding incidence matrix as in Equation 5.12 for H2O2degra- dation. AT = P1 P2 P3 P4 P5 P6 P7 P8 T1 T2 T3 T4 T5 −1 0 0 0 0 −1 1 1 1 1 0 −1 −1 0 0 0 −1 −1 −1 0 0 0 −1 −1 0 0 0 0 0 −1 0 0 0 0 0 1 0 0 0 0 (5.12)
The logic behind each transition from place to place is noted in each AT matrix for each module. A ‘−1’ indicates the taking of a token from a place, and a ‘1’ indicates the placing of a token into that place.
5.3.2
Petri-Net Simulation Logic
The Petri-Net logic is presented in Figure 5.6, and shows the progression of the process during running of the Petri-Net simulation. The global script is the overall code that runs the Petri- Net system model. It sets all current loss variables to ’0’ as the model is due to run numerous times and repetition of results per simulation is not desired. Any starting variable are then set, such as the amount of Start-up/Shut-down cycles for the simulation that are not inherent within the model. The incident matrix for the global net is then generated and the loop is started that runs the degradation parameters per time-step. For every time-step, each module of degradation phenomena have their incidents matrices generated first, then each step the logic is fired to ascertain degradation. Throughout this process, the degradation level is checked against a pre-determined failure level, and if this threshold is exceeded, the simulation is stopped and results recorded.
Activation of ‘Global’ script
Generate incident matrix for individual model Petri-Nets
Loop running of Global Petri-Net for pre- set ‘EndTime’
Set loss variables to zero
Run PNIce.metc.
Run PNGlobalPN.m script
Request starting variables
Generate incident matrix for ‘Global’
Petri-Net Run PNGlobal.m script
Is Global Petri-Net degradation transition
firing?
No
Yes
Run Petri-Net firing script Run PNIcePN.metc.
Update Degradation Variables Is Degradation more
than 5% ? No
Fire into ‘Failed State’. End Simulation
5.3.3
Token movement
The firing of transitions and the movement of tokens can depend on various parameters. Some depend on an operating condition of the degradation model, some depend on previous token movements, and some on specific time related conditions. An example of the movement of a token through a specific starting module in the Petri-Net model is presented in Figure 5.7.
Figure 5.7: Petri-Net module for Ice formation
Figure 5.7 shows the module for ice formation, and would have the token placed in P39 when the degradation model is first run. The transition can only fire if there is excess water present, placing a token in P30. Additionally if P40 has a token in (which depends on the cell/stack temperature operating parameter from the performance model) then the transition can’t fire. The movement of the token from P39 to P32 of this module would require two operating parameters from the 1D model to be in certain bounds. This example requires the cell/stack temperature to be below 0, and the RH of the cell to be above 100%. Once these conditions are met, the token will be moved from P39 to P32.
Figure 5.8: Petri-Net module for Swelling
The token placement resulting from the firing of the transition in Figure 5.7 then transfers tokens to other areas of the Petri-Net model. Figure 5.8 shows the module for swelling, and would have P32 and P30 harbouring tokens after the interactions were true. If P32 has a token in Figure 5.7, then P32 will contain a token for the next interaction of the degradation model. T36 in Figure 5.8 will fire if there is a token placed in P32 being an instantaneous firing. This would place a token into P58 which again triggers an instantaneous transition in T35, as long as there is currently no swelling (a token placed into P57 ).
A token placed into P29 of the swelling module triggers a degradation relationship that is derived from a combination of experimental results and data from the literature, and is covered in more detail in Chapter 7.
In addition to triggering a key hydration related degradation phenomena (covered in more detail in section 6.4.1), a token placed in P29 of the swelling net influences degradation due to GDL degradation in the such named net (as detailed in Figure 5.9).
Figure 5.9: Petri-Net module for GDL Degradation
As can be seen in Figure 5.9, both P29 and P30 enter this module from previous modules. The token that was in P29 from the last time-step is now not only directly affecting performance, but is also influencing logic in the GDL Degradation module by becoming an input into T12.
The movements of tokens through all of the other Petri-Net modules occur in a similar fashion.