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.

Plotting differential quantities in 1D plots

Christopher Timberlake

Please login with a confirmed email address before reporting spam

Hi,

I'm trying to plot the differential of a magnetic field in the z direction with respect to z on a model of a magnetic field around a current loop (I'm very new to comsol). When I plot just the field in the z direction against z the plot makes sense and it is apparent that there would be a field gradient (this also makes sense physically). However, I keep only getting a flat line of 0 for whatever differential I plot. what I've been trying to plot is d(mf.Bz, z) against z and this gives me a straight line at 0. Any help would be appreciated.

Thanks

1 Reply Last Post 20 sept. 2016, 08:04 UTC−4
Sergei Yushanov Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 20 sept. 2016, 08:04 UTC−4
Christopher,

Magnetic Field (mf) interface uses curl elements, meaning that you can not obtain derivatives of the magnetic field with these elements. To get derivatives, you need to add another Coefficient From PDE (c) interface with Lagrangian shape functions and perform mapping, as explained in the following Comsol blog:

www.comsol.com/blogs/plotting-spatial-derivatives-magnetic-field

Regards,
Sergei
Christopher, Magnetic Field (mf) interface uses curl elements, meaning that you can not obtain derivatives of the magnetic field with these elements. To get derivatives, you need to add another Coefficient From PDE (c) interface with Lagrangian shape functions and perform mapping, as explained in the following Comsol blog: https://www.comsol.com/blogs/plotting-spatial-derivatives-magnetic-field Regards, Sergei

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.