Deep Learning Techniques for Predicting Stress Fields in Composite Materials: A Superior Alternative to Finite Element Analysis

: Stress evaluation plays a pivotal role in the design of material systems, often accomplished through the ﬁnite element method (FEM) for intricate structures. However, the substantial costs and time requirements associated with multi-scale FEM analyses have prompted a growing interest in adopting more efﬁcient, machine-learning-driven strategies. This study investigates the utilization of advanced machine learning techniques for predicting local stress ﬁelds in composite materials, presenting it as a superior alternative to traditional FEM approaches. The primary objective of this research is to develop a predictive model for stress ﬁeld maps in composite components featuring diverse conﬁgurations of ﬁbers distributed within the matrix. To achieve this, we employ a Convolutional Neural Network (CNN) with a specialized U-Net architecture, enabling the correlation of spatial ﬁber organization with the resultant von Mises stress ﬁeld. The CNN model was extensively trained using four distinct data sets, encompassing uniform ﬁbrous structures, non-uniform ﬁbrous structures, irregularly shaped ﬁbrous structures, and a comprehensive combination of these data sets. The trained U-Net models demonstrate exceptional proﬁciency in predicting von Mises stress ﬁelds, yielding impressive structural similarity index scores (SSIM) of 0.977 and mean squared errors (MSE) of 0.0009 on a dedicated test set. This research harnesses 2D cross-sectional imagery to establish a surrogate model for ﬁnite element analysis, offering an accurate and efﬁcient approach for predicting stress ﬁelds in composite material design, irrespective of geometric complexity or boundary conditions.


