This article proposes analysis procedure of structural mechanic’s problem as integral formulation. The methodology is novel which can be suitable applied for finding the solution of engineering problems with required accuracy either it is linear or nonlinear range (plastic range) of the material behaviour. This methodology , which was proposed as stress -based analysis procedure , exploits the unfolded part of the structural analysis problems which were not so easy to solve such as geometric and material nonlinearity together with simple integration technique [11]. In fracture mechanics, i t has already unfolded the misery of physically exploiting plastic behaviour of structures before the start of crack for elastic materials [13]. The formulation is integral formulation rather than differential formulation in which whole stress –strain beha viour is utilised in the analysis procedure by using neural network as regression tool. In this article, o ne dimensional problem of uniaxial bar , beam bending problem and plane strain axis symmetric problem of cylinder subjected to internal pressure is sol ved. The results are compared with the existing differential formulation or linear theory. Key Words: Computational methods, Continuum mechanics, Machine learning, Plastic analysis , Elastic materials . 1. Introduction: Almost all problems in physics and engineering are derived /dealt based on differential formulation in which each problem, based on the physics, has its differential formulation. In recent years, a considerable development is seen in finding the solution of differential equations by machine learning [ 17-19]. Applications of machine learning , that are of interest in computational mechanics is based on the solution of differential equations by collocation method and was first de veloped by [1]. Recently, its applications are further extended to solve many other problems in structural mechanics [2 -6, 20, 28]. Machine learning, the name itself, demonstrates that the co mputer learns from the available data. Artificial neural network trains the model, for the given data, and are know n to make very accurate predictions. It has shown wide applications in different fields such as voice and face recognition, business and commercial applications etc. [14 -16]. This methodology utilizes regression, the ability of neural network to predict ac curate numerical value based on 2 the available data. The importance of the methodology is observed when it solves linear as well nonlinear analysis of the structures with relative ease. In this article , we propose the solution of physical problems for which physical response of the system is non - linear such as problems of structural mechanics. Solution based on these problems cover a wide range of engineeri ng applications in mechanical, c ivil and infrastructure engineering . In these nonlinear problems, nonlinearity in the physical response may be coming from material nonlinearity or geometric nonlinearity [30-36]. For these kind of problems, we propose integral formulation rather than differential formulation. For the physical nonlinear problems, the method has proved as the most efficient approach of analysis [11]. So far, in formulating the structural problem s, all the problems are modelled as displacement based [37-42]. In these problems, the material property is inputted as elastic modulus which is just the ratio of stress over strain . This formulation favours the displacement based or linear analysis procedure. Hence this structural analysis procedure is basically differential formulation . This type of formulation leads difficulty for finding the solution of problems when material behaviour is nonlinear or enters in plastic range. Till date, t his remained unfolded part of the research in which no direct solution is applicable. The difficulty can be observed w hen the complicated, len gthy and time consuming methods are availa ble for finding the solution of fracture mechanics problems of elastic materials [22]. For solving the structural mechanics problems, we utilize the capability/property of neural network of properly mapping the nonlinear data. This is done with the help of more than one layer (hidden layers) and activation function s. The work of neura l networks is essentially to optimize weights & biases such that to give accurate output. For different applications different neu ral networks are being used and th ey are named differently in the literature [23]. For our application in continuum mechanics , we wish to predict accurate output in our nume rical method, so, we have used fully connected n eural network as regression tool to make accurate numerical prediction. The architecture and functioning of the neural networks for our application can be understood with the help of figure s 5 and 6 . 2. From differential formulation towards integral formulation: Current state of art of stru ctural mechanics is basically differential formulation in which for solving any typical problem, force balance equations i.e. equations of equilibrium are written which are then solved analytically or by numerical methods such as finite element method, mesh -free methods and Isogeometric Analysis (IGA) etc. [ 24- 27]. It is evident that this formulation has limited capability of solving the problems in nonlinear range of material behaviour. In this article, we are proposing integral formulation of the analysis procedure for finding t he solutions of the problems of structural mechanics. With the integral formulation, strain energy stored in the loaded body is directly found. In the proposed approach, first of all true stress - strain behaviour of the material is mapped to some third parameter which is called as reference coordinate system (r). In the present study, it is taken to be varied between -1 to +1. This variation of stress and strain with reference coordinate system can be viewed in figures 8 and 9 for mild steel. The objective of this mapping is to express stress and strain in terms of this third parameter (r), by which strain energy can be evaluated by simple integration . Once 3 strain energy of the system is found, other desired results such as strain, deformation etc. can be foun d suitably. The proposed analysis procedure is novel and is perhaps inspired by the derivation of Piolla Kirchhoffs stress from Euler Lagrange Strain (energy conjugates) of finite Element an alysis [ 29]. 3. Methodology - the basic formulation : As explained previously, the proposed approach is the integral formulation. By integral formulation, we mean to evaluate strain energy of the deformed/stressed body when subjected to loading by the following integration. Here ‘ ’ and ‘ ’ are the stress and strain tensors generated in a three dimensional structural body in Cartesian coordinates [8]. Figure 1 shows a typical structure loaded with ‘ ’ at the boundary . It has fixed boundaries at ‘ ’. Under the application of external l oads, t otal potential ( ) of the structural body can be expressed as follows. Here, ‘U’ is strain energy stor ed in the deformed/stressed body which can be evaluated by equation (1) and ‘W’ is the work done by the external loads which can be evaluated by the express ions below . Here, ‘F’ and ‘ u’ are force and displacement vectors in thr ee dimensional coordinate system. Figure.1: A typical three dimensional body subjected to loading. It will be interesting to observe how integration of equation (1) is performed for finding the solution of any typical structure. For the structure loaded such that the material deforms in plastic ran ge, such as the bar with the loading condition shown i n figure 10 . In these cases, 4 stress and strain components may vary across the volume of the body and hence to evaluate the multiplication, numerical integration is performed in basic Python . Consider ing the special case of uniaxial rod of sectional area ‘A’ and length ‘L’, loaded in x - direction with the load of ‘ ’ as shown in figure 2. As there will be axial stress and strain for the given loading condition, t otal potential of the loade d bar of equation (2) can be expressed as, Figure. 2 : A cylindrical bar subjected to axial loading. Here ‘ ’ refers to the deformation of the bar in x - direction. Total potential of the bar can further be simplified as follows. Applying stationarity condition [7], Since , further simplifying, Or, This is force balance equation which is used in the methodology to fin d reference coordinate system (r ), once the stress distribution in the structural body is defined with proper/assumed structural idealization and modelling assumptions. 3.1. Modelling & Structural Idealization: The proposed methodology is regarded as the stress based analysis procedure as it is required to know the stress distribution within the body of the structure so that strain energy can be calculated [11]. Stress distribution with in the loaded body is determined from t he proper structural idealization and hence the accuracy of the solution depends upon the proper modelling assumptions. 5 Our assumptions for modelling and structural idealizations are same as found in the strength of material theory. For example, Euler -Bernoulli’s beam bending theory, torsion theory etc. Hence, the result obtained from the methodology can suitably be applied and used for the engineering applications. Once the stress distribution with in the loaded structural element is determined, strain energy stored within the body can simply be evaluated by the equations as explained in the methodology part. 3.2. Definition of stress and strain: As the proposed integral approach is a complete approach i. e. the results are valid for linear as well as nonlinear range of the material behaviour. We are usin g true stress and true strain in order to accommodate the behaviour of large deformation . Therefore, it should be noticed that the results are valid before necking star ts in the tension specimen of elas tic material used for measuring stress -strain behaviour . 4. Analysis procedure by Machine Learning as a regression tool : Neural n etwork is used as the nonlinear regression tool in the analysis procedure . For any structural problem , geometric parameters such as area of cross -section, length do not produce nonlinearity in the solution. Nonlinearity essentially comes from the material behaviour. Therefore, in the neural network, material property is the only parameter that is trained in the neural network. The basic idea behind the analysis procedure is to find reference coordinate system (r) , or to say, locating the point on stress -strain diagram (figure 3) . Force balance equation such as equation (7) is used to find reference coord inate system (r) from the known stresses . Once reference coordinate is known, strain can also be located by stress -strain graph. Once stress and strain are known, strain energy stored in the structural body can simply be evaluated by integration. Figure. 3: A typical stress - strain behaviour of material. Overall a nalysis procedure of the methodology is summarized with the help of flow chart shown in figure 4. 6 Figure . 4: Flow chart of overall analysis procedure employed . 4.1. Construction of Neural Network: Figure 5 shows fully connected feed forward neural network that is used in the analysis. Three hidden layers are found to be performing well in com parison to the two , or more than three hidden layers. It is found that changing the number of neurons in the hidden layer did not give any influence in the output. In this study, 64 neurons are used for each hidden layer . Nonlinear mapping is achieved by the ReLU activation function which is used for all hidden layers. For the last hidden layer, wh ich yields the output layer, linear activation function is used (figure s 5 & 6). First of all, for each neuron weights are initialized randomly as per standard normal distribution and all biases are set to zero. Python code used for generating a layer can be glanced underneath . Data flow following the code can be glanced with the help of neural network drawn in figure 5. In this neural network output from any particular neuron ‘i’ in the lth layer can be expressed as follows. 7 Here is the input from each neuron of the previous layer (l-1) to any particular neuron of the curren t layer ( l). is the bias used for neuron ‘i’ in layer l and is the activation function used for the layer l-1. Figure. 5: Architecture and functioning of Neural Network. Figure. 6: Schematics of (a) ReLU activation and (b) Linear activation functions 8 Because of the randomly choosing weights and biases, output of the forward pass yields huge error which has to be minimized by properly tuning weights and biases that is done in the backward pass. Backward pass is performed for training the neural network, or to say adjust ing/tuning the weights and biases to produce the accurate output. This is done based on error function (loss or cost function) which is taken as root mean square error (MSE) . This root mean squared error is evaluated by the following mathematical formula . Here, are the target values which neural network is supposed to predict and are the current predicted values by the neural network. Mean square error of equation (9) is the function of inputs ( , weights ( ) and biases ( ). Python code employed for evaluating loss is given below in the snippets. Weights and biases are updated in the backward pass . For this purpose , gradient ‘ ’ of this loss function is evaluated. Derivatives of this loss function with respect to weights and biases are used to update weights and biases , and derivatives with respect to inputs are used to chain with the previous layer [9]. Adam (Adaptive momentum) optimizer is used to train the model [10]. In order to check the accuracy in regression model, a limiting value is defined which is standard deviation of the target values. This standard deviation is divided by 250 (our choice, this value defines the desired precision in obtaining the accuracy). Following python code i s implemented in order to check the accuracy of the output from the neural network. It is found that, with this code, even 80 % accuracy gave satisfactory results that were required in the analysis. Full Python code used in th e study can be accessed from this Github page: https://github.com/hgaur0007/Solution -of-Structural -Mechanics -problems -by-ML- 9 4.2. Implementation of Neural Network in the analysis : In the analysis procedure bas ically two neural networks are used. One, which maps true stress to reference coordinate system, and is expressed by equation (11 ) and the another one, which maps reference coordinate system to true strain, and is expressed by equation (12 ). Flow chart of the analysis procedure using neural network as regression tool can be viewed in figure 7. Neural networks are trained with 100 % data available from stress -strain behaviour and mapping. The variation of reference coordinate system (test data which is different from the training data) with true stress can be observed in figure (7) and the variation of true strain (test data) with reference coordinate system can be observed in figure (8). Figure. 7: Flow chart of analysis procedure with neural network as regression tool. As explained previously, for solving the problem, the methodology requires proper stress distribution across the structural body with proper structural idealization and modelling assumptions. Once stress distribution in the s tructural body is defined, corresponding reference coordinate (r) is determined from the output of the neural network expressed by the following equation. Here, referees the neural network used for regression analysis from stress to reference coordinate (r), ‘ ’ refers to the true stress (input value), ‘ ’ and ‘ ’ refers to weights and biases of the neural network obtained after running the optimization by Adam optimizer. For training this neural network, weights and biases were updated by around 10000000 times (iterations ). Even 80 % accuracy gave satisfactory results. Accuracy of the output values from this neural network could be observed in figure 8. Once, reference coordinate (r) is obtained, true strain can be obtained with the regression analysis of neural network ( ) which maps reference coordinate to strains expressed by the following equation. Here ‘ ’ and ‘ ’ are weights and biases of this neural network after training and ‘r’ is the input value of neural network. This mapping is linear which could be observed with the help of figure 9. Around 1000 iterations sufficiently /satisfactorily tuned the weights and biases which produced accurate results. 10 Figure. 8 : Variation of true stress with reference coordinate system (r) of mid steel. Figure. 9 : Variation of true strain with reference coordinate system (r) of mid steel. 5. Numerical problems: In this section , uniaxial bar loaded with point and uniform load acting axially , beam bending problem and plan e strain axis symmetric problem of a long cylinder subjected to internal pressure are solved. 5.1. Uniaxial bar loaded with varying load: Figure 10 shows uniaxial bar loaded at the free end by the traction force ‘ ’ acting at the free end and a uniform load ‘ ’ acting along the length of the bar downward i n X-direction . Considering the magnitude of load combination is such that the material of the bar 11 experiences plastic deformation. One of the possible stress distribution in this condition is shown in figure 10 (b). Stress at the free and fixed end can be evaluated by the following expressions. Figure 10: (a). Uniaxial bar with loading condition. (b) stress distribution across the length of the bar is shown. Once the stress distribution across the body is defined, strain energy stored in the body can be evaluated by volume integral of equation (1). As per the loading, the only stress which is acting in the bar is ‘ ’ and at any particular section stress remains constant throughout the area, this strain energy expression is modified as follows. As the stress varies across the length, this volume integral can further be modified as follows. Here, the multiplication in integrated because it is not constant and varies across the length with the lower and upper b ound of and which can be obtained from the neural network , expressed with the equation (11 ) with known stress values ( ) across the length of the bar by expression s (13) and (14) . True strain ( ) can also be obtained by the neural network expressed with the equation (12 ) by known values of reference coordinate . 12 Numerical integration is performed with the Python code. Once, strain energy sto red in the bar is evaluated, it’s deformation can be evaluated by the Castigliano’s Theorem expressed as follows . Analytical solution (deformation at the free end) by differential formulation (linear theory) of this problem is given by the following equation [12]. Consi dering area of cross section of the bar as 20 cm2 and length as 50 cm . In this analysis, uniform load is kept constant and taken as 0.4 MN/m. Point load at free end varies in magnitude. Variation of strain energy as well as deformation of the bar at f ree end , versus the point load ‘F’ can be glanced in figures 11 and 12 . Figure 11 : Variation of strain energy versus the point load ‘F’ at free end. Statics of energy dissipated in plasticity is shown. 13 Figure 12: Variation of deflection at free end versus the point load ‘F’ at free end . Results of this uniaxial bar are compared with the linear theory in which Young’s modulus is taken as 184128.9683 MPa which is evaluated from the stress –strain curve of the material. It is important to notice the results in linear range, which are very accurately matching with linear theory. In nonlinear range, strain energy as well as deformation of the bar increases rapidly, this is because of the plastic deformation of the bar as per the material behaviour. Strain energy dissipated because of plasticity is also shown in figure 11. 5.2. Two Dimensional Problem of Beam Bending: Figure 13 shows a two dimensional problem of a simply supported beam of length ‘L’, width ‘b’ and depth ‘h’, loaded with a concentrated load ‘F’ at the mid span. Figure 1 3: Simply supported beam with concentrated load at mid span. Current state of art of beam bending theory assumes linear variation of the stresses across the depth of the beam. Interestingly, this methodology is capable of analyzing structures in nonlinear range of the material behavior as well. If the beam is loaded such that it generates stresses correspondi ng to plastic/nonlinear range of the material behavior, it is reasonable to understand that the stress variation across the depth of the beam at any particular section would resemble the variation shown in figure 14. 0 2 4 6 8 10 12 14 0 0.5 1 1.5 Total axial deformation , mm Point load at free end, MN Deformation, mm Deformation by linear theory , mm 14 Figure 1 4: Variation of stress across depth of the beam at a particular section. Stress variation across the length (for the simply supported beam of figure 13) could be visualized with the help of figure 15 . Its variation simply depends upon the variation of bending moment across the length. Figure 15 : Variation of stress along the depth (a) and length (b) at different sections of the beam . Since the simply supported beam shown in figure 13 is loaded with the concentrated load at the mid span, its bending moment at any particular section within the range can be calculated as, Where, is the reaction at support. Let be the bending moment ant any particular section. Considering stress in a fiber at any particular depth ‘y’ from neutral axis, bending moment at that section can be calculated as, or, Or, 15 Rearranging, It is to be noted that resembles with moment of inertia of the section which is found in the derivation of beam bending equations with linear theory of elasticity. Here avoids any linearity assumption in derivation. Now, bending energy stored in the beam can be calculated as [8], As the stress distribution across the with ‘b’ rem ains constant at any section, bending energy can be evaluated as, Now, c onsidering stress variation across the length of the beam as depicted in figure 1 5. Now, considering stress variation across the depth of the beam as portrayed with the help of figure 14 . Stress varies from zero at neutral axis (r = -1) and it becomes maximum at the outer layer. Hence, for this variation of stress, the integral modifies a s follows . Here, the integral is multiplied by as it is calculating strain energy starting from neutral axis to the extreme fibre, either in compression or tension zone. The expression is multiplied again by two because same energy will be stored, either it is compression or tension zone. Considering length of the beam as L =2 m, b = 300 mm and h = 400 mm . If the b eam is loaded with concentrated load of ma gnitude 2 MN, maximum stress generated ( ) at the extreme fiber of the middle span (x=1m) can be evaluated by equations (19) and (21) . For the known stress, corresponding value of reference coordinate system (r) could be obtained by neural network , expressed by the equation (11 ). Once the value of reference coordinate value (r) is known, corresponding value of strain ( ) could be evaluated by the neural network expressed by equation (12 ). Finally, strain energy stored in the beam bending is evaluated by expression (23) for different magnitudes of load. Deformation in the beam at the mid span is evaluated by Castigliano’s Theorem expressed with equati on (17). The results are compared with the linear theory and can be glanced the figures ( 16) and ( 17). Deformation at mid span for this beam with linear theory is evaluated by following expression of equation (24) 16 Figure 1 6: Bending energy stored in the beam for different magnitudes of loads. Figure 17 : Deflection at the mid span of the beam for different magnitudes of loads. It is worthy to note that this approach of structural analysis has given very accurate results which resembles material behavior ( stress -strain curve) . In c omparison to linear theory, which is valid until the linear range of the material behavior, this method is giving accurate results not only in linear range but in nonlinear range as well. 5.3. Plane strain axis -symmetric problem: Consider a long cy linder of inner and outer radius as ‘a’ and ‘b’ respectively, which is subjected to internal pressure of ‘ ’. Figure 18 shows a cross section of the cylinder in XY - plane in which length of the cylinder is along Z - axis. This is quite a practical probl em simulating an infinitely long pipe line subjected to internal pressure from the liquid. This is a plane strain axis symmetric problem in which deformation is in radial direction only and is constant along the circumferential direction. From the force eq uilibrium equations, variation 0 0.1 0.2 0.3 0.4 0.5 0.6 0 5 10 15 Strain Energy (MJ) Load, F (MN) Strain Energy, MJ Strain Energy by linear theory, MJ 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0 5 10 15 Deformation (m) Load, F (MN) Displacement at mid span (m) Displacement at mid span by linear theory (m) 17 of radial ( ) and hoop ( ) stresses along the thickness of the cylinder are derived as follows [21]. Figure 18 : Section of the cylinder across Z - plane. From equations ( 25) and ( 26), as there ar e two different stresses acting, strain energy stored in the cylindri cal body can be evaluated as follows. Here ‘ ’ is the strain energy stored because of radial stress and ‘ ’ is the strain energy stored because of hoop stress. Strain e nergy stored per unit length of the cylinder because o f radial stress only ( ), can be evaluated as, As, stresses varies from inner surface to outer surface, this i ntegration can be modified as, Here, and are the values of reference coordinate system at inner and outer layer of the cylinder which are obtained from the output of t he neural network of equation (11 ) by input values of stress from equation ( 25) at inner and outer layer respectively. Further si mplifying the expression of equation (29). 18 Similarly, strain energy stored because of hoop stress , per unit length of the cylinder, can be evaluated by the following expression. Here, and can be obtained from the output of t he neura l network of equation (11 ) by input values of stress from equation (26 ) at inner and outer layer respectively. Numerical integration is performed in basic Python code. Once total strain energy of the system by equation ( 27) is evaluated, displacement in ra dial direction is evaluated by Castigliano’s Theorem of equation ( 17). Exact radial deformation ‘ ’ of this problem at the inner layer by the linear theory is given by the expression [21]. Here ‘E’ is Young’s modulus of linear theory which is evaluated from the stress -strain curve in linear range, ‘ν’ is Poisson’s ratio which is taken as 0.3 for mild steel. Taking inner radius ‘a’ as 10 cm and outer radius as 20 cm, total strain energy of the cylinder as well as displacement in radial direction at inner layer is evaluated by Castigliano’s Theorem. Radial deformation at the inner layer of the cylinder is compared wi th linear theory . These results can be glanced in figure (19) and (20 ) with varying internal pressure. Figure 1 9: Variation of strain energy versus internal pressure inside the long cylinder . -0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0 100 200 300 400 Strain Energy, MJ Internal pressure, MPa Total Strain Energy (MJ) 19 Figure 20 : Variation of radial deformation as internal pressure increases inside the cylinder . From the results of figure 20 , it is important to notice the accuracy of the results which are matching with linear theory, in linear range of the material behaviour. In the plastic range, deformation explodes as pe r the material behaviour. 6. Conclusions: The methodology solves the uniaxial bar , either linear or nonlinear range of the material behavior, with just one simple integration . It is important to notice the accurately of the results which are matching with the linear theory in figures 11 and 12 . The beam bending problem of simply supported beam is also solved by evaluating simple integral. Results in the linear range are in the good match with the linear thory (figures 16 & 17). From the results of the cylinder which is subjected to internal pressure only, radial deformation at the inner layer is found to be accurately matching with the results of linear theory (figure 20 ). It should be noticed that finding the soltion of these problem in plastic range is not a easy task. It requires step by step method in which secant modulus changes with each step, which is a long and cost consuming method. The analysis procedure also evaluates strain energy dissipated in plasticity by evaluat ing one simple integration (figure 11). From the results of uniaxial bar and plane strain axis symmetric problem, it is important to notice the accuracy of the results, which matched with the linear theory. This proves the validity and accuracy of the meth od. Conflict of Interest: The authors declare that they have no conflict of interest.