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.

HIgher order derivatives of solved variables

Please login with a confirmed email address before reporting spam

I was wondering if someone could help me with an issue I am having in the "Magnetic Fields (mf)" module. As a test, I am doing a very simple simulation that calculates the field for a given external current distribution (in 2D). For my application I need to calculate the second "y" derivative of the magnetic flux density in the "y" direction (mf.By). I understand that these derivatives might be quite noisy but I wanted to see them anyway. However, when I try to plot d(d(mf.By,y),y), it evaluates to 0 which is obviously not the correct answer.
Looking around the forums and the documentation, it appears that comsol by default uses second order shape functions (I am not entirely sure what they are...). This apparently means that I can not evaluate derivatives of order higher that 2. I assume that, since the model solves for the magnetic vector potential (A), if I ask for the second derivative of the flux density (which is itself a derivative of A), I am asking for a 3rd order derivative of A (which fails in 2nd order shape functions).
So to get the result I need, I think I have to increase the order of the shape functions. I just can't find where to do this. I activated the "Discretization" option under the "Show" menu and selected "Cubic" in the "Magnetic Fields (mf)" node of the Model Builder (see attached image) but this doesn't help. The degrees of freedom increase accordingly but I still get all zeroes in the second derivative. I can't find anywhere else to change this in my version of Comsol and I don't know what I am doing wrong...
Thanks in advance for any help.


2 Replies Last Post 11.03.2015, 09:01 GMT-4
COMSOL Moderator

Hello yausern

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: 10 years ago 11.03.2015, 06:53 GMT-4
Hello yausern,
i'm having the same issue as you. Do you manage how to solve this problem with third order derivative of flux density?
Thanks in advance for your help!!
Giulia
Hello yausern, i'm having the same issue as you. Do you manage how to solve this problem with third order derivative of flux density? Thanks in advance for your help!! Giulia

Walter Frei COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 11.03.2015, 09:01 GMT-4
Hello Giulia ,

You will find this article helpful:
www.comsol.com/blogs/plotting-spatial-derivatives-magnetic-field/

Best Regards,
Hello Giulia , You will find this article helpful: http://www.comsol.com/blogs/plotting-spatial-derivatives-magnetic-field/ Best Regards,

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.