Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 26527

HIgher order derivatives of solved variables

$
0
0
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.

Viewing all articles
Browse latest Browse all 26527

Trending Articles