Introduction
The finite element method (FEM) is the conventional numerical approach used to perform stress analysis on structures, which requires solving partial differential equations [1,2]. FEM simulations can be computationally intensive, particularly when dealing with nonlinearities or intricate geometries. Furthermore, multi-scale evaluations demand extensive computations at a smaller scale. To address these challenges, considerable effort has been expended to supplant FEM methodologies with machine learning (ML) strategies, commonly utilized for surrogate modeling [3,4] of pertinent variables of interest. A comprehensive analysis of data mining and ML techniques applied to the processmicrostructure-property-performance chain in a descriptive-predictive-prescribed format is provided by Bock et al. [5]. These include applications such as process parameter effects on microstructure, microstructure reconstruction [6], and the capture of localized elastic strain in composites, among other things. Employing a gradient-boosted tree regression model, Pathan et al. [7] predicted a unidirectional composite's homogenized properties, namely macroscopic stiffness and yield strength, subjected to transverse plane loads. A CNN architecture for predicting the effective stiffness of high-contrast elastic microstructures was implemented by Yang et al. [8]. A similar 3D CNN architecture was also used by Rao et al. [9] for predicting the effective anisotropic properties of particlereinforced composites. Mozaffar et al. [10] utilized Recurrent Neural Networks (RNNs) to predict the plastic behavior of composite representative volume elements (RVEs) [11]. Similarly, Haghighat et al. [12] developed a Physics Informed Neural Networks (PINNs) framework and applied it to linear electrostatics and nonlinear elastoplastic problems. A deep-learning-based concurrent multiscale modeling approach for assessing the effect of polycrystalline inelastic solids was introduced by Liu et al. [13]. Gholami et al. [14] developed a deep-learning-based method to predict the mechanical properties of a bioglasscollagen composite hydrogel using microstructural images. They achieved high prediction accuracy by leveraging and optimizing deep neural network models, specifically AlexNet and ResNet. Their work shows potential applications in tissue engineering, materials science, and medical engineering. Despite these advancements, most studies primarily concentrate on the homogenization of properties of interest and only provide average outputs. However, frequently, there is a need to predict variations in local stress to anticipate local failures.
The prediction of stress fields in computational solid mechanics using deep learning has gained significant attention. Two different methodologies have been established by Nie et al. [15] using deep learning. These comprise a Single Channel StressNet (SCSNet), a Convolutional Neural Network (FR-CNN) with a single input channel, and a StressNet, a Squeeze-and-Excitation Residual Fully Convolutional Neural Network (SE-Res-FCN) with multiple input channels, used to predict 2D cantilevered structures' von Mises stress fields. A new model called StressGAN, a conditional generative adversarial network designed to predict 2D von Mises stress distributions in solid structures, was introduced by Jiang et al. [16]. Gupta et al. [17] utilized a pix2pix Convolutional CNN to predict the stress component S11 of fiber-reinforced polymer composites based on microstructural image inputs, demonstrating the model's robust predictive capabilities with a correlation score of 0.999 and L2 norm of less than 0.005. This approach allows for the expedited design and analysis of new composite materials, bypassing the need for labor-intensive numerical inputs. Chen et al. [18] introduce an efficient surrogate modelling framework using two CNNs for predicting stress fields and crack maps in composite material microstructures. The model, trained on high-resolution fracture simulations of circular-shaped inclusions, includes a self-attention layer for capturing key features. Sun et al. [19] employed a modified version of StressNet [16] to anticipate the stress field for the 2D microstructure slices of segmented tomography images from a 3D fiber-reinforced polymer sample. ML techniques have been presented by Liu et al. [20] for predicting the microscale elastic strain fields in a 3D voxel-based microstructure volume element (MVE), having potential applications in multiscale material modeling and simulations. A conditional generative adversarial neural network (cGAN)-based model has been developed by Yang et al. [21] to predict the stress and strain field directly from the material microstructure. Sepasdar et al. [22] constructed a two-stacked generator CNN framework to predict complete field damage and failure pattern prediction in composite materials. To enhance deep learning models' precision and training cost, Xu et al. [23] increased the computational efficiency of low-mesh density FEM models by developing a data-driven mesh density boosting model that uses the low mesh-density physical field as inputs to predict high-density physical field as outputs. A Fourier neural operator (FNO) was used by Rashid et al. [24] to accurately predict and design the mechanical responses of complex 2D composite microstructures, demonstrating high-fidelity stress and strain predictions with few training data and showing zero-shot generalization and super-resolution abilities, even for unseen geometries and low-resolution inputs. Bhaduri et al. [25] proposed an ML approach-specifically, a CNN with a U-Net architecture, for predicting local stress fields in fiber-reinforced matrix composite material systems, aiming to replace costlier and more time-consuming multi-scale finite element methods-and explored predicting larger systems by pretraining the CNN on data from smaller systems. They utilized U-Net architecture and a weighted mean square loss function for accurate prediction of the von Mises stress field in composite plates with varying fiber counts, improving results through increased training data and effective use of transfer learning, exemplifying the applicability of deep learning in stress field prediction.
While our study applies established techniques such as CNN models, U-Net models, data augmentation, and Python scripting, its novelty arises from the specific application to composite material microstructures with variability in volume fraction, inclusion quantities, and free shapes of fibers. Previous research has not thoroughly investigated these variables' impact on stress distribution, nor evaluated the robustness of these predictive models under such diverse conditions. Therefore, our research fills this critical gap, offering new insights into material behavior under various conditions, a crucial aspect for future material design and optimization. This research presents a unique approach to stress prediction in a fiber-reinforced composite material, considering variability in the number of fibers within the matrix with uniform, non-uniform, and free shapes. The proposed methodology utilizes deep learning models, specifically U-Net networks [26], which are known for their ability to capture high-resolution details and low-level features by propagating context information through skip connections, preventing the vanishing gradient problem during training. Our approach trains the model using data augmentation based on the physics of the problem, achieving highly accurate predictions by training on a data set comprising 350 images for each scenario.
This research uses deep learning models to predict local stress distributions in fiberreinforced matrix composite materials subjected to mechanical load. We aim to utilize data from a range of plane strain FEM models featuring a system with uniform, non-uniform, and free shapes of fibers to develop a deep learning model capable of predicting the stress field in a matrix. Specifically, this work employs U-Net networks [26] to demonstrate their generalization ability in predicting stress maps of composite materials. The manuscript is organized as follows: Section 2 discusses the proposed methodology, Section 3 presents the prediction results/analysis, and Section 4 provides discussions and conclusions.

