An ABAQUS® plug-in for generating virtual data required for inverse analysis of unidirectional composites using artificial neural networks

This paper presents a robust ABAQUS® plug-in called Virtual Data Generator (VDGen) for generating virtual data for identifying the uncertain material properties in unidirectional lamina through artificial neural networks (ANNs). The plug-in supports the 3D finite element models of unit cells with square and hexagonal fibre arrays, uses Latin-Hypercube sampling methods and robustly imposes periodic boundary conditions. Using the data generated from the plug-in, ANN is demonstrated to explicitly and accurately parameterise the relationship between fibre mechanical properties and fibre/matrix interphase parameters at microscale and the mechanical properties of a UD lamina at macroscale. The plug-in tool is applicable to general unidirectional lamina and enables easy establishment of high-fidelity micromechanical finite element models with identified material properties.


Introduction
Fibre-reinforced polymer (FRP) composite laminates have been widely used in aerospace, automotive, and wind energy industry due to their excellent material properties such as high stiffness-to-mass ratio, high strength, and light weight. Applications of FRP composite laminates to create engineering structure models fundamentally require mechanical properties as inputs. Experimental tests are ideal solutions to evaluate the mechanical properties of a composite lamina. However, it must be repeated whenever the constituents (fibre and matrix) and/or microstructure characteristics (fibre volume fraction) are altered. This procedure may, for instance, costs millions of dollars and lasts for years to generate the experimental data of mechanical properties for the design of aircraft structures [32].
To overcome the aforementioned drawbacks associated with experimental tests, various micromechanical approaches have been proposed to establish a closed-form relationship between elastic properties at the lamina scale and the elastic properties at the constituent scale. These methods fall generally into two categories, i.e., analytical and numerical methods. Analytical methods, such as the Rule of Mixture method [6], the Halpin-Tsai semi-empirical method [10], the Mori-Tanaka method [19], and the Chamis method [5], facilitate the calculation of elastic properties by a direct mathematical, empirical expression between constituent properties and elastic properties of the lamina. However, these methods have an inherent limitation in describing the stress and strain fields at microstructural scale mainly due to neglecting fibre interaction.
With the development of computing capacities, numerical methods, in particular the finite element method (FEM), have become widely used tools for studying the behaviour of composites, including inverse analysis [8,15,26], elastic moduli [27], failure of composite lamina [29,33,34], and the effective coefficients of thermal expansion [13]. Inverse analysis has been used to identify fibre mechanical properties and fibre thermal expansion coefficient, and evaluate the factors of analytical methods, and so on. [26] determined the elastic and thermal properties of graphite fibre using inverse analysis. [3] predicted fibre properties using finite element analysis of hexagonal and random representative volume element (RVE) through inverse analysis. Similarly, [14] conducted an inverse analysis to predict fibre mechanical properties. However, they used quasi-analytical gradients derived from analytical models such as Chamis or Halpin-Tsai to reduce the computational cost. [15] utilised an inverse method to identify the mechanical properties of T300 carbon fibre as well as the interphase region parameters based on a computational homogenisation approach together with experimental results and Kriging metamodelling. [8] carried out an inverse analysis in the framework of FEM to estimate the reinforcement parameter ξ of the Halpin-Tsai models which is used to calculate transverse stiffness E 2 . A total number of 67 FE models of 2D square, 2D hexagonal, and 3D random fibre distributions were used to obtain a new value of ξ with a high level of confidence.
Regardless of the inverse methods used or the purpose they are used for, a large number of FE analyses are required for converged solutions. However, constructing a micromechanical FE model is not a straightforward task and requires special treatments to impose boundary conditions, and generate microstructures including fibre distribution and fibre/ matrix interphase, and extract outputs, etc. These complexities impose a barrier of using inverse analysis by engineers and researchers. Recently, several ABAQUS plug-ins have been developed for the ease of creating micromechanical FE models. These plug-ins were developed either by the functions available in ABAQUS or by external software. An ABAQUS plug-in named MultiMech was developed to perform multi-scale finite-element analysis (FEA) with the capability of simulating nonlinear behaviours of composites [16]. Another ABAQUS plug-in for multilevel modelling of linear and nonlinear behaviour of composite structures [7,28]. The plug-in developed using Python scripts for analysing an RVE at microscopic level to obtain macroscopic parameters for structural analysis by user-defined FORTRAN subroutines in ABAQUS. Composite Micro-Mechanics (COMM) toolbox was developed in Matlab for micromechanical analysis of composites [17]. The toolbox creates an input file that can be read by ABAQUS which performs the FEA. Recently, EasyPBC plug-in was developed for ABAQUS to estimate effective elastic properties of a pre-prepared and meshed RVE [21]. While, the ABAQUS plug-in proposed by [24] is capable of generating an RVE with random fibre distribution using Random Sequential Adsorption (RSA) technique.
The aforementioned plug-ins have shown outstanding benefits and capabilities to create and simulate complex RVEs of unidirectional (UD) FRP composite lamina. However, they are designed to generate and analyse a single model. Therefore, this paper aims to develop an open-source ABAQUS plug-in named Virtual Data Generator (VDGen) that automates the time-consuming manual task requires to create a large number of virtual data for inverse analysis. The plug-in uses Latin-Hypercube (LH) sampling methods and supports the unit cell of square and hexagonal fibre arrays. In addition, the plug-in incorporates Artificial Neural Networks (ANN) to explicitly parameterise the relationship between fibre mechanical properties and fibre/matrix interphase parameters and the mechanical properties of a UD lamina. The data required here were created in advance by the plugin and used to train the ANN model.

