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.

Turn off step size tuning in parametric continuation?

Please login with a confirmed email address before reporting spam

Does anyone know how to turn off step size tuning in parametric continuation? For example I want it to change the parameter in steps of 0.2. I want COMSOL to change the parameter by 0.2, and then solve the model, and then change the parameter by 0.2 again, etc. I don't want the parameter to change by anything except 0.2 each time.

Instead, it changes the parameter by 0.2, and if it can't converge very very easily it changes the parameter back to take smaller steps of 0.05, etc. I want to turn this behavior off.

There's an option called "Tuning of step size". But if the box is unchecked, COMSOL doesn't care, it tunes the step size anyway.

Then I tried something else: I checked the box for "Tuning of step size", and typed in the parameters: "Initial step is 0.2, Minimum step size is 0.2, Maximum step size is 0.2". Did that work? Nope, COMSOL doesn't care, it still changes the step size to 0.05, etc.

The annoying thing is that COMSOL is so eager to change the step size that it does it prematurely! I'm using Newton's method and I set it to give up only after 25 iterations. But COMSOL doesn't care, it does only 5 or 6 iterations, and then just gives up and change the step size instead.

My model, it turns out, converges more reliably by using more iterations, than by using a small step size, but COMSOL does not seem to give me that choice!

Is there a trick or option I'm missing? Has anyone else had this issue??

Thanks in advance!

4 Replies Last Post Jun 18, 2013, 2:38 a.m. EDT
COMSOL Moderator

Hello David964

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 17, 2013, 8:04 a.m. EDT
David and other,

this seems to be a very old posting, but I am having the observations
with the 4.3 versions. Did anyone find a good way to the CMP *not* do these
intermedieate steps.

Thanks in advance


Regards

Jens
David and other, this seems to be a very old posting, but I am having the observations with the 4.3 versions. Did anyone find a good way to the CMP *not* do these intermedieate steps. Thanks in advance Regards Jens

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 17, 2013, 10:52 a.m. EDT
David and Jens,

I'm not quite sure if I understand your question...

but wouldn't a Parametric Solver (right click on the Study node) solve your problem?

try playing with the Parametric Solver option (turn it Off and Automatic and see which option suits you).

If you want something fancier, like going back and trying a smaller step in case the model dont converge, then I suggest you try using Livelink for Matlab. This module will let you write scripts that can handle those tasks.

--
cheers,
Felipe BM
David and Jens, I'm not quite sure if I understand your question... but wouldn't a Parametric Solver (right click on the Study node) solve your problem? try playing with the Parametric Solver option (turn it Off and Automatic and see which option suits you). If you want something fancier, like going back and trying a smaller step in case the model dont converge, then I suggest you try using Livelink for Matlab. This module will let you write scripts that can handle those tasks. -- cheers, Felipe BM

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 17, 2013, 11:33 a.m. EDT
Hi,

The Minimum step size is respected as long as the solver converges well. The automatic step-size algorithm detects poor convergence speed and other "problems" and reduces the step size. For a problem that never reaches quadratic convergence speed (for example, due to an incomplete Jacobian or too crude tolerance) this algorithm is not optimal.

We are looking into improving this behavior for future versions. In 4.3b, you can add a "dummy parameter" to the parametric solver; doing so will turn off the continuation.

Best regards,
Magnus Ringh, COMSOL
Hi, The Minimum step size is respected as long as the solver converges well. The automatic step-size algorithm detects poor convergence speed and other "problems" and reduces the step size. For a problem that never reaches quadratic convergence speed (for example, due to an incomplete Jacobian or too crude tolerance) this algorithm is not optimal. We are looking into improving this behavior for future versions. In 4.3b, you can add a "dummy parameter" to the parametric solver; doing so will turn off the continuation. Best regards, Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 18, 2013, 2:38 a.m. EDT
Felipe and Magnus,

thanks for replies.

Felipe, to better understand the problem: I want fewer paramtric step. Say I want to
solve only for two paramenter values. When set the parameters and use a simple stationary solve it converges nicely for any parameter. But when I start a parametric solve (be it "parametrc" or "continuation") the algorithm decides in some models to do many intermediate steps, which I believe to be unnecessary

And Magnus' trick avoids thes intermediate steps.

For the records and the help of others: I added a parameter, that is never used in the model, to the list of "continuation parameters" with one value and use the sweep type "all combination".

Thanks

Jens
Felipe and Magnus, thanks for replies. Felipe, to better understand the problem: I want fewer paramtric step. Say I want to solve only for two paramenter values. When set the parameters and use a simple stationary solve it converges nicely for any parameter. But when I start a parametric solve (be it "parametrc" or "continuation") the algorithm decides in some models to do many intermediate steps, which I believe to be unnecessary And Magnus' trick avoids thes intermediate steps. For the records and the help of others: I added a parameter, that is never used in the model, to the list of "continuation parameters" with one value and use the sweep type "all combination". Thanks Jens

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.