Two-Dimensional Composite Material Design and FEM Simulation Database
Our training database comprises finite element simulations of composite geometries and boundary conditions. We first developed a 2D parametric model using Python scripting in Abaqus/Explicit software version 2018 to streamline the process and generate various composite geometries rapidly. Python scripts in Abaqus can automate repetitive tasks, customize the software's behavior, and integrate it with other tools in a software pipeline. For example, a script could generate a series of similar simulations with varying parameters or post-process simulation results and generate customized visualizations. As shown in Figure 1, we simplified the assumption that the cross-section consists of a series of circles and splines. The specifications of the circles, including the number of fibrous with uniform, non-uniform, and free shapes arrangement in the matrix, were randomly varied. Uniformity in the fibrous structure was sought to be achieved by constructing a twodimensional square with a length of 20 µm. Subsequently, a Python code that had been developed was employed to select two random numbers within the matrix space (ranging from 0 to 20). The designation of these numbers as the center coordinates of the first circle in the x and y axes was then performed. Consequently, the positioning of the first fibrous entity in the matrix was achieved, boasting a diameter of 0.7 µm. When subsequent circles were added, it was ensured that the distance between the newly selected numbers-serving as the centers for these circles-was greater than the diameter of neighboring circles. This precaution was taken to prevent any potential overlap. The continuation of this process for all other circles was carried out to generate the preliminary composite microstructure image. The final composition was dictated by several fibrous elements, ranging from 1 to 110, which were selected randomly. The steps for creating the non-uniform data set are like the uniform data set, but the fibrous diameter can vary from 0.2 to 1.2 µm.
were added, it was ensured that the distance between the newly selected numbers-serving as the centers for these circles-was greater than the diameter of neighboring circles. This precaution was taken to prevent any potential overlap. The continuation of this process for all other circles was carried out to generate the preliminary composite microstructure image. The final composition was dictated by several fibrous elements, ranging from 1 to 110, which were selected randomly. The steps for creating the non-uniform data set are like the uniform data set, but the fibrous diameter can vary from 0.2 to 1.2 µm. The free shapes of fibrous inside the matrix were created using the following algorithm, as shown in Figure 1. Initially, the non-uniform code, as previously described, was utilized. Subsequently, in each circle's local polar coordinate system, random vertices were generated. The free shapes of fibrous in the matrix were generated by the vertices connected by the spline algorithm. Overall, 350 2D images were generated as inputs for each data set, including uniform, non-uniform, and free shapes of fibrous. The fibrous were assumed to be perfectly bonded in the matrix for simplicity, even though the developed Python code could be quickly expanded to generate an interphase between the fibrous and matrix. The Python script was split into two main phases for calculating the von Mises stress maps, with the unified periodic RVE homogenization method's concepts being implemented. The code was initially used to generate geometries and assign material properties (Young's modulus (E) and Poisson's ratio (ν)) to the fibrous with E = 76.7 GPa and ν = 0.261 [27] and to the matrix with E = 3 kPa and ν = 0.49. An approximate global meshing size of 0.1 µm with two-dimensional generalized plane stress elements (CPS4R) was chosen. For a uniform displacement of 20% of the matrix length (4 µm), the boundary surfaces and RVE dimensions were identified by the code. Then, the building of nodal sets was followed, allowing boundary conditions and displacement to be applied and the FE analysis to be conducted. The post-processing phase, which was the second The free shapes of fibrous inside the matrix were created using the following algorithm, as shown in Figure 1. Initially, the non-uniform code, as previously described, was utilized. Subsequently, in each circle's local polar coordinate system, random vertices were generated. The free shapes of fibrous in the matrix were generated by the vertices connected by the spline algorithm. Overall, 350 2D images were generated as inputs for each data set, including uniform, non-uniform, and free shapes of fibrous. The fibrous were assumed to be perfectly bonded in the matrix for simplicity, even though the developed Python code could be quickly expanded to generate an interphase between the fibrous and matrix. The Python script was split into two main phases for calculating the von Mises stress maps, with the unified periodic RVE homogenization method's concepts being implemented. The code was initially used to generate geometries and assign material properties (Young's modulus (E) and Poisson's ratio (ν)) to the fibrous with E = 76.7 GPa and ν = 0.261 [27] and to the matrix with E = 3 kPa and ν = 0.49. An approximate global meshing size of 0.1 µm with two-dimensional generalized plane stress elements (CPS4R) was chosen. For a uniform displacement of 20% of the matrix length (4 µm), the boundary surfaces and RVE dimensions were identified by the code. Then, the building of nodal sets was followed, allowing boundary conditions and displacement to be applied and the FE analysis to be conducted. The post-processing phase, which was the second phase, included calculating von Mises stress distribution. In this step, the first nodal forces at the affected boundary nodes were calculated and divided by the affected surface area to derive the stress value.
This stress map was then extracted by the Python code and saved as an output image for each input image. The verification of the simulation results was conducted using [28,29].