Main plug-in GUI
The concept of the plug-in arises from the need for a tool that helps to perform a large number of micromechanical FE simulations in a few simple steps. ABAQUS has different ways to increase its capabilities such as subroutines and/or adding new plug-ins. ABAQUS/CAE plug-in is one of the most powerful tools that can be used to perform pre-and post-processing via functions written in Python programming language in the kernel. The current plug-in operates through a series of user-friendly GUI commands send to the kernel to carry out tasks. The plug-in interface is shown in Fig. 1. It consists of six tab items that allow the user to navigate between them to edit input and output commands. For computational micromechanics modelling, the plug-in supports square and hexagonal unit cell fibre arrays. Despite fibres are usually randomly distributed in the matrix, it has been concluded by [31] that micromechanical modelling of the unit cell is accurate enough to predict the elastic properties of a UD lamina, while an RVE with randomly distributed fibres is essential to compute the local failure. Figure 2 shows a typical 3D unit cell of square and hexagonal fibre arrays of the fibre reinforced composite that the plug-in supports. The mechanical properties of each constituent, i.e., fibre, matrix and interphase, can be modified in the material section. There are two ways to input the value of constituent properties, either by a single value or using a domain of lower and upper bounds (lower-upper). A material property assigned with a single value remains unchanged throughout simulations. While for others, a random value in the range of (lower-upper) is generated at each training point using Latin-Hypercube sampling technique.
The fibres and matrix are meshed using eight-node brick element with reduced integration (C3D8R). There were also a relatively small amount of six-node linear triangular prism elements (C3D6) due to the free meshing technique used. The interphase region is meshed with eight-node cohesive elements (COH3D8). To maintain matched meshes between the cohesive elements and the fibres and matrix elements, a suitable number of nodes are seeded to the interphase and its neighbours. The elastic behaviour of the cohesive elements is written in terms of a stiffness matrix that relates the nominal stresses to the nominal strains across the interphase. The nominal traction stress vector t consists of three components, t n , t s , t t , which represent the normal and two shear tractions, respectively. The corresponding separations are denoted by δ n , δ s , and δ t , and the original thickness of the cohesive element is denoted by T. Then, the nominal strains can be defined as Therefore, the elastic behaviour of the cohesive element can be written in Eq. (1). For simplicity of computation, uncoupled behaviour between the normal and shear components is desired, so the off-diagonal terms in the elasticity matrix are set to be zero and the stiffness in the two shear directions are assumed to be equal [1,33] The plug-in imposes Periodic Boundary Conditions (PBC) on the corresponding surfaces of the unit cell to ensure the compatibility of strain and stress at the macroscale level. These consist of a series of constraints in which the deformation of each pair of nodes on the opposite surfaces of the unit cell is subject to the same amount of displacements. The PBCs are expressed in terms of the displacement vectors �� ⃗ U 1 , �� ⃗ U 2 , and �� ⃗ U 3 that are related to the displacements between the opposite surfaces by where L 1 , L 2 , and L 3 are the lengths of the unit cell along with three orthogonal directions, respectively. PBC requires matching nodes on opposite sides of the unit cell. Hence, elements of equal size are assigned to the edges of the unit cell to ensure periodic mesh required for PBC. The Output tab allows the user to select appropriate results that suit the work. The macroscopic normal and shear strain components are calculated by The macroscopic stress is calculated as where F i is the resultant force on the ith surface which represents the reaction force at a reference point where the displacement is applied, and A is the area of the surface. Therefore, Young's modulus, Poisson's ratio, and shear modulus are, respectively, calculated from Eqs. (7), (8), and (9) The flowchart of the pre-and post-processing procedure of the plug-in is described in Fig. 3. The user is to define the analysis of data and the required outputs, as given in Fig. 3. When the 'OK' or 'Apply' button is clicked, the plug-in creates three files to be called in the subsequent steps. ExperimentNAME.dat file contains all input commands which are given by the user in the GUI interface. These commands are vital to creating the FE model. Also, this file provides an opportunity to modify the input commands using exact plug-in keywords in the file. ~ Temp.txt is dedicated to storing the experiment name the user wants to run. Material properties values created by Latin-hypercube sampling are stored in a tabular format in Experi-mentNAME.csv file, which makes them easier to read and process by external software. Once these files are created, the Python script (Execute.py) can be submitted for analysis from ABAQUS command environment using either dos ('abaqus cae script = Execute.py') or dos ('abaqus cae noGUI = Execute.py') command. It is strongly recommended to execute it using the latter in which ABAQUS/ CAE runs commands in Execute.py without the added expense of running a GUI display. Whichever option adopted to perform the analysis, the plug-in continuously provides the user with useful information, e.g., number of jobs done, number of jobs remain and approximate time to complete. Upon running, the plug-in instantly creates two files to store outputs after completion of each job and to record errors that occurred during the analysis.

