[sundials-users] CVODE - Can you please help?

25 views
Skip to first unread message

Yuanfeng Shi

unread,
Sep 27, 2024, 2:18:49 PM9/27/24
to SUNDIAL...@listserv.llnl.gov
Dear CVODE developers,

Greetings from Oxford.

We are a group of physics researchers working on laser-plasma interactions. We have developed an atomic kinetics simulation kit (CCFLY) that enables us to model these physical processes, resulting in dozens of papers in the past few years. None of these would be possible without your well-known CVODE solver, which serves as the core component of our code. 

Recently, we encountered a problem that took a long time to investigate, and we find it may be useful if you could help.

Basically, we find that the solver often gets stuck at a certain time step for hours before throwing out an error. Our code has the design of retargeting at a slightly smaller t_out, so this is not a fundamental problem. However, this does get a bit annoying as the time spent on the point at which it got stuck has caused the code to run significantly longer than we expected.

Below is one example I took out from the printout log. Our code manually set t_i = 2.0e-15 s and t_out = 3.0e-15s. The solver got stuck at 2.009e-15 s for a long time, followed by throwing a convergence failure error. Our code then retargets at t_out = 2.0045 s (halfway before the solver failed), which is quickly reached by evaluating from 2.0e-15 s again. From there, the solver successfully reached 3.0e-15.

I wonder if there is a way to reduce the time cost by letting the solver abort earlier once it gets stuck. I do not have much experience using ODE solvers, so this might be a very silly question. Please forgive me if that is the case.

Thank you very much for reading this email. Any of your insight will be invaluable to us.

Best regards,
YuanFeng

----------------------------------------------------------------------

...... [lots of 2.009e-15 fs]   
30100: 2.009e-15 s.    30200: 2.009e-15 s.    30300: 2.009e-15 s.    30400: 2.009e-15 s.    30500: 2.009e-15 s.    
30600: 2.009e-15 s.    30700: 2.009e-15 s.    30800: 2.009e-15 s.    30900: 2.009e-15 s.    31000: 2.009e-15 s.    
31100: 2.009e-15 s.    31200: 2.009e-15 s.    
CVode-- At t=2.00898e-15 and step size h=1.05106e-22, the corrector
convergence failed repeatedly or with |h| = hmin.

prev_time: 2.008984e-15, t0: 2.000000e-15, dt: 1.000000e-15
Attemp 0 failed. Something is wrong during solving the ODE.
Will try with a smaller time step to 2.004492e-15. with dt 4.491943e-18.

CVode-- Warning.. internal t=2e-15 and step size h=1.06835e-33
are such that t + h == t on the next step.
The solver will continue anyway.

31300: 2.000e-15 s.    31400: 2.020e-15 s.

Successfully reached 2.004492e-15 from 2.000000e-15, now trying to reach 3.000000e-15.
31500: 2.1849e-15 s   31600: 2.3268e-15 s   31700: 2.4993e-15 s   31800: 2.6436e-15 s   31900: 2.7058e-15 s    

Successfully reached 3.000000e-15 from 2.004492e-15.


 

YuanFeng Shi  石元峰

DPhil Student (Atomic and Laser Physics) 原子与激光物理博士在读

Dept. of Phys., Univ. of Oxford 牛津大学物理系

Mobile Phone 移动电话: +86 182-1740-2301 / +44 07421-990313

 



To unsubscribe from the SUNDIALS-USERS list: write to: mailto:SUNDIALS-USERS-...@LISTSERV.LLNL.GOV

Margolis, Stephen B.

unread,
Sep 27, 2024, 7:53:09 PM9/27/24
to SUNDIAL...@listserv.llnl.gov

Hi,

 

I’ve encountered a similar issue in a different type of problem at late times in the integration. In my case, I’ve found that restricting the maximum time step to a sufficiently small value at late times generally fixes the problem, although it will likely slow the code unless you build in an additional change to the maximum step size after the difficult time has passed. In your case, your restart may be causing the second integration to take initially smaller steps after the restart just prior to the difficult time that allows the code to successfully get past this time.

 

I’m not sure why the integrator is unable to successfully recover on its own, especially since the robustness of CVODE is well established. Nonetheless, it seems plausible that, under certain circumstances, once the code completes a step with a step size that is outside the stability range of the integration scheme, it’s somehow unable to recover. One can also fiddle with resetting the error tolerances, and more extremely, changing some of the default settings in CVODE such as the maximum number of corrector convergence iterations, the maximum number of step refinements, the maximum order of the integration, etc. I’ve tried all of these (without necessarily understanding all the ramifications!), but the thing that seems to have worked for me is what I suggested in the first paragraph.

 

Good luck!

 

Steve

From: sundial...@llnl.gov <sundial...@llnl.gov> on behalf of Yuanfeng Shi <00002b89c253b98...@LISTSERV.LLNL.GOV>
Date: Friday, September 27, 2024 at 11:21 AM
To: SUNDIAL...@LISTSERV.LLNL.GOV <SUNDIAL...@LISTSERV.LLNL.GOV>
Subject: [EXTERNAL] [sundials-users] CVODE - Can you please help?

收到此件的某些人通常不会收到来自 00002b89c253b98...@listserv.llnl.gov 件。了解什么一点很重要

Reply all
Reply to author
Forward
0 new messages