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.
unexpected unit of input, derivative of analytic function
Posted 28 nov. 2014, 12:45 UTC−5 Modeling Tools & Definitions, Parameters, Variables, & Functions 1 Reply
Please login with a confirmed email address before reporting spam
I am very new to Comsol. I use Comsol 4.4.
I have created an analytic function Temp = (deltaT)/(1+(r/w)^2) <-- it defines a temperature gradient.
Argument -> r, argument unit -> m;
Function unit -> K;
I then define a conservative flux in the PDE:
-r[1/m]*(DS*cSr+DTS*cS*grad(Temp(r))*step2(t[1/s])*step1(t[1/s])) <-- expected unit mol/(m^2*s)
where
[DS]=m^2/s;
[cS]=mol/m^3;
[DTS]=m^2/(s*K);
step function is used to turn Temp(r) on and off.
But I need a derivative of Temp(r) in the PDE. And when I use grad(Temp(r)) or Temp(r)r, I get an error "unexpected unit of input".
Could you suggest what is wrong?
Thank you in advance!
Evgeniia
Hello Evgeniia Edeleva
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.