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.

If condition in coupled PDEs

Please login with a confirmed email address before reporting spam

I am solving 9 coupled-Nonlinear PDEs. How can I add an "If condition" to dependent variables? (e.g constrained their value to change in a specific domain, 0 and 1)
(if x>1 then x=1 and if x<0 then x=0)

2 Replies Last Post 12 juin 2012, 10:43 UTC−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 7 juin 2012, 02:04 UTC−4
Hi

check the doc on the if() operator, or use Bolean expressions

--
Good luck
Ivar
Hi check the doc on the if() operator, or use Bolean expressions -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12 juin 2012, 10:43 UTC−4
Thank you,
but I do not know where to put these IFs. I have 9 PDEs(g) and each of them has its own Gama and f. I add some if at the end of f part (force part) but it says Syntax error.
Should I add these IFs in Constraints part?
Thank you, but I do not know where to put these IFs. I have 9 PDEs(g) and each of them has its own Gama and f. I add some if at the end of f part (force part) but it says Syntax error. Should I add these IFs in Constraints part?

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.