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.

Stop sweep when a probe value decreases

Please login with a confirmed email address before reporting spam

Hi all,

I was introduced to the "stop condition" in parametric sweeps (see attached). Is it possible to make a sweep stop when a probe value for the new solution is smaller than that from the preveous solution?

Thanks, Jacob



2 Replies Last Post 11 giu 2019, 09:23 GMT-4
Thure Ralfs COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 11 giu 2019, 08:55 GMT-4
Updated: 6 years ago 11 giu 2019, 08:55 GMT-4

Hi Jacob

If I understand you question correct then, yes you can. You can see a very simple example in the attached model. I use a Global ODE to store “Tnew” in a new dependent variable “Told” and to make “Told” the previous solution I add a “Previous Solution” node under the parametric solver step (same place as you “Stop condition”.

Best regards Thure

Hi Jacob If I understand you question correct then, yes you can. You can see a very simple example in the attached model. I use a Global ODE to store “Tnew” in a new dependent variable “Told” and to make “Told” the previous solution I add a “Previous Solution” node under the parametric solver step (same place as you “Stop condition”. Best regards Thure


Please login with a confirmed email address before reporting spam

Posted: 6 years ago 11 giu 2019, 09:23 GMT-4

Hi Thure,

Thanks for your reply! That works for me!

Best, Jacob

Hi Thure, Thanks for your reply! That works for me! Best, Jacob

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.