Abstract
A new algorithm to generate Representative Volume Elements (RVEs) of random fiber distributions is presented in this study. The Random Sequence Expansion (RSE)_stirring algorithm generates the initial fiber random distribution. Subsequently, by stirring the generated fibers and highlighting the influence of fiber short-range spacing interactions, the method facilitates the capture of the real fiber distribution. To verify the soundness of the proposed algorithm, the RVE model, generated by the RSE_stirring algorithm, was analyzed using four statistical functions. The model was then statistically compared with the experimentally obtained real fiber distributions in a Completely Spatial Random (CSR) pattern. In this study, the equivalent modulus of the composite was also predicted using RVE and compared with the results predicted by other algorithms. The experimental and the predicted results showed a strong similarity.
Keywords
Introduction
Carbon fiber-reinforced composites (CFRP) are becoming increasingly prevalent in the aerospace field because of their excellent properties such as lightweight, high strength, and impact resistance. CFRP consists of carbon fibers, which reinforce the mechanical properties of the composite, and a matrix polymer that binds the fibers together to protect them against the external environment. 1 Although the experimentally-derived composites are more accurate and reliable mechanically, such experiments often require huge financial and material inputs. With the development of computers and finite element technology, the fine-scale mechanical analysis of composites has gradually become a research hotspot. Further, analytical calculations or numerical simulations have been shown to be meaningful alternatives to experimental methods. 2
The mesoscale mechanical analysis of fiber-reinforced composites is usually performed using their Representative Volume Element (RVE). Originally, Sun et al. 3 conducted finite element analysis based on the RVE model to obtain the equivalent modulus of the unidirectional fiber composite. One of the most important issues for investigation based on the RVE model is the spatial arrangement of the fiber bundles. Initially, for the sake of analytical simplicity, a periodic and ordered fiber arrangement at the microscopic scale was assumed by Aghdam et al. 4 , who analyzed the RVE model using hexagonal arrays. However, subsequently, Zhang et al. 5 found that the rectangular and the hexagonal arrays were inconsistent in predicting the transverse and the shear modulus, and the periodic array model was less accurate compared with the random model. Trias et al. 6 found that matrix cracking and damage were underestimated by models with periodic fiber distribution compared with random distribution models as the real distribution of fibers was also random and disordered. Further, Segurado et al. 7 proposed another technique to randomly generate fibers, known as the Strauss “hard-core” algorithm, also known as the Random Sequential Adsorption (RSA) algorithm. It ensures equal probability of generating each coordinate point within a specified range, without overlapping fibers. The technique is limited by the fiber content, which reached only about 50%, while in reality, it often reaches 60% or higher. Therefore, additional studies are ongoing to improve the content of the randomly generated fiber structures to levels higher than 60%.
The three classic methods to generate RVE models for random fiber distributions are as follows: 1) Perturbation method. As defined by Wongsto et al.
8
it is based on fiber generation in a hexagonal periodic array via random size perturbation displacement, which leads to RVE with high levels of randomly distributed fiber content. Subsequently, Balasubramani et al.
9
used the perturbation method to evaluate the effect of RVE aspect ratio on the predicted elastic modulus. 2) Nearest Neighbor Algorithm (NNA) 3) Random Sequence Expansion (RSE) algorithm. Lei et al.
12
generated a stochastic distribution model with a high fiber volume fraction by adjusting the inter-fiber distance parameter. Subsequently, Kim et al.
13
predicted the mechanical properties of unidirectional composites using convolutional neural networks (CNN) for the RVE model generated by the RSE algorithm.
Thus, a suitable algorithm for generating the RVE model plays a crucial role in the subsequent study to predict the elastic modulus. New algorithms, such as Random Microstructure Generation (RMG) by Melro et al., 14 Hard-Core Optimization Algorithm (HCOA) by Liu et al., 15 and an adaptive RVE model based on molecular dynamics and evolutionary periodic boundary algorithms by Qu et al. 16 However, all of these aforementioned algorithms were too complex and difficult to promote.
Therefore, several studies have subsequently optimized and improved the classical algorithm. Wang et al. 17 improved the NNA by adding the statistical properties of the actual fibers using scanning electron microscopy. Subsequently, they introduced probability equations to resolve the low approximate fiber distribution generated by the original NNA; however, the new method still failed to resolve the operational complexity. Liu et al. 18 proposed a new RSA algorithm based on Boolean operation to generate the RVE containing non-overlapping fibers. Even though this algorithm shortens the modeling time by avoiding repeated cycles of running calculations, the algorithm does not consider the statistical elements of the actual fiber distribution.
Consequently, the main objective of this study was to propose an improved RSE method, called
The RSE_stirring algorithm is currently used in classical, unidirectional, continuous fiber composites. However, it should not be restricted to a single type, such as the Tailorable Universal Feedstock for Forming (TuFF) material, where Yarlagadda et al. 19 demonstrated the potential to achieve composites of recycled discontinuous fibers with properties comparable to those of continuous fibers. Heider et al. 20 quantified the microstructural characteristics of experimentally obtained discontinuous composites represented by Tuff via statistical formulation. In future studies, the RVE model generated by discontinuous fibers should also be considered using the RSE_stirring algorithm.
This study is further divided as follows: section 2 discussing the development of the algorithm; section 3 dealing with statistical analysis; section 4, the prediction of the elastic properties of the system; and section 5, which summarizes the obtained results and proposes future perspectives.
Development of algorithm
The initial version of the RSE algorithm represents a random distribution model that produces high content of fiber volume fractions by adjusting the inter-fiber distance. The main limitation of this algorithm is that it does not analyze the real-world effects of microscopic distribution and the tendency to produce fiber clusters and free fibers. In addition, Valentin 21 found that the local fiber aggregation introduces additional stress gradients, which play an important role in failure.
Therefore, the proposed RSE_stirring algorithm based on the advantages of RMG and NNA methods incorporates targeted fiber stirring, mobilizes each fiber to move toward the nearest and second nearest neighboring fibers, highlights the influence of fiber short-range spacing interactions, improves the long-range spacing fiber clusters and fiber drift. It also retains the simplicity and rapid modeling of the RSE algorithm. The flowchart of the RSE_stirring algorithm is presented in Figure 1. The different layers of the RSE_stirring algorithm are indicated. Flowchart of the RSE_stirring algorithm.
The following steps represent the procedure of the RSE algorithm. In addition, Figure 1 shows the outcome of these steps: [1] Generate a random coordinate ( [2] Search randomly around the first fiber and generate the location of the second fiber ( The direction of the second fiber ( [3] Repeat steps [2] to search and generate the position of the third fiber ( [4] Repeat steps [2] and [3] with the second fiber (

Random fiber generation using RSE method.
By adjusting the fiber spacing, the fiber stirring step can reduce the “fiber clustering” phenomenon. It can also increase the randomness of the long-range fiber distribution. The stirring process is presented in Figure 3. [1] Stir the fibers generated in step 1-RSE generates fibers as shown in Figure 3. The window contains four fibers, A, B, C and D. During the fiber stirring, only a single fiber is moved, while the other fibers remain stable. Taking the first stirring of fiber A as an example, where fiber A0 is the starting position of fiber A, A0 is moved toward its nearest fiber (fiber B). The direction of movement is the direction vector of [2] During the second stirring of fiber A, the reference fiber in the first stirring (fiber B) is not considered. Thus, fiber A1 seeks and moves towards its nearest fiber (fiber C). Similarly, the direction of movement is the direction vector of [3] Similarly, during the second stirring of fiber A, the reference fiber in the first stirring is not considered (fibers B and C). The fiber A2 goes to the nearest fiber (fiber D) while passing through A3. Theoretically, fiber A can continue to be stirred [4] When the stirring of fiber A is completed, the next fiber enters the cycle. The stirring standard consists of determining each stirring to identify the nearest fiber. The above operation is repeated until all fibers in the RVE complete stirring. Note that fiber overlap cannot occur during the stirring process. Comparison of predicted effects under different fiber stirring times. The step 2 in this study is based on the algorithmic ideas of RMG
14
and differs partially from the proposed RSE_stirring algorithm, which covers a larger range of targeted stirring. Thus, the movement of mobilized fibers toward the nearest and second nearest neighbor fibers is enhanced. The connection between internal and boundary fibers, which is also consistent with the actual fiber distribution.

Stirring the fiber A.
If the fiber content at this point is greater than expected, a number of fibers inside the RVE window will be removed randomly until the fiber content reaches the expected result. At this point, the RVE model is exported. Considering the periodic boundary conditions, the RVE window is divided into two regions A and B. Region A contains fibers that are completely distributed inside the RVE, whereas region B contains fibers on the RVE boundary, as shown in Figure 4. The letter [1] Count the number of valid fibers in regions A and B. As shown in Figure 4, the region A contains nine fibers and the region B consists of four fibers, yielding a total of 13 fibers ( [2] Set a specific probability statistical function and output a random value among 0 (representing the occurrence of selected region A) or 1 (representing the occurrence of selected region B), according to the different probabilities of the two events. If zero is generated, one fiber in region A is randomly deleted. Conversely, when the value one is obtained, a single fiber in region B will be deleted; [3] Determine if the current fiber content is at the expected content: The first two steps are repeated until this condition is satisfied, and then the loop is ended to derive the RVE model. The entire algorithm is written in Python code and displayed as a GUI plug-in for ABAQUS, as shown in Figure 5. The RSE_stirring algorithm is simple and user-friendly, both in terms of flow and GUI input parameters, and it allows the fibers to touch each other (when taking During the preparation and production of carbon-fiber composites, a submicron-thick interphase between the fibers and the matrix is generated.23 The thickness of this interface specifically for CFRP materials was approximately 200 nm based on transmission electron microscopy (TEM) analysis,
24
resulting in a cylindrical shell. The interface properties strongly affect the mechanical properties of composites.
25
Composite failure analysis at the microscopic level is mainly reflected in matrix fracture and interface debonding. Therefore, the RSE_stirring algorithm was used to generate interfaces and for future studies involving the microscopic failure models of composites. Nevertheless, the interface has little influence on the prediction of elastic properties. Other algorithms
26
use the interface to predict the equivalent modulus. The results of prediction do not differ significantly from those not based on the interface. Therefore, the computational simplicity and subsequent models used to predict elasticity do not factor the interface. The RVE model analyzed in this paper is the ideal model. In reality, it is impossible to avoid defects and voids generated by modern manufacturing techniques that aim to reduce production costs and time.
27
Zhang et al.
28
have used suitable statistical functions to analyze the voids in thermoplastic composites. While statistical void data are essential to capture the true behavior of the modeled material, it is also essential to model the shape voids used and determine the distribution format,
29
which requires further in-depth analysis.

Dividing the RVE region into zones A and B.

RSE_stirring main view.

Representative Volume Element (RVE) model with different constituent phases.
Statistical characterization
In order to verify the statistical equivalence between the fiber distribution established by the RSE_stirring algorithm and the fiber distribution of the microscopic images of real composites,
22
four statistical spatial descriptors
30
were used. This method analyses both the short- and the long-range interaction of fibers, including the nearest neighbor distances, the nearest neighbor orientation, Ripley’s
According to experimental observations,
22
each fiber has a slightly different diameter. To simplify, the fibers in subsequent statistical data and the equivalent modulus calculation model were considered to have the same diameter and their average value was 6.6 μm. Further, Trias et al.
31
showed that the larger the size of the RVE model, the more apparent the characterization. The width-to-diameter ratio of 50 is generally optimal and therefore, the RVE size used for the statistical analysis in this study was equivalent to 165 μm × 165 μm × 10 μm. The input variables were:
Nearest neighbor distance
The nearest neighbor distance is defined as the distance between the reference fiber and the nearest neighboring fiber, and its Probability Density Function (PDF)
30
reveals the interaction between the fibers, which is commonly used to characterize the arrangement of fibers. Whether the RSE stirring algorithm improves the cluster of long-range spacing fibers and fiber drift was further investigated. Figure 7(a) and (b) show the nearest neighbor and second nearest neighbor probability distribution functions, respectively. These functions are used to compare experimental results
22
and the probability distribution of fiber distances between various simulation methods, including the original RSE and the RSE stirring algorithms. Comparison of PDF based on experimental characterization and results of simulation: (a) first nearest neighbor distribution and (b) second nearest neighbor distribution.
As shown in Figure 7, four conclusions can be drawn: - 1) The experimental data differ from the data obtained from the two algorithms, mainly because the fiber distribution is generally not completely random in reality, and the nearest neighbor PDF does not follow the same form as the PDF of the Completely Space Random (CSR); - 2) The abscissa is normalized as h/r, where r is the average fiber radius of 3.3 μm. Both RSE and RSE_stirring values of curves are zero when the h/r value varies between 0 and 2; while the experimental curve is not null. This indicates clearly the existence of experiments in which the distance - 3) Concerning the nearest neighbor distribution (shown in Figure 7(a)), all three curves show peaks. The higher the peak, the more uniform the nearest neighbor distance between fibers. The highest observed peak of the RSE_stirring algorithm indicates clustering of the long-range spacing fibers and improved fiber drift; - 4) Compared to the nearest neighbor distribution function, the peak of the curve of the next nearest neighbor distribution function is lower for both algorithms, and the general trend of the RSE_stirring curve fits the experimental curve more closely.
Nearest neighbor orientation
The nearest neighbor direction is the directional distribution of the undirected line connecting the center of the reference fiber and its nearest neighbor direction; it is generally described by the Cumulative Distribution Function (CDF).
30
The CSR is used to verify the randomness of its algorithm and has equal probability of occurring in the nearest neighbor direction at all angles, implying that the CDF is a diagonal line at 45°. Thus, Figure 8 shows that the curves carrying the RSE_stirring and the RSE algorithms are on almost the same straight line as the CSR curve for a complete round despite the slight vibration. Therefore, the randomness of the nearest neighbor fiber direction is still undamaged even with a high fiber content based on the RSE_stirring algorithm and additional stirring operation. This result further illustrated by the fiber distribution of the real experiment demonstrating an incompletely random phenomenon. Comparison between the nearest-neighbor direction cumulative distribution based on experimental characterization and simulation.
Ripley’s K function
Ripley’s
It is useful to analyze the fiber distribution by comparing the Comparison of K-functions for experimental characterization and simulation results: (a) 0 ≤ h/r ≤ 4; (b) 9 ≤ h/r ≤ 14; (c) 0 ≤ h/r ≤14.
Figure 9(b) and (c) present the zoomed plots of Figure 9(a) when the h/r value varies between 9 and 14 and between 0 and 4, respectively. As shown in Figure 9(c), in the lower range (0 ≤ h/r ≤ 4), the three
Pair distribution function
The pair distribution function, also known as the radial distribution function, is defined as the probability of finding an additional point in the annulus of the inner radius
As shown in Figure 10, the value of the curve is almost zero at low distance range (0 < h/r < 2). The three curves fluctuate, and the amplitude of the oscillation gradually decreases. The simulated value at low distance range ( Comparison of the radial distribution functions based on experimental characterization and simulation results.
Prediction of elastic properties
The equivalent modulus of elasticity of the composite is the most intuitive parameter and the core metric determining the feasibility of the algorithm used to establish RVE. In this section, the effective elastic properties of the composites are predicted using the finite element method. The simulated results are then compared to the experimental results, 22 the initial version of the RSE algorithm, the RSE_stirring algorithm, and the Modified NNA algorithm 17 to verify the accuracy of the RSE_stirring algorithm.
Finite element model
In this article, we used the Python language tool to create a strongly optimized algorithm -- RSE_stirring plug-in, and build the RVE model in ABAQUS. 33
Comparison of simulation results for size ratio δ = 50 and δ = 25.
The RVE size of the model used for simulation in this section was 82.5 μm × 82.5 μm × 10 μm. The values of the input variables were defined. While
In order to ensure the alignment of the front and the back grid, the following steps were taken: 1. selection of the type of sweep mesh 2. moderately dense grid size to avoid concomitant increase in computational volume and meet the requirements of the periodic grid.
Elastic properties of T300 carbon fiber and 914C resin matrix. 22
Periodic boundary condition
Setting periodic boundary conditions is crucial when predicting the elastic modulus. 34 Initially, Xia et al. 34 proposed a relatively well-developed periodic boundary condition to display the differences in displacement in a unified form for nonlinear analysis under arbitrary multi-axial loading. Omairey et al. 35 created a plug-in, called Easypbc, to integrate the surrounding conditions for predicting the elastic modulus. Easypbc can be currently applied only to the classical RVE model for unidirectional fibers and not to materials with a slightly more complex microstructure. Tian et al. 36 proposed a specific implementation of the algorithm to predict the elastic modulus for short fibers using the RVE model. Our study initially analyzed only fiber-reinforced composites. Additional studies may also incorporate complex RVE models for further analysis.
This study used the Easypbc plugin
35
to calculate the E11 elastic modulus with periodic boundary conditions, as shown in Figure 11. The equations modeling this system are as follows Easypbc periodic boundary condition.
35

Analysis and results
Predicted mean values of effective elastic properties.
As shown in Table 4, for the Young’s modulus E11 in the main fiber direction, the predicted values of all three algorithms are very close to the experimental results, especially for the two improved algorithms (
In addition, minor differences were found between the data in Tables 1 and 2 and the simulated data in Table 4. Only five RVE models were used to determine the simulation conditions in each of the first two cases, while 50 RVE models were used for the latter simulation predictions to increase the accuracy of the results.
In general, the RSE_stirring algorithm was optimized from the original RSE algorithm in terms of prediction modulus. Further, the RSE_stirring algorithm with specific stirring was better than the Modified NNA, which was also optimized according to the base algorithm.
Conclusion
In this study, a new algorithm, the RSE_stirring, was proposed to generate random spatial distributions of fibers. This algorithm has two major advantages over the original version of RSE. First, the simulation time required to build each RVE model was less than 3 min, which was significantly faster than the other modeling algorithms. Second, no expensive techniques, such as electron microscopy and image processing, were needed. Further, when considering a stirring step based on the original algorithm, which highlights the influence of fiber short-range spacing interactions, improves the long-range spacing fibers cluster, and the fiber drift phenomenon, the RSE_stirring algorithm is more effective in capturing real fiber distribution.
In terms of statistical analysis, the RVE model, generated by the algorithm, was previously described. Compared with the experimental results, the RSE_stirring algorithms were more consistent with the nearest neighbor distance, the nearest neighbor direction, Ripley’s K function, and the pair distribution function. For the completely random CSR model, the statistical curves of the RSE and RSE_stirring algorithms do not match perfectly, suggesting that the real fiber distribution was not completely random and depended heavily on the manufacturing and the processing conditions.
In summary, the RSE_stirring algorithm is simple, efficient, and can better reproduce the fiber distribution of high-content carbon fiber composites. In addition, the RSE_stirring algorithm facilitates prediction of an equivalent model for simulation.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the National Natural Science Foundation of China (U21A20132), Guangxi Specially-invited Experts Foundation of Guangxi Zhuang Autonomous Region.
Data availability
The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request.