U-Net Architecture
A collection of image data for inputs and outputs was amassed through the operation of the FEM model across a spectrum of composite microstructure geometries. These data were subsequently harnessed using a supervised learning approach to train a deep learning model. As referenced in the source, an encoder-decoder network was employed to establish a correlation between the input image and the resultant stress [15]. These input images are colorful representations showcasing the position and dimensions of fibrous. The encoderdecoder network transforms the input image into a simpler latent space and then maps this simplified representation back to the stress. It is assumed in this process that the input and target spaces both share the same latent space. The U-Net architecture, as noted in source [26], based on the FEM mapping data from images to the stress field, has been applied to this process. The training of the architecture's weights occurs through the process of learning. Originally introduced for medical image segmentation, the U-Net architecture has demonstrated its effectiveness in obtaining latent representations from various images. The standard architecture comprises of contracting layers followed by expanding layers, accompanied by skip connections that disseminate context information and improve the output resolution. The U-Net architecture utilized in this study exhibits slight modifications from the original. It consists of six repetitive blocks in the encoder, each including a 2 × 2 max pooling operation and, barring the first and last block, two successive 2D convolutions of size 3 × 3, followed by batch normalization and a ReLU operation. The initial decoder block solely contains the transpose convolution layer, while the final decoder block incorporates two successive layers of convolution-batch norm-ReLU, excluding a transpose convolution. Following the encoder and decoder blocks is a final 1 × 1 convolutional layer, mapping the 64-channel decoder output into three channels. The training of the weights is accomplished by minimizing the loss function, which is calculated as the weighted mean squared error (MSE) between the predicted and actual von Mises stress map derived from the training data. The U-Net architecture was developed using the TensorFlow and Keras libraries, as stated in the source [30]. A graphic illustration of the modified U-Net architecture can be seen in Figure 2. Figure 2 The U-Net architecture [26]. The training loss function is defined using the MSE. MSE is denoted as follows: In this context, X represented the input image, characterized by 2D composite microstructure images. The batch size is represented by n. The U-Net model's prediction is signified by f (X), and Y denotes the output images. A verification process was carried out during each training epoch in the network to ensure the selection of the most suitable model, avoiding overfitting. This process had been previously completed.

Image Quality Metrics and Statistical Analysis
The accuracy of the deep learning models was evaluated using SSIM [31]. Traditional evaluation metrics such as precision, recall, and F1 score were employed in computer vision tasks such as image classification or object detection. However, these metrics could not provide information about the visual quality of the output images or the extent of the model's predictions matching the ground truth. SSIM, a measure of the structural similarity between the output and ground truth images, bridged this gap. A comparison of the output images produced by CNN with the ground truth images was conducted using SSIM, and the resultant value was utilized to evaluate the model's accuracy. SSIM values lie within a range between 0 and 1. A value of 1 denotes a perfect similarity between two images, and 0 signifies no similarity. The measure between two common sizes N × N images, x and y, was calculated as follows: where x and y are the two images being compared, µ x and µ y are the mean pixel intensities of images x and y, σ 2 x and σ 2 y are the variances of pixel intensities in images x and y, σ xy is the covariance of pixel intensities between x and y, and c 1 and c 2 are constants used to stabilize the division, typically c 1 = (k 1 L) 2 and c 1 = (k 2 L) 2 , where L is the dynamic range of the pixel values (for example, 255 for 8-bit grayscale images) and k 1 and k 2 are constants that control the relative contribution of the luminance and contrast terms to the final SSIM score. The SSIM formula considers the compared images' luminance, contrast, and structure and produces a value between 0 and 1.

Image Quality Metrics and Statistical Analysis
The accuracy of the deep learning models was evaluated using SSIM [31]. Traditional evaluation metrics such as precision, recall, and F1 score were employed in computer vision tasks such as image classification or object detection. However, these metrics could not provide information about the visual quality of the output images or the extent of the model's predictions matching the ground truth. SSIM, a measure of the structural similarity between the output and ground truth images, bridged this gap. A comparison of the output images produced by CNN with the ground truth images was conducted using SSIM, and the resultant value was utilized to evaluate the model's accuracy. SSIM values lie within a range between 0 and 1. A value of 1 denotes a perfect similarity between two images, and 0 signifies no similarity. The measure between two common sizes N × N images, x and y, was calculated as follows: where x and y are the two images being compared, and are the mean pixel intensities of images x and y, and are the variances of pixel intensities in images x and y, is the covariance of pixel intensities between x and y, and and are constants

