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.
Skip unsolvable parameters in parametric sweep?
Posted 2013年9月4日 GMT-4 12:15 Studies & Solvers Version 4.3, Version 4.3a, Version 4.3b, Version 5.2, Version 5.2a 7 Replies
Please login with a confirmed email address before reporting spam
I run a parametric sweep and occasionally one of the parameters causes a simulation that doesn't converge.
e.g. the parameters are
param = 1, 2, 3, 4, 5 meters
and this simulation solves for 1, 2, 4, 5 meters but for whatever reason doesn't solve for 3 meters. It gives me an error.
The problem is, the parameter sweep just stops at param = 3 meters! How do I get it to, if it encounters something unsolvable, just skip 3 meters and continue to solve for param = 4 and 5 meters?
Thanks
Please login with a confirmed email address before reporting spam
In this way, the troublesome parameter step will still "converge" because you've iterated to the max amount of times. But, be careful because in this case the error will still be above the tolerance you set. You will have to be sure you individually check the error reported in the log for each parameter step to be sure the error is not too high for each of your returned solutions.
Best regards,
Josh Thomas
AltaSim Technologies
Please login with a confirmed email address before reporting spam
General question.
I run a parametric sweep and occasionally one of the parameters causes a simulation that doesn't converge.
e.g. the parameters are
param = 1, 2, 3, 4, 5 meters
and this simulation solves for 1, 2, 4, 5 meters but for whatever reason doesn't solve for 3 meters. It gives me an error.
The problem is, the parameter sweep just stops at param = 3 meters! How do I get it to, if it encounters something unsolvable, just skip 3 meters and continue to solve for param = 4 and 5 meters?
Thanks
Try 2.999 or 3.001 meters. Numerics is funny sometimes.
Lasse
Please login with a confirmed email address before reporting spam
General question.
I run a parametric sweep and occasionally one of the parameters causes a simulation that doesn't converge.
e.g. the parameters are
param = 1, 2, 3, 4, 5 meters
and this simulation solves for 1, 2, 4, 5 meters but for whatever reason doesn't solve for 3 meters. It gives me an error.
The problem is, the parameter sweep just stops at param = 3 meters! How do I get it to, if it encounters something unsolvable, just skip 3 meters and continue to solve for param = 4 and 5 meters?
Thanks
Try 2.999 or 3.001 meters. Numerics is funny sometimes.
Lasse
Yes that's what I usually do. But if I am sweeping a parameter 100 times, the simulation takes 24 hours to run, I don't want it to stop randomly on the 22nd value and then I must tweak that one value and run from scratch again...
Then it stops on the 26th value, I tweak that one value and run from scratch again...
You see the problem :)
Please login with a confirmed email address before reporting spam
General question.
I run a parametric sweep and occasionally one of the parameters causes a simulation that doesn't converge.
e.g. the parameters are
param = 1, 2, 3, 4, 5 meters
and this simulation solves for 1, 2, 4, 5 meters but for whatever reason doesn't solve for 3 meters. It gives me an error.
The problem is, the parameter sweep just stops at param = 3 meters! How do I get it to, if it encounters something unsolvable, just skip 3 meters and continue to solve for param = 4 and 5 meters?
Thanks
Try 2.999 or 3.001 meters. Numerics is funny sometimes.
Lasse
Yes that's what I usually do. But if I am sweeping a parameter 100 times, the simulation takes 24 hours to run, I don't want it to stop randomly on the 22nd value and then I must tweak that one value and run from scratch again...
Then it stops on the 26th value, I tweak that one value and run from scratch again...
You see the problem :) It shouldn't have to run all the prior values over again, it should just skip the offending value.
Please login with a confirmed email address before reporting spam
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
Please login with a confirmed email address before reporting spam
Hi,
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
Henrik,
Fantastic, works great.
David
Please login with a confirmed email address before reporting spam
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.
Suggested Content
- BLOG How to Use Job Sequences to Save Data After Solving Your Model
- FORUM Using simultaneously a Parametric and a Function sweep
- BLOG The Power of the Batch Sweep
- KNOWLEDGE BASE Running parametric sweeps, batch sweeps, and cluster sweeps from the command line
- FORUM Parametric sweep vs auxiliary sweep