Multiscale finite element calculations in Python using SfePy

  • PDF / 3,119,371 Bytes
  • 25 Pages / 439.642 x 666.49 pts Page_size
  • 1 Downloads / 230 Views

DOWNLOAD

REPORT


Multiscale finite element calculations in Python using SfePy Robert Cimrman1 · Vladim´ır Lukeˇs2

· Eduard Rohan2

Received: 27 September 2018 / Accepted: 22 January 2019 / © Springer Science+Business Media, LLC, part of Springer Nature 2019

Abstract 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. Keywords Finite element method · Multiscale simulations · Piezoelasticity · SfePy · Python

Communicated by: Pavel Solin  Robert Cimrman

[email protected] Vladim´ır Lukeˇs [email protected] Eduard Rohan [email protected] 1

New Technologies - Research Centre, University of West Bohemia, Univerzitn´ı 8, 30614, Pilsen, Czech Republic

2

NTIS – New Technologies for the Information Society, Faculty of Applied Sciences, University of West Bohemia, Univerzitn´ı 8, 30614, Pilsen, Czech Republic

R. Cimrman et al.

Mathematics Subject Classification (2010) 35Qxx · 65N30 · 65M60 · 65Y05 · 74S05

1 Introduction SfePy (http://sfepy.org) is a software for solving systems of coupled partial differential equations (PDEs) by the finite element method (FEM) in 1D, 2D, and 3D. It can be viewed both as a black-box PDE solver, and as a Python package which can be used for building custom applications. It is a multiplatform (Linux, Mac OS X, Windows) software released under the New BSD license—the source code hosting, issue tracker, and continuous integration tools are available thanks to the GitHub development platform. SfePy has been employed by our group for a range of topics in multiscale modeling in biomechanics and materials science, including multiscale models of biological tissues (bone, muscle tissue with blood perfusion) [15, 16, 51, 57, 59, 60], a fish heart model with active contraction [37], computations of acoustic transmission coefficients across interfaces of arbitrary microstructure geometry [53], computations of phononic band gaps [55, 58], the finite element formulati