AIM Tutorials

AIM Tutorials

Magnetics-Permanent Magnetic Circuit with Air Gap

    • joshua.wallace
      Ansys Employee

      In this tutorial, the magnetic flux density will be calculated. See the attached file for the tutorial of this problem.

    • Les-O-Lee

      (continued from the post above. This site is playing silly beggars.)

      So you can now select Electromagnetic physics, except that is not a valid thing to do ... at all.

      But, I hear you say, it must work because of the tutorial. Ok, fair point. Let's look at that in more detail then.

      Did you notice that the tutorial was “Created using ANSYS AIM 18.1.” Then by the fourth page it tells you to load 18.2. Hmm.
      Then in the contents on the first page there is a title for Mesh. That’s interesting because there is no such section in the actual document. But how can a full field simulation run without a mesh? So we go straight from geometry to Physics without a Mesh, as seen on page 7 of the tutorial. No wonder the Physics complains!

      How can this have happened? I have a tentative theory. This subject was titled Magnetics: Physics. But in 19.0 it is Electromagnetics. I think that between 18.1 and 18.2 they half changed it from Magnetics to Electromagnetics and broke the internal linkages. Easy to do, and also fairly easy to fix I would think.

    • Les-O-Lee

      (continued again)

      You can also note that if you try to add a Mesh after the geometry it doesn’t understand Magnetics or Electromagnetics as a valid reason for having a mesh.

       I claim that the tutorial is bogus in as much as it was started on 18.1 and edited to 18.2 without ever having tried it from start to finish on 18.2

       I am happy to delete my assertion if just one person can honestly claim to have run this tutorial from start to finish in 18.2

       I really want this simulation to work, and I have put a lot of effort into getting this far. I don’t imagine the 18.1 version is still in its licence period given that 18.2 runs out in 6 months. I look forward to 19.1 where hopefully they can fix this problem, and the help problem, and the Space Claim dimensioning problem.

    • Les-O-Lee

      So my next theory and plan is this: Given that the Aim 18.2 user interface to the Magnetic simulations is clearly broken, can we bypass the user interface using the built in scripting?

      The first step is to put the automatically created journal in an easily accessible place (or you could just create a short-cut to it).

      Top left file menu icon: Tools > Options … then Journals and Logs

      Then we start the workbench, create a Magnetics project using a geometry import, and see what the journal looks like (I prefer Notepad++ for this viewing).

      Then we close the workbench and try again with an Electric Conduction simulation, as this uses a mesh.

      Again we close the workbench and now we have two journals to compare.

      Now this journal is not a Python script as that would end in a .py file extension. And in fact the scripting is done in IronPython (which I only heard of yesterday). It seems to be Python with .NET functionality, so why it wasn’t called Python.NET is unclear.

      Looking at the journal files, the # at the beginning of a line is a comment. A colon is a tag for a functional block and the indenting is crucial to define where this block ends (since there are no braces or semi-colons).

      I merged the two journal files to electromagnetics and a mesh.

          meshing1.EngineeringIntent = 2

      In the meshing dialog box you have two options: “structural, thermal or electric conduction” or “Fluid flow or fluid-solid heat transfer”. In the script the string may not be exactly what I typed above. But IronPython is not a strongly typed language so you can give it a string or an int. Guessing it was an enum I tried 0, 1, 2, and 3 for the engineering intent. 0 is not accepted. 1 and 2 give the equivalents of the string types mentioned above, and 3 is not accepted. Apparently magnetics or electromagnetics is an unlisted intent. I can’t find any header source files to see if “Magnetics” is some larger value like 123, which would be very boring to try to test!

       (The merged script file is script2.wbjn but this site doesn't like .wbjn as an extension so I had to change it to txt )

    • Les-O-Lee

      The next area of attack was the script line:

          physicsRegion1.PhysicsType = "Electromagnetics"

      Again I tried different ints on the right hand side, running the script, seeing what happened, then closing the workbench and trying again. Only after I had done most of the testing did I wonder what the Reset() command in the script did. So I opened the scripting command window

      File > Scripting > Open command window

      And enter the Reset () command. Sure enough it reset the workbench environment. A few goes like that and I again realised that all I actually needed to do was to just run the next script variant as the script itself already contains a Reset().

      From direct experimentation it seems that the PhysicsType in question is really split into bit fields. With the least significant bit as B0 we have

      B0 = ?
      B1 = structural
      B2 = ?
      B3 = electrical conduction
      B4 = fluid
      B5 = thermal
      B6 = ?
      B7 = ?
      B8 = polymer extrusion
      B9 = electromagnetics

      You can enter 512 for the PhysicsType and get electromagnetics, and you can use 520 to get electromagnetics and electric conduction. Neither is valid however :-(

      The strings “Magnetic”, “Magnetics”, and “Electromagnetic” as PhysicsTypes are not recognised.


      This is what apparently constitutes HELP on the subject of PhysicsTypes ...

Viewing 4 reply threads
  • The topic ‘Magnetics-Permanent Magnetic Circuit with Air Gap’ is closed to new replies.