Full Program »
COMBINING DEEP LEARNING WITH OPENFOAM: SOLVER ACCELERATION AND HISTORY-DEPENDENT CONSTITUTIVE MODELS
Deep learning is transforming many areas of society, from self-driving cars to cognitive medical assistants and energy-efficient buildings. The application of such groundbreaking approaches to the computational mechanics field is in its infancy. A primary reason is that deep learning methods are typically developed and implemented by computer scientists and statisticians, whereas the intimate details of computational mechanics software are primarily known by engineers.
The current project examines the integration of deep learning techniques with OpenFOAM solvers in two distinct ways:
1. Using recurrent neural networks to accelerate OpenFOAM solver outer iterations;
2. Using recurrent neural networks to approximate computationally expensive elasto-plasticity mechanical
constitutive laws.
For both approaches, Keras [1], a high-level neural networks API built on TensorFlow [2], is used. Integration with C++ OpenFOAM code is made possible using the frugally-deep header library [3]. There are a large number of deep learning approaches; in this project, recurrent neural networks have been selected due to their ability to deal with variable sequences of data, for example, solver residuals vs iteration, or stress vs deformation. In particular, so-called Long short- term memory (LSTM) and Gated recurrent units (GRUs) methods are used. The overall approach consists of generating a dataset of sequences that are representative of the problem of interest, a deep learning model is then trained on this dataset to learn the trends, and finally, the trained deep learning models are used to predict the output on unseen sequences.
In approach 1, a nonlinear solid mechanics solver is chosen as the focus, although the procedure can be applied to any iterative OpenFOAM solver. For a large number of cases, the solution field in every cell is stored to disk versus iteration number to produce a dataset. The deep learning model is then trained on this dataset such that it can predict the final converged solution field given a sequence of solution field iterations. In this way, for example, the simpleFoam solver could jump to the final converged solution after a small number of outer iterations, based on experience of previous similar cases. Some initial promising results are shown in Figure 1(a) for a nonlinear solid mechanics solver [4], where a reduction in the number of iterations and solution time of 20% was achieved.
In approach 2, a deep learning approach is used to replace the mechanical constitutive law in a nonlinear solid mechanics solver. Whereas in fluids simulations, the choice of turbulence model greatly affects the accuracy, in solid simulations the choice of constitutive model plays a similar role. A constitutive model takes a deformation and returns a stress, and for advanced elasto-plasticity procedures can be expensive to evaluate. Furthermore, when multi-scale approaches are required to evaluate the constitutive law, computing times become prohibitive. To overcome this, a deep learning model is proposed here to learn the behaviour of a history dependent constitutive law. Initial promising results are shown in 1(b) for J2 hyper-elasto-plasticity [4] and 3-D complex deformation paths; the effect of the number of training epochs/iterations is shown.