Numerical example: prediction of effective elastic properties
To validate the newly developed plug-in, the effective elastic properties of carbon fibre/epoxy (T300/PR-319) and glass fibre/epoxy (E-Glass/MY750) were determined and compared with EasyPBC plug-in developed by [21] as well as the experimental data [12]. The mechanical properties of the fibre, matrix, and interphase are given in Table1. Since T300 carbon fibre is classified as a transversely isotropic material, the elastic properties highlighted by an asterisk * symbol in the table are obtained by applying the following relations: The E-glass is considered as isotropic material. It is important to note that the input data for the interphase region are not accurately known as they are difficult to measure from simple laboratory experiments. However, an initial stiffness K i of 10 5 GPa/mm is used in [2,18,25,30] to simulate the elastic behaviour of the RVE model. In this paper, the elastic parameters from [15] are used to for the interphase as an approximation. Table 2 shows the comparison of the predicted effective elastic properties determined by VDGen and EasyPBC plug-ins. It is noted among the prediction results that VDGen provides reliable results that are identical to those from EasyPBC. However, an obvious discrepancy exists between experimental results and those predicted by the two plug-ins. This is mainly due to the inaccurate parameters used for the interphase region. Figure 4a shows the stress contours of a loaded unit cell under transverse and Fig. 4b shows the stress contours for in-plane shear loading conditions. It can be seen the periodic stress contours distribution which is additional verification of the PBC.

