Skip to content

DOKOS-TAYOS/DifferentialLab

Repository files navigation

DifferentialLab Logo

DifferentialLab

Numerical ODE, difference equation, and PDE solver with a graphical interface for scientists, engineers, and students.

Python License Version Status SciPy NumPy Matplotlib

📖 Documentation🐛 Report Bug💡 Request Feature


Features

  • ODEs: Six methods (RK45, RK23, DOP853, Radau, BDF, LSODA) via SciPy
  • Difference equations: Recurrence relations (geometric growth, logistic map, Fibonacci, etc.)
  • PDEs: 2D elliptic solver (Poisson, Laplace) plus general operator-based PDEs with configurable derivative terms
  • Vector ODEs: Coupled systems with animation, 3D phase-space trajectories, and surface visualization
  • Unified f-notation: Write equations using f[0] (function), f[1] (first derivative), f[i,k] (component i, derivative k for vector ODEs)
  • Predefined equations: Harmonic oscillator, pendulum, Van der Pol, Lorenz, Lotka-Volterra, Duffing, Schrödinger, and more
  • Function transforms: Fourier (FFT), Laplace, Taylor series, Hilbert, Z-transform
  • Custom equations: Write any ODE, difference equation, or PDE in Python syntax
  • Interactive result tabs: Select derivatives to plot, choose phase-space axes, switch visualization modes without re-solving
  • Professional plots: Solution curves, phase portraits (2D/3D), surface/contour, vector animation
  • Statistics: Mean, max/min, period, energy, RMS, residual error metrics
  • Export: CSV, JSON, PNG/JPG/PDF, MP4 animation
  • Configurable via .env file or in-app Configuration dialog
  • Desktop GUI built with Tkinter/ttk

Requirements

  • Python 3.12 or higher
  • Windows 10/11, macOS 10.14+, or Linux
  • 4 GB RAM minimum

Quick Start

Installation (first-time setup)

Windows:

install.bat

Linux/macOS:

chmod +x install.sh
./install.sh

This clones the repository (if needed) and runs setup.

Manual setup (existing clone)

  1. Create virtual environment and install dependencies:
# Windows
bin\setup.bat

# Linux/macOS
chmod +x bin/setup.sh
./bin/setup.sh
  1. Run the application:
# Windows
bin\run.bat

# Linux/macOS
./bin/run.sh

Or run directly:

python src/main_program.py

Configuration

Copy .env.example to .env and customize, or use the in-app Configuration dialog.

Available settings:

  • UI theme (colors, fonts, padding)
  • Plot style (line, markers, fonts, grid)
  • Solver defaults (method, tolerances)
  • File paths and output format
  • Logging

Documentation

Full documentation is built with Sphinx and hosted on Read the Docs.

To build the docs locally:

pip install -e ".[docs]"
cd docs
make html          # Linux/macOS
make.bat html      # Windows

The output will be in docs/_build/html/.

Documentation contents:

  • Getting Started — installation, setup, first run
  • User Guide — walk-through of the complete workflow
  • Configuration Reference — every .env setting explained
  • Architecture — module structure and design decisions
  • API Reference — auto-generated from source docstrings

Dependencies

Package Version Purpose
NumPy >= 2.0 Numerical computations
Matplotlib >= 3.10 Plotting and visualization
SciPy >= 1.15 ODE solving engine
python-dotenv >= 1.0 Environment configuration
PyYAML >= 6.0 Equation definitions

License

MIT License. See license.md.

Third-party licenses: see THIRD_PARTY_LICENSES.md.

Author

Alejandro Mata Ali

About

DifferentialLab: numerical solver for ODEs, difference equations, and PDEs with a Python GUI. SciPy methods (RK45, Radau, BDF), vector systems, transforms (Fourier, Laplace), and CSV/PNG/MP4 export.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors