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.

Reactions with non-integer exponents

Please login with a confirmed email address before reporting spam

I am using the transport of diluted species physics (let's call it species "c") and have stumbled across a problem that is driving me up the wall. I have the diffusion equation being applied to a 3D geometry but there is also a REACTION part to my model, which I added to the physics and gave a reaction rate. Within the reaction rate I am using a non-integer exponent for example: -c^(2/3).

Now, when I do this COMSOL tries to apply this power to negative values and so my question is this: is there a way to tell COMSOL that if it comes across a negative value, to just treat it as zero? I.e if c<0 then make c=0.

I am slowly going mad, help me Obi-Wan Kenobi!

David

1 Reply Last Post 16 févr. 2017, 05:43 UTC−5

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 16 févr. 2017, 05:43 UTC−5
I suggest that instead of writing c^(2/3), write (max(eps,c))^(2/3). I cannot guarantee that it works 100% but please try.

eps is a machine constant, a very small positive number.

BR
Lasse
I suggest that instead of writing c^(2/3), write (max(eps,c))^(2/3). I cannot guarantee that it works 100% but please try. eps is a machine constant, a very small positive number. BR Lasse

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.