# Numerical Modeling Technique of Damage Behavior of
## 2 Introduction of XFEM
### Crack-Propagation Strategy  
FEAP allows users to add their own macro commands to realize some specific functions, which are performed by adding a subroutine called \"UMACRn\". In this study, a macro command with name \"CKPG\" is built to check the element crack-propagation criterion and to update the crack and enrichment information, and its implementation process is shown in Figure 7.  
In previous literature, only one or a few cracks are allowed to occur, and the starting position of cracks is usually prescribed before carrying out the numerical analysis. Some good results have been achieved in these numerical analyses; however, it will become much more difficult to ensure cracks propagate properly in real structures, since a large number of cracks may occur and affect each other. Therefore, an appropriate crack-propagation strategy is proposed in this study, so that the crack can propagate in a rational way.  
In this study, the maximum principal stress criterion is adopted as the fracture criteria, which means a new crack segment normal to the major principal stress direction is specified if the major principal stress reaches the tensile strength. For a real structure, however, if a new crack segment occurs once the fracture criterion is satisfied, there could be numerous distributed cracks occurring. This may lead to a locking problem if these cracks cannot be properly connected. In this study, a new crack segment is allowed to occur only if it starts at the free edge of a finite element mesh, or it is an extension of the existing cracks. It should be mentioned that the propagation strategies used for concrete and blocks are different due to the difference in the enrichment of the two materials.  
For concrete members, two steps are included. Firstly, the elements containing the crack tip are checked. A new crack segment with a given length is added if the stress around the crack tip reaches the fracture criterion. Next, the elements located on the boundary of the mesh and without enriched degrees of freedom activated are checked. A new crack segment that passes through the element centroid is inserted if the average element stress is beyond the tensile strength of concrete.  
For masonry blocks, one crack segment can pass through one element at one time. At each loading step, the fracture criterion is checked within every finite element to determine if a crack segment may initiate. If so, the direction of this potential crack segment is also calculated. Following this, the crack information of neighboring elements is checked. If  
Figure 7: Implementation process of macro command “CKPG”.  
there are no cracks that touch any edges of the current element, the crack segment is simply placed through the centroid of the current element. For elements in the same block with the current element, if only one crack in the neighboring elements touches an edge of the current element, the new crack segment is forced to align with the crack of the neighboring element; if there are two cracks in two neighboring elements that could potentially be aligned with the new crack segment, the new crack is then aligned with the one of the neighboring element whose angle of orientation is closest to that of the new crack. If no cracks in the neighboring elements could be aligned with the crack in the current element of the same block, a similar method is used to align the crack of the current element with the crack of those elements in the neighboring block; please see Figure 7 for the implementation process.  
As the crack propagates, the information for the cracks, enrichment and the crack tips is updated and stored in the corresponding locations of the element history variables, as described in Section 3.3.