Results
The accuracy of mapping 2D cross-section images of composite microstructure to the corresponding von Mises stress map is evaluated in this section using data from 350 FEM simulations. To augment the data, the physics of the problem is utilized by flipping the input images and corresponding output maps horizontally and/or vertically. This 4-fold data augmentation is achieved through three flipping operations: horizontal flip, vertical flip, and horizontal flip, followed by vertical flip, as illustrated in Figure 3. data augmentation is achieved through three flipping operations: horizontal flip, vertical flip, and horizontal flip, followed by vertical flip, as illustrated in Figure 3. After augmenting the data, the training set comprises 1400 images depicting various spatial distributions of fibrous material within a matrix. Each image has a corresponding von Mises stress map. The data have been split for training and testing purposes in an 85% to 15% ratio. Figure 4 displays the real von Mises stress maps generated through FEM simulations, predicted maps developed using U-Net through 100 epochs, and a map delineating absolute stress error. Figure 4a shows two images from the uniform test data set. The subfigure provides a comparative analysis of the true stress map produced by FEM and the stress map generated by U-Net. The SSIM achieved by U-Net for the first and second images is 0.970 and 0.993, respectively, while the MSE rates are 0.0006 and 0.0001, respectively. The stress error map suggests a relatively minor prediction error, with an average error of 4.9% for the first image and 2.76% for the second. Figure 4b features a pair of non-uniform test data images and compares the original stress map from FEM and the stress maps created by U-Net. U-Net reaches an SSIM of 0.988 and 0.992 for the first and second images, respectively, with MSE rates of 0.0002 and 0.0001. The stress error map demonstrates a relatively slight prediction error, averaging 2.67% for the first image and 2.07% for the second. Figure 4c introduces two non-uniform test data images and conducts a comparative study between the ground truth and the stress maps designed by U-Net. U-Net records an SSIM of 0.984 and 0.972 for the first and second images, respectively. The MSE rates for these images are 0.0003 and 0.0005, respectively.
The stress error map uncovers a minor prediction error, averaging 2.75% for the first image and 3.65% for the second. Finally, we amalgamated all the data sets and processed them through our customized U-Net network, which handled 3 × 350 images. We must highlight that we modified our U-Net architecture specifically for this task. To be more precise, we introduced two additional layers with 32 kernels at the start and finish of our network, making our network significantly deeper than those used for other data sets. Figure 4d displays two images from the test set. One exhibits a free shape, while the other showcases a non-uniform pattern. The U-Net system demonstrated impressive performance with SSIM scores of 0.960 and 0.996 for the first and second images, respectively. Additionally, the MSE rates for these images were relatively low, recorded at 0.0012 and 0.0001 correspondingly. The stress error map reveals minor prediction errors, averaging 4.68% for the first image and 1.10% for the second. Notably, the deep learning approach significantly reduces computational effort compared to FE results. While Abaqus requires After augmenting the data, the training set comprises 1400 images depicting various spatial distributions of fibrous material within a matrix. Each image has a corresponding von Mises stress map. The data have been split for training and testing purposes in an 85% to 15% ratio. Figure 4 displays the real von Mises stress maps generated through FEM simulations, predicted maps developed using U-Net through 100 epochs, and a map delineating absolute stress error. Figure 4a shows two images from the uniform test data set. The subfigure provides a comparative analysis of the true stress map produced by FEM and the stress map generated by U-Net. The SSIM achieved by U-Net for the first and second images is 0.970 and 0.993, respectively, while the MSE rates are 0.0006 and 0.0001, respectively. The stress error map suggests a relatively minor prediction error, with an average error of 4.9% for the first image and 2.76% for the second. Figure 4b features a pair of non-uniform test data images and compares the original stress map from FEM and the stress maps created by U-Net. U-Net reaches an SSIM of 0.988 and 0.992 for the first and second images, respectively, with MSE rates of 0.0002 and 0.0001. The stress error map demonstrates a relatively slight prediction error, averaging 2.67% for the first image and 2.07% for the second. Figure 4c introduces two non-uniform test data images and conducts a comparative study between the ground truth and the stress maps designed by U-Net. U-Net records an SSIM of 0.984 and 0.972 for the first and second images, respectively. The MSE rates for these images are 0.0003 and 0.0005, respectively.
The stress error map uncovers a minor prediction error, averaging 2.75% for the first image and 3.65% for the second. Finally, we amalgamated all the data sets and processed them through our customized U-Net network, which handled 3 × 350 images. We must highlight that we modified our U-Net architecture specifically for this task. To be more precise, we introduced two additional layers with 32 kernels at the start and finish of our network, making our network significantly deeper than those used for other data sets. Figure 4d displays two images from the test set. One exhibits a free shape, while the other showcases a non-uniform pattern. The U-Net system demonstrated impressive performance with SSIM scores of 0.960 and 0.996 for the first and second images, respectively. Additionally, the MSE rates for these images were relatively low, recorded at 0.0012 and 0.0001 correspondingly. The stress error map reveals minor prediction errors, averaging 4.68% for the first image and 1.10% for the second. Notably, the deep learning approach significantly reduces computational effort compared to FE results. While Abaqus requires approximately 5 min for a single analysis, our trained U-Net model predicts stress in just 0.5 s on a laptop CPU. Our deep learning model is trained on GPU, using a Jupyter Notebook environment with Google collab pro, which is much faster than CPU. When running on GPU, each analysis takes approximately 0.05 s to complete. Table 1 showcases the SSIM and MSE metrics for the predicted stress across 210 test images. These images comprise three data sets-uniform, non-uniform, free shape, and a combination of all data sets. Our observations indicate that U-Net can predict stress maps across all data sets flawlessly. This is evidenced by an average SSIM score exceeding 0.97 for all data sets and an MSE score consistently below 0.0009. J. Compos. Sci. 2023, 7, x FOR PEER REVIEW 8 of 12 approximately 5 min for a single analysis, our trained U-Net model predicts stress in just 0.5 s on a laptop CPU. Our deep learning model is trained on GPU, using a Jupyter Notebook environment with Google collab pro, which is much faster than CPU. When running on GPU, each analysis takes approximately 0.05 s to complete. Table 1 showcases the SSIM and MSE metrics for the predicted stress across 210 test images. These images comprise three data sets-uniform, non-uniform, free shape, and a combination of all data sets. Our observations indicate that U-Net can predict stress maps across all data sets flawlessly. This is evidenced by an average SSIM score exceeding 0.97 for all data sets and an MSE score consistently below 0.0009.       Figure 5 compares the average SSIM and MSE values for stress between the actual and predicted stress-strain maps across all 210 validation images, substantiating the high precision of our model's predictive capabilities. In Figure 5a, we compared the MSE of predicted von Mises stress maps among three data sets: uniform, non-uniform, and free shape, and a combination of all data sets as all data sets. The box plots indicate that the MSE of uniform testing data was lower than that of other data sets. Additionally, Figure 5b suggests that the SSIM of predicted stress maps across all test data sets showed superior performance for combining all data sets. J. Compos. Sci. 2023, 7, x FOR PEER REVIEW 10 of 12 Figure 5 compares the average SSIM and MSE values for stress between the actual and predicted stress-strain maps across all 210 validation images, substantiating the high precision of our model's predictive capabilities. In Figure 5a, we compared the MSE of predicted von Mises stress maps among three data sets: uniform, non-uniform, and free shape, and a combination of all data sets as all data sets. The box plots indicate that the MSE of uniform testing data was lower than that of other data sets. Additionally, Figure  5b suggests that the SSIM of predicted stress maps across all test data sets showed superior performance for combining all data sets.

