# Two-Dimensional Mesoscale Finite Element Modeling of Concrete Damage and Failure
## 3 Automatic Generation of Cohesive Elements  
To the authors' knowledge, direct implementation of cohesive interface elements into an existing finite element mesh is not possible in Abaqus/CAE, so a Python code is developed to solve this issue. The Python code reads an FE mesh file generated by Abaqus and then generates 2D cohesive interface elements between the interfaces of two adjacent solid elements. Figure 3a shows a 2D four-node cohesive interface element. The code starts by reading the FE mesh file containing the data of the nodes and elements. Then, a node connectivity list is created for each node. In this context, the node connectivity list illustrates a set of elements that surround a specific node. Then, the mesh is modified by duplicating the nodes followed by generating element connectivity lists of cohesive elements. In the following, the algorithms for generating cohesive elements in a particulate composite with three different phases are described in detail. For this purpose, a mesh of triangular elements is considered, where each solid element has three nodes. The steps required to generate cohesive elements are described below. In addition, Algorithm 1 briefly summarizes the procedures for generating cohesive elements. Figure 2: Flowchart to generate aggregates and voids. * Step 1: Initialization The initial FE mesh file generated by Abaqus/CAE is imported into the Python code, and by processing the node and element data, three main data structures are generated. A unique specific ID number is assigned to each node and element in the first and second data structures, and the corresponding coordinates and element connectivity list are stored, respectively. It is worth mentioning that the assigned ID numbers are positive integers. The element connectivity list represents all nodes that constitute an element. As illustrated in Figure 3b, the element connectivity list of a triangular element is [1-2-3]. Element sets are stored in the third data structure, and the elements in each set are assigned a specific material ID. In this context, element sets, which are automatically written to the original FE mesh file, represent a specific region of discretized geometry. The elements forming the mortar matrix are labeled with the material ID equal to zero, whereas the elements constituting the aggregates would have different material ID numbers. The material ID numbers for aggregates are positive integers, and the corresponding value for each aggregate depends on the name of the aggregate's element set in the original FE mesh file. For instance, if the name of the element set of a particular aggregate in the initial FE mesh file is one, the elements that constitute that aggregate will be labeled with a material ID of one. Material IDs enable the generation of cohesive interface elements at different phases of the concrete mesostructure. * Step 2: Construction of node connectivity list A data structure called the node connectivity list (ndConnL) is created that stores the element IDs of all elements that contain a particular node. The node connectivity list of each node is determined by traversing the element connectivity list of all elements so that all possible elements containing a given node in their element connectivity list are identified. * Step 3: Identification of ITZ nodes The nodes located at the interface of the aggregates and mortar matrix are identified. For this purpose, the node connectivity list of each node is called from the corresponding data structure in Python, and in the second step, the corresponding material ID of each element in the node connectivity list is determined. Then, the extracted material IDs are compared with each other. If the material IDs are not unique, then the corresponding node is in the ITZ zone. Figure 3: Four Figures with Subtitles. * Step 4: Identification of adjacent elements In this step, every two neighboring elements that share a common face will be identified. To this end, the node connectivity list of each node is called.