- Clone the repo
- Install Python 3 and optionally Jupyter Notebook (
pip install notebook
orconda install -C conda-force notebook
). - Install
matplotlib
,numpy
, and (if using Jupyter Notebook)ipywidgets
withconda
orpip
.
Note: unforunately, GitHub does not have built in support for ipywidgets
, so
you will need to run it locally.
- If you have jupyter notebook installed, run
jupyter notebook main.ipynb
. Alternatively, use an IDE to runmain.ipynb
(for example, in Visual Studio Code, if you have the Python extension installed, a Jupyter Notebook kernel will automatically be started when you open the file). - Run all the cells in order
- Change the inputs of the interact widgets (they are in the order of Euler's Method, Runge-Kutta, and Forest & Neri)
- Click "Run Interact"
Each method is given its own graph. The color scale indicates the time dimension of the particle (lighter is earlier, darker is later).
- Run
python3 main.py
- Select your inputs and initial conditions
All three numerical methods will be displayed on the same graph
- Higher
δt
results in more accurate graphs but requires more iterations (and thus is slower) - Euler's Method is the least accurate by far, but also the fastest