1 Star 0 Fork 1

吉祥水/SolidsPy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

SolidsPy: 2D-Finite Element Analysis with Python

Wrench under bending.
PyPI download Documentation Status Downloads frequency

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:
    • IC0285 Computational Modeling (Universidad EAFIT).
    • IC0602 Introduction to the Finite Element Methods (Universidad EAFIT).

Installation

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

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

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}
}
MIT License Copyright (c) 2015 - 2018 Juan Gomez and Nicolás Guarín-Zapata Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

2D-Finite Element Analysis with Python 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jixiangshui/SolidsPy.git
git@gitee.com:jixiangshui/SolidsPy.git
jixiangshui
SolidsPy
SolidsPy
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385