ART Multiscale Finite Element Calculations in Python Using SfePy
ART Multiscale Finite Element Calculations in Python Using SfePy
https://doi.org/10.1007/s10444-019-09666-0
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 inter-
face (API), where problem description/definition files (Python modules) are used to
define a calculation, and an imperative API, that can be used for interactive com-
mands, or in scripts and libraries. After outlining the SfePy package development,
the paper introduces its implementation, structure, and general features. The com-
ponents 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 homogeniza-
tion, 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
Vladimı́r Lukeš
vlukes@ntis.zcu.cz
Eduard Rohan
rohan@ntis.zcu.cz
1 Introduction
2 Development
The code has been written primarily in the Python programming language1 . Python
is a very high-level interpreted programming language, that has a number of fea-
tures appealing to scientists (non-IT), such as a clean, easy-to-read syntax, no manual
memory management, a huge standard library, a very good interoperability with other
languages (C, fortran), and a large and friendly scientific computing community. It
allows both fast exploration of various ideas and efficient implementation, thanks
to many high-performance solvers with a Python interface, and numerical tools and
libraries available among open-source packages.
There are many finite element packages, commercial or open source, that can be
used from Python, and some of them use Python as a primary language, notably
Fenics [3] or Firedrake [50]. This indicates viability of our choice and is in agreement
with our positive experience with the language.
1 SfePy sources (version 2018.3) GitHub statistics: Python, 85.1%; C, 14.6%; other, 0.3 %.
Multiscale finite element calculations in Python using SfePy
The SfePy project uses Git [30] for source code management and GitHub develop-
ment platform [31] for the source code hosting and developer interaction (see https://
github.com/sfepy/sfepy), similarly to many other scientific Python tools. Travis CI
[67] is used (via GitHub) for running automatic tests after every uploaded commit.
The developers and users of the software can communicate using the mailing list
“sfepy@python.org.” The source code and the package usage and development are
documented with the help of the Sphinx documentation generator [65] that is also
used to generate the pages of the SfePy project website.
The version 2018.3 has been released in September 17, 2018, and its git-controlled
sources contained 897 total files, 721447 total lines (1539277 added, 817830
removed), and 6386 commits done by 24 authors2 . About 120000 lines (16 %) are the
source code, the other lines belong to the finite element meshes, documentation, etc.
3 Description
In this section, we briefly outline the package implementation, structure, and general
features. The components for defining a PDE to solve are described using a simple
example in Section 3.4.
In SfePy, the equations are not given in a fully symbolic way, as in, for example, Fen-
ics or Firedrake projects3 , but a simpler approach is used: the SfePy package comes
with a database of predefined terms. A term is the smallest unit that can be used to
build equations. It corresponds to a weak formulation integral over a (sub)domain and
takes usually several arguments: (optional) material parameters, a single virtual (or
test) function variable and zero or more state (or unknown) variables. The available
terms are listed at our website [63]; currently, there are 118 terms.
The high-level code that handles a PDE discretization in SfePy is independent of
a method of domain or variable discretization. For each particular method of dis-
cretization, there is a subpackage that implements the specific functionality (degrees
of freedom management, selection of subdomains, reference domain mappings, etc.).
This abstraction allows adding various discretization methods. The following ones
are currently implemented:
– The finite element method on 1D line, 2D area (triangle, rectangle), and 3D
volume (tetrahedron, hexahedron) finite elements, with two kinds of polynomial
bases:
– The classical nodal (Lagrange) basis that can be used with all supported
element/cell types
– The hierarchical (Lobatto) basis [64] that can be used with tensor-
product elements (line, rectangle, hexahedron)
The basis function polynomials of an arbitrary order (theoretically, see limita-
tions below) as well as the corresponding quadrature rules are supported. The
Lagrange basis is implemented in C/Cython, while the Lobatto basis functions
use a C code generated using SymPy.
– The isogeometric analysis [21] with a NURBS or B-spline basis, implemented
using the Bézier extraction approach [8], currently limited to single NURBS
patch domains (see [13]).
All the basis functions listed above support the H 1 function spaces only (H (curl),
H (div) spaces are not currently implemented). In addition to the above elements, two
structural elements are implemented (using SfePy terms): the hyperelastic Mooney-
Rivlin membrane [72], and the shell10x element term based on the Reissner-Mindlin
theory [74].
SfePy can solve many problems described by PDEs in the weak form. For a particular
problem, there are two interfaces that can be used:
– A declarative API, where problem description/definition files (Python modules)
are used to define a calculation.
– An imperative API, that can be used for interactive commands, or in scripts and
libraries.
Both the above APIs closely correspond to the mathematical description of the
weak form PDEs. An advanced use of the declarative API is demonstrated in the
piezoelectric model example in Section 5.
The declarative API involves almost no programming besides using basic Python
data types (dicts, lists, tuples, strings, etc.) and allows a lazy definition of the prob-
lem, called problem configuration, as well as a manipulation with the problem
configuration. Prior to a problem solution, the problem configuration is automati-
cally translated into a problem object using the imperative API. The SfePy package
contains several top-level scripts that can be used to run simulations defined using
the declarative API. The two common ones are as follows:
– The simple.py script that allows running regular calculations of PDEs
– The homogen.py script that allows running the homogenization engine to
compute effective material parameters (see Section 4.2)
The imperative API allows immediate evaluation of expressions, and thus supports
interactive exploration or inspection of the FE data. It is also more powerful than
the declarative API as a user is free to perform nonpredefined tasks. The problems
defined using the imperative API usually have a main() function and can be run
directly using the Python interpreter.
In the both cases, a problem definition is a Python module, so all the power
of Python (and supporting SfePy modules) is available when needed for complex
problems.
∂u −2 x ∈ left ,
v + c∇v · ∇u = 0 , ∀v , u(x, 0) = g(x) , u(x, t) =
∂t 2 x ∈ right ,
– Regions serve as domains of integration and allow defining boundary and initial
conditions. Subdomains of various topological dimension can be defined. The
mesh/domain and region handling uses a C data structure adapted from [39]. The
following code defines the domain and the boundaries left , right .
– Fields correspond to the discrete function spaces and are defined using the
(numerical data type, number of components, region name, approximation order)
tuple. A field can be defined on the whole domain, on a volume (cell) subdomain
or on a surface (facet) region.
– The fields (FE spaces) can be used to define variables. Variables come in three
flavors: unknown field for state variables, test field for test (virtual)
variables, and parameter field for variables with known values of degrees
of freedom (DOFs). The definition items for an unknown variable definition
are: (’unknown field’, field name, order in global vector, [optional history
size]). In the snippet below, the history size is 1, as the previous time step state
is required for the numerical time derivative. For a test variable, the last item is
the name of the corresponding unknown variable.
– The initial conditions can be defined analogously; here, we illustrate how to use
a function. The conditions are applied in the whole domain . The code assumes
NumPy was imported (import numpy as np), and ic max is a constant
defined outside the function.
– The PDEs can be built as a linear combination of many predefined terms. Each
term has its quadrature order and its region of integration. The integral specifies
a numerical quadrature order.
SfePy has no meshing capabilities besides several simple mesh generators (a block
mesh generator, an open/closed cylinder mesh generator, a mesh generator from
CT image data), but several operations like merging of matching meshes are sup-
ported. The FE mesh needs to be provided in a file in one of the supported formats,
notably the legacy VTK format [36]. The results are stored in legacy VTK files,
or in, usually in case of time-dependent problems with many time steps, custom
HDF5 [32] files. Many standard open-source tools can be used to display the VTK
files, namely Paraview [33] or Mayavi [49], see data workflow of a simulation in
Fig. 2. Mayavi is supported directly within SfePy via the postproc.py script. The
extractor.py script is provided to extract/convert the HDF5 file content to VTK.
3.6 Solvers
SfePy provides and uses a unified interface to many standard codes, for example,
UMFPACK [25], MUMPS [5], PETSc [6], Pysparse [28], as well as the solvers avail-
able in SciPy. Various solver classes are supported: time-stepping, nonlinear, linear,
eigenvalue problem, and optimization solvers. An automatically generated list of all
the supported solvers can be found at the SfePy website [63].
Besides external solvers, several solvers are implemented directly in SfePy, for
example:
– ts.simple: implicit time-stepping solver with a fixed time step, suitable also
for quasistatic problems
– ts.newmark, ts.bathe, ts.generalized alpha: solve elastodynam-
ics problems by the Newmark, Bathe, generalized-α methods, respectively
– nls.newton: the Newton nonlinear solver with a backtracking line search
A typical problem solution, when using the declarative problem definition API,
then involves calling a time-stepping solver that calls a nonlinear solver in each
time step, which, in turn, calls a linear solver in the nonlinear iterations. A uni-
fied approach is used here: for stationary problems, a dummy time-stepping solver
pre-processing
Netgen
FE mesh file
Hypermesh (.vtk, .msh, .hmascii,
.h5, .bdf, .neu, ...)
ANSYS post-processing
Mayavi
...
output file
Paraview
(.vtk or .h5)
FE solver
...
Fig. 2 Data exchange between SfePy and external preprocessing and postprocessing tools
Multiscale finite element calculations in Python using SfePy
3.7 Limitations
The limitations can be split into two groups. The first group is related to limited num-
ber of developers and our research focus: certain features are missing, because they
do not fall into our field of research (e.g., the vector finite elements). The limitations
in the second group are more fundamental. Because the code relies on vectorization
provided by NumPy, the code tries to work on all cells in a region in each operation:
for example, all local finite element matrices are evaluated in a vectorized way into a
single large NumPy array, and then assembled to a SciPy’s sparse matrix. This places
a restriction on a practically usable order of the basis function polynomials, especially
for 3D hexahedrons, where orders greater than 4 are not practically usable. Using
NumPy’s arrays places another restriction: data homogeneity. So, for examples, the
FE basis polynomial order has to be uniform over the whole (sub)domain where a
field is defined. This is incompatible with an adaptive mesh refinement, especially
the hp-adaptivity. Note that SfePy supports meshes with level 1 hanging nodes, so a
limited h-adaptivity is partly possible.
In this section, we briefly outline the approach to solving multiscale problems based
on the theory of homogenization [2, 19]. The main asset of the homogenization
approach is that a homogenized model can take into account various details at
the microstructure scale (topology, heterogeneous material parameters, etc.) without
actually meshing those detailed features on a macroscopic domain, which would lead
to an extremely large problem.
The homogenization engine is a feature that makes SfePy, in our opinion, espe-
cially suitable for multiphysical and multiscale simulations. It has been developed
to allow an easy and flexible formulation of problems arising from use of the
Multiscale finite element calculations in Python using SfePy
4 Thesituation is much more complicated for nonlinear problems: a microproblem needs to be typically
solved in every macroscopic integration point. This mode is also supported in SfePy.
R. Cimrman et al.
on the other hand, we provide a general framework together with a set of specific
functions which allow users to put together their own applications for the numeri-
cal simulations of given phenomena. The project website offers several examples of
multiscale modeling to help users create an efficient computational code according
to their needs. Our goal is to have a computing system usable, in terms of speed,
for practical homogenization problems, but primarily we want to offer a framework
that makes defining numerical simulations of diverse multiscale and multiphysical
problems easy and fast.
The efficiency of a numerical simulation is mainly related to the employed linear
solver which is usually the most time and memory consuming part of the compu-
tational process. Therefore, SfePy interfaces a number of external high-performance
linear direct and iterative solvers so that it is possible to choose a suitable one for a
given type of equations describing the problem. Some of the supported solvers can be
run in parallel; but in most cases, it is better to parallelize the multiscale computation
at the level of the microscopic subproblems. Then, it makes sense to use a parallel
solver at the macroscopic level because it does not interfere with parallel computa-
tion of the local subproblems. The efficiency of the FE data management, including
the assembling of local arrays, is usually not very important from the overall point
of view5 . Due to employed NumPy/SciPy data structures and operations these func-
tions are fast enough in practice. Moreover, the assembling process can be also run
in parallel using MPI and PETSc, but the parallel execution at more than one level
must be done with care to avoid a drop in performance.
The complex multiscale model, solved by the means of the homogenization method,
and its implementation in SfePy are presented in this section.
Fig. 3 The scheme of the representative periodic cell decomposition and the generated periodic structure
ε
which express the dependencies of the Cauchy stress εtensor σε Tand
the electric dis-
placement D on the strain tensor e(u ) = 2 ∇u + (∇u ) , where uε is the
ε ε 1
displacement field, and on the electric field E(ϕ ε ) = ∇ϕ ε , where ϕ ε is the electric
potential. On the right-hand side of (1), we have the fourth-order elastic tensor Aεij kl
(Aεij kl = Aεklij = Aεj ilk ), the third-order tensor gkij
ε (g ε = g ε ), which couples
kij kj i
mechanical and electric quantities, and the permeability tensor dkl ε.
−∇ · σ ε (uε , ϕ ε ) = fε , in εmc ,
(2)
−∇ · Dε (uε , ϕ ε ) = qEε , in εm ,
n · σ ε = hε on σε , n · Dε = E
ε on ε ,
D (3)
uε = ū on uε , ϕ = ϕ̄ on ϕε ,
ε
where fε , hε are the volume and surface forces, qEε , E ε are the volume and surface
charges and ū, ϕ̄ are the prescribed displacements and electric potential, respec-
tively. The piezoelastic medium occupies an open bounded region ∈ R3 which is
decomposed into several non-overlapping parts: the piezoelectric elastic matrix εm ,
conductive elastic parts εc = k k,ε ε
c and isolated void inclusions o (see Fig. 3).
The elastic part, i.e., the matrix and the conductors, is denoted by mc = εm ∪ εc .
ε
The weak formulation of the problem stated above can be written as follows: given
volume and surface forces fε , hε and volume and surface charges qEε , E ε , find uε ∈
[Aε e (uε ) − (gε )T · ∇ϕ ε ] : e (v) dV + ε [Aε e (uε )] : e (v) dV
εm c
= ε h · v dS + ε fε · v dV , (4)
σ mc
εm [gε : e (uε ) + dε · ∇ϕ ε ] · ∇ψ dV = ε E ε ψ dS + ε
ε qE ψ dV .
D m
We apply the standard homogenization techniques, cf. [2] or [19], to the problem
(4). It results in the limit model for ε −→ 0, where ε is the scale parameter relating
the microscopic and macroscopic length scales. The homogenization process leads to
local microscopic problems, defined within a reference periodic cell, and to the global
problem describing the behavior of the homogenized medium at the macroscopic
level. The global problem involves the homogenized material coefficients which are
evaluated using the solutions of the local problems. Due to linearity of the problem,
the microscopic and macroscopic problems are decoupled.
As we assume given potentials ϕ̄ k in each of the electrode networks, the dielectric
properties must be appropriately rescaled in order to preserve the finite electric field
for the limit ε −→ 0: gε = εḡ, dε = ε2 d̄, cf. [54].
Fig. 4 Left, the geometry of the reference periodic cell Y ; right, the macroscopic domain
In this section, we illustrate the use of SfePy’s homogenization engine in the follow-
ing setting. The macroscopic problem described by (8) is solved in the domain ,
depicted in Fig. 4 right, that is fixed at its left face (u0i = 0 for i = 1, 2, 3 on left ). No
volume and surface forces or charges are applied and the deformation of the macro-
scopic sample is invoked only by the prescribed electrical potential ϕ̄ = ±104 V
in the two embedded conductor networks. The geometry of the representative vol-
ume element, which is used to solve the microscopic problems (5), (6), is depicted
in Fig. 4 left. The material parameters of the piezoelectric elastic matrix, made of
barium-titanite, and metallic conductors are summarized in Table 1.
The results of the multiscale numerical simulation are shown in Figs. 5 and 6.
The macroscopic strain field and the deformed macroscopic sample (deformation
scaled by factor 100) are presented in Fig. 5. Although the global macroscopic
equation (8) and the local problems (5), (6) arise from the asymptotic analysis of the
original problem (4) for ε −→ 0, the homogenization approach is also applicable
for a finite size ε0 of heterogeneities. Using the macroscopic solution and the char-
acteristic responses, we can reconstruct the fields at the microscopic level for a given
finite size ε0 in a chosen part of the macroscopic domain. The reconstructed strain
field and the deformed microstructure (deformation scaled by factor 10) are shown
in Fig. 6 left, the reconstructed electric field is depicted in Fig. 6 right.
R. Cimrman et al.
Piezoelectric matrix
Fig. 5 The deformed macroscopic sample (deformation scaled by factor 100) and the magnitude of
macroscopic strain field
Multiscale finite element calculations in Python using SfePy
Fig. 6 Left, the deformed microscopic structure (deformation scaled by factor 10) and the magnitude of
reconstructed strain field; right, the magnitude of the reconstructed electric field
the differences drop significantly. Based on this comparison, we can say that the
presented multiscale approach gives reliable results computed with a lower compu-
tation cost in comparison to the direct simulation. In [54], the reference simulation
has approximately 4.5 × 105 degrees of freedom while the microscopic problem has
only 741 DOFs and the macroscopic problem 577 DOFs. A similar validation anal-
ysis has been done for the problem of the vibro-acoustic transmission on perforated
interfaces in [52].
The linear multiscale analysis defined above is performed in SfePy in two steps:
1. The local microscopic subproblems (5), (6) are solved using the homogenization
engine (see Section 4.2). The engine is also used to evaluate the homogenized
coefficients according to (7).
2. The global macroscopic problem (8) is solved, the known homogenized coeffi-
cients are employed.
The definition of the global problem can be done in the similar way as in the
simple heat conduction example presented in Section 3.4. The macroscopic equation
in the declarative API attains the form as follows:
where
hom.A stands for the homogenized coefficients AH and hom.Pf is equal
to k P ϕ̄ , i.e., the sum of the coefficients PH,k multiplied by the prescribed
H,k k
R. Cimrman et al.
The material parameters of the elastic matrix (Ym ) and the metallic conductors
(Yc ) are defined as follows (see Table 1):
where we follow the expression (71 ) which consists of two integrals over domains
Ymc (matrix + conductors) and Yc (conductors). The definition of each coeffi-
cient has these parts: requires—the names of correctors needed for evaluation,
expression—the expression to be evaluated, class—the coefficient class; it
determines the way of evaluation and the resulting matrix/array shape. In our case,
the class of A1 and A2 is CoefSymSym: it means that the resulting coefficients
are the fourth-order tensors in the symmetric storage, e.g., sym × sym matrices,
where sym is the number of components in a symmetric stress/strain vector. Class
CoefEval is used to evaluate a simple mathematical expression, in our example,
the summation of A1, A2. In set variables section, we say how to substi-
tute the correctors into the variables employed in the expression. For example,
the code (’U1’, (’omega ij’, ’pis u’), ’u’) is interpreted as follows:
U 1 = ωK +K , where ωK is stored in omega ij[’u’], K in pis u[’u’] and
K is the multi-index attaining 11, 22, 33, 12, 13, 23 for a 3D problem because of the
used CoefSymSym class. In a similar way, the coefficients PH,1 can be introduced
as follows:
Here, the CoefSym class is employed due to the second-order coefficient which can
be represented as a vector with dimension sym.
Multiscale finite element calculations in Python using SfePy
The required correctors omega ij, see (5), and pis u are defined as follows:
ij
The class ShapeDimDim is used to define the symbol k = yj δik and
CorrDimDim ensures the corrector with dim × dim components, dim is the space
dimension. Note that a corrector can also depend on another corrector as in the code
above, where pis u is required to solve omega ij. The correctors introduced in
(6) can be defined in SfePy as follows:
R. Cimrman et al.
The class CoefOne corresponds to the scalar corrector function. The correctors
are solved with the periodic boundary conditions defined in the lines with the key-
word epbcs and the Dirichlet (essential) boundary conditions defined in the lines
with the keyword ebcs.
The multiscale simulation can be run by calling the simple.py script
(see Section 3.5), with the name of the description file for the macroscopic
problem as a script parameter. The script runs the simulation at the macro-
scopic level and invokes the homogenization engine through the material func-
tion. The full sources of this example can be found in the SfePy package in
examples/multiphysics/: piezo elasticity macro.py defines the
macroscopic problem, and piezo elasticity micro.py defines the compu-
tations on the reference periodic cell of the microstructure. For the version of the
sources used in this article, see [14].
6 Conclusion
We introduced the open-source finite element package SfePy, a code written (mostly)
in Python for solving various kinds of problems described by partial differential
equations and discretized by the finite element method. The design of the code was
discussed and illustrated using a simple heat conduction example.
Special attention was devoted to the description of the SfePy’s homogeniza-
tion engine, a subpackage for defining complex multiscale problems. This feature
was introduced in a tutorial-like form using a multiscale numerical simulation of a
piezoelectric structure.
For the complete code of the examples presented, together with the required FE
meshes and the 2018.3 version of SfePy, see [14]. Further documentation and many
more examples of SfePy use can be found on the project’s website [63].
Funding information This work was supported by the projects GA17-12925S (the first author) and
GA19-04956S (the second author) of the Czech Science Foundation and by the project LO1506 of the
Czech Ministry of Education, Youth and Sports (the third author).
References
1. Abdulle, A., Nonnenmacher, A.: A short and versatile finite element multiscale code for
homogenization problems. Comput. Methods Appl. Mech. Eng. 198(37), 2839–2859 (2009).
https://doi.org/10.1016/j.cma.2009.03.019
2. Allaire, G.: Homogenization and two-scale convergence. SIAM J. Math. Anal. 23, 1482–1518 (1992).
https://doi.org/10.1137/0523084
3. Alnaes, M.S., Blechta, J., Hake, J., Johansson, A., Kehlet, B., Logg, A., Richardson, C., Ring, J.,
Rognes, M.E., Wells, G.N.: The FEniCS project version 1.5. Arch. Numer. Softw. 3, 9–23. https://
doi.org/10.11588/ans.2015.100.20553 (2015)
4. Alowayyed, S., Groen, D., Coveney, P.V., Hoekstra, A.G.: Multiscale computing in the exascale era.
J. Comput. Sci. 22, 15–25 (2017). https://doi.org/10.1016/j.jocs.2017.07.004
5. Amaya, M., Morten, J.P., Boman, L.: A low-rank approximation for large-scale 3D controlled-
source electromagnetic gauss-newton inversion. Geophysics 81(3), 211–225. https://doi.org/10.1190/
10.1190/geo2015-0079.1 (2016)
Multiscale finite element calculations in Python using SfePy
6. Balay, S., Abhyankar, S., Adams, M., Brown, J., Brune, P., Buschelman, K., Dalcin, L., Dener, A.,
Eijkhout, V., Gropp, W., Kaushik, D., Knepley, M., May, D., Curfman McInnes, L., Mills, R., Munson,
T., Rupp, K., Sanan, P., Smith, B., Zampini, S., Zhang, H., Zhang, H.: PETSc users manual. Tech. Rep.
ANL-95/11 - Revision 3.10, Argonne National Laboratory. http://www.mcs.anl.gov/petsc, accessed
25 September 2018 (2018)
7. Balzani, D., Gandhi, A., Klawonn, A., Lanser, M., Rheinbach, O., Schröder, J.: 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. In: Bungartz, H.J., Neumann, P.,
Nagel, W.E. (eds.) Software for Exascale Computing - SPPEXA 2013-2015, Springer International
Publishing, Lecture Notes in Computational Science and Engineering, pp. 91-112 (2016)
8. Borden, M.J., Scott, M.A., Evans, J.A., Hughes, T.J.R.: Isogeometric finite element data struc-
tures based on Bezier extraction of NURBS. Int. J. Numer. Meth. Eng. 87, 15–47 (2011).
https://doi.org/10.1002/nme.2968
9. Borgdorff, J., Mamonski, M., Bosak, B., Kurowski, K., Ben Belgacem, M., Chopard, B., Groen,
D., Coveney, P.V., Hoekstra, A.G.: Distributed multiscale computing with muscle 2, the multiscale
coupling library and environment. J. Comput. Sci. 5(5), 719–731 (2014). https://doi.org/10.1016/j.
jocs.2014.04.004
10. Bradshaw, R., Behnel, S., Seljebotn, D.S., Ewing, G., et al.: The Cython compiler. http://cython.org,
Accessed 25 September 2018 (2018)
11. Brough, D.B., Wheeler, D., Kalidindi, S.R.: Materials knowledge systems in python—a data science
framework for accelerated development of hierarchical materials. Integ. Mater. Manuf. Innov. 6(1),
36–53 (2017). https://doi.org/10.1007/s40192-017-0089-0
12. Chopard, B., Borgdorff, J., Hoekstra, A.G.: A framework for multi-scale modelling. Philos. Trans. R.
Soc. A Math. Phys. Eng. Sci. 372(2021), 20130378 (2014). https://doi.org/10.1098/rsta.2013.0378
13. Cimrman, R.: Enhancing sfepy with isogeometric analysis. arXiv: 1412.6407 (2014)
14. Cimrman, R., Lukeš, V.: SfePy 2018.3 sources and heat conduction examples demon-
strating declarative and imperative APIs of SfePy. https://zenodo.org/record/1434071.
https://doi.org/10.5281/zenodo.1434071 (2018)
15. Cimrman, R., Rohan, E.: On modelling the parallel diffusion flow in deforming porous media. Math.
Comput. Simul. 76(1–3), 34–43 (2007). https://doi.org/10.1016/j.matcom.2007.01.034
16. Cimrman, R., Rohan, E.: Two-scale modeling of tissue perfusion problem using homogeniza-
tion of dual porous media. Int. J. Multiscale. Com. 8(1), 81–102 (2010). https://doi.org/10.1615/
IntJMultCompEng.v8.i1.70
17. Cimrman, R., Novák, M., Kolman, R., Tůma, M., Plešek, P., Vackář, J.: Convergence study of isoge-
ometric analysis based on Bézier extraction in electronic structure calculations. Appl. Math. Comput.
319, 138–152 (2018a). https://doi.org/10.1016/j.amc.2017.02.023
18. Cimrman, R., Novák, M., Kolman, R., Tůma, M., Vackář, J.: Isogeometric analysis in electronic
structure calculations. Math. Comput. Simulat. 145, 125–135 (2018b). https://doi.org/10.1016/j.
matcom.2016.05.011
19. Cioranescu, D., Donato, P.: An introduction to homogenization. No. 17 in Oxford Lecture Series in
mathematics and its applications. Oxford University Press, Oxford (1999)
20. Cioranescu, D., Damlamian, A., Griso, G.: The periodic unfolding method in homogenization. SIAM
J. Math. Anal. 40(4), 1585–1620 (2008). https://doi.org/10.1137/080713148
21. Cottrell, J.A., Hughes, T.J.R., Bazilevs, Y.: Isogeometric analysis: toward integration of CAD and
FEA. New York, Wiley (2009)
22. Dalcin, L., Paz, R., Kler, P., Cosimo, A.: Parallel distributed computing using Python. Adv. Water
Resour. 34(9), 1124–1139 (2011a). https://doi.org/10.1016/j.advwatres.2011.04.013
23. Dalcin, L., Collier, N., Vignal, P., Cortes, A., Calo, V.: Petiga: a framework for high-performance iso-
geometric analysis. Comput. Method Appl. M, 308(C), 151–181. https://doi.org/10.1016/j.cma.2016.
05.011 (2016)
24. Dalcin, L.D., Paz, R.R., Kler, P.A., Cosimo, A.: Parallel distributed computing using Python. Adv.
Water Resour. 34(9), 1124–1139 (2011b). https://doi.org/10.1016/j.advwatres.2011.04.013
25. Davis, T.A.: Algorithm 832: UMFPACK, an unsymmetric-pattern multifrontal method. ACM T Math.
Softw. 30(2), 196–199 (2004). https://doi.org/10.1145/992200.992206
26. Falcone, J.L., Chopard, B., Hoekstra, A.: MML: towards a multiscale modeling language. Procedia
Comput. Sci. 1(1), 819–826 (2010). https://doi.org/10.1016/j.procs.2010.04.089
27. Geers, M.G.D., Kouznetsova, V.G., Matouš, K., Yvonnet, J.: Homogenization Methods and Multi-
scale Modeling: Nonlinear Problems, Wiley, Ltd, p. 1–34. https://doi.org/10.1002/9781119176817.
ecm2107 (2017)
R. Cimrman et al.
28. Geus, R., Wheeler, D., Orban, D.: Pysparse documentation. http://pysparse.sourceforge.net, Accessed
25 September 2018 (2018)
29. de Geus, T.W.J., Vondřejc, J., Zeman, J., Peerlings, R.H.J., Geers, M.G.D.: Finite strain fft-
based non-linear solvers made simple. Comput. Methods Appl. Mech. Eng. 318, 412–430 (2017).
https://doi.org/10.1016/j.cma.2016.12.032
30. git: The git project web site. https://git-scm.com, Accessed 25 September 2018 (2018)
31. github: Github web site. https://github.com, Accessed 25 September 2018 (2018)
32. Group TH: Hierarchical data format version 5. http://www.hdfgroup.org/HDF5, Accessed 25 Septem-
ber 2018 (2018)
33. Henderson, A.: ParaView guide, a parallel visualization application. Kitware Inc, New York (2007)
34. Hunter, J.D.: Matplotlib: A 2D graphics environment. Comput. Sci. Eng. 9(3), 90–95 (2007).
https://doi.org/10.1109/MCSE.2007.55
35. Jones, E., Oliphant, T.E., Peterson, P., et al.: SciPy: open source scientific tools for Python. http://
www.scipy.org, Accessed 25 September 2018 (2018)
36. Kitware, I.nc.: The Visualization Toolkit User’s Guide. Kitware, Inc. Publishers., iSBN 1-930934-18-
1 (2010)
37. Kochová, P., Cimrman, R., Stengl, M., Ošťádal, B., Tonar, Z.: A mathematical model of the carp
heart ventricle during the cardiac cycle. J. Theor. Bio. 373, 12–25 (2015). https://doi.org/10.1016
/j.jtbi.2015.03.014
38. Kondov, I., Surmann, G. (eds.): Multiscale modelling methods for applications in materials science:
CECAM tutorial, 16 - 20 September 2013, Forschungszentrum Jülich; lecture notes. Schriften des
Forschungszentrums Jülich IAS series, Forschungszentrum, Zentralbibliothek (2013)
39. Logg, A.: Efficient representation of computational meshes. Int. J. Comput. Sci. Eng. 4(4), 283–295
(2009). https://doi.org/10.1504/IJCSE.2009.029164
40. Matouš, K., Geers, M.G., Kouznetsova, V.G., Gillman, A.: A review of predictive nonlinear the-
ories for multiscale modeling of heterogeneous materials. J. Comput. Phys. 330, 192–220 (2017).
https://doi.org/10.1016/j.jcp.2016.10.070
41. Meurer, A., Smith, C.P., Paprocki, M., Čertı́k, O., Kirpichev, S.B., Rocklin, M., Kumar, A., Ivanov,
S., Moore, J.K., Singh, S., Rathnayake, T., Vig, S., Granger, B.E., Muller, R.P., Bonazzi, F., Gupta,
H., Vats, S., Johansson, F., Pedregosa, F., Curry, M.J., Terrel, A.R., Roučka, Š., Saboo, A., Fernando,
I., Kulal, S., Cimrman, R., Scopatz, A.: Sympy: symbolic computing in Python. Peer J. Comput. Sci.
3, e103 (2017). https://doi.org/10.7717/peerj-cs.103
42. Miller, R.E., Tadmor, E.B.: A unified framework and performance benchmark of fourteen multi-
scale atomistic/continuum coupling methods. Model. Simul. Mater. Sci. Eng. 17(5), 053001 (2009).
https://doi.org/10.1088/0965-0393/17/5/053001
43. Mosby, M., Matouš, K.: Hierarchically parallel coupled finite strain multiscale solver for modeling
heterogeneous layers: hierarchically parallel multiscale solver. Int. J. Numer. Methods Eng. 102(3–4),
748–765 (2015). https://doi.org/10.1002/nme.4755
44. Moulinec, H., Suquet, P.: A fast numerical method for computing the linear and nonlinear mechanical
properties of composites. Comptes Rendus de l’Académie des Sciences 318(11), 1417–1423 (1994).
série II, Mécanique, physique, chimie, astronomie
45. Muntean, A., Chalupecky, V.: Homogenization Method and Multiscale Modeling MI Lecture Note
Series, Faculty of Mathematics, Kyushu University (2011)
46. Oliphant, T.E.: Python for scientific computing. Comput. Sci. Eng. 9(3), 10–20 (2007)
47. Patzák, B., Rypl, D., Kruis, J.: Mupif – a distributed multi-physics integration tool. Adv. Eng. Softw.
60–61, 89–97 (2013). https://doi.org/10.1016/j.advengsoft.2012.09.005
48. pytables: Pytables web site. https://www.pytables.org, Accessed 25 September 2018 (2018)
49. Ramachandran, P., Varoquaux, G.: Mayavi: 3d visualization of scientific data. Comput. Sci. Eng.
13(2), 40–51 (2011). https://doi.org/10.1109/MCSE.2011.35
50. Rathgeber, F., Ham, D., Mitchell, L., Lange, M., Luporini, F., Mcrae, A., Bercea, G.T., Markall, G.,
Kelly, P.: Firedrake: automating the finite element method by composing abstractions. ACM T Math.
Softw. 43(3), 24:1–24:27 (2016). https://doi.org/10.1145/2998441
51. Rohan, E., Cimrman, R.: Multiscale FE simulation of diffusion-deformation processes in homog-
enized dual-porous media. Math Comput. Simul. 82(10), 1744–1772 (2012). https://doi.org/10.10
16/j.matcom.2011.02.011
52. Rohan, E., Lukeš, V.: Homogenization of the vibro–acoustic transmission on perforated plates. arXiv:
1901.00202 [physics.comp-ph] (2019)
Multiscale finite element calculations in Python using SfePy
53. Rohan, E., Lukeš, V.: Homogenization of the acoustic transmission through a perforated layer. J.
Comput. Appl. Math 234(6), 1876–1885 (2010). https://doi.org/10.1016/j.cam.2009.08.059
54. Rohan, E., Lukeš, V.: Homogenization of the fluid-saturated piezoelectric porous media. Int. J. Solids
Struct. 147, 110–125 (2018). https://doi.org/10.1016/j.ijsolstr.2018.05.017
55. Rohan, E., Miara, B.: Band gaps and vibration of strongly heterogeneous Reissner-Mindlin elastic
plates. C R Math 349(13–14), 777–781 (2011). https://doi.org/10.1016/j.crma.2011.05.013
56. Rohan, E., Cimrman, R., Lukeš, V.: Numerical modelling and homogenized constitutive law of
large deforming fluid saturated heterogeneous solids. Comput. Struct. 84(17–18), 1095–1114 (2006).
https://doi.org/10.1016/j.compstruc.2006.01.008
57. Rohan, E., Cimrman, R., Naili, S., Lemaire, T.: Multiscale modelling of compact bone based
on homogenization of double porous medium. In: Computational plasticity x - fundamentals and
applications (2009a)
58. Rohan, E., Miara, B., Seifrt, F.: Numerical simulation of acoustic band gaps in homogenized elastic
composites. Int. J. Eng. Sci. 47(4), 573–594 (2009b). https://doi.org/10.1016/j.ijengsci.2008.12.003
59. Rohan, E., Naili, S., Cimrman, R., Lemaire, T.: Hierarchical homogenization of fluid satu-
rated porous solid with multiple porosity scales. C R Mecanique 340(10), 688–694 (2012a).
https://doi.org/10.1016/j.crme.2012.10.022
60. Rohan, E., Naili, S., Cimrman, R., Lemaire, T.: Multiscale modeling of a fluid saturated medium
with double porosity: relevance to the compact bone. J. Mech. Phys. Solids 60(5), 857–881 (2012b).
https://doi.org/10.1016/j.jmps.2012.01.013
61. Schneider, M., Ospald, F., Kabel, M.: Computational homogenization of elasticity on a staggered grid.
Int. J. Numer. Methods Eng. 105(9), 693–720 (2016). https://doi.org/10.1002/nme.5008
62. scikit-umfpack: skikit-umfpack web site. https://github.com/scikit-umfpack/scikit-umfpack,
Accessed 25 September 2018 (2018)
63. sfepy: The SfePy project web site. http://sfepy.org, Accessed 25 September 2018 (2018)
64. Solin, P., Segeth, K., Dolezel, I.: Higher-order finite element methods. CRC Press, Boca Raton (2003)
65. sphinx: Sphinx web site. http://www.sphinx-doc.org, Accessed 25 September 2018 (2018)
66. Talebi, H., Silani, M., Bordas, S.P.A., Kerfriden, P., Rabczuk, T.: A computational library for multi-
scale modeling of material failure. Comput. Mech. 53(5), 1047–1071 (2014). https://doi.org/10.100
7/s00466-013-0948-2
67. travis-ci: Travis-ci web site. https://travis-ci.org, Accessed 25 September 2018 (2018)
68. Vackář, J., Čertı́k, O., Cimrman, R., Novák, M., Šipr, O., Plešek, J.: Advances in the Theory
of Quantum Systems in Chemistry and Physics. Prog. T. Chem, vol. 22, Springer, chap Finite
Element Method in Density Functional Theory Electronic Structure Calculations, pp. 199–217.
https://doi.org/10.1007/978-94-007-2076-3 12 (2011)
69. Wang, K., Sun, W.: A multiscale multi-permeability poroplasticity model linked by recursive
homogenizations and deep learning. Comput. Methods Appl. Mech. Eng. 334, 337–380 (2018).
https://doi.org/10.1016/j.cma.2018.01.036
70. Weinan, E., Engquist, B.: The heterogeneous multi-scale method for homogenization problems.
In: Engquist, B., Runborg, O., Lötstedt, P. (eds.) Multiscale Methods in Science and Engineering,
Springer Berlin Heidelberg, Lecture Notes in Computational Science and Engineering, pp. 89-110
(2005)
71. Wheeler, D., Brough, D., Fast, T., Kalidindi, S., Reid, A.: PYMKS: materials knowledge sys-
tem in Python. https://doi.org/10.6084/m9.figshare.1015761.v2. https://figshare.com/articles/pymks/
1015761 (2014)
72. Wu, B., Du, X., Tan, H.: A three-dimensional FE nonlinear analysis of membranes. Comput. Struct.
59(4), 601–605 (1996). https://doi.org/10.1016/0045-7949(95)00283-9
73. Zeman, J., de Geus, T.W.J., Vondřejc, J., Peerlings, R.H.J., Geers, M.G.D.: A finite element per-
spective on nonlinear FFT-based micromechanical simulations. Int. J. Numer. Methods Eng. 111(10),
903–926 (2017). https://doi.org/10.1002/nme.5481
74. Zemčı́k, R., Rolfes, R., Rose, M., Tessmer, J.: High-performance 4-node shell element with piezo-
electric coupling. Mech. Adv. Mater Struct. 13(5), 393–401 (2006). https://doi.org/10.1080/15376
490600777657
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps
and institutional affiliations.