Multiscale finite element calculations in Python using SfePy

SfePy (simple finite elements in Python) is a software for solving various kinds of problems described by partial differential equations in one, two, or three spatial dimensions by the finite element method. Its source code is mostly (85%) Python and relies on fast vectorized operations provided by the NumPy package. For a particular problem, two interfaces can be used: a declarative application programming interface (API), where problem description/definition files (Python modules) are used to define a calculation, and an imperative API, that can be used for interactive commands, or in scripts and libraries. After outlining the SfePy package development, the paper introduces its implementation, structure, and general features. The components for defining a partial differential equation are described using an example of a simple heat conduction problem. Specifically, the declarative API of SfePy is presented in the example. To illustrate one of SfePy’s main assets, the framework for implementing complex multiscale models based on the theory of homogenization, an example of a two-scale piezoelastic model is presented, showing both the mathematical description of the problem and the corresponding code.

[1]  Godehard Sutmann,et al.  Multiscale modelling methods for applications in materials science , 2013 .

[2]  E Weinan,et al.  The heterogeneous multi-scale method for homogenization problems , 2005 .

[3]  Joris Borgdorff,et al.  A framework for multi-scale modelling , 2014, Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences.

[4]  Anders Logg,et al.  Efficient representation of computational meshes , 2009, Int. J. Comput. Sci. Eng..

[5]  Petra Kochová,et al.  A mathematical model of the carp heart ventricle during the cardiac cycle. , 2015, Journal of theoretical biology.

[6]  Jaroslav Kruis,et al.  MuPIF - A distributed multi-physics integration tool , 2013, Adv. Eng. Softw..

[7]  David B. Brough,et al.  Materials Knowledge Systems in Python—a Data Science Framework for Accelerated Development of Hierarchical Materials , 2017, Integrating Materials and Manufacturing Innovation.

[8]  Doina Cioranescu,et al.  The Periodic Unfolding Method in Homogenization , 2008, SIAM J. Math. Anal..

[9]  Raytcho D. Lazarov,et al.  Higher-order finite element methods , 2005, Math. Comput..

[10]  Julien Yvonnet,et al.  Homogenization methods and multiscale modeling : Nonlinear problems , 2017 .

[11]  Xingwen Du,et al.  A three-dimensional Fe nonlinear analysis of membranes , 1996 .

[12]  Utkarsh Ayachit,et al.  The ParaView Guide: A Parallel Visualization Application , 2015 .

[13]  Kun Wang,et al.  A multiscale multi-permeability poroplasticity model linked by recursive homogenizations and deep learning , 2018, Computer Methods in Applied Mechanics and Engineering.

[14]  I. Doležel,et al.  Higher-Order Finite Element Methods , 2003 .

[15]  Eduard Rohan,et al.  Two-Scale Modeling of Tissue Perfusion Problem Using Homogenization of Dual Porous Media , 2010 .

[16]  Assyr Abdulle,et al.  A short and versatile finite element multiscale code for homogenization problems , 2009 .

[17]  P. Hoggan,et al.  Advances in the Theory of Quantum Systems in Chemistry and Physics , 2012 .

[18]  Eduard Rohan,et al.  Band gaps and vibration of strongly heterogeneous Reissner–Mindlin elastic plates , 2011 .

[19]  Peter V. Coveney,et al.  Multiscale computing in the exascale era , 2016, J. Comput. Sci..

[20]  Eduard Rohan,et al.  Numerical modelling and homogenized constitutive law of large deforming fluid saturated heterogeneous solids , 2006 .

[21]  Vladimír Lukes,et al.  Homogenization of the vibro-acoustic transmission on perforated plates , 2019, Appl. Math. Comput..

[22]  Lisandro Dalcin,et al.  Parallel distributed computing using Python , 2011 .

[23]  Eduard Rohan,et al.  Numerical simulation of acoustic band gaps in homogenized elastic composites , 2009 .

[24]  Alfons G. Hoekstra,et al.  MML: towards a Multiscale Modeling Language , 2010, ICCS.

[25]  Adrian Muntean,et al.  Homogenization method and multiscale modeling , 2011 .

[26]  Travis E. Oliphant,et al.  Python for Scientific Computing , 2007, Computing in Science & Engineering.

[27]  Andy R. Terrel,et al.  SymPy: Symbolic computing in Python , 2017, PeerJ Prepr..

[28]  Robert Cimrman Enhancing SfePy with Isogeometric Analysis , 2014, ArXiv.

