Hi, I am working with COMSOL 5.2 a. Is there still a same function to set as what you said about "if(c<0,eps,c)" ? Cause when I try with Definitions--> variables, it goes red (means can not recognized) after I put the if function under expression.
Thanks,
Blake
Hi,
Here is one trick to solve negative concentrations.
I made variable "C" which is defined by "if(c<0,eps,c)" under Definitions => Variables. Instead of concentration "c" I used variable "C". Now variable "C" is never below zero. Eps is very small number defined is Comsol.
Does this help you?
Best regard
Tero
Thanks,
Blake
Hi,
Here is one trick to solve negative concentrations.
I made variable "C" which is defined by "if(c<0,eps,c)" under Definitions => Variables. Instead of concentration "c" I used variable "C". Now variable "C" is never below zero. Eps is very small number defined is Comsol.
Does this help you?
Best regard
Tero