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.

COMSOL if statement

Please login with a confirmed email address before reporting spam

I am trying to plot an arrow surface plot where the resulting arrows depend on where they are located in the geometry.

if (distance from xo,yo to x,y is less than r)/squareroot(absolute(x-xo)^2 + absolute(y-yo)^2) < r

then (the x component of the arrow is equal to dh/dx * -K2)

else (the x component of the arrow is equal to dh/dx * -K1)

(The dependent variable in my PDE is h)

How do I formulate this in COMSOL?

Another way I thought of solving this issue was defining some data set within a circle. But I also can't figure out how to do this?


0 Replies Last Post Oct 12, 2018, 12:06 a.m. EDT
COMSOL Moderator

Hello Isaac Wilkinson

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.

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.