[29]  G. Allaire Homogenization and two-scale convergence , 1992 .

[30]  Miroslav Tuma,et al.  Convergence study of isogeometric analysis based on Bézier extraction in electronic structure calculations , 2018, Appl. Math. Comput..

[31]  Robert Cimrman,et al.  Finite Element Method in Density Functional Theory Electronic Structure Calculations , 2012 .

[32]  Eric Jones,et al.  SciPy: Open Source Scientific Tools for Python , 2001 .

[33]  Thomas J. R. Hughes,et al.  Isogeometric Analysis: Toward Integration of CAD and FEA , 2009 .

[34]  Andrew T. T. McRae,et al.  Firedrake: automating the finite element method by composing abstractions , 2015, ACM Trans. Math. Softw..

[35]  John D. Hunter,et al.  Matplotlib: A 2D Graphics Environment , 2007, Computing in Science & Engineering.

[36]  Ellad B. Tadmor,et al.  A unified framework and performance benchmark of fourteen multiscale atomistic/continuum coupling methods , 2009 .

[37]  Timon Rabczuk,et al.  A computational library for multiscale modeling of material failure , 2014 .

[38]  Eduard Rohan,et al.  Multiscale FE simulation of diffusion-deformation processes in homogenized dual-porous media , 2012, Math. Comput. Simul..

[39]  Vladimír Lukes,et al.  Homogenization of the acoustic transmission through a perforated layer , 2010, J. Comput. Appl. Math..

[40]  Gaël Varoquaux,et al.  Mayavi: 3D Visualization of Scientific Data , 2010, Computing in Science & Engineering.

[41]  Axel Klawonn,et al.  One-Way and Fully-Coupled FE2 Methods for Heterogeneous Elasticity and Plasticity Problems: Parallel Scalability and an Application to Thermo-Elastoplasticity of Dual-Phase Steels , 2016, Software for Exascale Computing.

[42]  Surya R. Kalidindi,et al.  PyMKS: Materials Knowledge System in Python , 2014 .

[43]  M. Schneider,et al.  Computational homogenization of elasticity on a staggered grid , 2016 .

[44]  Matthew Mosby,et al.  Hierarchically parallel coupled finite strain multiscale solver for modeling heterogeneous layers , 2015 .

[45]  Salah Naili,et al.  Multiscale modeling of a fluid saturated medium with double porosity: Relevance to the compact bone , 2012 .

[46]  John A. Evans,et al.  Isogeometric finite element data structures based on Bézier extraction of NURBS , 2011 .

[47]  P. Donato,et al.  An introduction to homogenization , 2000 .

[48]  Raimund Rolfes,et al.  High-Performance 4-Node Shell Element with Piezoelectric Coupling , 2006 .

[49]  Salah Naili,et al.  Hierarchical homogenization of fluid saturated porous solid with multiple porosity scales , 2012 .

[50]  Miroslav Tuma,et al.  Isogeometric analysis in electronic structure calculations , 2016, Math. Comput. Simul..

[51]  M. Geers,et al.  Finite strain FFT-based non-linear solvers made simple , 2016, 1603.08893.

[52]  Eduard Rohan,et al.  On modelling the parallel diffusion flow in deforming porous media , 2007, Math. Comput. Simul..

[53]  H. Moulinec,et al.  A fast numerical method for computing the linear and nonlinear mechanical properties of composites , 1994 .

[54]  Peter V. Coveney,et al.  Distributed multiscale computing with MUSCLE 2, the Multiscale Coupling Library and Environment , 2013, J. Comput. Sci..

[55]  Vladimír Lukes,et al.  Homogenization of the fluid-saturated piezoelectric porous media , 2018, ArXiv.

[56]  Timothy A. Davis,et al.  Algorithm 832: UMFPACK V4.3---an unsymmetric-pattern multifrontal method , 2004, TOMS.

[57]  Marc G. D. Geers,et al.  A review of predictive nonlinear theories for multiscale modeling of heterogeneous materials , 2017, J. Comput. Phys..

[58]  M. Geers,et al.  A finite element perspective on nonlinear FFT‐based micromechanical simulations , 2016, 1601.05970.

[59]  Manuel Amaya,et al.  A low-rank approximation for large-scale 3D controlled-source electromagnetic Gauss-Newton inversion , 2016 .

[60]  Victor M. Calo,et al.  PetIGA: A Framework for High-Performance Isogeometric Analysis , 2013 .

[61]  Anders Logg,et al.  The FEniCS Project Version 1.5 , 2015 .