Coder Social home page Coder Social logo

van der Pol equation about dassl.jl HOT 4 CLOSED

sciml avatar sciml commented on May 28, 2024
van der Pol equation

from dassl.jl.

Comments (4)

pwl avatar pwl commented on May 28, 2024

I was deducing minimal allowed stepsize from eps(T) where T is the type of the time variable. When eps is changed to eps(t), where t is the current time your example works fine (the epsilon for t=0.0 is ~e-324...).

EDIT: After thinking about it, the van der Pol equation should be time independent, so starting from t=1.0 brings the bug back...

from dassl.jl.

mauro3 avatar mauro3 commented on May 28, 2024

How does the time step evolve? Your fix above suggests that the time step is >eps(1) at t1 even though the solution repeats after t1.6. Maybe it's a problem with the initial steps? Anyway, using eps(t) instead of eps(T) is probably good irrespective.

from dassl.jl.

pwl avatar pwl commented on May 28, 2024

This fixes the two errors I made when implementing DASSL.

  1. I was not using the initial value for the derivative properly (the dy0 keyword argument).
  2. When dy0 was not given I was not obtaining it from solving F(t,y0,dy0)=0 for dy0.

These two errors combined were forcing the stepsize to go way below the sensible values thus causing the premature termination of integration due to h<hmin.

In this fix I also rewrote the way error estimates are generated and handled (now it's clearer and simpler) and I slightly changed the order/timestep selection strategy.

Now it is possible to run the solver (with or without Jacobian) with the local error tolerances reduced to 1e-14 and still have h>1e-16 (although for this particular example it leads to larger global error due to roundoff errors).

from dassl.jl.

mauro3 avatar mauro3 commented on May 28, 2024

thanks

from dassl.jl.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.