Disclaimer
This repository is distributed under an MIT license. In layman's term, you are free to do what you want with it. We just kindly request you to cite our papers that form the basis for this repository, and encourage you to be equally open with your code.
(c) Tom de Geus (tom@geus.me), Jaroslav Vondřejc, 2016
This repository is primarily meant for those researchers who want to dive into the FFT-based micro-mechanical solver. It contains several small, single file, Python scripts which should lower the learning curve (see Ref. [1], which was written with this particular aim). These examples are formulated both in small strain (with linear and non-linear elastic, elasto-plastic, elasto-visco-plastic constitutive models; accompanying [2]), and finite strain (with hyper-elastic and elasto-plastic constitutive models; accompanying [1]). The examples only depend on standard Python and its scientific libraries NumPy and SciPy, which are freely available for all operating systems and are widely used. No custom software or libraries are used, i.e. there are no hidden layers of complexity.
Since different approaches exists for this type of numerical method, and since there are many styles and programming languages, anyone is invited to contribute by uploading similar small, preferably single file, examples for different materials, in different programming languages, or featuring different approaches.
The examples are divided in three categories:
-
Basic methodology. These examples focus on accessibility while retaining some computational efficiency. Great to get started.
-
Different materials models. These examples focus on different constitutive relations (which are completely uncoupled from the FFT-solver). At the same time, they are implemented more general and more efficiently than the examples that present the basic methodology.
-
Applications. These examples show just how powerful the FFT-solver can be, even with the very simple Python code. Also, they introduce the concept of 2-D plane strain.
-
finite-strain/hyper-elasticity.py
andfinite-strain/hyper-elasticity-even.py
: the main example of Ref. [1] featuring a simple hyper-elastic model in finite strain. As described in Ref. [1] the projection operator is slightly different for even or odd grids, here included in two files. -
small-strain/linear-elasticity.py
andsmall-strain/linear-elasticity-even.py
. The small strain equivalent (linear) of the previous example. Notice that the projection operator is more involved, as the symmetry of the strain tensor has to be enforced.
-
finite-strain/elasto-plasticity.py
andfinite-strain/elasto-plasticity_even.py
: the Simo elasto-plastic constitutive model for finite strain [1]. Furthermore, the definition of the projection operator is vectorized. -
small-strain/laminate/non-linear-elasticity.py
: a laminate of a non-linear elastic and a linear elastic material. For this configuration an analytical solution is available [2]. -
small-strain/laminate/elasto-plasticity.py
: a laminate of an elasto-plastic and a linear elastic material. For this configuration an analytical solution is available [2]. -
small-strain/laminate/visco-plasticity.py
: a laminate of an elasto-visco-plastic and a linear elastic material. For this configuration an analytical solution is available [2].
-
finite-strain/elasto-plasticity_2D-micrograph
: a realistic example to simulate the mechanical response of the 2-D micrograph of dual-phase steel [1]. -
small-strain/micrograph
: the same example as the previous one, but in small strain [2]. -
small-strain/spherical-inclusions
: an example to simulate the response of a matrix material with spherical inclusions. The FFT operations of the simulation can be executed either using the CPU or GPU via CuPy [3].
- To enable GPU functionality for
small-strain/spherical-inclusions
via the in-script flagGPU = 1
, you need a CUDA enabled Nvidia GPU + CUDA installed. The easiest way for Linux / Ubuntu is to follow these instructions: https://www.tensorflow.org/install/gpu . After that, you can install CuPy viapip install cupy-cuda110
.
[1]: T.W.J. de Geus, J. Vondřejc, J. Zeman, R.H.J. Peerlings, M.G.D. Geers. Finite strain FFT-based non-linear solvers made simple. Computer Methods in Applied Mechanics and Engineering, 2017, 318:412–430. doi: 10.1016/j.cma.2016.12.032, arXiv: 1603.08893
[2]: J. Zeman, T.W.J. de Geus, J. Vondřejc, R.H.J. Peerlings, M.G.D. Geers. A finite element perspective on nonlinear FFT-based micromechanical simulations. International Journal for Numerical Methods in Engineering, 2017, 111(10):903–926. doi: 10.1002/nme.5481, arXiv: 1601.05970
[3]: A. Henkes, I. Caylak, R. Mahnken. "A deep learning driven uncertain full‐field homogenization method." PAMM 20.1 (2021): e202000180. doi: 10.1002/pamm.202000180