Skip to main content

Simple Finite Element Analysis in Python

Build Status PyPI - Downloads GitHub code size in bytes GitHub last commit GitHub

An easy to use elastic 3D structural engineering finite element analysis library for Python.

Current Capabilities

  • 3D static analysis of elastic structures.
  • P-Δ analysis of frame type structures.
  • Member point loads, linearly varying distributed loads, and nodal loads are supported.
  • Classify loads by load case and create load combinations from load cases.
  • Produces shear, moment, and deflection results and diagrams for each member.
  • Tension-only and compression-only elements.
  • Spring elements: two-way, tension-only, and compression-only.
  • Spring supports
  • Quadrilateral plate elements (based on an isoparametric formulation).
  • Rectangular plate elements (based on a 12-term polynomial formulation).
  • Basic meshing algorithms for some common shapes.
  • Reports support reactions.
  • Rendering of model geometry, supports, load cases, load combinations, and deformed shapes.
  • Generates PDF reports for models and model results.

Project Objectives

As I've gotten into the structural engineering profession, I've found there's a need for an easy to use open-source finite element package. I hope to help fill that need by prioritizing the following:

  1. Accuracy: There are no guarantees PyNite is error free, but accuracy and correctness are a priority. When bugs or errors are identified, top priority will be given to eliminate them. PyNite's code is frequently reviewed, and its output is tested against a suite of textbook problems with known solutions using continuous integration (CI) anytime a change to the code base is made. If you do happen to find an error, please report it as an issue.

  2. Simplicity: There are other finite element alternatives out there with many more capabilities, but they are often lacking in documentation, written in outdated languages, or require extensive knowledge of finite element theory and/or element formulations to use. PyNite is not intended to be the most technically advanced solver out there. Rather, the goal is to provide a robust yet simple general purpose package.

  3. Improvement: I plan to continue supporting PyNite for many years to come. There are a lot of pieces I'd like to add to PyNite going forward. There's a lot of potential to create extensions as well to solve all kinds of engineering problems. There are more problems to solve than I have time for, so some priorities will have to be made. The plan is to keep PyNite mainstream, adding core functionality first. Occasionally however I may just add what interests me at the time.

  4. Collaboration: The intent is to keep PyNite free and open source. This will encourage future development and contributions. Keeping it open source will allow anyone to inspect and improve the code it runs on. If you see an area you think you can help PyNite improve in you are encouraged to contribute. I'd like to get PyNite doing a lot more. Don't be offended if I'm a little slow to accept your contributions. FEA is a very technical subject and accuracy is extremely important to me. Sometimes I'm a little slow understanding both FEA and Python and it takes some time for me to comprehend what's being proposed. I also have a young family to take care of that takes first priority.

Support

Whether you just need help getting started with PyNite, or are looking to build something more complex, there are a few resources available:

  • The examples in the "Examples" folder in this repository cover a variety of simple problems. The comments in the examples provide additional guidance on how PyNite works.
  • The wiki in this repository provides basic guidance on how to use PyNite.
  • If you're looking for more direct guidance on using PyNite, or for help coding a project, I am available on a private consulting basis. You can reach out to me directly at Building.Code@outlook.com to discuss options.

Dependencies

PyNite depends on the following packages:

Required Dependencies

  • numpy: used for matrix algebra and dense matrix solver
  • scipy: used for sparse matrix solver to improve solution speed
  • matplotlib: used for plotting member diagrams
  • PrettyTable : used to format tabular output

Optional Dependencies

  • VTK: Used for visualization - Note that VTK is a little picky about which version of Python you are running. You must run a 64 bit installation of Python, rather than a 32 bit version. VTK is published by Kitware. I've noticed Kitware takes a little time updating VTK to be compatible anytime a new version of Python is released. If you're having trouble installing VTK, you can see which versions of Python are supported by visiting https://pypi.org/project/vtk/#files. VTK does not need to be installed if you don't plan to use the visualization tools built into PyNite.
  • PDFKit: Used for generating pdf reports. In order to generate pdf reports, PDFKit requires you to have wkhtmltopdf installed on your computer. This is a free program available for download at https://wkhtmltopdf.org/downloads.html. Once installed, you'll need to help PyNite find it. On Windows, this can be done by setting your PATH environment variable to include the path to "wkhtmltopdf.exe" after installation. For example, mine is installed at "C:\Program Files\wkhtmltopdf\bin"
  • jinja2: Used for templating reports into HTML prior to HTML-to-pdf conversion.
  • jupyterlab: Only needed if you want to view the derivations used to build PyNite.
  • sympy: Only needed if you want to view the derivations used to build PyNite.

What's New?

v0.0.44

  • Many method and function names have been renamed to match the PEP8 style guide for Python. For now PyNite is backwards compatible, but deprecation warnings have been implemented for function names that will be disappearing in a future release. If you see deprecation warnings when you run your code, it's recommended to move your code over to the new method and function names given in the deprecation warnings. This is a big change that will affect most users. I don't plan to make changes this big very often, but PyNite was getting large and complex enough that I had to do it now or never. When I started PyNite I didn't know much about Python coding styles. This change brings the code into better conformance with normal conventions in Python.
  • The ClearLoads method (delete_loads going forward) wasn't deleting plate and quad loads. Fixed this issue.

Example Projects

Here's a list of projects that run on PyNite:

Metadata

Release files for PyNiteFEA 0.0.44

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyNiteFEA 0.0.44
File Size Uploaded
PyNiteFEA-0.0.44.tar.gz 75.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyNiteFEA 0.0.44
File Interpreter ABI Platform
PyNiteFEA-0.0.44-py3-none-any.whl Python 3 none any Details

Total release size: 161.5 kB

Release files / PyNiteFEA-0.0.44.tar.gz

Download URL PyNiteFEA-0.0.44.tar.gz
Size 75.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7ce29aa554af7c063cf9603cd940f9e484b842790c5b9363ea2b0f1787731abb
BLAKE2b-256 checksum
How to use checksums
3757c78ceaaa92a6839d18242a956f341ce7452c418668ca26b358d06ea58479
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release files / PyNiteFEA-0.0.44-py3-none-any.whl

Download URL PyNiteFEA-0.0.44-py3-none-any.whl
Size 86.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01d68938c21d3efd4c0f8b896b74831ec09c053ef2b40b02f8dad306353f3c7e
BLAKE2b-256 checksum
How to use checksums
265a5095697d2343a9c91e86b58a8485d4d0c1f65c3def56f7f49495846fcd94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release history Release notifications | RSS feed

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.96

2 release files

0.0.94

2 release files

0.0.93

2 release files

0.0.91

2 release files

0.0.90

2 release files

0.0.87

2 release files

0.0.85

2 release files

0.0.84

2 release files

0.0.82

2 release files

0.0.75

2 release files

0.0.74

2 release files

0.0.73

2 release files

0.0.72

2 release files

0.0.71

2 release files

0.0.69

2 release files

0.0.68

2 release files

0.0.67

2 release files

0.0.66

2 release files

0.0.61

2 release files

0.0.60

2 release files

0.0.59

2 release files

0.0.58

2 release files

0.0.57

2 release files

0.0.56

2 release files

0.0.55

2 release files

0.0.53

2 release files

0.0.51

2 release files

0.0.48

2 release files

0.0.47

2 release files

0.0.46

2 release files

This release

0.0.44 This release

2 release files

0.0.43

2 release files

0.0.42

2 release files

0.0.41

2 release files

0.0.40

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page