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.

Parametric sweep : Can I bypass (ignore)the error occuring for a particular parameter?

Please login with a confirmed email address before reporting spam

In coupled MEMS electrostatic study, I defined two parameters: Vdc and InitialGap.

These two parameters were used for parametric sweep on the electromechanics module of Comsol 4.3.

Now Comsol runs my model for these parameters one by one , as in nested loop. Total number of parameter combination equals (number of Vdc values)x(number of InitialGap values).

Whenever instability occurs, Comsol cannot converge and returns and error.This is fine. But the error which comes terminates the computational progress once the error occurs, further combinations of the parameters are not evaluated, because the error was returned.

Is there any way to sort out this because the alternative to this will be running seperate Comsol simulations in parallel for individual InitialGap values which will be tiresome. Is there an option which bypasses(or ignores) errors during parametric sweep, so that rest of the parameter combinations are evaluated?


4 Replies Last Post 3 gen 2014, 00:36 GMT-5
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 1 gen 2014, 10:24 GMT-5

Check this thread: www.comsol.com/community/forums/general/thread/39298

Cheers and Happy New Year
Edgar

--
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Check this thread: http://www.comsol.com/community/forums/general/thread/39298 Cheers and Happy New Year Edgar -- Edgar J. Kaiser emPhys Physical Technology http://www.emphys.com

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 1 gen 2014, 12:14 GMT-5
COPIED ANSWER:
There is a way of doing this, although not completely general. If you do a 'Show default solver' and go to the Parametric node under 'Job Configurations' there is a check box 'Stop if error'. Clear it. This approach assumes that the sweep is an 'outer' sweep so that there is a 'Job Configurations' node in the solver.

Being able to continue after a parameter value caused an error is a functionality which has been recognized as important. In the upcoming version (to be released this autumn) it will be possible to instruct the parametric solver also within the Stationary solver to store dummy solutions and continue and to the next parameter value if an error occurs.

Regards,
Henrik

copied from HENRICK
COPIED ANSWER: There is a way of doing this, although not completely general. If you do a 'Show default solver' and go to the Parametric node under 'Job Configurations' there is a check box 'Stop if error'. Clear it. This approach assumes that the sweep is an 'outer' sweep so that there is a 'Job Configurations' node in the solver. Being able to continue after a parameter value caused an error is a functionality which has been recognized as important. In the upcoming version (to be released this autumn) it will be possible to instruct the parametric solver also within the Stationary solver to store dummy solutions and continue and to the next parameter value if an error occurs. Regards, Henrik copied from HENRICK

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 gen 2014, 11:12 GMT-5

In the upcoming version (to be released this autumn) it will be possible to instruct the parametric solver also within the Stationary solver to store dummy solutions and continue and to the next parameter value if an error occurs.


Looks like this indeed made it into v4.4, with the new "parametric solver". I haven't upgraded yet--anyone have any positive/negative comments on the new feature?

v/r

-Bryan

[QUOTE] In the upcoming version (to be released this autumn) it will be possible to instruct the parametric solver also within the Stationary solver to store dummy solutions and continue and to the next parameter value if an error occurs. [/QUOTE] Looks like this indeed made it into v4.4, with the new "parametric solver". I haven't upgraded yet--anyone have any positive/negative comments on the new feature? v/r -Bryan

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 3 gen 2014, 00:36 GMT-5
"There is a way of doing this, although not completely general. If you do a 'Show default solver' and go to the Parametric node under 'Job Configurations' there is a check box 'Stop if error'. Clear it. This approach assumes that the sweep is an 'outer' sweep so that there is a 'Job Configurations' node in the solver."

Disabling 'Stop if error' is great but does not help because it only stops returning the error, but still stuck in the inner parametric loop.
To elaborate:
'Stop if error' does not 'break' the inner loop but it 'continue' it after the error occurs. I am referring to the 'break' and 'continue' in the sense they are used in java, c, or Matlab.
I want it to 'break' the inner loop because for each 'continue' execution the same error occurs and all the parameters are tried which takes a lot of time.

'Stop if error' is similar to:
for i=1 to 10
for j=200 to 300
compute();
if (error occurs), continue;
end
end

I want:
for i=1 to 10
for j=200 to 300
compute();
if (error occurs), break;
end
end

Here 'i' and 'j' refer to the parameters which have been applied parametric sweep. Suppose error occurs at j=225, then for values j=226 to j= 300, the same error will occur, and I don't want to 'continue' for values j=226 to j= 300. It consumes 99% of execution time because of the problem mentioned in the thread: www.comsol.co.in/community/forums/general/thread/41405/
"There is a way of doing this, although not completely general. If you do a 'Show default solver' and go to the Parametric node under 'Job Configurations' there is a check box 'Stop if error'. Clear it. This approach assumes that the sweep is an 'outer' sweep so that there is a 'Job Configurations' node in the solver." Disabling 'Stop if error' is great but does not help because it only stops returning the error, but still stuck in the inner parametric loop. To elaborate: 'Stop if error' does not 'break' the inner loop but it 'continue' it after the error occurs. I am referring to the 'break' and 'continue' in the sense they are used in java, c, or Matlab. I want it to 'break' the inner loop because for each 'continue' execution the same error occurs and all the parameters are tried which takes a lot of time. 'Stop if error' is similar to: for i=1 to 10 for j=200 to 300 compute(); if (error occurs), continue; end end I want: for i=1 to 10 for j=200 to 300 compute(); if (error occurs), break; end end Here 'i' and 'j' refer to the parameters which have been applied parametric sweep. Suppose error occurs at j=225, then for values j=226 to j= 300, the same error will occur, and I don't want to 'continue' for values j=226 to j= 300. It consumes 99% of execution time because of the problem mentioned in the thread: http://www.comsol.co.in/community/forums/general/thread/41405/

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.