Optimizing ODE solver performance for very small step size

5 views (last 30 days)
Hi, I have a function (containing 2 diff. eqns) that needs to be solved. Unfortunately, the time step needed is 1e-11. I think the program will run into a memory issue. Is there any way to save values at a certain time interval? OR Do I need to non-dimensionalize the eqns.?
P.S. I am using the ode45 solver.
  8 Comments
J. Alex Lee
J. Alex Lee on 23 Feb 2021
Not knowing details, the first thing I would always look at is if the problem can be nondimensionalized to remove units and more easily uncover stiffness. Especially since the plots shown have such huge orders of magnitude.
Angshuman Podder
Angshuman Podder on 23 Feb 2021
Edited: Angshuman Podder on 23 Feb 2021
I am sorry about that. Convergence is not the right word, it should be stability. For e.g the diameter/number density is going negative.
I think the ODEs are stiff. I just saw that there are ODE solvers for stiff eqns. Thanks again @Jan.
@J. Alex Lee, you are right. I will sit down with non-dimensionalizing the equations.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!