COPADS IV: Fixed Time-Step ODE Solvers for a System of Equations Implemented as a Set of Python Functions

Maurice HT Ling

Abstract


Ordinary differential equation (ODE) systems are commonly used many different fields. The de-facto method to implement an ODE system in Python programming using SciPy requires the entire system to be implemented as a single function, which only allow for inline documentation. Although each equation can be broken up into sub-equations, there is no compart-mentalization of sub-equations to its ODE. A better method will be to implement each ODE as a function. This encapsulates the sub-equations to its ODE, and allow for function and inline documentation, resulting in better maintainability. This study presents the implementation 11 ODE solvers that enable each ODE in a system to be implemented as a function. Three enhancements will be added. Firstly, the solvers will be implemented as generators to allow for virtually infinite simulation and returning a stream of intermediate results for analysis. Secondly, the solvers will allow for non-ODE-bounded variables or solution vector to improve code and results documentation. Lastly, a means to set upper and lower boundary of ODE solutions will be added. Validation testing shows that the enhanced ODE solvers give comparable results to SciPy’s default ODE solver. The implemented solvers are incorporated into COPADS repository (https://github.com/copads/copads).


Keywords


ODE solvers; system of ODEs; Python; Documentation; one-ODE-one-function

Full Text:

PDF

References


C. C. Chicone, “Ordinary Differential Equations with Applications”, Springer, 1999.

T. E. Oliphant, “Python for Scientific Computing”, Computing in Science & Engineering, 9, 2007, 10-20.

H. P. Langtangen and L. Wang, “Odespy software package”, 2014. URL: https://github.com/hplgit/odespy.

P. Munz, I. Hudea, J. Imad and R. J. Smith, “When Zombies Attack!: Mathematical Modelling of Outbreak of Zombie Infection”, Infectious Disease Modelling Research Progress, 4, 2009, 133-150.

J. Senning, “www.math-cs.gordon.edu/courses/ma342/ python/diffeq.py”, 2008.

G. A. Glatzmaiers and P. H. Roberts, “A Three-Dimensional Self-Consistent Computer Simulation of a Geomagnetic Field Reversal”, Nature, 377, 1995, 203-209.

J. R. Cash and A. H. Karp, “A Variable Order Runge-Kutta Method for Initial Value Problems with Rapidly Varying Right-Hand Sides”, ACM Transactions on Mathematical Software, 16, 1990, 201-222.

J.R. Dormand and P. J Prince, “A Family of Embedded Runge-Kutta Formulae”, Journal of Computational and Applied Mathematics, 6, 1980, 19–26.

S. B. Patel, “Nuclear Physics: An Introduction”, New Delhi: New Age International, 2000.

Z. Memon, S. Qureshi, A. A. Shaikh and M. S. Chandio, “A Modified ODE Solver for Autonomous Initial Value Problems”, Mathematical Theory and Modeling, 4, 2014, 80-85.

G. Bao and H. Zhang, “Sensitivity Analysis of an Inverse Problem for the Wave Equation with Caustics”, Journal of the American Mathematical Society, 27, 2014, 953-981.

Z. Zi, “Sensitivity Approached Applied to System Biology Models”, IET Systems Biology, 5, 2011, 336-346.

F. Brauer, “Bounds for Solutions of Ordinary Differential Equations”, Proceedings of the American Mathematical Society, 14, 1963, 36-43.

J. K. Scott and P. I. Barton, “Improved Relaxations for Parametric Solutions of ODEs using Differential Inequalities”, Journal of Global Optimization, 57, 2013, 143-176.




Lululemon Black Friday cheap nfl jerseys Lululemon factory Outlet ny Black Friday discount tiffany outlet wholesale soccer jerseys online oakley black friday cheap nhl jerseys china cheap nfl jerseys north face black friday sale cheap nfl jerseys online Jordans Black Friday Sale 2015 Cheap Moncler Cyber Monday moncler outlet cheap soccer jerseys moncler outlet black friday cheap authentic nfl jerseys north face cyber monday Louboutin Black Friday canada wholesale cheap nfl jerseys lululemon cyber monday 2015 cheap nfl jerseys from china 2015 Cheap Moncler Black Friday Sale Moncler Cyber Monday 2015 cheap jerseys Lululemon Cyber Monday Sale jordans cyber monday deals 2015 cheap nike nfl jerseys Black Friday deals Lululemon 2015 jordan black friday 2015 Moncler Jackets Black Friday Sale 2015 Louboutin Pas Cher Black Friday 2015 Canada Lululemon north face black friday cheap wholesale soccer jerseys