Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Proposal for GSoC 2016 #91

@PerezHz

Description

@PerezHz

Hi, everyone!

My name is Jorge Perez, I have been learning Julia since last year's summer, and would like to submit a proposal to work on the ODE.jl package, for this year's GSoC!

I'm currently a physics PhD student at UNAM, Mexico, under supervision of Luis Benet and David Sanders, authors of JuliaDiff/TaylorSeries.jl.

I have already talked a bit with @mauro3 on julia-users mailing list, but wanted also to contact you guys in order to introduce myself and see if there's anyone else interested in mentoring or co-mentoring this proposal.

The main idea

I have been looking at your work and it's really awesome! It would be an honor to be able to work with you guys! The main idea for my proposal is this: to implement automatic differentiation techniques to ODE.jl, in particular the Taylor method. As you know, AD techniques are essentially based on exploiting Taylor series expansions for a given initial value problem (IVP). The advantages from using these techniques include:

  • Implementing high-(variable)-order, variable timestep, ODE solvers which use AD techniques to generate high-order (20th, 30th, 40th order) Taylor methods. Taylor methods offer the ability to reach machine-epsilon precision, with very competitive speeds.
  • Derivative estimation (Jacobians, etc): instead of depending on finite-difference methods to calculate derivatives (which are error-prone as well as numerically unstable), AD techniques can calculate, for example, 1st and 2nd time-derivatives, or even Jacobians, automatically, to machine-epsilon precision. Looking at ODE.jl source code, AD could replace finite difference for example here, here, and here.
  • Variable order and timestep: when integrating near singularities (i.e., regions where the "force" increases substantially) it's cheaper to increase the order than to reduce the timestep (see, for example section 3 of Jorba and Zou, 2004).
  • Root-finding: Taylor methods allow to efficiently perform root finding (e.g., Newton-Raphson), without having to explicitly calculate derivatives, via high-order interpolation.
  • Sympletic methods: Since Taylor methods are so precise, as a bonus they do preserve symplectic structure without asking them to preserve it: for energy-conserving problems, relative energy error is essentially a random walk around zero (each step of this random walk is of the order of eps(Float64)), due solely to rounding errors (can't ask for anything better, numerically!).

For the last two points I think AD could help ODE.jl a lot, as @pwl was discussing in #49 for root finding, and @tlycken, @stevengj, @mauro3 and @acroy were discussing in #7 and #10 for symplectic integrators.

A 100% Julia example

Right now I have an example on which I've been working (:100:% pure Julia!). There, I calculate times of lunar and solar eclipse occurrence, and compare those times with the ones obtained by NASA's Goddard Space Flight Center (GSFC) and Jet Propulsion Laboratory (JPL). For this example, I used a ~25th order, fixed timestep, Taylor method which integrated numerically a model of the Solar System including the Sun, the Moon and all the planets (Mercury through Neptune), and implemented a root-finding subroutine (which actually exploits TaylorSeries.jl) to calculate the time of each eclipse occurrence (ie., lunar conjunction or opposition wrt the Earth's orbit around the Sun) to an absolute precision of 1.0E-20. In a time span from September 2015, through December 2020, my code was able to reproduce each eclipse, with a difference of 25 seconds (max!) wrt NASA's results. This is ongoing work, but if you look carefully at my results, there seems to be a systematic linear drift from one eclipse to the next. Currently, I think this drift appears to be physical (it appears that polar flattening of both the Earth and Moon is really important!) rather than numerical (the relative error in the energy is less than 40*eps(Float64)).

I'm looking forward to receiving your comments, suggestions and ideas for this proposal!

Best regards,
Jorge

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions