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.
The code is written in Python and it depends on numpy
, scipy
and
sympy
. 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
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.
This project is licensed under the MIT license. The documents are licensed under Creative Commons Attribution License.
To cite SolidsPy in publications use
Juan Gómez, Nicolás Guarín-Zapata (2018). SolidsPy: 2D-Finite Element Analysis with Python, <https://github.com/AppliedMechanics-EAFIT/SolidsPy>.
A BibTeX entry for LaTeX users is
@software{solidspy,
title = {SolidsPy: 2D-Finite Element Analysis with Python},
author = {Gómez, Juan and Guarín-Zapata, Nicolás},
year = 2018,
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}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。