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.

Formula/Syntax to specify non-negative concentration

Please login with a confirmed email address before reporting spam

Hello.

While using chemical reaction engineering physics, I was wondering if there is a function or syntax to prevent the concentration of species to become negative.

I found that in 3.5, the syntax ("mod1.cs_C3H6>0") works to prevent the concentration from becoming negative.

I am not sure what function or constraint can be used in 4.2.

Any advise?

Thank you
Brian

1 Reply Last Post 2012/02/06 20:09 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012/02/06 20:09 GMT-5
Well, I was having the same problem when working with a pde with reaction diffusion equations.
My advise to you would be not to "tweak" the equations at that level, but rather to let the solver pick the actual true solution from the pde. I think the negative solution happens because your model might be a little too sensitive.

A way around that is to make a simple change of variable. For example let w= log(c) and then rewrite the equation from there.
Good luck
Well, I was having the same problem when working with a pde with reaction diffusion equations. My advise to you would be not to "tweak" the equations at that level, but rather to let the solver pick the actual true solution from the pde. I think the negative solution happens because your model might be a little too sensitive. A way around that is to make a simple change of variable. For example let w= log(c) and then rewrite the equation from there. Good luck

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.