2021 Deep Learning Model To Predict Complex Stress and Strain Fields in Hierarchical Composites
2021 Deep Learning Model To Predict Complex Stress and Strain Fields in Hierarchical Composites
the Generator and the Discriminator, which are trained against unloading is the target. This represents a complex physical scenario
each other based on the game theory. The Generator generates and will serve as a test case to assess the method reported here. Typical
candidates that are evaluated by the Discriminator. Although GANs results of strain or stress field predictions of the test dataset are shown
were originally proposed as a form of unsupervised learning, labels in Fig. 2A. Notably, both stress and strain fields as well as displace-
can be incorporated as constrains, which leads to a subtype of GANs ments (incorporated in the overall deformation of the geometry)
known as the condition GAN (cGAN). In our work, we develop a are captured in our prediction, as shown in Fig. 3A. To further
DL model implemented in a cGAN with a paired image as the con- quantitatively evaluate the similarity between the ground truth and
straint (44). The cGAN model has two key components, Generator the prediction, the L2 norm (see Materials and Methods) is calculat-
U-Net and Discriminator PatchGAN (44). The geometric images ed for all 400 data in the test dataset, considering von Mises stress
(labels or constraints) are fed into the Generator to generate field field prediction.
images of interest with random noise. The Discriminator evaluates The distributions of L2 norm of predicted contours are plotted
these field images generated by the Generator through comparing against two reference contours, clean contours and random contours
them with real field images obtained from FEM. The training objec- (Fig. 3A). According to the figure, the mean value of the L2 norm of
tive of the Generator is to increase the error rate of the Discriminator, predicted contours is much lower when comparing with random
while the Discriminator is trained to optimize the capacity of iden- contours (~1.8, normalized by predicted contour) and clean con-
tifying fake images produced by the Generator. Within the game tours (~2.9, normalized by predicted contour). Furthermore, a
theory framework used here, the GAN model converges when the narrower peak of predicted contours indicates that the variation is
Discriminator and the Generator reach a Nash equilibrium in which smaller as well (random contour ~2.8 and clean contour ~2.7, nor-
one component maintains its status regardless of the actions of malized by predicted contour). The results reveal that our ML model
the opponent. features both high accuracy and applicability in predicting strain or
Once the ML model is trained, new field images can be predicted stress fields directly from the composite geometry.
bypassing conventional numerical simulations. The field predictions With predicted fields, we can further derive secondary mechan-
can be further used to extract mechanical properties of the compos- ical properties of the composites. For instance, mechanical recover-
ite given its geometry. As we show in the following sections, not ability of the composite can be computed after subjected to
only mechanical properties including stiffness and recoverability compressive loading and unloading. Here, recoverability is defined
can be obtained but also local features such as stress concentrations as average residual stress of the composites. Our model is able to
around cracks or sharp inclusions. More details are provided in the predict the geometries associated with the top three recoverability
Supplementary Materials. levels in the test dataset exactly (Fig. 3C), with the information
obtained from the field images. And more broadly, our ML model
Fig. 1. Depiction of the workflow of the method reported here. Starting from a random Generator, geometry images (8 × 8) of composites are created. A FEM analysis
is performed to obtain real field information of composites under mechanical tests. To predict strain and stress fields from geometry images, we train a ML model known
as GAN (red window) which consists of two components, Generator U-Net (blue window) and Discriminator PatchGAN (green window). The Generator takes geometry
images as input to generate fake images with wrong fields. Discriminator compares fake images from Generator with real images from FEM. Once the model is trained,
across different scales. In terms of reducing the divergence regarding boundary conditions, which are embedded directly in the images.
different scales in the future work, an alternative model can be trained The loading conditions are specified by adding green lines to our
by incorporating multiple representations (e.g., 8 × 8, 16 × 16, and geometry images and field images (Fig. 4A). These green lines are
32 × 32 resolutions, each with 1000 images) into the dataset. With such representative of rigid bodies that exert loads during simulations of
multiscale information, the model will likely be able to learn how to upscale FEM. The straight green lines are two rigid lines used to compress
or downscale the strain or stress fields across different hierarchies. the composites along the x direction. The circular green line is a
In conclusion, our model’s capacity for recognizing scale-inde- spherical (2D) rigid indenter used for nanoindentation. Hence, now
pendent local patterns can be applied to predict strain or stress field the dataset consists of two sets of data: One set of images contains
of hierarchical structures and is useful for design applications that two straight green lines showing the results of compression, and the
explore a broad range of de novo microstructures. other set includes one circular line exhibiting the results of nano
indentation. The geometries of composites in the two sets are the same.
Nonsquare features After being trained with the mixed dataset, the model is able to
In the earlier examples, the composite was composed of square units. recognize different loading conditions and make relevant predictions
Now, we explore whether our model can be extended to investigate (Fig. 4A). More specifically, the model transfers loading conditions
composites with nonsquare elementary design units. To demonstrate from input geometry images to the prediction and predicts von Mises
such possibility, both hexagonal and triangular tessellations are used stress field according to the specified loading conditions. More
for designing composite elements. To do this, the same model trained unexpectedly, when two loading conditions are combined in the
on square representation is now trained with a dataset in hexagonal geometry image that is not included in our training dataset, the ML
and triangular representations, respectively. von Mises stress fields model is still able to predict the stress field accurately. As is shown
calculated by FEM and the trained model show high similarity, as in Fig. 4A, both stress fields caused by compression (the general
visualized in two example cases (Fig. 4A). The results indicate that stress pattern similar to single compression) and nanoindentation
the model can be easily generalized to composites of different shapes. (stress concentration on the top) are predicted by our model.
The ability of our model to read two distinct loading conditions
Multiple loading conditions from images and predict fields accordingly shows the potential of
The input geometry images we used above do not yet include any applying one model to predict multiple mechanical tests and offers
information about loading conditions, which were encoded in the evidence for transferability. In addition, in principle, the model is
training set used. Now, we extend the model to learn variations in also able to predict strain or stress fields for multistage mechanical tests
such as multiple loading cycles. One straightforward way to achieve geometries, we trained an even deeper model (see Materials and Methods)
that within the framework reported here is by leveraging different with 32 × 32 representation (Fig. 4C). Similarly, as before, the loading
color codes for different loading stages. For instance, as the loading condition is a one-cycle compressive loading and unloading with
cycles increase, we can vary the colors of the green lines in Fig. 4B von Mises stress field images being the target outputs. To show an ex-
from light green to dark green to encode the loading stages for training. ample of a more complicated composition and the associated pre-
With our well-trained model, FEM simulations that are usually carried diction, a geometry image in the shape of the MIT dome is used as the
out by conventional codes can be performed at much higher speed input. Both the ground truth and the field image predicted by the
and lower computational costs. Last, our model can also be used for model exhibit a similar stress pattern (Fig. 4C). In other words, a deeper
complex loading conditions due to its capacity of predicting fields model trained with 32 × 32 representation is more powerful than that
with mixed loading conditions. in 8 × 8 representation because it can better present nonsquare pat-
terns such as the sector in Fig. 4C and cover more situations when a
High-resolution geometry desired resolution is requested. The example reveals the potential of
For real-world composites, their geometries can be quite complicated the model to predict high-resolution fields for general inputs.
(45, 46). As a consequence, a relatively simple 8 × 8 representation To quantitatively investigate the accuracy of high-resolution pre-
may not be sufficient for practical applications. To study complex diction, we calculated the L2 norm as we did for 8 × 8 representation.
Fig. 3. Model performance. (A) Direct comparison of both deformation (green line) and stress field (yellow line) between the ground truth and the prediction of ML
model. (B) Quantitative comparison of image difference between the ground truth and the prediction of ML model. The L2 norm indicates the image difference. “Random
contour” and “clean contour” are two reference frames (see Materials and Methods). (C) Geometry images of top three mechanical recoverability in the test dataset. The
results from FEM and ML models are consistent, showing excellent predictive power. (D) Rank of recoverability given by FEM and ML considering all 400 data in the test
dataset. The inset displays the relative errors of ML predictions of the residual stress/recoverability for all 400 data in the test dataset. (E) The ML model trained with 8 × 8
crack-related design problems such as crack-resistant materials complex systems of interest. Moreover, the approach reported here
(47), providing added evidence for the transferability of the method. can also be directly applied to experimental images for training of
Our model can capture mechanical behaviors of composites the model, which underscores the transferability of the approach,
with various shapes, different loading conditions, and complicated and provides a previously unidentified way to combine bottom-up
geometries. It can predict mechanical behaviors from random ge- modeling with experimental data sources for predictive methods.
ometries and open the gate to accelerate searching optimal designs Future work could also focus more on global mechanical properties
of composites with multiple mechanical functionalities from the derived from local stress and strain fields, as opposed to local fields
bottom up. In that context, one of the extraordinary advantages of as focused on in this study. Although we covered a detailed analysis
using predicted stress and strain fields is that fields contain compre- of one global property—recoverability—some global properties may
hensive information for various design purposes. Thus, the approach possibly be more sensitive to divergence within the predicted maps.
offers a high level of efficiency of predicting physical properties and For instance, the fracture toughness is strongly correlated with local
accelerate the design process based on a transferrable ML method. predictions of stress fields around a crack tip. In the case, the train-
Furthermore, we extended our model to incorporate nonsquare repre- ing data may need to be modified accordingly, such as incorporating
sentations, multiple loading conditions, cracks, and high-resolution sharp edges and dynamic effects.
geometries. These extensions enabled us to cover tremendous ap- Moreover, combined with optimization algorithms (20), the model
plications of FEM with lower computational costs and investigate can speed up the discovery of optimal designs without heavy
computational loads. Moreover, the proposed approach is a general split them into training dataset with 80% data and test dataset with
method for geometry-to-field translation. A similar protocol as de- the rest 20% data. The split is also stochastic, thus the distribution is
veloped here could be applied to other areas in the sciences, such as being conserved.
density functional theory fields, fluid mechanical fields, or electro-
magnetism. Image processing
The images of mechanical fields are generated first in Abaqus Visu-
alization and then postprocessed by Python code. As for the gener-
MATERIALS AND METHODS ation, the images are plotted with both deformation (to capture the
Graphical representation of composites displacement field in the geometry change) and strain or stress field
We use 8 × 8 graphical representation for composite profile, which contours. The color spectrum for field contours is realized using “white”
is shown in fig. S1A. For any composite with the given geometry, it [RGB = (216, 216, 216)] for lower bound and “red” [RGB = (216, 7, 0)]
consists of two different block units, labeled as brittle unit and soft for the upper bound. The lower and upper bounds vary from cases
unit. Brittle unit and soft unit are mechanically distinct in elasticity to cases but are consistent within one dataset. The same spectrum is
and plasticity. A brutal force algorithm is executed to generate all also used for geometry input with white [RGB = (216, 216, 216)] for
possible combinations of two different units without fixing the brittle units and red [RGB = (216, 7, 0)] for soft units. The contour
composition. To simplify the geometry and shorten the calculation style used is “DISCRETE,” and the number of intervals is set to 24.
time in Abaqus, all composites created by the algorithm are sym- As for options for edges, “FEATURE” is used for visible edges, and
metric about Y axis. “THICK” is used specifically for green lines, which represent ana-
lytical rigid bodies. Any triad, legend, title, state, annotation, com-
FEM pass, and reference point are turned off to exclude useless information
The dataset is generated by FEM, using a commercial Abaqus/ in the images. In addition, the background of the image is set to
Explicit code (Dassault Systemes Simulia Corp., 2010). In our work, solid black [RGB = (0, 0, 0)]. After all settings are applied, an image
strain or stress fields calculated by FEM are considered as the ground is generated with the “print” command in Abaqus.
truth when comparing with ML results. All simulations are carried On the basis of the images created by Abaqus, a Python code is
out in 2D. To include plastic deformation, crushable foam model executed to cut, resize, and stitch images. Input image (geometry
with volumetric hardening embedded in Abaqus is implemented images) and target image (field images) are cut to keep the propor-
for composites (48, 49). Detailed material properties of two differ- tion of black background similar vertically and horizontally. The
ent units in composites are exhibited (tables S1 and S2). Table S1 purpose of cutting operation is to make sure that the composites
displays overall mechanical behavior of materials, while the specific in input image and target image are generally matching in shape to
In addition, the relative errors comparing the residual stress values Nonsquare features
of ML predictions and the FEM results are computed simply follow- Hexagonal and triangular representations are used to testify wheth-
ing the expression er our model can be applied to composites with different shapes.
The sizes of composites in hexagonal and triangular representations
S FEM
|
S ML − S FEM
RE = ─
× 100% | (2)
are 312 × 315 and 320 × 332 (x × y). At the boundaries of composite,
both hexagonal and triangular units are cut half. The field images
for both cases were generated after one-cycle compressive loading
where SML is the average von Mises stress from ML predictions, and unloading. The magnitude of compressive strain is 10% for the
and SFEM is the average von Mises stress from FEM simulation results. hexagonal representation and 5% for the triangular representation.
The reason why a smaller strain is used for triangular cases is to
DL approach avoid singularity at the edges of triangles when FEM simulations
The ML calculations are performed using TensorFlow (51), a general are carried out.
purpose ML framework. A GAN is implemented for translating
composite geometries to mechanical fields (44). GAN is a type of Distinct loading conditions
deep neural network consisting of a Generator and a Discriminator To explore the capacity of our ML model to predict strain or stress
based on game theory (43). Particularly in our model, U-Net is the fields under various loads, we use two mechanical tests, nanoinden-
Generator and PatchGAN is the Discriminator (44). U-Net is a deep tation and compression. The general setup of those mechanical tests
neural network model that has been used for biomedical image seg- using FEM is the same as the setup mentioned above (see the
mentation in earlier work (27). Here, we use U-Net to generate fake “FEM” section). However, we do not unload the composite after
field images based on composite geometries. PatchGAN evaluates loading. The reason is that the field image after unloading in
the generated field images from U-Net by comparing with real field nanoindentation contains very little information as the composite
images. The model was trained using a single NVIDIA Quadro RTX has most of its region stress free. A compressive strain with magni-
4000 with 8-gigabyte memory. The numbers of training epochs range tude of 5% is used again to again avoid singularity during the
from 150 to 400 in different cases to achieve convergence, and the nanoindentation simulation. To include loading condition in images,
batch size of the training is 1. Although GANs are notorious for the green lines are used to represent analytical rigid bodies, which
training instability, cGANs are relatively more stable with the con- induce deformation (Fig. 4D).
strain of the input labels (52). The numbers of training epochs were As for the nanoindentation test, rather than a straight-line rigid
carefully tuned so that the training process is not too short for the body, a spherical indenter is used to implement loading (movie S3).
generator to learn enough information and also not too long that The indenter is laid at the top center of the composite with radius of
brittle materials. We use the model that is trained for high-resolution 28. S. L. Franjou, M. Milazzo, C.-H. Yu, M. J. Buehler, Sounds interesting: Can sonification help
geometry to predict the stress field around soft materials. Two types us design new proteins? Expert Rev. Proteomics 16, 875–879 (2019).
29. C.-H. Yu, M. J. Buehler, Sonification based de novo protein design using artificial
of cracks with different shapes and positions are investigated (fig. S4).
intelligence, structure prediction, and analysis using molecular modeling. APL Bioeng. 4,
016108 (2020).
SUPPLEMENTARY MATERIALS 30. C. H. Yu, Z. Qin, F. J. Martin-Martinez, M. J. Buehler, A self-consistent sonification method
Supplementary material for this article is available at http://advances.sciencemag.org/cgi/ to translate amino acid sequences into musical compositions and application in protein
content/full/7/15/eabd7416/DC1 design using artificial intelligence. ACS Nano 13, 7471–7482 (2019).
31. R. Gómez-Bombarelli, J. N. Wei, D. Duvenaud, J. M. Hernández-Lobato, B. Sánchez-
Lengeling, D. Sheberla, J. Aguilera-Iparraguirre, T. D. Hirzel, R. P. Adams, A. Aspuru-Guzik,
REFERENCES AND NOTES Automatic chemical design using a data-driven continuous representation of molecules.
1. K. K. Chawla, Composite Materials: Science and Engineering (Springer Science & Business
ACS Cent. Sci. 4, 268–276 (2018).
Media, 2012).
32. D. K. Johnson, J. Karanicolas, Ultra-high-throughput structure-based virtual screening
2. A. R. Studart, Biological and bioinspired composites with spatially tunable heterogeneous
for small-molecule inhibitors of protein-protein interactions. J. Chem. Inf. Model. 56,
architectures. Adv. Funct. Mater. 23, 4423–4436 (2013).
399–411 (2016).
3. C. T. Chen, F. J. Martin-Martinez, S. Ling, Z. Qin, M. J. Buehler, Nacre-inspired design
33. K. T. Schütt, F. Arbabzadah, S. Chmiela, K. R. Müller, A. Tkatchenko, Quantum-chemical
of graphene oxide–polydopamine nanocomposites for enhanced mechanical properties
insights from deep tensor neural networks. Nat. Commun. 8, 13890 (2017).
and multi-functionalities. Nano Futur. 1, 011003 (2017).
34. G. R. Schleder, A. C. M. Padilha, C. M. Acosta, M. Costa, A. Fazzio, From DFT to machine
4. M. J. Buehler, H. Gao, Dynamical fracture instabilities due to local hyperelasticity at crack
learning: Recent approaches to materials science–A review. J. Phys. Mater. 2, 032001
tips. Nature 439, 307–310 (2006).
(2019).
5. K. K. Chawla, Ceramic Matrix Composites (Springer Science & Business Media, 2013).
35. K. T. Schütt, P. J. Kindermans, H. E. Sauceda, S. Chmiela, A. Tkatchenko, K. R. Müller,
6. C. H. Yu, M. W. Bird, C. W. Huang, C. S. Chen, Y. F. Gao, K. W. White, C. H. Hsueh,
SchNet: A continuous-filter convolutional neural network for modeling quantum
Micromechanics modeling of creep fracture of zirconium diboride-silicon carbide
interactions. Adv. Neural Inf. Process. Syst. 2017, 992–1002 (2017).
composites at 1400-1700°C. J. Eur. Ceram. Soc. 34, 4145–4155 (2014).
36. J. Wang, S. Olsson, C. Wehmeyer, A. Pérez, N. E. Charron, G. De Fabritiis, F. Noé,
7. Z. M. Huang, Y. Z. Zhang, M. Kotaki, S. Ramakrishna, A review on polymer nanofibers by
C. Clementi, Machine learning of coarse-grained molecular dynamics force fields. ACS
electrospinning and their applications in nanocomposites. Compos. Sci. Technol. 63,
Cent. Sci. 5, 755–767 (2019).
2223–2253 (2003).
37. J. Behler, M. Parrinello, Generalized neural-network representation of high-dimensional
8. X. Xia, A. Afshar, H. Yang, C. M. Portela, D. M. Kochmann, C. V. Di Leo, J. R. Greer,
potential-energy surfaces. Phys. Rev. Lett. 98, 146401 (2007).
Electrochemically reconfigurable architected materials. Nature 573, 205–213 (2019).
38. F. Noé, A. Tkatchenko, K.-R. Müller, C. Clementi, Machine learning for molecular
9. M. S. Pham, C. Liu, I. Todd, J. Lertthanasarn, Damage-tolerant architected materials
simulation. Annu. Rev. Phys. Chem. 71, 361–390 (2020).
inspired by crystal microstructure. Nature 565, 305–311 (2019).
39. G. X. Gu, C. T. Chen, D. J. Richmond, M. J. Buehler, Bioinspired hierarchical composite
10. F. Barthelat, Z. Yin, M. J. Buehler, Structure and mechanics of interfaces in biological
design using machine learning: Simulation, additive manufacturing, and experiment.
materials. Nat. Rev. Mater. 1, 16007 (2016).
Mater. Horizons. 5, 939–945 (2018).
11. H. Gao, B. Ji, I. L. Jäger, E. Arzt, P. Fratzl, Materials become insensitive to flaws at
40. F. Martínez-Martínez, M. J. Rupérez-Moreno, M. Martínez-Sober, J. A. Solves-Llorens,
nanoscale: Lessons from nature. Proc. Natl. Acad. Sci. U.S.A. 100, 5597–5600 (2003).
D. Lorente, A. J. Serrano-López, S. Martínez-Sanchis, C. Monserrat, J. D. Martín-Guerrero, A
the idea. Z.Y., C.-H.Y., and M.J.B. developed the model and carried out the simulations. Z.Y. and Submitted 9 July 2020
C.-H.Y. curated the training and testing data. M.J.B. supervised the project, analyzed the Accepted 24 February 2021
results, and interpreted it with Z.Y. and C.-H.Y. Z.Y., C.-H.Y., and M.J.B. wrote the manuscript. Published 9 April 2021
Competing interests: The authors declare that they have no competing interests. Data and 10.1126/sciadv.abd7416
materials availability: All data needed to evaluate the conclusions in the paper are present in
the paper and/or the Supplementary Materials. Additional data related to this paper may be Citation: Z. Yang, C.-H. Yu, M. J. Buehler, Deep learning model to predict complex stress and
requested from the corresponding author. strain fields in hierarchical composites. Sci. Adv. 7, eabd7416 (2021).
Science Advances (ISSN 2375-2548) is published by the American Association for the Advancement of Science. 1200 New York Avenue
NW, Washington, DC 20005. The title Science Advances is a registered trademark of AAAS.
Copyright © 2021 The Authors, some rights reserved; exclusive licensee American Association for the Advancement of Science. No claim
to original U.S. Government Works. Distributed under a Creative Commons Attribution NonCommercial License 4.0 (CC BY-NC).