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

Please login with a confirmed email address before reporting spam

Hello,

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

1 Reply Last Post Sep 18, 2016, 6:00 a.m. EDT
COMSOL Moderator

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.


Please login with a confirmed email address before reporting spam

Posted: 8 years ago Sep 18, 2016, 6:00 a.m. EDT
Hi
using the version 5.2, in the variable expression i try to use sinh(phi) or cosh(phi) and give them a name , the unit of (phi) is the volt wich is the variable of electrostatic module, but the color is orange and show ''unexpected unit of input'' so i can't used it in boundary condition ad i can't solve my problem
Appreciate much for your help!!
Hi using the version 5.2, in the variable expression i try to use sinh(phi) or cosh(phi) and give them a name , the unit of (phi) is the volt wich is the variable of electrostatic module, but the color is orange and show ''unexpected unit of input'' so i can't used it in boundary condition ad i can't solve my problem Appreciate much for your help!!

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.