Discussion Forum

calculation of derivative in 3D

Thread index  |  Previous thread  |  Next thread  |  Start a new discussion

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   7 Replies   Last post: January 22, 2012 2:07pm UTC
Rana Afshar

Rana Afshar

July 2, 2010 9:19am UTC

calculation of derivative in 3D

Hi all,
I want to run a calculation in comsol, and for that, I need to calculate the derivative of a function
I already ran this calculation in 2D and it works, but while I get to 3D, the derivative is calculated as zero although it is not:
To check that I went to:
Postprocessing -> cross section Plot Parameters
In line/extrusion tab, I choose magnetic flux density, x component, I have a graph that its derivative cannot be zero (attached)
Then I type d(Bx_emqa,x) in expression case, the graph of the result is zero(attached)!
What am I doing wrong? the syntax of derivative in 3D is different than the one in 2D?
thanks

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Arye Nudelman

Arye Nudelman

July 16, 2011 4:59pm UTC in response to Rana Afshar

Re: calculation of derivative in 3D

Hey

how are you?

did you solve described problem?
becuse i have exactly the same problem

Thanks a lot and
Best regards,
Arye Nudelman

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Matt Eichenfield

Matt Eichenfield

August 2, 2011 6:53pm UTC in response to Arye Nudelman

Re: calculation of derivative in 3D

I also have exactly the same problem.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg
Moderator

August 14, 2011 3:33pm UTC in response to Matt Eichenfield

Re: calculation of derivative in 3D

Hi

I do not have access to my COMSOL running PC, but there are a few things to know abot derivatives: COMSOl can only extract them if the shape functions are of high enough order (2 or more). Then COMSOl has already defined as variables most of the first and second order derivatives. Do not forget that for ACDC you solve for A, the B is then derived from the derivative of A and the gradient of B from the second derivative of A. So if you are looking for the first derivative of the gradient, your are using the third derivative of the dependet variable A, hence you need at least 3rd order shape functions.

I suspect this is the reason why you get only "0". the > 2nd derivative of a second ordr equation is "0" so mathemataically it is correct ;)

Even if COMSOl is looking after most of the physics and math behind the scene, you must be sure you understand too, the FEM limitations underneath

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Hendrik Santoso Sugiarto

Hendrik Santoso Sugiarto

August 25, 2011 8:10am UTC in response to Ivar Kjelberg

Re: calculation of derivative in 3D

I also encountered the same problem
I have tried different cross section line and ended up with zero result when I differentiated it
anyone knows the solution?

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

soljang

soljang

September 22, 2011 10:23pm UTC in response to Hendrik Santoso Sugiarto

Re: calculation of derivative in 3D

I'm afraid I have the same question. I'm not able to derive dB/dz from A. It says it cannot be evaluation as shown in the picture attached. I think it should be Axyz but it does not work.

Attachments:   Capture5.PNG  

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Chen Chen

Chen Chen

January 21, 2012 5:49pm UTC in response to Ivar Kjelberg

Re: calculation of derivative in 3D

Hi, i try to get the derivative of H in x,y,z direction in MF module(3D) by using the command d(Hx,x). while the result is zero. i already changed the discretization option to cubic. can you help me out. thanks

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg
Moderator

January 22, 2012 2:07pm UTC in response to Chen Chen

Re: calculation of derivative in 3D

Hi

indeed in my up to date 4.2a in 2D I can plot the derivative d(mf.Hx,x) even with default second order discretisation, but in 3D it's all = 0 even if I select higher order discretisation.

Not sure why, it seems that B is calculated slightly differently internally between 2D and 3D, could it be from the way the Bx = curl of Ax is extracted ?

It's worth to try to ask support if nobody else has a good reply that we have missed ;)

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse


Rules and guidelines