A Finite Element Analysis (FEA) library and GUI written in Rust. Provides efficient, robust tools for solid mechanics simulations with both direct and explicit solving capabilities.
Try the Web Demo | Documentation
- Pure Rust - No external C dependencies; builds anywhere Rust builds
- Desktop & Web - Native app plus WebAssembly version (try it)
- Modern Solvers -
faer(Cholesky/LU) for direct solving, explicit time integration for dynamics/contact - Multiple Element Types - C3D8 (8-node brick), C3D20 (20-node quadratic brick), C3D4 (4-node tetrahedra)
- Contact Mechanics - Penalty method contact via explicit solver
- Section Cuts - Interactive clipping planes with 2D cross-section view and PNG export
- VTK Export - Standard VTK and pure-Rust VTK HDF output for ParaView
# Build the library
cargo build --release
# Run an example simulation
cargo run --bin read_input -- examples/tube_benchmark.toml -v
# Run the GUI (native desktop)
cargo run -p rust_fea_gui --releaseSee gui/README.md for GUI-specific documentation and WASM build instructions.
├── src/ # Core FEA library
│ ├── elements/ # Element formulations (C3D8, C3D20, C3D4)
│ ├── bc/ # Boundary conditions (fixed, load, contact, pressure)
│ ├── simulation/ # Simulation orchestration
│ ├── solver.rs # Direct sparse solver (faer)
│ └── io/ # File I/O (TOML, VTK, mesh formats)
├── gui/ # egui-based graphical interface
├── examples/ # Example simulations and mesh sources
├── test/ # Integration tests
├── benches/ # Criterion benchmarks
└── reports/ # Validation reports and comparisons
Import meshes in these formats:
.inp- Abaqus format (recommended via Gmsh).bin.xz,.json.xz,.bin,.json- RustFEA internal formats
Gmsh geometry files are in examples/mesh_src/*.geo.
| Element | Nodes | Order | Description |
|---|---|---|---|
| C3D8 | 8 | Linear | Hexahedral brick |
| C3D20 | 20 | Quadratic | Hexahedral brick with mid-edge nodes |
| C3D4 | 4 | Linear | Tetrahedral |
- Dirichlet - Fixed displacement (clamped faces/nodes)
- Neumann - Applied loads, pressure, torque, body forces
- Contact - Node-to-segment penalty contact (explicit solver only)
Uses faer for sparse Cholesky decomposition (symmetric positive-definite systems) with LU fallback. Pure Rust with SIMD optimization, ~1.5-2x faster than UMFPACK on typical FEA matrices.
Central-difference time integration for dynamics and contact problems. Element-by-element assembly avoids global matrix formation.
- VTK (
.vtk) - Legacy VTK format for ParaView - VTK HDF (
.hdf) - Modern HDF5-based format (pure Rust viahdf5-writer)
Run the validation benchmark suite:
cargo run --bin run_benchmarks --releaseResults compare against analytical solutions for cantilever beams, torsion shafts, hollow spheres, and Hertzian contact.
cargo build --releasecd gui
./build_wasm.shSee gui/README.md for detailed WASM instructions.
A project by John Dews-Flick