Continuous carbon fiber 3D printing partitioning method based on stress distribution

3D printing of continuous carbon fiber composites presents a need for the directivity of fiber distribution. For parts with actual working conditions, the stress distribution of the same part under the same stress condition is different, but the existing partitioning algorithm mainly fills the path of the subregion according to the shape of the part, and does not combine the working condition of the part. To solve this problem, a partitioning algorithm based on stress contour density is proposed. Based on the results of finite element analysis, the stress contour of the parts is obtained, and the stress concentration area is partitioned by calculating the stress contour density. The stress concentration area is filled with a more suitable path to improve the performance of the parts.


Introduction
The application of 3D printing technology combined with continuous carbon fiber composite materials in the manufacturing field can reduce the complexity of the carbon fiber molding process, improve molding efficiency, give play to molding advantages, and have broad application prospects [1][2].In the actual use of composite material sheets in automobiles, the mechanical opening is required to facilitate connection and maintenance, etc., but the opening will destroy the continuity of fibers, produce stress concentration, and reduce the mechanical properties of parts [3][4].Due to the directivity and continuity of continuous carbon fiber composite materials, the combination of the path planning of parts and the actual working conditions can effectively improve the performance of parts.For the continuous carbon fiber 3D printing path research and the improvement of part performance, domestic and foreign scholars have done a lot of research.
Zhai et al. [5] used a generalized Voronoi diagram and duality operation to divide molecular regions for porous structures, and filled the subregions with helical curves to achieve path continuity in porous regions and ensure mechanical properties around holes.Wang et al. [6] developed a stress vector tracking algorithm through topology optimization to generate a print path along the load transmission path, showing better load-bearing performance.Li et al. [7] used topological optimization to analyze the load transfer path and generate the print path, which reduced the stress concentration but changed the original shape of the part.Li et al. [8] used grayscale images to delimit molecular regions, and the sub-regions generated print paths aligned with the main direction field to improve the tensile strength of the parts.The stress concentration area of the part is determined and targeted reinforcement is carried out, but the partition boundary of the method is inaccurate and irregular, which will affect the print quality during the process of carbon fiber 3D printing.Kamil et al. [9] Steuben et al. used Von Mises stress fields to generate horizontal set filling paths, but these paths were unevenly spaced due to the irregular shape of the stress fields.[12] Yusuke et al. used genetic algorithm to adjust the placement of fibers and optimize the orientation of bent carbon fibers, and the optimized fiber position showed excellent fracture improvement.[13] Determined the interval of layers to be reinforced through the finite element calculation results, reflecting the selective reinforcement of carbon fiber between different layers, but no selective reinforcement was carried out within the same layer.Combined with the finite element analysis, domestic and foreign scholars have studied and planned the 3D printing path of continuous carbon fiber composite materials according to the stress distribution results in the finite element calculation, and mainly enhanced the performance of parts by generating paths through load transfer.Chen et al. [10] extracted the equivalent curve of the stress field to generate the path of fiber reinforcement and improve the mechanical properties of the parts.However, due to the irregular shape of the stress field, the shape and spacing of these paths are not uniform.
It can be seen that the existing path planning method still has the following problems: (1) the zoning path planning is mainly divided by the shape characteristics of the parts, and the zoning path planning is not carried out according to the actual working conditions of the parts, which cannot give full play to the anisotropy characteristics of continuous carbon fiber composites; (2) Due to the irregularity of the stress field, the shape of the area after zoning according to the stress field boundary is irregular, which will affect the molding effect of the parts during the 3D printing of carbon fiber composite materials.
In this paper, a zonal path planning algorithm based on stress contour lines is proposed.The stress contour lines are obtained through finite element analysis of the specific use environment of the parts, and the stress concentration areas are determined by calculating the density of the stress contour lines.On this basis, different paths are selected for different areas for targeted enhancement.

Based on stress contour partitioning algorithm
The traditional partition method based on the shape of the part is not specific to the working condition, and the irregular shape of the partition boundary based on the finite element analysis will affect the print quality.In order to solve the problems of the above partitioning methods, a partitioning algorithm based on stress isoline is proposed in this paper.Partitioning is to process STL surfaces after processing the finite element analysis data.The partitioning algorithm inputs STL files with model surface information and the finite element analysis result data, outputs the regional boundary information of the partition after algorithm calculation and processing, and segments the STL surfaces according to the boundary information to obtain regions with different stress concentration degrees.The main flow of the algorithm is shown in Figure 1 Start

