Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Debug the time step selection

Please login with a confirmed email address before reporting spam

When using COMSOL, the area I feel I have least control over is the time step selection. What I would love to have is some way to debug why comsol has chosen a step size a few orders of magnitude smaller than the one I specified.

My understanding is that I have indirect control through the absolute and relative tolerances and the dependant variable scaling. However, I have cases where I have 10x the tolerances and it has little or no effect on the time step. What would be ideal is some procedure for showing that dominant reason for the time step selection was because of “the gradient of turbulent kinetic energy” or an absolute tolerance has not been met etc. With no feedback to me, I resort to manipulating ALL the control variables to see if has any effect on the time step.

I am also a bit perplexed that “manual” time stepping does not follow the time steps I specify.

I will appreciate any guidance. Thanks.


2 Replies Last Post 2018年6月23日 GMT-4 13:47
Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 2018年6月21日 GMT-4 07:32

Hi Dan,

Typically, you can see from the log that the NLfail counter (for failures in the nonlinear iterations) starts to increase. Such failures should be the reason that you do not get the time step that you expect. The NLfail count is reported in the log for each time step taken. To study the algebraic iterations for each time step, choose Detailed from the Solver log list in the Advanced node under the Time-Dependent Solver node. Hopefully, that information can provide some guidance.

Best regards,

Magnus Ringh, COMSOL

Hi Dan, Typically, you can see from the log that the NLfail counter (for failures in the nonlinear iterations) starts to increase. Such failures should be the reason that you do not get the time step that you expect. The NLfail count is reported in the log for each time step taken. To study the algebraic iterations for each time step, choose **Detailed** from the **Solver log** list in the **Advanced** node under the **Time-Dependent Solver** node. Hopefully, that information can provide some guidance. Best regards, Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 2018年6月23日 GMT-4 13:47

Thanks for your suggestion to look at NLfail and the detailed solver log. NLfail does seem to be increasing in my simulation.

In the reference manual, there is one passing reference to NLfail and a paragraph on the nonlinear solver log. Given that these variables alter the time step size, which in turn can either make a simulation run possible or impractical, I think that users would be very keen to learn more about how to interpret them.

As it has a relevance to all COMSOL users, is it possible to respectlly request a blog article on the auto time step selection, NLfail and strategies to counter impractically small time steps ?

Thanks.

Thanks for your suggestion to look at NLfail and the detailed solver log. NLfail does seem to be increasing in my simulation. In the reference manual, there is one passing reference to NLfail and a paragraph on the nonlinear solver log. Given that these variables alter the time step size, which in turn can either make a simulation run possible or impractical, I think that users would be very keen to learn more about how to interpret them. As it has a relevance to all COMSOL users, is it possible to respectlly request a blog article on the auto time step selection, NLfail and strategies to counter impractically small time steps ? Thanks.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.