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.

Differentiation operator gives zero everywhere

Please login with a confirmed email address before reporting spam

I'm having trouble using the differentiation operator when plotting some results from my simulation and for defining variables.

Every time I try to use a derivative of the form d(u,t) or d(u,x), the result is zero for all times and locations. For instance, plotting Vx gives non-zero results, but d(V,x) gives zero results for the same solution, same location and same times.

What I primarily need is the time derivative of the electric field es.Ex. I think I should be able to use d(es.Ex,t), but that gives me zero as well.

2 Replies Last Post 12 gen 2012, 02:30 GMT-5
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12 gen 2012, 01:48 GMT-5
Hi

What about looking into the equations a bit ? ;)

With ES physics you solve for V, and your E field x component is defined internally in COMSOL as Ex = -Vx
Turn on the equation view (Options Preferences Show Equation View) and do not get confused with the poor notation Vx is in fact defined as d(V,x) but Ex is the "X" component of "E"

So if you are asking for d(E,x) you are looking for -Vxx the second derivative of the dependent variable "V".

but the derivatives are extracted from the "shape" functions you use and by default COMSOL mostly uses second order shape functions, and the 2nd derivative of a 2nd order polynomial is a constant

to get a better value, try using a third forth of fifth order shape function. (turn on the discretisation tab with Options Preferences Show Discretisation)

Concerning the time derivatives, you need to have a time dependent study

Try it out on a models like this one (4.2a)


--
Good luck
Ivar
Hi What about looking into the equations a bit ? ;) With ES physics you solve for V, and your E field x component is defined internally in COMSOL as Ex = -Vx Turn on the equation view (Options Preferences Show Equation View) and do not get confused with the poor notation Vx is in fact defined as d(V,x) but Ex is the "X" component of "E" So if you are asking for d(E,x) you are looking for -Vxx the second derivative of the dependent variable "V". but the derivatives are extracted from the "shape" functions you use and by default COMSOL mostly uses second order shape functions, and the 2nd derivative of a 2nd order polynomial is a constant to get a better value, try using a third forth of fifth order shape function. (turn on the discretisation tab with Options Preferences Show Discretisation) Concerning the time derivatives, you need to have a time dependent study Try it out on a models like this one (4.2a) -- Good luck Ivar


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12 gen 2012, 02:30 GMT-5
Hi Ivar,
I'm currently using a fifth-order shape function and a time-dependent study, so the derivatives I want should be available. The current problem is that I get zero for any derivative of the form d(u,t) or d(u,x) that I try to plot. For instance, I can plot "Vx", so I know that this derivative is non-zero, but if I try to plot it as d(V,x), I get zero.

Unfortunately, I couldn't open the model you attached, because it was created in a later version of COMSOL than I have. I'm using COMSOL 4.2--I guess you must be using 4.2a?

Thanks.
Hi Ivar, I'm currently using a fifth-order shape function and a time-dependent study, so the derivatives I want should be available. The current problem is that I get zero for any derivative of the form d(u,t) or d(u,x) that I try to plot. For instance, I can plot "Vx", so I know that this derivative is non-zero, but if I try to plot it as d(V,x), I get zero. Unfortunately, I couldn't open the model you attached, because it was created in a later version of COMSOL than I have. I'm using COMSOL 4.2--I guess you must be using 4.2a? Thanks.

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.