Unified Numerical Engineering & Simulation Suite
A modular, dual-interface Python suite implementing 20+ numerical methods โ from root finding to ODEs โ featuring a beautiful Rich TUI and a full CustomTkinter GUI dashboard with live Matplotlib plots.
NumCore is a comprehensive numerical engineering toolkit developed as part of the Numerical Methods course at the Arab Academy for Science, Technology & Maritime Transport (AAST). It implements over 20 classical numerical algorithms across six domains: root finding, linear systems, interpolation, differentiation, integration, curve fitting, and ODEs.
What sets NumCore apart is its strictly clean architecture โ a pure computation engine (numcore_engine/) is completely decoupled from the interfaces, allowing the exact same solvers to power both a terminal-first Rich TUI and a modern CustomTkinter GUI dashboard with live Matplotlib visualizations. Users can launch either interface from a single unified entry point.
| Calculus Plot | Convergence Graph | Regression Plot |
|---|---|---|
![]() |
![]() |
![]() |
| Integration rules with visual bounds | Iterative solver convergence | Curve fitting & regression overlay |
| Solver | Description |
|---|---|
| Bisection Method | Bracket-based root isolation; guaranteed convergence on continuous functions |
| Newton-Raphson Method | Derivative-driven quadratic convergence; fast for smooth functions |
| Secant Method | Derivative-free quasi-Newton method using two initial points |
| Simple Fixed-Point Iteration | Iterative |
| Solver | Description |
|---|---|
| Gauss-Seidel | Iterative method; uses the latest available values at each step |
| Jacobi Method | Simultaneous iterative updates; ideal for diagonally dominant systems |
| Diagonal Dominance Check | Automatic detection + row swapping to ensure convergence preconditions |
| Solver | Description |
|---|---|
| Lagrange Interpolation | Global polynomial fit through |
| Newton Forward Difference | Efficient polynomial interpolation on equally-spaced points |
| Newton Divided Difference | Generalized Newton form for arbitrarily-spaced data |
| Linear Spline | Piecewise linear interpolation; fast and lightweight |
| Cubic Spline | Smooth piecewise-cubic interpolation with continuous second derivatives |
| Method | Description |
|---|---|
| Forward Difference | First-order approximation: |
| Backward Difference | Backward-looking first-order approximation |
| Central Difference | Second-order symmetric approximation; higher accuracy |
| Method | Description |
|---|---|
| Midpoint Rule | Basic + composite rectangle integration using midpoints |
| Trapezoidal Rule | Basic + composite trapezoidal approximation |
| Simpson's 1/3 Rule | Parabolic approximation; requires even number of subintervals |
| Simpson's 3/8 Rule | Cubic approximation; requires subintervals divisible by 3 |
| Gaussian Quadrature (2-pt) | Exact for polynomials up to degree 3 using optimal node placement |
| Gaussian Quadrature (3-pt) | Exact for polynomials up to degree 5 |
| Method | Description |
|---|---|
| Least Squares | General linear regression minimizing sum of squared residuals |
| Linear Regression | Fit |
| Quadratic Regression | Fit |
| Power Regression | Fit |
| Exponential Regression | Fit |
| Growth Regression | Fit |
| Method | Description |
|---|---|
| Euler's Method | First-order explicit time-stepping |
| Modified Euler (Heun) | Predictor-corrector; second-order accuracy |
| Runge-Kutta (RK4) | Fourth-order gold-standard ODE solver |
| Taylor Series (Order 4) | Derivative-expansion method up to 4th order |
NumCore ships with two complete, independent interfaces โ both powered by the same numcore_engine under the hood.
| ๐ค TUI (Terminal) | ๐ช GUI (Dashboard) | |
|---|---|---|
| Library | Rich | CustomTkinter |
| Visualization | ASCII tables & progress bars | Matplotlib live plots |
| Best for | SSH sessions, scripting, power users | Interactive exploration, presentations |
| Launch | python main.py --tui |
python main.py --gui |
The Unified Startup Selector launches when no flag is given, letting users choose their preferred interface interactively. Both interfaces support CSV export of calculation steps and intermediate results.
NumCore follows a strict three-layer modular architecture, keeping math logic completely isolated from presentation.
NUM-CORE/
โ
โโโ numcore_engine/ # ๐งฎ Pure math โ zero UI dependencies
โ โโโ root_finding/ # Bisection, Newton-Raphson, Secant, Fixed-Point
โ โโโ linear_systems/ # Gauss-Seidel, Jacobi, dominance checking
โ โโโ interpolation/ # Lagrange, Newton FD/DD, Splines
โ โโโ differentiation/ # Forward, Backward, Central difference
โ โโโ integration/ # Midpoint, Trapezoidal, Simpson, Gauss
โ โโโ curve_fitting/ # Least Squares, Linear, Quadratic, Power, Exp
โ โโโ odes/ # Euler, Heun, RK4, Taylor
โ
โโโ numcore_cli/ # ๐ค Rich TUI โ terminal interface layer
โ โโโ ... # Menus, tables, Rich panels, spinner prompts
โ
โโโ numcore_gui/ # ๐ช GUI dashboard โ CustomTkinter + Matplotlib
โ โโโ ... # Frames, input forms, live plot canvases
โ
โโโ docs/ # ๐ Documentation & screenshots
โ โโโ ARCHITECTURE.md
โ โโโ ENGINE_MODULES.md
โ โโโ GUI_GUIDE.md
โ โโโ screenshots/
โ
โโโ tests/ # ๐งช pytest test suite
โโโ main.py # ๐ Unified entry point
โโโ requirements.txt
Design principle:
numcore_enginehas no imports fromnumcore_cliornumcore_gui. Either interface layer can be swapped or extended without touching a single solver.
1. Clone the repository
git clone https://github.com/4awmy/NUM-CORE.git
cd NUM-CORE2. Create and activate a virtual environment (recommended)
# Windows
python -m venv venv
venv\Scripts\activate
# macOS / Linux
python -m venv venv
source venv/bin/activate3. Install dependencies
pip install -r requirements.txtRequirements: Python 3.10 or higher is required.
# Launch the unified startup selector (choose TUI or GUI interactively)
python main.py
# Force the Rich TUI interface directly
python main.py --tui
# Force the CustomTkinter GUI dashboard directly
python main.py --gui
# Run the full test suite
python -m pytest
# Run tests with verbose output
python -m pytest -v| Document | Description |
|---|---|
| ARCHITECTURE.md | Deep dive into the three-layer module design |
| ENGINE_MODULES.md | Full API reference for all solver functions |
| GUI_GUIDE.md | GUI dashboard walkthrough and usage tips |
Omar Hossam Student โ Computer Engineering Arab Academy for Science, Technology & Maritime Transport (AAST)
Numerical Methods Course Project ยท Spring 2025
This project is licensed under the MIT License โ see the LICENSE file for details.
MIT License โ Copyright (c) 2025 Omar Hossam
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...
Built with ๐ค and a lot of numerical analysis for AAST Numerical Methods.


