## 2 Generation of Mesostructures and Numerical Models
### The Generation of Aggregate Structure and Pore Structure  
Based on the generation method proposed by [PERSON] et al. [2], a new generation program of aggregate structure and pore structure written in ANSYS APDL language is proposed, which realizes a more accurate simulation of pore structure and can change the pore structure separately without changing the aggregate structure. The pore structure is controlled by some parameters, such as the total porosity, pore gradation, pore size, and sub-porosity of each gradation segment. The details of the program are shown below. 1. Input controlling parameters:  
The controlling parameters contain four categories. The first category is related to the size of the concrete specimen, including the length, width (2D), and height (3D) of the specimen. The second category is aggregate-related parameters, including the Fuller curve, the aggregate area/volume fraction, and the aggregate type and shape. The size distribution of aggregates shown in Section 2.1 is used in this paper. The third category is pore-related parameters, including the pore shape, total porosity, pore gradation, pore size, and sub-porosity of each gradation segment of pores, etc. The size distribution of pores described in Section 2.2 is used in this paper. The fourth category is the structural parameters of concrete, including the minimum distance, \(\psi_{1}\), between the pore and the specimen boundary and the minimum thickness, \(\psi_{2}\), of the mortar layer, which surrounds the aggregate, etc. In CRAMs, aggregates are generally simulated as circles, ellipses, or polygons. [PERSON] [2] found that the shape of aggregates has a certain influence on the mechanical properties of concrete, but it is not significant. Therefore, it is feasible to simulate the aggregates as circles, ellipses, or polygons. [PERSON] [28] found that most of the pores in concrete are spherical, so the aggregates and pores in this paper are both simulated as circles. 2. Generate and place the aggregate:  
Firstly, generate an aggregate, which starts with the grading segment containing the largest aggregates. In each grading segment [D\({}_{i}\), D\({}_{i+1}\)], the aggregate size is uniformly distributed. Secondly, place the aggregate. Three random numbers for the two-dimensional specimen or four random numbers for the three-dimensional specimen are generated to determine the position and radius of the aggregate. Before that, three conditions are checked: (1) all aggregates should be inside the specimen, and the distance between the aggregate boundary and the specimen boundary is greater than \(\psi_{2}\); (2) there is no overlapping/intersection between this aggregate and any other existing aggregates; (3) the distance between any two aggregates should be greater than \(\psi_{2}\). If any of three conditions  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Sample**} & **P\({}_{\text{p}}\) [e\({}_{1}\), e\({}_{2}\)]** & **P\({}_{\text{p}}\) [e\({}_{2}\), e\({}_{3}\)]** & **P\({}_{\text{p}}\) [e\({}_{3}\), e\({}_{4}\)]** & **P\({}_{\text{p}}\) [e\({}_{4}\), e\({}_{5}\)]** & **Total Porosity** & **Average Pore Radius** & **PSSA** \\  & **(\%)** & **(\%)** & **(\%)** & **(\%)** & **(\%)** & **(\%)** & **(mm)** & **(mm\({}^{-1}\))** \\ \hline
2-2-L & 0.83 & 0.48 & 0.4 & 0.29 & 2 & 0.244804 & 0.1359 \\
3-1-S & 1.75 & 0.52 & 0.42  
is not met, the three random numbers (2D)/four random numbers (3D) should be ignored, and a new set of random numbers will be generated to place the aggregate in a new position. If these conditions are all met, the aggregate is generated and placed successfully, and the three random numbers (2D)/four random numbers (3D) are stored in an array, Aagg, which has n rows, and n is equal to the number of aggregates. Generate and place all aggregates to form an aggregate structure:  
Repeat step 2 until the remaining aggregate area in this gradation segment is less than \(\pi D_{1}^{2}/4\), which is transferred to the next smaller gradation segment.