# Two-Dimensional Mesoscale Finite Element Modeling of Concrete Damage and Failure
## 3 Automatic Generation of Cohesive Elements
Then, an extraction of the element connectivity lists of all elements contained in the node connectivity list is performed. A comparison is made between all element connectivity vectors, and when the number of common nodes between two elements reaches two, it means that these two elements are adjacent. This process is performed for all elements, and the element IDs of the adjacent elements are stored in a separate data structure. * Step 5: Assigning face type Face type is assigned to each of the two adjacent elements identified in the previous step, and the corresponding face type of each element is stored in a separate data structure. Figure 3b illustrates a two-dimensional triangular element with its corresponding node numbering. As can be seen, a 2D triangular element has three faces consisting of the segments defined by the nodes [1; 2; 3; 2] for face 1, nodes [2; 3; 3] for face 2, and nodes [3; 4; 5; 6; 7] for face 3. To assign the face type to each element, first, the element connectivity list of each two adjacent elements is extracted. Then, new numeric labels are assigned to the components of the element connectivity list. These new numerical labels are integer positive numbers ranging between 1 and 3. As mentioned earlier, adjacent elements have two common nodes; in this state, the corresponding new numerical labels of the common nodes are extracted for each adjacent element. Based on the new numerical labels of the common nodes, the face type is identified and assigned to each element. As Figure 3c illustrates, nodes [2; 3; 3] represent the common interface between elements \(E_{1}\) and \(E_{2}\). With respect to the corresponding new numerical labels of the common nodes, Face 2 is assigned to element \(E_{1}\) and face 1 is assigned to element \(E_{2}\). * Step 6: Multiplication of cohesive nodes Those nodes that are located at the interface of two adjacent elements are multiplied, and in this way cohesive nodes are generated. It is worth mentioning that if the node connectivity list has \(n\) members, \(n-1\) new nodes are generated and the original node is always assigned to an element with the smallest element ID in the node connectivity list. After this operation, interface nodes do not exist anymore and each created node is allocated to a different element. Therefore, it is crucial to update the element connectivity list of each element after the generation of cohesive nodes. * Step 7: Generation of cohesive elements For this purpose, the updated element connectivity list and face type of each two adjacent elements are retrieved, and with these data at hand, the element connectivity list of a four-node cohesive element (COH2D4) is written. The traction-separation law (TSL) is implemented as the material property of cohesive elements which is based on the deformation vector of the nodes. As shown in Figure 3d, the first two nodes (\(n_{1}\), \(n_{2}\)) belong to the bulk element \(E_{1}\) and the other two nodes (\(n_{4}\), \(n_{5}\)) belong to the bulk element \(E_{2}\). When there is no deformation, node \(n_{1}\) coincides with \(n_{4}\), and node \(n_{2}\) coincides with node \(n_{5}\). The distance between these nodes determines the interface separation. Since the finite element solver can distinguish between the opening and closing of the cohesive element with respect to its element connectivity list, its node arrangement must be written correctly in a counterclockwise manner. The triangular elements can have any orientation in space, but the node numbering is always as illustrated in Figure 3b. It is worth mentioning that the face type of the adjacent elements helps to write the element connectivity list of the cohesive elements in a counterclockwise fashion, which leads to a correct distinction between the opening and closing of cohesive elements. Figure 4 represents the generated cohesive element in three different regions of the concrete mesostructure.