Skip to main content

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则在计算时会导致全局刚度矩阵奇异。

Metadata

Release files for pyfem 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyfem 0.4.1
File Size Uploaded Provenance Actions
pyfem-0.4.1.tar.gz 157.5 kB Without provenance Details for pyfem-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyfem 0.4.1
File Interpreter ABI Platform Actions
pyfem-0.4.1-py3-none-any.whl Python 3 none any Details for pyfem-0.4.1-py3-none-any.whl

Total release size: 397.1 kB

Release files / pyfem-0.4.1.tar.gz

Download URL pyfem-0.4.1.tar.gz
Size 157.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1757f9bef76529be0a8639cd461fc2679b67bc965b6db9b97c061115e0cb4112
BLAKE2b-256 checksum
How to use checksums
bccd014ebe005ca751347bb028b93b0bcb937455cbea581369cbf17c663d79ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.5

Release files / pyfem-0.4.1-py3-none-any.whl

Download URL pyfem-0.4.1-py3-none-any.whl
Size 239.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
feef6698309d68ef70c54e8365e9022a70b55a7a178dd18909f33e69448036ab
BLAKE2b-256 checksum
How to use checksums
7681988d3c759ec5dbeff2e3dbd6e57eaaa633d47ef31172c77cd5c37cf354a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.5

Security for pyfem 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page