Background
In this section, a machine learning (ML) technique Artificial Neural Network (ANN) is used to construct a relationship between fibres and interphase parameters and effective elastic properties of the lamina. It is inspired by the animal brain's structure and function, which learns from former examples. ANN consists of three main layers: an input layer, one or more hidden layers, and an output layer. Each layer has several neurons which are responsible for transmitting weight and biases (equivalent to chemical and electric signals in the animal brain) between two layers. Figure 5 illustrates a typical structure of single neurons where each input (x) comes from the previous layer multiplied with its individual weight of the connection (w i ) and then summed up with biases [23]. Then, this sum is composed with activation function (f), resulting in another vector (a) as Another key step of ANN is a defined objective function that is to be minimised during the training process. Mean Squared Error (MSE) and Sum Squared Error (SSE) among others are examples of functions used to assess the network's behaviour by measuring the errors between the output and the target. The errors are reduced through tuning the values of the weight and biases by the so-called back-propagation. Back-propagation is widely recognised as a powerful tool for the training of ANN very efficiently. Several algorithms have been proposed to address the slow convergence associated with the back-propagation. However, it is quite difficult to decide which algorithm is more computationally efficient as it depends on many factors. Readers may refer to a comparative study carried out by researchers to evaluate accuracy and convergence time for different algorithms [4,9].

ANN model to identify micro-parameters
ANN model is developed to identify the micro-parameters, e.g., fibre and fibre/matrix interphase parameters. The relationship between micro-and macro-properties in UD lamina is fairly complex and nonlinear. Moreover, the number of micro-parameters to be identified is usually more than the number of macro-properties, which makes the ANN a complicated task. Therefore, to ease the training process, the micro-parameters are set to be the input layer of the neural networks model and the macro-properties are of the output layer. However, the calculation of optimal micro-parameters becomes difficult when they are in the input layer as it is not possible to obtain an analytical inverse response solution with the ANN model that has multiple neurons in the hidden layer. This issue is overcome using trained ANN to enlarge the dataset. Details of model building are explained in the following section.

Model building
The whole procedure of the fibre and interphase parameters identification using ANN is illustrated in Fig. 6. Firstly, a total of n = 500 FE models were created by VDGen using the procedure outlined in Sect. 3. In each model, a random value of the parameters to be identified is created by LH sampling within the range given in Table 3. The remaining fibre properties were obtained by applying the transversely isotropic material relationships E f1 remained unchanged in all samples and its value was 230GPa. For all samples, the fibre volume fraction is 60% and matrix properties are given in Table1. By the end of (12) this phase (Step 1), a dataset of 500 samples containing the inputs (x = [E f2 , ν f12 , ν f23 , G f12 , T i , K nn , K ss ]) and the targets (t = [E 11 , E 22 , ν 12 , ν 23 , G 12 ]) required to train ANN is obtained (Fig. 7).
In Step 2, the ANN was built and trained using the dataset created in the previous step. The training, testing, and validation of the ANN model were conducted by MATLAB R2015a software. By MATLAB default, 70%, 15%, and 15% of the original dataset were used for training, validation, and testing, respectively. Nonlinear tangent sigmoid and linear functions were employed as the activation functions in the hidden layers and the output layer, respectively.
Selecting a best representative ANN structure plays an important role in output prediction. In this study, two hidden layers were used and the number of neurons in each hidden layer was changed until the best possible prediction was obtained. Initially, the number of neurons in the first hidden layer (nh 1 ) was set to 20 then increased by one, whereas the total number of neurons in both hidden layers (nh) was retained at 100. Usually, the data are randomly divided into three subsets (training, validation, and testing), and different initial weight and bias values are used in each time the neural networks are trained. As a result, different neural networks trained for the same problem may give different outputs for the same inputs. In this study, therefore, 20 runs were performed on each ANN architecture to ensure inclusion of different data for each subset. MSE, which is the average squared difference between the output (y) vectors and the target (t) vectors, was used to compute the difference and back-propagated though the networks to update weights and biases Levenberg-Marquardt (LM) back-propagation algorithm was adopted in this study. This function uses back-propagation scheme to update weights and biases according to Levenberg-Marquardt optimization algorithm, which can accurately achieve results with fewer data comparing with its counterparts.
To decide which is the best ANN taking into account the fact of dividing the input data into three main subsets (training, validation, and testing) during the training process, the sum of correlation coefficient (R-value) between the target and the output of the entire dataset was used to attain the optimal ANN structure are the regressions of the dataset of E 11 , E 22 , ν 12 , ν 23 , and G 12 , respectively. The optimal ANN was then used to extend the dataset and (13) f (x) = 2∕ 1 + e −2x − 1 tansig(tangent sigmoid activation function) f (x) = x purelin(linear activation function).

