This project focuses on the exploration of numerical solutions to ODEs in Python. We will introduce a few generic methods for solving general purpose ODEs using standardized Python extension libraries (see these examples). The exposition for the course project is centered on exploring the properties of numerical solutions to a few types of chaotic attractors (see examples in the subdirectories here). In doing so, we aim to present a set of reusable ideas and methods that viewers can use to understand numerical solutions to ODEs more generally that arise in other applications.
$ brew install [email protected] ipython
$ brew install sage
$ python3.9 -m pip install numpy scipy sympy matplotlib notebook jupyterlab
$ python3.9 -m pip install gekko ode-toolbox ode-explorer
$ sage
(sage) pip install pandas
(sage) exit
$ cd UtilityScripts
$ /bin/bash ./AddPythonPathToBashConfig.sh
# ... On MacOS:
$ source ~/.bash_profile
# ... On Linux:
$ source ~/.bashrc
$ cd ..
- Ordinary Differential Equations (ODE) with Python
- Towards Data Science: Ordinary Differential Equation (ODE) in Python
- Learn Programming: Solve Differential Equations in Python
- Dyanmics and Control: Solve Differential Equations with GEKKO
- Solve differential equations in Python (with ODEINT)
- GEKKO documentation: Note that this package is substantially error prone and hard to use compared to
scipy
. Nonetheless, it does seem to have some sophisticated solver capability if you understand the internals of the package well. - ODE-toolbox: Simplifies and automates many useful procedures in simulating ODE solutions numerically or even analytically. The utility still suffers from a lack of computational motivation in Python when working with symbolic independent (indeterminate) parameters. For example, an example given in the package docs shows a model for the Lorenz attractor given by
{
"dynamics": [
{
"expression": "x' = sigma * (y - x)",
"initial_value" : "1"
},
{
"expression": "y' = x * (rho - z) - y",
"initial_value" : "1"
},
{
"expression": "z' = x * y - beta * z",
"initial_value" : "1"
}
],
"parameters" : {
"sigma" : "10",
"beta" : "8/3",
"rho" : "28"
}
}