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.

Delimit maximum and minimum values

Please login with a confirmed email address before reporting spam

Hello!!

Is there a way to delimit the maximum and minimum values for a specific variable? For instance, when I use the MS application mode I often get mass fraction values over 1 and below 0 if I don't use a very refined mesh. Could I say Comsol to take 1 if w>1 and to take 0 if w<0?

Thank you very much!!!

1 Reply Last Post 21.07.2010, 04:00 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.07.2010, 04:00 GMT-4
Hi
from my understanding there is nothing blocking you from using bolean conditions, or "if()" statements in most expression fields in COMSOL.
There is though an element to consider: COMSOL often uses the derivative of variables, which it creates via different methods depending on your input, and bolean opeators are not the easiest to derive. Smoothing the limits with Heavyside step functions or similar behaviour could help if one hit some convergion issues when solving

--
Good luck
Ivar
Hi from my understanding there is nothing blocking you from using bolean conditions, or "if()" statements in most expression fields in COMSOL. There is though an element to consider: COMSOL often uses the derivative of variables, which it creates via different methods depending on your input, and bolean opeators are not the easiest to derive. Smoothing the limits with Heavyside step functions or similar behaviour could help if one hit some convergion issues when solving -- Good luck Ivar

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.