Skip to main content

SolidsPy: 2D-Finite Element Analysis with Python

PyPI download Documentation Status Downloads frequency image

A simple finite element analysis code for 2D elasticity problems. The code uses as input simple-to-create text files defining a model in terms of nodal, element, material and load data.

Features

  • It is based on an open-source environment.
  • It is easy to use.
  • The code allows to find displacement, strain and stress solutions for arbitrary two-dimensional domains discretized into finite elements and subject to point loads.
  • The code is organized in independent modules for pre-processing, assembly and post-processing allowing the user to easily modify it or add features like new elements or analyses pipelines.
  • It was created with academic and research purposes.
  • It has been used to tech the following courses:
    • Introduction to Solid Mechanics.
    • Computational Modeling.
    • Introduction to the Finite Element Methods.
    • Introduction to Soil Mechanics.

Installation

The code is written in Python and it depends on numpy, and scipy and. It has been tested under Windows, Mac, Linux and Android.

To install SolidsPy open a terminal and type:

pip install solidspy

To specify through a GUI the folder where the input files are stored you will need to install easygui.

To easily generate the required SolidsPy text files out of a Gmsh model you will need meshio.

These two can be installed with:

pip install easygui
pip install meshio

How to run a simple model

For further explanation check the docs.

Let's suppose that we have a simple model represented by the following files (see tutorials/square example for further explanation).

  • nodes.txt
    0  0.00  0.00   0  -1
    1  2.00  0.00   0  -1
    2  2.00  2.00   0   0
    3  0.00  2.00   0   0
    4  1.00  0.00  -1  -1
    5  2.00  1.00   0   0
    6  1.00  2.00   0   0
    7  0.00  1.00   0   0
    8  1.00  1.00   0   0
  • eles.txt
    0   1   0   0   4   8   7
    1   1   0   4   1   5   8
    2   1   0   7   8   6   3
    3   1   0   8   5   2   6
  • mater.txt
    1.0  0.3
  • loads.txt
    3  0.0  1.0
    6  0.0  2.0
    2  0.0  1.0

Run it in Python as follows:

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

For Mac users it is suggested to use an IPython console to run the example.

License

This project is licensed under the MIT license. The documents are licensed under Creative Commons Attribution License.

Citation

To cite SolidsPy in publications use

Nicolás Guarín-Zapata, Juan Gomez (2023). SolidsPy: Version 1.1.0 (Version v1.1.0). Zenodo. https://doi.org/10.5281/zenodo.7694030

A BibTeX entry for LaTeX users is

@software{solidspy,
 title = {SolidsPy: 2D-Finite Element Analysis with Python},
 version = {1.1.0},
 author = {Guarín-Zapata, Nicolás and Gómez, Juan},
 year = 2023,
 keywords = {Python, Finite elements, Scientific computing, Computational mechanics},
 abstract = {SolidsPy is a simple finite element analysis code for 2D elasticity
 problems. The code uses as input simple-to-create text files defining a model
 in terms of nodal, element, material and load data.},
 url = {https://github.com/AppliedMechanics-EAFIT/SolidsPy},
 doi = {https://doi.org/10.5281/zenodo.7694030}
}

Metadata

Release files for solidspy 1.1.0.post1

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

Source distribution (sdist)

Source distribution for solidspy 1.1.0.post1
File Size Uploaded
solidspy-1.1.0.post1.tar.gz 30.8 kB Details

Release files / solidspy-1.1.0.post1.tar.gz

Download URL solidspy-1.1.0.post1.tar.gz
Size 30.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8e3c065394bdb30478bbd3bffe739318cfc34c7f1ecabb873fb35cdee29e2480
BLAKE2b-256 checksum
How to use checksums
e1088e44037de6c971c7ad4157928ad79eadb401d2d223a3efcb1d7137439434
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.9

Release history Release notifications | RSS feed

This release

1.1.0.post1 This release

1 release file

1.0.16

1 release file

1.0.15

1 release file

1.0.14

1 release file

1.0.12

1 release file

1.0.11

2 release files

1.0.10

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

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