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.

how to set a if condition in chemical reaction flow?

Please login with a confirmed email address before reporting spam

Hi,

This is a starter of COMSOL.

I'm calculating a chemical recation with the solution flowing through a thick porous media in one dimention x.

I want to set a condition to define: only when the flow arrives position x, the reaction occurs, else the the reaction rate r(t)=0.

the following is my setting:

if(t*u(t,x)>0,r(t),0),

where t is time, u(t,x) is the velocity field,r(t) is the reaction rate,

but it fails.

Thank you for your help.


0 Replies Last Post 17 lug 2020, 03:03 GMT-4
COMSOL Moderator

Hello Shuaitong Liang

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.