Skip to main content

Python Finite Element Method

Project description

pyfem

pyfem是一个完全基于python语言实现的极简有限元求解器。依赖的第三方库包括numpy、scipy和meshio等,主要用于有限元方法的学习、有限元算法验证和快速建立材料本构模型的程序原型。

Github仓库:https://github.com/sunwhale/pyfem

Codacy Badge

Contact 联系方式

电子邮箱 E-mail:sunjingyu@imech.ac.cn

作者主页 Homepage: https://people.ucas.edu.cn/~sunjingyu

Installation 安装

支持的操作系统包括:Windows,Linux和MacOS。

Recommend 推荐

Use the package manager pip to install pyfem:

使用pip命令安装:

pip install -U pyfem

If you have no root access on Linux/MacOS, please try

如果你在Linux/MacOS上没有root访问权限,请尝试

python -m pip install -U 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

Using the "From Source" approach will generate executable files or batch files, which can then have their paths added to the system environment variables.

采用基于源代码的方法会生成可执行文件或批处理文件,可将其路径写入系统环境变量。

Quickstart 快速开始

Run in command line 在命令行运行:

pyfem --help

Run the first example 执行第一个算例:

当前算例文件存储目录 examples/tutorial,该算例定义了一个二维平面应变模型,材料为塑性随动强化,载荷为y方向的循环拉伸-压缩。

cd examples/tutorial
pyfem -i Job-1.toml

Postproc 后处理

算例计算完成后将在配置文件所在目录下生成 .pvd 或 .vtu文件,可以使用开源可视化软件 paraview 进行查看。

Preproc 前处理

本项目暂不提供前处理模块,基于 meshio 库,可以识别gmsh、abaqus 和 ansys等有限元软件的网格文件。

Documents 帮助文档

帮助文档中给出了详细的理论公式和函数说明。

Development 开发

ToDo list

  • 增加如何建立toml算例文件的帮助文档
  • 增加hdf5计算结果输出格式
  • 处理平面应力状态的面外应力平衡
  • 增加内聚区单元
  • 增加动力学求解器
  • 建立前处理界面

Bug list

  • 采用abaqus网格文件时,如果存在node不属于任何element则在计算时会导致全局刚度矩阵奇异。

Project details


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.5.tar.gz (135.7 kB view details)

Uploaded Source

Built Distribution

pyfem-0.2.5-py3-none-any.whl (196.1 kB view details)

Uploaded Python 3

File details

Details for the file pyfem-0.2.5.tar.gz.

File metadata

  • Download URL: pyfem-0.2.5.tar.gz
  • Upload date:
  • Size: 135.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for pyfem-0.2.5.tar.gz
Algorithm Hash digest
SHA256 3dce32d069878f72928b3a48dbbdf86cd664320ca45725c5b38787e10c97d23c
MD5 2136161623c8216c70395dea788f7677
BLAKE2b-256 63ee91140560a500db5b62417a797fefa9faefe81f27e66feb9fd3387030e845

See more details on using hashes here.

File details

Details for the file pyfem-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: pyfem-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 196.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for pyfem-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bce4c278efec75b02cfd726db8188745b50f08fc7b8b3201c54d526722656646
MD5 83862c99b25dc6927ab79722c27a7ed7
BLAKE2b-256 d15ba9bc6edf5b296af76a312f7b1438c993b2debaf09a329bd9157c6887fa65

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page