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.

Stop condition expression

Please login with a confirmed email address before reporting spam

How do I set up the stop condition if I want the solver to stop when the point probe expression ppb1 is less than a value?

4 Replies Last Post 2 nov 2012, 16:27 GMT-4
COMSOL Moderator

Hello Collin Mui

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 2 nov 2012, 05:58 GMT-4
I have the same problem.

The stop condition expression that I use is

mod1.ppb1<0.1

where mod1 is the index from the model and ppb1 is the point probe.

The expression is well evaluated and the model works but the stop condition isn't.

Does anybody know why?

Paul
I have the same problem. The stop condition expression that I use is mod1.ppb1

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 nov 2012, 05:59 GMT-4
If I use

mod1.ppb1-0.1

the model stops when the point value reaches the value 0.1, therefore it works. But what about "less than" ?
If I use mod1.ppb1-0.1 the model stops when the point value reaches the value 0.1, therefore it works. But what about "less than" ?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 nov 2012, 06:08 GMT-4
Dear Collin,

I was killing my brain with this and finally I have discovered how it works.

Just write:

0.5-(modx.ppby<value)

where x and y denote the index of model and probe evaluation and the value is the desired value. My example:

0.5-(mod1.ppb1<0.02)

Dear Collin, I was killing my brain with this and finally I have discovered how it works. Just write: 0.5-(modx.ppby

Nagi Elabbasi Facebook Reality Labs

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 nov 2012, 16:27 GMT-4
You figured it out obviously. I just want to clarify one thing. The Stop condition terminates the analysis when the stop expression becomes negative. The Boolean operators like >, < evaluate to 0 (False) or 1 (True). That’s why they don’t work as you expected. Your modified expression takes care of that.
You figured it out obviously. I just want to clarify one thing. The Stop condition terminates the analysis when the stop expression becomes negative. The Boolean operators like >, < evaluate to 0 (False) or 1 (True). That’s why they don’t work as you expected. Your modified expression takes care of that.

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.