Skip to content

yhyap/programming-differential-equations

Repository files navigation

Programming Differential Equations

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:

Problem 1: Houston we have a problem

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.

Problem 2: Contagion

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.

Problem 3: Responsible Fishing

Model the logistic growth of fish


Primer on Scientific Programming

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


Lotka-Volterra example

Example from scipy.

About

Examples of Differential Equation programming using Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages