Skip to content

jjcremmers/PyFEM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PyFEM: A Python Finite Element Code

Python Version License: MIT Documentation GitHub Stars GitHub Issues Cite

PyFEM is a Python-based finite element code designed for educational and research purposes in computational solid mechanics. The code emphasizes clarity and readability, making it ideal for learning, teaching, and prototyping finite element methods for nonlinear analysis.

✨ Features

  • Comprehensive Element Library: Continuum elements (2D/3D, small and finite strain), beam elements, plate elements, interface elements
  • Material Models: Linear elastic, plasticity with hardening, cohesive zone models for fracture
  • Nonlinear Solvers: Newton-Raphson, arc-length (Riks), explicit dynamics
  • I/O Capabilities: VTK output for ParaView, HDF5, text-based formats
  • Python API: Programmatic control for custom analyses and workflows
  • Multi-scale Modeling: RVE (Representative Volume Element) with periodic boundary conditions
  • Well-Documented: Extensive documentation with examples and developer guides

πŸ“š About the Book

PyFEM accompanies the textbook:

R. de Borst, M.A. Crisfield, J.J.C. Remmers and C.V. Verhoosel
Non-Linear Finite Element Analysis of Solids and Structures
John Wiley and Sons, 2012, ISBN 978-0470666449

Book Cover

The code is open source and intended for educational and scientific purposes. If you use PyFEM in your research, please cite the book in your publications.

πŸ“₯ Download and Installation

Requirements

  • Python 3.9 or higher
  • pip package manager
  • Git (for cloning the repository)

Quick Installation

# Clone the repository
git clone https://github.com/jjcremmers/PyFEM.git
cd PyFEM

# Install with pip
pip install .

Development Installation

For developers who want to make changes and test immediately:

git clone https://github.com/jjcremmers/PyFEM.git
cd PyFEM
pip install -e .

Virtual Environment (Recommended)

# Create and activate virtual environment
python3 -m venv pyfem-env
source pyfem-env/bin/activate  # Linux/macOS
# or
pyfem-env\Scripts\activate  # Windows

# Install PyFEM
pip install .

For detailed installation instructions including platform-specific notes, see the Installation Guide.

πŸš€ Quick Start

Command-Line Interface

Run a PyFEM analysis from the command line:

# Navigate to examples
cd examples/ch02

# Run an example
pyfem PatchTest.pro

View results in ParaView:

paraview PatchTest.pvd

πŸ“– Documentation

User Guide

Developer Guide

For contributors and those extending PyFEM:

API Reference

🎯 Example Gallery

PyFEM includes numerous examples organized by chapter from the book:

examples/
β”œβ”€β”€ ch02/    # Linear elasticity and patch tests
β”œβ”€β”€ ch03/    # Nonlinear analysis
β”œβ”€β”€ ch04/    # Isoparametric elements
β”œβ”€β”€ ch05/    # Element technology
β”œβ”€β”€ ch06/    # Plasticity
β”œβ”€β”€ ch09/    # Dynamics
β”œβ”€β”€ ch13/    # Contact mechanics
β”œβ”€β”€ ch15/    # Damage and fracture
β”œβ”€β”€ elements/ # Element-specific examples
β”œβ”€β”€ materials/ # Material model examples
β”œβ”€β”€ models/   # Special models (RVE)
└── plate/    # Plate and shell examples

Each directory contains input files (.pro), mesh files (.dat), and generates output files for visualization.

πŸ› οΈ Key Capabilities

Nonlinear Analysis

  • Geometrically nonlinear formulations
  • Material nonlinearity (plasticity, damage)
  • Path-following methods (arc-length)
  • Contact mechanics

Dynamic Analysis

  • Explicit time integration
  • Implicit dynamics
  • Modal analysis
  • Eigenvalue problems

Multi-Scale Modeling

  • Representative Volume Elements (RVE)
  • Periodic boundary conditions
  • Computational homogenization

Fracture Mechanics

  • Cohesive zone models
  • Interface elements
  • Crack propagation

🀝 Contributing

Contributions are welcome! Please see the Developer's Guide for:

  • Code style and conventions
  • Testing guidelines
  • Documentation requirements
  • Pull request process

To contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes and add tests
  4. Commit your changes (git commit -m 'Add amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

πŸ“ License

PyFEM is distributed under the MIT License. See LICENSE for details.

πŸ“§ Contact and Support

🌟 Citing PyFEM

If PyFEM contributes to a publication, please cite:

Software:

J.J.C. Remmers (2026). PyFEM - A Python Finite Element Code.
https://github.com/jjcremmers/PyFEM

Textbook:

R. de Borst, M.A. Crisfield, J.J.C. Remmers and C.V. Verhoosel (2012).
Non-Linear Finite Element Analysis of Solids and Structures, 2nd Edition.
John Wiley & Sons, ISBN 978-0470666449.

πŸ™ Acknowledgments

PyFEM is developed and maintained by:

  • Joris Remmers - Eindhoven University of Technology
  • Contributors and users from the computational mechanics community

The code accompanies the textbook by de Borst, Crisfield, Remmers, and Verhoosel, which provides the theoretical foundation for the implemented methods.

About

A Python finite element code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages