一个简单的有限元程序
solidsp的Python项目详细描述
二维弹性问题的一个简单有限元分析程序。 代码使用简单的输入来创建文本文件 根据节点、单元、材料和荷载数据定义模型。
- 文档:http://solidspy.readthedocs.io
- github:https://github.com/AppliedMechanics-EAFIT/SolidsPy
- 圆周率:https://pypi.org/project/solidspy/
- 免费开源软件:MIT license
功能
- 它基于一个开源环境。
- 它很容易使用。
- 该规范允许找到位移、应变和应力解 任意二维区域离散成有限元 承受点荷载。
- 代码被组织成独立的模块,用于预处理、组装和 后处理允许用户轻松地修改它或添加类似的功能 新的元素或分析管道。
- 它是出于学术目的而创建的,用于教学:
- IC0285计算建模(EAFIT大学)。
- IC0602有限元方法简介(Universidad eafit)。
安装
代码是用python编写的,它依赖于numpy、scipy和 sympy。它已经在windows、mac、linux和android下进行了测试。
要安装solidspy请打开终端并键入:
pip install solidspy
要通过gui指定输入 文件已存储,您需要安装easygui。
这两个可以安装在:
pip install easygui pip install meshio
如何运行简单模型
有关进一步的解释,请检查docs。
假设我们有一个简单的模型 文件(请参见tutorials/square example 为进一步解释)。
- 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
用python运行它,如下所示:
importmatplotlib.pyplotasplt# load matplotlibfromsolidspyimportsolids_GUI# import our packagedisp=solids_GUI()# run the Finite Element Analysisplt.show()# plot contours
这在anaconda for mac os中无法正常工作。在那种情况下 建议使用ipython控制台运行该示例。
许可证
这个项目是根据MIT license授权的。文件是 根据Creative Commons Attribution License授权。
引文
要在出版物中引用solidspy,请使用
Juan Gómez, Nicolás Guarín-Zapata (2018). SolidsPy: 2D-Finite Element Analysis with Python, <https://github.com/AppliedMechanics-EAFIT/SolidsPy>.
乳胶用户的bibtex条目是
@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}}