Skip to main content

A simple Finite Element program

Project description

# SolidsPy: 2D-Finite Element Analysis with Python


![Wrench under bending.](./docs/img/wrench.png)

This _repo_ contains a simple finite element analysis code for 2D elasticity
problems. The code uses as input data simple-to-create text files containing
nodal, element, material and load data.

The _repo_ contains 3 main folders:

1. `solidspy/` stores the package routines:

- `solids_GUI.py`: run the program;
- `preprocesor.py` model input subroutines);
- `assemutil.py` (assembly subroutines);
- `femutil.py` (general finite element method subroutines);
- `uelutil.py` (local matrix subroutines for different elements; and
- `postprocesor.py` (results handling subroutines)

2. `meshes/` contains input files and meshes in `.msh` format corresponding to
different examples.

3. `docs/` contains the documentation files.

4. `examples/` contains some examples of the use of the package.

5. `tests/` contains unit testing.

## Authors
- [Juan David Gómez Cataño](http://www.eafit.edu.co/docentes-investigadores/Paginas/juan-gomez.aspx),
Professor at Universidad EAFIT.
- [Nicolás Guarín-Zapata](https://github.com/nicoguaro), PhD Student at
Purdue University.

## Installation
The code is written in Python and it depends on `numpy`, `scipy` and `sympy`.

To run the examples with GUI input you will need to install
[`easygui`](http://easygui.readthedocs.org/en/master/). And, you will
need [`meshio`](https://github.com/nschloe/meshio) to automatically read
[Gmsh](http://gmsh.info/) mesh files. These two can be installed with

pip install easygui
pip install meshio

To install _SolidsPy_ use

pip install solidspy

## Run a simple model
After installation, you can run an analysis in 3 easy steps (see [template](./docs/template/README.md)):
- Create the mesh using [Gmsh](http://gmsh.info/).
- Generate the model files (eles.txt, nodes.txt, mater.txt and loads.txt) using
a python script with the aid of [`meshio`](https://github.com/nschloe/meshio).
- Run it in Python

```python
import matplotlib.pyplot as plt # load matplotlib
from solidspy import solids_GUI # import our package
solids_GUI() # run the Finite Element Analysis
plt.show() # plot contours
```

## License
This project is licensed under the
[MIT license](http://en.wikipedia.org/wiki/MIT_License). The documents are
licensed under
[Creative Commons Attribution License](http://creativecommons.org/licenses/by/4.0/).

Since this project is used to teach Finite Element Methods and Computational
Mechanics, we have included some examples and documents and code snippets
developed by students. Their license is specified in each particular directory.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

solidspy-1.0.4-py2.py3-none-any.whl (20.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file solidspy-1.0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for solidspy-1.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cffb59d6ddb3714bf962dd60f39be42037c520fa9e39ff8eddfd12766a0d2094
MD5 f71b4eec8ccf24bacfdca128f812809b
BLAKE2b-256 e1c71d23840e1535e0f7370296f7fa9b0fb845d69a0a633be602deef4b5bde99

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page