Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Problem while changing the study steps of a time dependent model

Please login with a confirmed email address before reporting spam

Hi

I just faced a strange problem with COMSOL, I have a time dependent model which runs perfectly fine from t=0 to t=1e-6[s]. In this model I divide the interval into 20 steps for getting results: range(0,1e-6/20,1e-6).
When I try to run this model from t=0 to t=2e-5[s] with 20 equal steps, the model stops somewhere around t=1e-10 "Nonlinear solver did not converge; Undefined value found; Undefined value found in stiffness matrix".
This doesn't make sense at all, Could somebody here help me with this please?
By the way; I set the "Steps taken by the solver" as "Free" in the "Study 1=>Solver 1=>Time-Dependent Solver 1=> Time Stepping" section.

Regards,
Peyman.

4 Replies Last Post Oct 22, 2013, 7:05 p.m. EDT
Josh Thomas Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 25, 2013, 2:33 p.m. EDT
Peyman,

I ran into a similar issue recently. For me, the resolution was understanding that the initial time step is determined based on the final time step request. So, when you change from 1e-6 to 2e-5 you may have changed your initial time step. This could cause one run to converge and the other not to converge.

Best regards,
Josh Thomas
AltaSim Technologies
Peyman, I ran into a similar issue recently. For me, the resolution was understanding that the initial time step is determined based on the final time step request. So, when you change from 1e-6 to 2e-5 you may have changed your initial time step. This could cause one run to converge and the other not to converge. Best regards, Josh Thomas AltaSim Technologies

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 25, 2013, 4:15 p.m. EDT
Hi Josh

The fact that the size of the initial step taken by the solver is dependent on the final time instant doesn't make much sense for me.
If this is true, the solution for this problem is then to impose solver to take the first step size very small. I'm gonna try with 1e-15 and let you know how it goes.

Regards,
Peyman Dordizadeh
Applied Electrostatics Center
Western University, Canada
Hi Josh The fact that the size of the initial step taken by the solver is dependent on the final time instant doesn't make much sense for me. If this is true, the solution for this problem is then to impose solver to take the first step size very small. I'm gonna try with 1e-15 and let you know how it goes. Regards, Peyman Dordizadeh Applied Electrostatics Center Western University, Canada

Josh Thomas Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 25, 2013, 5:02 p.m. EDT
Peyman,

I've been looking into this some more. Although, the documentation says "Free" means "let the time-stepping method choose time freely. The times specified in the Times field in the General section are not considered when a time step is chosen," from what I've seen, this is not strictly true. It is true the time steps are free to change, but (from using the code) I've seen that depending on the first time step request (and in some cases the final end time request) that the stepping I see in the log changes.

If you use the "Free" method and ask for range(0,1e-6/20,1e-6) the initial step and consequently the subsequent steps that the solver takes will be different than if you request range(0,1,10) for example. The solver uses the Times request in some way to govern the choices even under the "Free" setting.

Regards,
Josh

Peyman, I've been looking into this some more. Although, the documentation says "Free" means "let the time-stepping method choose time freely. The times specified in the Times field in the General section are not considered when a time step is chosen," from what I've seen, this is not strictly true. It is true the time steps are free to change, but (from using the code) I've seen that depending on the first time step request (and in some cases the final end time request) that the stepping I see in the log changes. If you use the "Free" method and ask for range(0,1e-6/20,1e-6) the initial step and consequently the subsequent steps that the solver takes will be different than if you request range(0,1,10) for example. The solver uses the Times request in some way to govern the choices even under the "Free" setting. Regards, Josh

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 22, 2013, 7:05 p.m. EDT
Hi Peyman,

Did using 1e-15 work for your problem? I'm having similar problems where the solution changes due to changes in what I input as the time range. Using a tiny initial step did seem to make the solutions more consistent across time range inputs, but I'm dubious as to whether it has settled down onto the right solution.
Hi Peyman, Did using 1e-15 work for your problem? I'm having similar problems where the solution changes due to changes in what I input as the time range. Using a tiny initial step did seem to make the solutions more consistent across time range inputs, but I'm dubious as to whether it has settled down onto the right solution.

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.