Method of obtaining stress contour
In the process of identifying the stress concentration area and non-concentration area of the model, the stress distribution in the specific model cannot be obtained only from the simple distribution of isolines.Therefore, the partition calculation should be carried out by combining the relevant data of the model and the stress isolines, and the specific process of generating isolines is shown in Figure 2: For the grid cell four vertices  ,  ,  ,  ,  ,  ,  ,  , four vertices corresponding stress values respectively  ,  ,  ,  , forming an isoline with a stress value of  in the element.The calculation of the intersection point between grid elements and isolines is mainly to find the intersection point between edge lines and isolines of each element.Assuming that the function changes linearly within the element, the method of vertex judgment and edge interpolation can be used to calculate the intersection point.The specific steps are as follows: (1) The grid point is divided into two states, IN and OUT, indicating that the point is inside or outside the contour line.If   , then the vertex  ,  is IN, denoted as .If   , then the vertex  ,  is OUT, denoted as .
(2) If all four vertices of the cell are or , then the grid cell has no intersection with the contour of  .Otherwise, for cell points where the two vertices are and , linear interpolation calculates the intersection of the contours on this edge.If the two vertices  ,  is ,  ,  is , then the intersection point is 1 (3) After calculating the intersection point between the contour line and the grid element in each cell, the contour line segment in the cell is formed by using the intersection point.
(4) The contour lines in the unit are connected to form the contour lines in the unit.

Calculation of density of stress contour
The stress contour can clearly describe the stress variation in the model in the finite element calculation, but it does not obtain the coordinate range, which makes it impossible to accurately partition in the printing.Therefore, the calculated stress contour gradient information in this section is used to fit the intensity of stress contour change, and the density of stress contour.The Sobel algorithm is widely used in image edge detection [11].
The predetermined threshold T=0 is set, and each pixel of the gradient image is compared with the predetermined threshold T. If the gradient exceeds the threshold, the pixels are regarded as edges.Otherwise, they are non-edge points, and all pixels are regarded as edge points.The gradient values of all pixels are compared to obtain the edge point with the largest gradient value, that is, the boundary of the area with dense stress isolines, and the edge information of the area with concentrated stress, that is, the edge isoline information.
The contour lines in the finite element analysis were obtained by the grid sequence method in 1.1.After the finite element analysis, the contour lines have irregular shapes such as sharp corners.The printing quality of continuous carbon fiber will be affected if the region is divided by the contour lines as the boundary.The region calculated by contour density is used to generate an AABB minimum bounding box composed of regular shapes with the information of the points on the contour boundary of the region, and the center circle surrounded by the stress concentration area is generated with the information of the AABB minimum bounding box.

Simulation experiment
In this paper, the composite plate with holes is taken as a typical test sample for calculation, analysis and experimental verification.The length of the perforated plate model is 100 mm, the width is 40 mm, the diameter of the central circular hole is 12 mm, and the thickness is 4 mm.The left end of the perforated plate is fixed, and the displacement W is applied to the right end.The stress partitioning results of the parts are obtained through the partitioning calculation in Section 1, and the partitioning path planning for different areas is carried out according to this, as shown in Figure 3 and Figure 4.The contour line of stress distribution is shown in Figure 5, and the partition range calculated according to the contour line is shown in Figure 6.

Path planning simulation
The simulation experiment of traditional path planning was carried out on the perforated plate.Compared with traditional path planning, path planning is carried out for different regions according to the results of zoning.For the model with holes, a continuous path is formed around the hole in the stress concentration area to ensure performance, and a straight filling path is selected for the non-stress concentration area when the force direction of the part is satisfied.

Print test
After the carbon fiber composite material printing experiment was carried out on the above paths through the double-nozzle printer, the molded parts realized different path planning in different areas of the same model, realized the printing of different paths in the same layer, and realized the combination with the actual working conditions of the parts, as shown in Figure 8.

Conclusion
By processing the finite element analysis data of the parts, the stress isoline was obtained.The density of the stress isoline was calculated according to the partition to realize the analysis of the actual working conditions of the parts.The distinction between the concentrated and non-concentrated areas was realized, and the path planning was carried out according to different areas.The path planning is realized according to the actual working conditions of the parts.

Figure 1 .
Figure 1.Flow chart of stress contour partitioning algorithm.

Figure 2 .
Figure 2. Contour generation process.For the grid cell four vertices  ,  ,  ,  ,  ,  ,  ,  , four vertices corresponding stress values respectively  ,  ,  ,  , forming an isoline with a stress value of  in the element.The calculation of the intersection point between grid elements and isolines is mainly to find the intersection point between edge lines and isolines of each element.Assuming that the function changes linearly within the element, the method of vertex judgment and edge interpolation can be used to calculate the intersection point.The specific steps are as follows:(1) The grid point is divided into two states, IN and OUT, indicating that the point is inside or outside the contour line.If   , then the vertex  ,  is IN, denoted as .If   , then the vertex  ,  is OUT, denoted as .(2)If all four vertices of the cell are or , then the grid cell has no intersection with the contour of  .Otherwise, for cell points where the two vertices are and , linear interpolation calculates the intersection of the contours on this edge.If the two vertices  ,  is ,  ,  is , then the intersection point is

Figure 7 .
Figure 7.Comparison diagram of path simulation planning.Compared with traditional path planning, path planning is carried out for different regions according to the results of zoning.For the model with holes, a continuous path is formed around the hole in the stress concentration area to ensure performance, and a straight filling path is selected for the non-stress concentration area when the force direction of the part is satisfied.

Figure 8 .
Figure 8. Partition printing and straight line printing results.