Python Finite Element Method
Project description
pyfem
pyfem是一个完全基于python语言实现的极简有限元求解器。依赖的第三方库包括numpy、scipy和meshio等,主要用于有限元方法的学习、有限元算法验证和快速建立材料本构模型的程序原型。
Installation 安装
支持的操作系统包括:Windows,Linux和MacOS。
Recommend 推荐
Use the package manager pip to install pyfem:
使用pip命令安装:
pip install pyfem
If you have no root access on Linux/MacOS, please try
python -m pip install pyfem
Users in China can install pyfem from mirrors such as:
中国用户可以使用以下镜像:
From Source 基于源代码
git clone https://github.com/sunwhale/pyfem.git
cd pyfem
pip install .
or 或者
git clone https://github.com/sunwhale/pyfem.git
cd pyfem
python install.py
采用第二种方法需要将可执行文件或批处理文件写入环境变量。
Quickstart 快速开始
Run in command line 在命令行运行:
pyfem --help
Run the first example 执行第一个算例:
当前算例文件存储目录 examples/tutorial,该算例定义了一个二维平面应变模型,材料为塑性随动强化,载荷为y方向的循环拉伸-压缩。
cd examples/tutorial
pyfem -i Job-1.toml
后处理
算例计算完成后将在配置文件所在目录下生成 .pvd 或 .vtu文件,可以使用开源可视化软件 paraview 进行查看。
前处理
本项目暂不提供前处理模块,基于 meshio 库,可以识别gmsh、abaqus 和 ansys等有限元软件的网格文件。
Documents 帮助文档
https://pyfem-doc.readthedocs.io/
Development
ToDo list
- 增加Neumann边界条件,支持concentrated force,distributed和pressure定义方式
- 增加hdf5计算结果输出格式
- 完善帮助文档
- 完善输入文件的校检
- 增加测试模块
- 增加日志模块
- 增加后台运行模式
- 处理平面应力状态的面外应力平衡
- 增加粘弹性力学本构模型
- 增加晶体塑性力学本构模型
- 增加温度场求解单元
- 增加温度场-位移场耦合求解单元
- 增加相场-位移场耦合求解单元
- 增加内聚区单元
- 增加动力学求解器
- 建立前处理界面
Bug list
- 采用abaqus网格文件时,如果存在node不属于任何element则在计算时会导致全局刚度矩阵奇异。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyfem-0.2.0.tar.gz
(136.3 kB
view hashes)
Built Distribution
pyfem-0.2.0-py3-none-any.whl
(191.4 kB
view hashes)