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.

conditional expression "if"

Please login with a confirmed email address before reporting spam

it is possible to use an conditional expression "if" in an analitic function?

3 Replies Last Post 10.03.2011, 09:58 GMT-5
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 22.02.2011, 09:54 GMT-5
Hi

mostly yes, try it.
But be aware that expressions and functions should ideally be derivable once or even better twice, so use with sens and try to keep your function continuous to avoid convergence issues

--
Good luck
Ivar
Hi mostly yes, try it. But be aware that expressions and functions should ideally be derivable once or even better twice, so use with sens and try to keep your function continuous to avoid convergence issues -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 10.03.2011, 08:21 GMT-5
Hi,

I'm having trouble with the 'if' operator.
Would you mind explaining what you mean by combining it with the 'sens' operator please?
I tried to combine the two but I am getting errors.

Thanks!
Hi, I'm having trouble with the 'if' operator. Would you mind explaining what you mean by combining it with the 'sens' operator please? I tried to combine the two but I am getting errors. Thanks!

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 10.03.2011, 09:58 GMT-5
Hi

sorry that was my floppy and too quick writing there is no sens operator, its just that an if operator makes often step functions and you should avoid steps, but make the transition smooth with a heaviside combination, easy in V4 because step functions or pulse functions with smoothing are "built in" see the functions tab under Definitions

--
Good luck
Ivar
Hi sorry that was my floppy and too quick writing there is no sens operator, its just that an if operator makes often step functions and you should avoid steps, but make the transition smooth with a heaviside combination, easy in V4 because step functions or pulse functions with smoothing are "built in" see the functions tab under Definitions -- 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.