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.

the "if statement" in comsol

Please login with a confirmed email address before reporting spam

hi
the tutorial for the red blood separation use a if statement "if(fpt.dp==dp2,dp2/2,dp1)" to express the point radius, may I know its meaning? Thank you!

1 Reply Last Post Mar 12, 2016, 10:31 p.m. EST
COMSOL Moderator

Hello Wu Zhang

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: 8 years ago Mar 12, 2016, 10:31 p.m. EST
if syntax - if(cond1, expr1, expr2) -- if cond1 is true it is expr1 else expr2. I assume that if fpt.dp, i.e the particle diameter is dp2 then the radius is dp2/2 else it is dp1
if syntax - if(cond1, expr1, expr2) -- if cond1 is true it is expr1 else expr2. I assume that if fpt.dp, i.e the particle diameter is dp2 then the radius is dp2/2 else it is dp1

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.