A repository that stores the work from Udacity's course: Differential Equations in Action, and examples from A Primer on Scientific Programming using Python. The following numerical methods are covered:
- Forward Euler method
- Heun's method
- Backward Euler method
- Trapezoidal Rule
For the Udacity's part, the repository currently comprises the following problems:
Using ODE to calculate how much the acceleration (with the direction) needed from the rocket booster to change the trajectory and bring the Apollo 13 back to earth safely. It involves programming of Forward Euler and Heun's method.
Using compartmental SEIR model to simulate an epidemic, and work out the number of people in Susceptible, Exposed, Infected, Recovered groups assuming no age and geographic distribution. It can be used for modeling flows between different compartments, normally in the field of epidemiology, economy, chemistry and biology. Involved programming of implicit methods such as Backward Euler and Trapezoidal Rule.
Model the logistic growth of fish
The repository currently comprises the following problems:
- simple first order du/dt = u in first_order.py
- spring mass system in springmass.py
- logistic equation for population growth
It shows how to solve ODE with object-oriented feature and class hierarchy. Solvers used include Forward Euler, 4th order Runge-Kutta and Backward Euler method. All the solvers are located in ODESolver.py
Example from scipy.