# A Novel Dynamic Approach for Risk Analysis and Simulation Using Multi-Agents Model
## 7 Case Study: Modelling Chemical Reactor/Operator Using GDABM
### Failure Analysis of the Chemical Reactor/Operator Using GDABM  
Figure 11 illustrates the Reactor/operator system with the proposed risk model that shows for every agent the set of all possible failure (including fault and event trees), and behavioral modes plus the mutual relation between them. The Agents reactor/operator experience different failure events and failure modes. Table 3 contains seven different failure modes that are used as examples in this paper. The first failure mode \(FM_{0}\) illustrates quantity above threshold in the reactor caused by the _Transform products_ activity or a misread of the level sensor. The second failure \(FM_{1}\) is overfilling that take place with the existence of a malfunctioned operator and level sensor failure followed by a quantity above threshold Figure 12.  
\(FM_{2}\) represents Over-temperature and \(FM_{3}\) Over-pressure. The top event for the agent reactor is \(FM_{4}\) that represents gas leakage from the reactor. \(FM_{4}\) occurs when at least one of the failure modes \(FM_{1}\), \(FM_{2}\) and \(FM_{3}\) occur. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Failure Mode** & **Type** & **Agent** & **Description** \\ \hline \(FM_{0}\) & Boolean & Reactor & Quantity above \\  & & & threshold (\(V>V_{max}\)) \\ \(FM_{1}\) & Complex & Reactor & Overfilling \\ \(FM_{2}\) & Complex & Reactor & Overtemperature \\ \(FM_{3}\) & Complex & Reactor & Overpressure \\ \(FM_{4}\) & Complex & Reactor & Leakage \\ \(FM_{5}\) & Boolean & Operator & Toxic inhalation \\  & & & (\(GC>\gamma\)) \\ \(FM_{6}\) & Complex & Operator & Suffocation \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Agents failure modes. Figure 11: Reactor/Operator with the risk model. By consequence, reactor' behavior mode changes from \(R_{Nom}\) (_nominal mode_) to \(R_{Deg}\) (_degraded gas leakage mode_) where the gas concentration is measured continuously through an activity called _compute GC (gas concentration_), and the agent reactor sends a _gasleakage_ message to the agent operator. \(FM_{4}\) is considered as an external failure mode to the operator \(operator_{EFAC}\), as the failure occurs at the reactor rather than at the operator. Once \(FM_{4}\) occurs, the behavioral mode of the agent Operator change form \(O_{Nom}\) (_nominal mode_) to \(O_{Deg1}\) (_degraded mode_), where the operator evaluates the risk level related to the Gas Leakage. \(FM_{5}\) is the failure mode of the operator representing a gas concentration \(GC\) exceeding the _Gas Concentration Threshold_\(\gamma\). \(FM_{5}\) is an internal failure mode \(reactor_{IFAC}\). \(FM_{5}\) is BFM; since it depends on the condition whether the gas concentration exceeds the threshold value or not. \(FM_{6}\) is a suffocation failure mode that occurs if the sequence of \(FM_{4}\), \(E_{1}\) and \(FM_{5}\) is valid. Once \(FM_{6}\) is enabled, operator' behavior mode changes from \(O_{Deg1}\) (_operator's degraded mode 1_) to \(O_{Deg2}\) (operator's degraded mode 2), where the state of the operator change from inactive to out of order due to the toxic inhalation. Table 4 summarize the main events that might occur during the chemical reaction including their descriptions and probability of failure [108]. Those events and the related failure modes are then represented in a dynamic fault tree as shown in Figure 12.  
A gas leakage eventually causes evaporation of Hydrogen sulfide H2S that reduces the volume level inside the reactor. The atmospheric dispersion of gases continues until the failure is fixed or the volume of the product becomes less than the \(capacity_{max}\) and hence it might eventually restore its nominal mode. Table 5 represents the various activities and their associated equations where \(V^{+}\), \(GC^{+}\) represent the products' volume and the gas concentration in the environment of the reactor at the next time step (t+1), respectively.