General-purpose finite element solver - pyfe3d
Github Actions status:
Coverage status:
About 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.
Citing this library
Saullo G. P. Castro. (2026). General-purpose finite element solver based on Python and Cython (Version 0.12.0). Zenodo. DOI: https://doi.org/10.5281/zenodo.6573489.
Documentation
The documentation is available on: https://saullocastro.github.io/pyfe3d.
Important features of this library
- efficient and simple for linear and nonlinear analyses
- importable and cimportable code
- 6 degrees-of-freedom per node
- linear static analyses, also of unsupported structures with inertia
relief, balancing the loads with the inertia forces of the rigid-body
accelerations (
pyfe3d.solver.apply_inertia_relief) - linear buckling, natural frequency and damped (complex) frequency analyses, with verified eigenvalues
- geometrically non-linear static analyses with the Newton-Raphson method and the arc-length methods of Riks and Crisfield, configuration-dependent loads and prescribed displacements
- large rotations with the element-independent co-rotational formulation
of
pyfe3d.corotational, for every element - cross-sectional analysis of composite beams with
pyfe3d.vabs, whose 6x6 sectional stiffness matrix, with all its couplings, is taken by the beam elements
Available finite elements
-
'Quad4' - 4-node plate with linear interpolation, equivalent to Nastran's CQUAD4, with the MITC4 transverse shear of Dvorkin and Bathe (1984) by default. The recommended quadrilateral plate element.
-
'Quad4R' - 4-node plate with linear interpolation and one integration point, with the physical stabilisation of Belytschko and Leviathan (1994) for the bending and the transverse shear, and the hourglass control of Brockman (1987) for the membrane.
-
'Tria3DSG' - 3-node plate with linear interpolation and a discrete shear gap transverse shear field, after Bletzinger, Bischoff and Ramm (2000), free of shear locking by construction and without a tuning parameter, with a constant-strain membrane. The better choice on coarse meshes of doubly curved shells, where it is less stiff than Tria3R.
-
'Tria3R' - 3-node shell with linear interpolation, the recommended triangular element. Since 0.12.0 it takes the discrete shear gap transverse shear field of Tria3DSG by default, with the membrane enriched by the drilling rotations of Allman (1984), which makes it much better than Tria3DSG in in-plane bending. Its former transverse shear, sampled at the centroid and stabilised by
alpha_shear_locking, remains available withshear_model = 0, but it does not converge on thin plates and shells, see the element documentation. -
'BeamC' - 2-node Timoshenko beam element with consistent shape functions and analytical integration, exact under nodal loads for any sectional stiffness matrix. The recommended beam element.
-
'BeamLR' - 2-node Timoshenko beam element with linear interpolation and reduced integration.
-
'Spring' - 2-node spring element with 6 stiffenesses defined in the element coordinate system.
-
'Truss' - 2-node truss element with only axial and torsion stiffness. I recommend using the BeamLR instead, which is physically more consistent.
Development history
See CHANGELOG.md for the details of each version.
| Main versions | Changes |
|---|---|
| 0.12.0 | New module pyfe3d.vabs: variational asymptotic cross-sectional analysis (VABS) of prismatic beams with arbitrary cross sections and anisotropic materials, giving the classical 4x4 and the generalized Timoshenko 6x6 stiffness matrices, the tension and shear centres and the mass properties, with the conversion to the convention of pyfe3d and to a BeamProp; general 6x6 sectional stiffness matrix BeamProp.C of the beams, with BeamC exact under nodal loads for any coupling; new module pyfe3d.corotational, an element-independent co-rotational formulation for large rotations; inertia relief with apply_inertia_relief(); MITC4 transverse shear of Quad4 by default; physical hourglass stabilisation of Quad4R; discrete shear gap transverse shear of Tria3R by default; rigid offsets of warped quadrilaterals; eigenvalue solvers that complete missing eigenvalues. |
| 0.11.0 | Non-linear static solvers in pyfe3d.solver (Newton-Raphson, arc-length methods of Riks and Crisfield, Crisfield's convergence criterion as the default, with a round-off floor of the residual); damped (quadratic) eigenvalue solver complex_frequency(); fixed sign of the shear parameters of BeamC; fixed piston-theory slope of Quad4 and Quad4R; fixed MatLamina c11 and q31 and the 66 row of GradABD.calc_LP_grad; pyfe3d.shellprop mirrors composites.Laminate (breaking: force_* renamed make_*, get_transf_matrix_displ_to_lamina; new shear corrections, make_smeared, a posteriori transverse shear); derivation scripts in theory/. |
| 0.10.0 | New Tria3DSG element with discrete shear gap transverse shear, the recommended triangle; physics-based drilling stiffness (Allman, Hughes-Brezzi) as the default, with the K6ROT penalty kept through drilling_model; fixed lost K6ROT coefficient; new pyfe3d.solver module for linear buckling and natural frequencies; speedup with Cython and compiler flags. |
| 0.9.0 | Shear correction factors as per Rohwer and Vlachoutsis. |
| 0.8.0 | KCNL matrix for all elements, with more accurate nonlinear analyses; fixed KC0 and KG for beams; fixed KC0 for Tria3R. |
| 0.7.0 | Drilling stiffness re-coupled with in-plane rotation using K6ROT; fixed drilling stiffness integration; restored missing pid attribute. |
| 0.6.4 | Internal force vectors (finte) for all elements; fixed drilling stiffness (K6ROT) scaling; added Python 3.14 and removed Python 3.8 support; Linux wheels limited to 64-bit; Exposed update_probe_finte to Python; new documentation examples. |
| 0.5.2 | New Quad4 element; K6ROT drilling stiffness; probe.update_BL; removed alg3dpy dependency; topology optimization tutorial |
| 0.4.28 | Piston theory aerodynamics for Quad4R; fixed array casting on some systems; Quad4R less sensitive to small element sizes; new pid attribute for elements; exposed element orientation vectors; Python 3.12 support; fixed build for Linux and macOS wheels. |
| 0.3.24 | New Tria3R element; fixed BeamC formulation; fixed beam torsion stiffness; fixed lamination parameters and added their gradients; fixed lumped mass for Tria3R; removed dependency on the NumPy C API; OpenMP build fixes; improved Zenodo metadata and documentation layout; Python 3.10 support. |
| 0.2.8 | Material coordinate systems for plate elements; Fixed Truss mass matrix; more aggressive Cython directives; license changed to 3-clause BSD; license info in README, author metadata updates. |
| 0.1.16 | New Spring element; Rotation matrices using direct rij terms instead of Euler angles; renamed update_xe to update_probe_xe; probe made a public attribute; KG with a given stress state; renamed update_ue to update_probe_ue |
| 0.1.3 | First release: Quad4R, BeamC, BeamLR and Truss elements; shell properties; linear buckling |
Installing pyfe3d
First, you should try to install from the distributed binaries by simply doing:
python -m pip install pyfe3d
If a distribution could not be found, you can try to install from the source code using:
python -m pip install .
Another alternative is the following:
python -m pip install -r requirements.txt
python -m pip install --no-build-isolation .
If none of the above alternatives worked for you, this link shares some information on how to set up a C compiler on different operating systems:
https://cython2.readthedocs.io/en/latest/src/quickstart/install.html
License
Distrubuted under the 3-Clause BSD license (https://raw.github.com/saullocastro/pyfe3d/main/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.
Contacts:
- Saullo G. P. Castro, S.G.P.Castro@tudelft.nl
Metadata
Release files for pyfe3d 0.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyfe3d-0.12.0.tar.gz | 5.2 MB | Without provenance | Details for pyfe3d-0.12.0.tar.gz |
Built distributions (wheels)
Total release size: 182.7 MB
Release files / pyfe3d-0.12.0.tar.gz
| Download URL | pyfe3d-0.12.0.tar.gz |
|---|---|
| Size | 5.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b9f1c8d437157d190adb9cade85e2105cb0e7f64ea351fc0cb3441c9bc1c709
|
|
BLAKE2b-256 checksum How to use checksums |
08fb8cd18aeb5f47d505e9daccb97bb6f38aa582f165172e606daf1dbc4a4087
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.9
|
Release files / pyfe3d-0.12.0-cp314-cp314-win_amd64.whl
| Download URL | pyfe3d-0.12.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
af60d88c45977c9646ffd697c09b061b0fe2b1955de2786e1d1de4af6eb83029
|
|
BLAKE2b-256 checksum How to use checksums |
0fc26491cf8e21af3ceb7ebf9f0b66f17a2475d77bbd9aa37c8a457b09916993
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.9
|
Release files / pyfe3d-0.12.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyfe3d-0.12.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 18.8 MB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
793a142da8eaaaa853883b494b6e0eeb485a13cf39e5d9b889f15918ba502a28
|
|
BLAKE2b-256 checksum How to use checksums |
4d791e71540d5f8767ae75353a31ee68ee22f95afce295be7af5a17a9d2e0294
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.9
|
Release files / pyfe3d-0.12.0-cp314-cp314-macosx_10_15_universal2.whl
| Download URL | pyfe3d-0.12.0-cp314-cp314-macosx_10_15_universal2.whl |
|---|---|
| Size | 9.7 MB |
| Tags | CPython 3.14 macOS 10.15+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
fc4111c5ad898c3c14f464191170701444065f1d2342a1ba0128f2020e50c141
|
|
BLAKE2b-256 checksum How to use checksums |
b06a9dfcb81f204af47d82b7846794fb6b9c646faeeaf2a9760a5385412a6e7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.9
|
Release files / pyfe3d-0.12.0-cp313-cp313-win_amd64.whl
| Download URL | pyfe3d-0.12.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5f77cb5975213506fd68b24bcd4feae08a2253fa3390beab4c63988a3b4e75f8
|
|
BLAKE2b-256 checksum How to use checksums |
85b1ffe89849111665d8763d48377a77d168753d05d6c74f53559e4015317ac2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / pyfe3d-0.12.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyfe3d-0.12.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 18.8 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
a0528759b4c52dda8c30b0cf630311d5db85f21b3eb8ccf2b380428d2b30ea29
|
|
BLAKE2b-256 checksum How to use checksums |
9e075a3f0442ca1fbabc80660adb5a40bc9278460f5d9e44fe4ab60ab70c96a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.9
|
Release files / pyfe3d-0.12.0-cp313-cp313-macosx_10_13_universal2.whl
| Download URL | pyfe3d-0.12.0-cp313-cp313-macosx_10_13_universal2.whl |
|---|---|
| Size | 9.6 MB |
| Tags | CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
2fa9deff6a1352d1bab3f1d0a8b160ffa22ff577db6c57a4e77a15e22e81425e
|
|
BLAKE2b-256 checksum How to use checksums |
9686ec28cde9bbda4d22d4bb6bb3a6d5bdf8c8ec1047a99cef381b50cfb37bc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.17
|
Release files / pyfe3d-0.12.0-cp312-cp312-win_amd64.whl
| Download URL | pyfe3d-0.12.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2b44cd86fe84dbf81a76dc23e116dc74c1e1134944ffc46aa61c8498b9cb731a
|
|
BLAKE2b-256 checksum How to use checksums |
0956d109314ae853a8385a1f95e05ed8c5ec9062f715bc0ffc1be5b81704e737
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / pyfe3d-0.12.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyfe3d-0.12.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 18.9 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
0928c456673e1ad4e1b5605bd0c50faf8937b6f6ddc55b9d645ed43f3652a0cf
|
|
BLAKE2b-256 checksum How to use checksums |
10f54c9adadfd3ed8c274c3becc19bb378627f0c64f8a73659fa914f3c309ce5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.9
|
Release files / pyfe3d-0.12.0-cp312-cp312-macosx_10_13_universal2.whl
| Download URL | pyfe3d-0.12.0-cp312-cp312-macosx_10_13_universal2.whl |
|---|---|
| Size | 9.6 MB |
| Tags | CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
78ac3b1efd1ba2d3c38f25df790b8cf7e508c0ea78f1aa290895dd4f152e1131
|
|
BLAKE2b-256 checksum How to use checksums |
2a377bb08bb1de807e5d4f9f81946072a6a22b92c591bcdd01cd3208b5eb9c9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / pyfe3d-0.12.0-cp311-cp311-win_amd64.whl
| Download URL | pyfe3d-0.12.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 7.1 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
59b24a8ef46dac91da524057a6e87f9837b12f745606dd59cdde1d9e5e9080e2
|
|
BLAKE2b-256 checksum How to use checksums |
38f72acfaf6bbcf1ab162c1fc0aeb1db8719e0eb91b7425df844000e5a940cd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / pyfe3d-0.12.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyfe3d-0.12.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 19.1 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
30672eb753dee3555df089336ff270e2a88f84619735acb6b87a0be25cf3a12a
|
|
BLAKE2b-256 checksum How to use checksums |
8d027d2f9826afae1b629313231f1d6c9f23e913fb51c4025bf3119ae9deafb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.9
|
Release files / pyfe3d-0.12.0-cp311-cp311-macosx_10_9_universal2.whl
| Download URL | pyfe3d-0.12.0-cp311-cp311-macosx_10_9_universal2.whl |
|---|---|
| Size | 9.6 MB |
| Tags | CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
555d87bae388e27bc26f73a6f2829994e2f71b88161d17d35b91de2027fe2d08
|
|
BLAKE2b-256 checksum How to use checksums |
28499d9be0806960dc77312540d7596665bca210940d1edfd1a1d194ddfd53ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / pyfe3d-0.12.0-cp310-cp310-win_amd64.whl
| Download URL | pyfe3d-0.12.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 7.1 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
35ceba441b16efe9ecba30affa9fa46b4f65f282ccfd560efc88c212543e01c4
|
|
BLAKE2b-256 checksum How to use checksums |
7eb191dc44d181460568a9c9ba367f3b9017e13d6dce1c4ed5e485d9698dff9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Release files / pyfe3d-0.12.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyfe3d-0.12.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 18.6 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
06e9ef9220be4b4da8dfacdee50f508b705a35be788ab84e414d0c62ffd74703
|
|
BLAKE2b-256 checksum How to use checksums |
944fd13d669508f27bf157364d9d9ee38f0542ebb911c4993cb39c16e6ccd50b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.9
|
Release files / pyfe3d-0.12.0-cp310-cp310-macosx_10_9_universal2.whl
| Download URL | pyfe3d-0.12.0-cp310-cp310-macosx_10_9_universal2.whl |
|---|---|
| Size | 9.6 MB |
| Tags | CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
fcb7f41f7fcf62ddfb85e18bb36ea06b6d930237e5d5615949228862c7072315
|
|
BLAKE2b-256 checksum How to use checksums |
34ce4e9118124078d70c417e07d9dcccccd804f330f163d3d959574de063581c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Security for pyfe3d 0.12.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.