Skip to main content

Tool that solves ODE's numerically. Written in Python.

Project description

Numerical ODE Solver

This project is a Python implementation for solving ordinary differential equations (ODEs) numerically. The script allows users to choose between two methods: Euler's Method and Runge-Kutta 4th Order Method (RK4), providing a visual representation of the solution.

Requirements

Python version >= 3.8

Ensure the following Python libraries are installed:

Install it using pip:

pip install numODEsolver

Example

from numODEsolver import solver
import matplotlib.pyplot as plt #optional for plot

solver = solver()
f = solver.get_function("y") 
x,y = solver.solve_rk4(f,x0=0,y0=1,n=10000,bound=10.1)
print(solver.get_value(x,y,val=10,dec=5))
from numODEsolver import solver

solver = solver()
f = solver.get_function_2order("dy")
x,y,dy = solver.solve_euler_2order(f,x0=0,y0=1,dy0=1,n=10000,bound=5)
print(solver.get_value(x,y,val=3,dec=2))

Version History

  • 8.12.2024 - v0.1 -> only 1st order ODE's are solvable, more features coming soon
  • 15.12.2024 - v0.2 -> removed plot function
  • 26.1.2025 - v0.3 -> included 2nd order methods, see more on GitHub

For more documentation take a look at the source code on my GitHub.

You can modify the script to add more methods, adjust default parameters, or change visualization settings.

This project is open-source and free to use. Contributions and suggestions are welcome!

Lukas

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

numodesolver-1.0.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

numODEsolver-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file numodesolver-1.0.0.tar.gz.

File metadata

  • Download URL: numodesolver-1.0.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for numodesolver-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ad4b3d4600b917e075a736ef9781a1d9f84081a149d3f869ce4d226a74e46f44
MD5 3a4f1c817cf1661725ea8365138beefd
BLAKE2b-256 3c7cbd2862af2f5748400c91203e31e43c0bd84e3ab3972851bbc81fbae88d54

See more details on using hashes here.

File details

Details for the file numODEsolver-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: numODEsolver-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for numODEsolver-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4065d0a7ff3c083f60c642927eda1e336b45da8679e4b2f29067b11ef379965
MD5 e21f6dcb8cff95963b6e92118aadf9fd
BLAKE2b-256 5ac1268bc138eeb66d3a890616a26e548e218240fd0951cbdf5ec7e84fa9bb12

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page