Discussion and Conclusions
To sum up, this study aimed to explore the capabilities of deep learning techniques in accurately predicting local stress fields within 2D slices of composite microstructure images, providing an alternative to the conventional FEM approach. A CNN model based on U-Net architecture was trained to establish a connection between the spatial arrangement of fibers in the matrix and the von Mises stress field. The trained models successfully predicted stress field maps with high accuracy for composite microstructure images that varied in the number and spatial layout of the fibers, which is a significant achievement. Python programming was employed to generate the training data set to create diverse fiber shapes, including uniform, non-uniform, and free-form shapes, with randomized features including location, diameter, number of fibers, and shape. The data sets comprised input and output images obtained by applying boundary conditions and extracting stress field maps. The U-Net models trained through this research provide precise predictions of the von Mises stress fields, achieving mean rates of 0.985, 0.988, and 0.977 for SSIM and MSE values of 0.0009, 0.0009, and 0.0004 for uniform, non-uniform, and free-form data sets, respectively, when tested on a separate set of data. Furthermore, integrating all data sets and employing a more advanced U-Net architecture resulted in superior performance on the test sets, demonstrated by a mean SSIM of 0.993 and an MSE of 0.002.
The first data set we assembled comprised 350 2D images of composite microstructures, each uniformly distributed, circular fibrous dispersed throughout the matrix. These fibrous had a diameter of 0.7 µm, with a random count ranging from 1 to 110 per image. Compared to the previous study, our data set was larger and encompassed a wider variety of fibrous distributions within the matrix, ranging from 1 to 110 fibrous, as opposed to only using images containing 6, 10, 20, or 100 fibrous. Furthermore, our training data sets were extensive, initially comprising 350 images. However, through the application of data augmentation techniques, we were able to expand this to 1400 images per data set. This starkly contrasts the study referenced as [25], which utilized a training set of 100 images.

Discussion and Conclusions
To sum up, this study aimed to explore the capabilities of deep learning techniques in accurately predicting local stress fields within 2D slices of composite microstructure images, providing an alternative to the conventional FEM approach. A CNN model based on U-Net architecture was trained to establish a connection between the spatial arrangement of fibers in the matrix and the von Mises stress field. The trained models successfully predicted stress field maps with high accuracy for composite microstructure images that varied in the number and spatial layout of the fibers, which is a significant achievement. Python programming was employed to generate the training data set to create diverse fiber shapes, including uniform, non-uniform, and free-form shapes, with randomized features including location, diameter, number of fibers, and shape. The data sets comprised input and output images obtained by applying boundary conditions and extracting stress field maps. The U-Net models trained through this research provide precise predictions of the von Mises stress fields, achieving mean rates of 0.985, 0.988, and 0.977 for SSIM and MSE values of 0.0009, 0.0009, and 0.0004 for uniform, non-uniform, and free-form data sets, respectively, when tested on a separate set of data. Furthermore, integrating all data sets and employing a more advanced U-Net architecture resulted in superior performance on the test sets, demonstrated by a mean SSIM of 0.993 and an MSE of 0.002.
The first data set we assembled comprised 350 2D images of composite microstructures, each uniformly distributed, circular fibrous dispersed throughout the matrix. These fibrous had a diameter of 0.7 µm, with a random count ranging from 1 to 110 per image. Compared to the previous study, our data set was larger and encompassed a wider variety of fibrous distributions within the matrix, ranging from 1 to 110 fibrous, as opposed to only using images containing 6, 10, 20, or 100 fibrous. Furthermore, our training data sets were extensive, initially comprising 350 images. However, through the application of data augmentation techniques, we were able to expand this to 1400 images per data set. This starkly contrasts the study referenced as [25], which utilized a training set of 100 images.
Our findings concurred with the research conducted by Bhaduri et al. [25] in that we also achieved a high performance when predicting stress maps.
Moreover, our research was not limited to merely uniform, circular shapes. Comparing our data sets with the literature [17,25], we created two additional data sets to broaden the capabilities of our network, allowing them to accommodate a wider variety of fibrous distributions. These data sets incorporated non-uniform circular and free-shaped fibrous, further generalizing our problem space. The results indicated that our U-Net model could accurately predict stress maps across all data sets. Additionally, the mean SSIM for all test data was found to be above 0.977, attesting to the accuracy of our model. We merged all data sets into a comprehensive package comprising 1050 images and their associated stress map images. This task involved a diverse range of images and the distribution of fibers within the matrix. To ensure our network could predict stress maps accurately, we integrated two additional deep layers at the start and end of our U-Net architecture, each equipped with 32 kernels. Our results indicated that our network could effectively predict stress maps, even when we amalgamated all data sets.
While we have primarily focused on simulated structures in this study, we believe that our method has significant real-world applicability. Specifically, high-resolution SEM images of real composite materials could serve as inputs for our CNN model, allowing for the prediction of stress distribution in real materials under actual load conditions. In addition, this study focused on two-dimensional data sets, but the framework can potentially expand to predict three-dimensional composite microstructures. Notably, this work did not consider the effect of fibrous crosslinking, a process commonly employed in these composites. Fibrous and matrix crosslinking can alter the mechanical properties of the matrix, and the degree of change depends on the crosslinking method and extent. The impact of the fibrous element may be obscured by matrix crosslinking, where the incorporation of fibers does not influence the mechanical properties of the composites. Further research could explore the extension of this approach to three-dimensional scenarios and investigate the effects of fibrous crosslinking on stress field predictions. It was additionally incorporating other material properties and structural.