General-purpose finite element solver - pyfe3d#

The pyfe3d module is a general-purpose finite element solver for structural analysis and optimization based on Python and Cython. The main principles guiding the development of pyfe3d are: simplicity, efficiency and compatibility. The aimed level of compatibility allows one to run this solver in any platform, including the Google Colab environment.

With pyfe3d you can build models of:

all with six degrees of freedom per node, whose element matrices are written into sparse arrays: the linear constitutive stiffness matrix, the non-linear constitutive and geometric stiffness matrices, the mass matrix and, for the quadrilaterals, the aerodynamic matrices of the piston theory. With the solvers of pyfe3d.solver you can run:

  • Linear static analyses, \(\boldsymbol{K}_{C0} \boldsymbol{u} = \boldsymbol{f}\), with solve() or Analysis

  • Linear static analyses of unsupported structures with inertia relief, balancing the loads with the inertia forces of the rigid-body acceleration, with apply_inertia_relief(), see Inertia relief

  • Linear buckling analyses, \((\boldsymbol{K}_{C0} + \lambda \boldsymbol{K}_G) \boldsymbol{u} = \boldsymbol{0}\), with linear_buckling()

  • Natural frequency analyses, \((\boldsymbol{K}_{C0} - \omega_n^2 \boldsymbol{M}) \boldsymbol{u} = \boldsymbol{0}\), with natural_frequency(), and complex frequencies of damped systems, \((\lambda^2 \boldsymbol{M} + \lambda \boldsymbol{C} + \boldsymbol{K}) \boldsymbol{u} = \boldsymbol{0}\), with complex_frequency()

  • Geometrically non-linear static analyses with Analysis, using the Newton-Raphson method or the arc-length methods of Riks and of Crisfield, with Crisfield’s convergence criterion, configuration-dependent loads and prescribed displacements, and with large rotations through the element-independent co-rotational formulation of pyfe3d.corotational

The eigenvalue solvers verify their results and use a dense solver only as a last resort, see Eigenvalue solvers and their verification.

Code repository#

saullocastro/pyfe3d

User guide#

Analyses and solvers#

pyfe3d API#

Installing pyfe3d#

Install the distributed binaries by simply doing:

python -m pip install pyfe3d

or, from the source code, with a C++ compiler:

python -m pip install .

See Installation and building for building in place, running the tests and building this documentation, and Repository structure for the layout of the repository.

Changelog

License#

Copyright (c) 2021-2026, Saullo G. P. Castro (S.G.P.Castro@tudelft.nl)
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

AUTHORS#

Saullo G. P. Castro, S.G.P.Castro@tudelft.nl

Citing this library#

Saullo G. P. Castro. (2026). General-purpose finite element solver based on Python and Cython (Version 0.12.2). Zenodo. DOI: https://doi.org/10.5281/zenodo.6573489.

The DOI represents all the versions and resolves to the latest one. The repository also has a CITATION.cff file with the same data.

Indices and tables#