Magnetostatics analysis system - Magnetic flux density distribution (not Maxwell 2D or 3D)

PD1029PD1029 Member
edited August 20 in Structures


I am trying to simulate the Halbach array in flat magnet array configuration with samarium cobalt magnets. I have defined the polarization direction for each magnet by creating a coordinate system and duplicating the material property. I have successfully performed the simulation but I am not able to visualize the field distribution as shown in the figure. I tried different graphic settings using vector display but failed to achieve the desired field distribution. Should I change the analysis settings? or there should there be some changes in the graphic settings? Or do i have to generate a 2-D geometry for the 3-D model? Can anyone guide me here?

Thank you

Simulation result:

Best Answers



  • icellbicellb Member


    You could draw a rectangle on the x-z plane cutting across your structure, then plot magnetic field on that plane only.

  • PD1029PD1029 Member

    Hello @icellb , do you mean that i should create an enclosure around the geometry. I have already created the geometry, it is hidden in the image from the simulation result.

    Thank you for your reply.

    Still It does not solve the issue

  • icellbicellb Member

    Hi, PD1029,

    By saying enclosure, I guess you meant the "3D region" you created. What I meant was not a 3D enclosure but a 2D plane. To show the target field distribution, it is better to plot field on a plane rather than a 3D space. You just need to draw another plane (it will not affect your geometry or simulation), right click that plane and choose to plot B field. Hope I understood you correctly.

  • PD1029PD1029 Member

    Hello @icellb , I tried creating zx plane.

    I don't find the option to plot b-field. Could you please elaborate on how to proceed further?

    Thank you for your responses. Really appreciate your help.

    I am attaching some pictures. Could you please take a look?

  • icellbicellb Member


    Right click on that plane, choose field->B->Mag_B.

  • PD1029PD1029 Member

    could you take a look at the second image from my last comment. I right clicked, it does not show any option to plot the B field.


  • PD1029PD1029 Member
    edited August 20

    Hello @peteroznewman,

    Kindly take a look at the question on top of the page.

    Can you guide me on how to do visualize the magnetic field distribution in the flat magnet array?

    I would really appreciate if you could advice me here

    Thank you

  • Hello,

    I believe you need to go back to CAD and add a large solid block around the magnets and assign that block the material property of air.

    The solid block must have a magnet shaped cavity at the center. SpaceClaim can do this for you by using the Enclosure tool.

    You also want to use the Share button on the Workbench tab to create shared topology so the mesh connects from the magnet to the air.

  • PD1029PD1029 Member

    Hello @peteroznewman ,

    I followed your advice. I created an enclosure and also used the share topology tool. Still I am not getting the desired result.

    I want to get the result as shown in the figure below

    In order to achieve the magnetic polarization, I created a duplicate material property and a co-ordinate system for each magnet and assigned the direction as demonstrated in the image above.

    I am attaching the simulation results. Kindly take a look. My aim is to be able to show the field lines as shown in the Halbach array image. Do I have to change some analysis settings or it can be achieved by changing the visualization in the simulation?

    In the graphics, there are two options - uniform and proportional vectors. I have chosen proportional to in order to visualize the field distribution. Since, the vectors with blue color shows 0T it is of no use. However, I have provided an image below showing with the uniform vector selection. Kindly guide me here, what has to be done.

    Thank you very much for your time.

  • PD1029PD1029 Member

    Hello @peteroznewman, thank you very much for the detailed explanation. I followed your advice and applied it in the simulation.

    I am attaching the image from the simulation result below with vector display and isolines:

    Result for all bodies(vector display):

    Result for enclosure(vector display):


    Also, i tried attaching the project file in .wbpz format. this format is not allowed i guess. So, i have attached a .rar file. I am not quite sure if that works. I think you will be able to open the zip(.rar) file. Once again, thank you for your time and advice.

  • PD1029PD1029 Member

    Hello @peteroznewman, I have attached both the files .wbpz and .wbpj. I hope you will now be able to open it

  • wrbulatwrbulat Forum Coordinator

    I think the problem is this: the image depicts magnetic fluxlines. Fluxlines are lines along which the magnetic flux density B is parallel. In 3D magnetic models, I think the field results image that is closest to this (but NOT the same thing) is a vector plot of B, which I can see you have created. The vectors are also parallel to B, but they are in general not "aligned" as the fluxlines are.

    Using 2D models it IS possible to plot fluxlines (by making contour plots of AZ - the nodal degree of freedom that represents the out of plane component of the magnetic vector potential demoted in the literature as A). If you create a 2D planar model which is a cross section of the Halbach array, it should allow you to create a plot of fluxlines.

  • wrbulatwrbulat Forum Coordinator

    I should add that I think the 3D analogy to fluxlines are called fluxtubes:

    and that the results of a 2D planar model of the Halbach array cross section will differ somewhat from those calculated at the cross section by a 3D model because the 2D planar model assumes no field variation in the z direction (normal to the plane of the model).

  • Hello @peteroznewman , sorry for the delayed response. I had examinations in the month of August and September, that is why i was not able to work on the model and could not reply here.

    The model you worked on in ANSYS 2020 R1, that is what I was trying to do.

    Could you explain to me how did you eliminate the air gaps between the magnets? How were you able to mesh that? So that I can also achieve the same results.

    Thank you very much. Really appreciate your help.

  • Hello @peteroznewman ,

    I was successfully able to do all of it but as you can see in the picture below, the visualization is still not the same as yours. I followed your advice and eliminated the air gaps. I am using ANSYS student. Is it because of the size limits of the elements and nodes? In the student license the nodes and number of elements are limited to 32,000 only. ANSYS does not allow elements than 32,000.

Sign In or Register to comment.