Results and discussion
The ANN which can predict fibre and fibre/matrix interphase parameters from micromechanical FE modelling dataset is designed. The number of total samples created by micromechanical FE modelling to train the ANN is 500. 350 of them is randomly assigned for training, 75 for validation set and the rest used for testing. The ANN is built and validated as explained in Sect. 4.2.1. Table 4 presents some architecture samples used to verify the performance of the ANN in terms of R-value. Since 20   Figure 8 shows the regression graphs for the target and the output of the verification data set only. This figure shows the closeness among the output data predicted by the ANN and the target data obtained from FEM. The dashed line in each subfigure represents the perfect results when the outputs equal targets. It can be seen that E 11 , E 22 , ν 12 and ν 23 are well predicted by ANN with an R-value between 0.91 and 0.99 and a regression slope (m) between 0.81 and 0.96. G 12 is slightly less well predicted comparing to other effective elastic properties with an R-value and a regression slope of 0.86 and 1.08, respectively. Hence, the selected ANN is capable of providing a good correlation between the target and the output.
After training the ANN, the selected model with the highest R-value is used to generate N samples. It is found that 10,000 samples of the random input parameters generated by the LH sampling method are sufficient to produce a dense space. These new input data (E f2 , ν f12 , ν f23 , G f12 , T i , K nn and K ss ) are then processed by the ANN to obtain and the outputs (E 11 , E 22 , ν 12 , ν 23 , and G 12 ). The closest point of the new output to the experimental data is found through Eq. (16). The corresponding carbon fibre and interphase parameters of the closest point are given in Table 5.
Finally, the identified fibre and interphase parameters (micro-parameters) obtained from the ANN are used as input for the FE model to predict the effective properties of the UD lamina, i.e., macroscale level properties. The effective elastic properties calculated by the FE model using the identified parameters are given in Table 6 (second column). The table also shows a comparison between these properties and those predicted by the ANN and the experimental data. It can be seen that the effective elastic properties agree well with the experimental data with a maximum error of about 6%. This error is mainly due to the using fixed value for E 11 in the training of ANN.

Conclusions and future improvement
An ABAQUS® plug-in (VDGen) has been developed for generating virtual data for identifying the uncertain materials' properties in unidirectional (UD) lamina. In combination with artificial neural networks (ANNs), the data generated from the plug-in enable the determination of the relationship between fibre mechanical properties and fibre/ matrix interphase parameters at microscale and the mechanical properties of a UD lamina at macroscale. Application of the plug-in to a T300/PR-319 UD lamina has shown very good agreement between the predictions and the experimental data when using the identified constituent properties.
A few improvements of the plug-in should be considered in the future. The current plug-in is designed to support the square and hexagonal unit cell fibre arrays. Micromechanical FE modelling of randomly distributed fibres in the matrix is essential when studying the failure of the composite lamina. However, using random fibre distribution causes arbitrary meshing condition on opposite RVE edges [20,35]. Further development of the plug-in to support RVEs with randomly fibre distribution and capable of generating periodic mesh on the opposite edges is under investigation by the authors.
At this stage, the plug-in is only designed to calculate the effective elastic properties of a lamina. We aim to develop it further, so that it will be capable of conducting failure analysis under uniaxial, biaxial, and multiaxial loading conditions.
The effect of fibre shape has recently been subjected to intensive studies by means of computational micromechanics [11,22]. The current core Python scripts of the plug-in will be developed further, so that RVEs with different fibre shapes can be automatically generated. Fig. 8 ANN predictions versus FEM results for a E 11 , b E 22 , c ν 12 , d ν 23 , and e G 12