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 Jun 11, 2019, 9:23 a.m. EDT
Thure Ralfs COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Jun 11, 2019, 8:55 a.m. EDT
Updated: 5 years ago Jun 11, 2019, 8:55 a.m. EDT

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: 5 years ago Jun 11, 2019, 9:23 a.m. EDT

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.