Skip to content

GUI-based Finite Element Analysis (FEA) toolkit, supporting 2D/3D truss and beam structures, custom units, advanced visualization, and extensible analysis features.

License

Notifications You must be signed in to change notification settings

a-dorgham/FEAnalysisApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FEAnalysisApp

Python PyQt6 License

FEAnalysisApp is a cross-platform, Python-based graphical user interface (GUI) for performing Finite Element Analysis (FEA). Designed using PyQt6, it provides an intuitive and interactive environment for structural engineers, educators, and researchers to model, analyze, and visualize various types of structures, including beams, trusses, and frames in both 2D and 3D.


Features

  • Graphical User Interface built with PyQt6.
  • Supports 2D and 3D structures: Trusses, Beams, and Frames.
  • Customizable input using structured .txt files or GUI forms.
  • Modular architecture with extensible solvers and element libraries.
  • Supports both direct and iterative solvers.
  • Real-time visualization of analysis results.
  • Integrated input/output file viewer and result report generator.
  • Built-in library for materials, cross-sections, and units.
  • Exports results to human-readable reports and visual plots.

Project Structure

FEAnalysisApp/
├── LICENSE                    # The project's license file.
├── README.md                  # This file.
├── main.py                    # Application entry point; starts the GUI.
├── requirements.txt           # Python dependencies for the project.
├── setup.cfg                  # Configuration file for packaging/tools (e.g., setuptools, pytest).
|
├── assets/                    # Static resources (icons, styling, web libraries).
│   ├── icons/                 # All icon files, structured by their context.
│   │   ├── analysis_window/   # Icons used in the analysis/viewer window (e.g., solve, view).
│   │   └── main_window/       # Icons and images for the main application window (e.g., structure types).
│   ├── plotly/                # External JavaScript libraries (e.g., for data visualization).
│   └── styles/                # CSS/QSS files for application styling (e.g., dark/light mode).
|
├── data/                      # Default, user-defined, and library data files (JSON format).
│   ├── defaults/              # Default settings for various analysis components (nodes, elements, units, etc.).
│   └── libraries/             # User-editable libraries for materials and cross-sections.
|
├── examples/                  # Sample input text files for running analyses.
│   └── *.txt
|
├── src/                       # Source code for the application's logic and modules.
│   ├── config.py              # Application-wide configuration settings.
│   ├── constants.py           # Definition of numerical or physical constants.
│   ├── core/                  # Core FEA logic, including structure handling and solvers.
│   │   ├── structure_io.py    # Logic for reading and writing structure data.
│   │   ├── elements/          # Implementation of different element types (bar, beam, frame).
│   │   └── solvers/           # Numerical solvers (direct, iterative) for the stiffness matrix.
│   ├── gui/                   # GUI components using the Qt framework (PyQt/PySide).
│   │   ├── setup_docks.py     # Configuration for the docked windows.
│   │   ├── viewers/           # Modules for displaying file, report, and analysis results.
│   │   ├── widgets/           # Custom reusable GUI components (spinner, tree widget).
│   │   └── windows/           # Definition of main application windows and dialogs.
│   └── utils/                 # Utility functions for common tasks.
│       ├── classes.py         # Custom helper classes.
│       ├── errors.py          # Custom exception and error handling.
│       ├── http.py            # HTTP client/server utilities (if used for data/API).
│       ├── io.py              # General Input/Output and file handling utilities.
│       └── units.py           # Unit conversion and management logic.
|
└── tests/                     # Test suite using pytest.
    ├── conftest.py            # Fixtures and configuration for pytest.
    ├── test_*.py              # Test files for individual elements.
    ├── integration/           # High-level integration tests.
    └── unit/                  # Low-level unit tests for specific functions/classes.

Getting Started

Prerequisites

  • Python 3.10.5
  • Recommended: Virtual environment

Install the dependencies using:

pip install -r requirements.txt

Running the App

python main.py

The GUI will launch, providing access to structure modeling, analysis configuration, result viewing, and report generation.


Usage

  1. Load a Model: Use sample input files from /examples/ folder or import your own.
  2. Set Parameters: Define material properties, cross-sections, boundary conditions, and loads.
  3. Solve: Choose between direct or iterative solvers.
  4. Visualize: View deformation, internal forces, and support reactions graphically.
  5. Export: Generate formatted reports and save the analysis results.

Supported Structure Types

  • 2D Truss
  • 2D Beam
  • 3D Truss
  • 3D Frame

More element types and general 3D solids will be supported in future versions.


Example Inputs

The examples/ directory contains ready-to-use structural models. Example:

2D_Truss.txt
2D_Beam.txt
3D_Frame.txt

Input format is simple, human-readable, and structured for easy editing.


Developer Notes

Modular Solvers

  • core/direct_solver.py: Gauss elimination and banded matrix solver.
  • core/iterative_solver.py: Iterative solving for large systems.
  • core/main_solver.py: Solver interface and result integration.

Extendable Element Library

  • Linear bar, beam, and frame elements under core/isoparametric_elements/.

Testing

Run tests using:

pytest tests/

Includes unit tests for core finite element components and shape functions.


Screenshots

Main window

FEAnalysisApp_1

Analysis window

FEAnalysisApp_2

File Viewer

FEAnalysisApp_4

Stiffness Matrix Viewer

FEAnalysisApp_5

Solved Displacements Viewer

FEAnalysisApp_6

Solved Stresses Viewer

FEAnalysisApp_7

Beam Shear and Bending Moments

FEAnalysisApp_8

Analysis Report

FEAnalysisApp_9

Logging Console

FEAnalysisApp_10

Roadmap

  • Add support for shell and solid elements.
  • Web-based remote analysis interface.
  • Advanced post-processing with Plotly.
  • Improved mesh generation and visualization.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request.

git clone https://github.com/a-dorgham/FEAnalysisApp.git
cd FEAnalysisApp

License

This project is licensed under the MIT License.


Contact

For bug reports, feature requests, or collaboration:

About

GUI-based Finite Element Analysis (FEA) toolkit, supporting 2D/3D truss and beam structures, custom units, advanced visualization, and extensible analysis features.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages