Skip to content

1. Getting Started

Craig edited this page Mar 24, 2022 · 10 revisions

Installing and Upgrading with pip

You can use pip to install the most recent PyNite package available on PyPI. The PyPI package is the latest stable version. PyNite can be installed from the command line using pip as follows:

$ pip install PyNiteFEA

A common mistake is to use the command $ pip install PyNite. This will install a different package entirely. Make sure to include the suffix FEA.

If you already have PyNite installed, you can easily upgrade to the latest version using pip. Use the following command from the command line:

$ pip install --upgrade PyNiteFEA

Installing without pip

Alternatively, the PyNite folder on the Code page contains all the files necessary to run PyNite. Just download or clone it into your project directory or into your python path and you're set. Using this method will allow you to stay current with the latest changes to PyNite (for better or worse) between PyPI updates.

Important Notes about PyNite's Dependencies

You also need to install several dependencies for PyNite to work. The required basic dependencies (numpy, matplotlib, prettytable) will be installed by pip.

I also recommend installing scipy via $ pip install scipy. This will allow use of PyNite's sparse matrix solver, which is much faster and uses less memory than the dense matrix solver. By default, PyNite is set up to analyze with the sparse solver, so you may see errors unless you install it, or pass the command sparse=False to the solver. scipy is not installed by default to provide compatibility with Blender.

If you want to use the visualization tools, you'll need to also install VTK (Visualization Toolkit). VTK can be installed using the command $ pip install vtk. VTK requires a 64-bit version of Python. Also, VTK's updates lag behind Python's so the latest version of Python may not be compatible with VTK. At the time of this writing (1/11/2022), I recommend using Python version 3.9.9 (64-bit).

Importing PyNite

Once you've installed PyNite, import PyNite like you would any other Python library. At this point of development, the FEModel3D class contains everything you need to import.

Example:

from PyNite import FEModel3D

Creating a Model

Use the FEModel3D class to create finite element models.

Example:

myModel = FEModel3D()