# Surrogate Models for Estimating Failure in Brittle and Quasi-Brittle Materials
## 3 An Algorithm to Estimate Failure Paths
Among these ten nearest crack tip neighbors, we identify the ones that could interact or coalesce with the horizontal cracks. Crack interaction or crack coalescence occurs if the FPZ of two neighboring cracks overlap. That is, if the Euclidean distance of a nearest neighbor is less than the length of FPZ, then we assume that the neighboring cracks are going to coalesce to form a larger crack. In the graph based representation of failure, we form new edges by joining the crack tips that have overlapping FPZs. The size of the FPZ, \(l_{12}\), is given as [77]:  
\[l_{12}\propto\left(\frac{\sigma}{\sigma_{y}}\right)^{2}\left(l_{1}+l_{2}\right) \tag{1}\]  
where \(\sigma\) and \(\sigma_{y}\) are the applied and yield stresses of the material. \(l_{1}\) and \(l_{2}\) are the length of the interacting cracks. Herein, we assume that the size of FPZ to be 75% of \((l_{1}+l_{2})\). [PERSON] [83] was among the first to introduce Equation (1) to calculate the size of FPZ. We note that this equation has been used in various experimental and modeling works in literature [83; 84; 85; 86]. Once we have identified the potential coalescing cracks, we next identify the regions or zones of interest in which failure is likely to occur. It should be noted that there may be one or more potential failure zones in a specimen. However, in a realistic system only one of these failure paths will actually correspond to the sample's complete failure. To identify this failure zone, we divide the entire domain into a set of non-overlapping rectangular zones. Let the total number of non-overlapping rectangular zones be equal to NumZones. The width of the rectangular zone is equal to the width of the domain and its height is equal to \(\frac{H}{\texttt{NumZones}}\), where \(H\) is the height of the specimen. Then, we form a weighted undirected graph for the entire domain. This weighted graph contains graph nodes (which are crack tips), pre-existing edges, and newly formed edges. Preexisting edges representing initial cracks are given small edge weights, equal to \(10^{-4}\). The rationale behind giving small edge weights to initial cracks is that, physically, there is a strong possibility for the failure path to traverse through these cracks. The weights of the newly formed edges are equal to their length. Once this weighted graph is formed, we find all the connected components in each non-overlapping rectangular zone. A connected component of a weighted undirected graph is a set of nodes such that each pair of nodes is connected by a path. The Depth First Search algorithm available in NetworkX[87] is used to identify connected  
Figure 3: Failure paths graph representation: A pictorial description of graph representation of fracture propagation. Crack tips are graph nodes and edges are cracks (which are assumed to be line segments connecting crack tips). components. After identifying them, we search for the non-overlapping rectangular zone which has maximal connected component. Here, the maximal connected component is defined as a connected component whose number of nodes is at least greater than or equal to the number of nodes in every other connected component in the graph. The maximal connected component is identified in order of size, number of 0-degree cracks, largest length, and location with respect to loading side of the domain (see step-18 in Algorithm 1). ```
1:INPUT: Domain length; Initial coordinates of the crack tips; NumZones: Total number of regions the domain is divided into (in-order to estimate zone of failure); Length of FPZ. 2:Identify the 0-degree angle cracks that are perpendicular to tensile loading. 3:for Each crack tip in the set of all 0-degree angle cracks: do
4: Calculate ten nearest crack tip neighbors using \(k\)NN algorithm with \(k=10\) and their respective Euclidean distances. 5: Among these ten nearest crack tip neighbors, identify the ones that fall within the FPZ.