Differences between revisions 2 and 4 (spanning 2 versions)
Revision 2 as of 2009-10-12 21:47:58
Size: 4976
Editor: HaixingMiao
Comment:
Revision 4 as of 2009-10-12 21:54:04
Size: 4597
Editor: HaixingMiao
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
In this section, we will briefly introduce the procedure of using Comsol Multiphysics and show how to combine Comsol with MATLAB for a flexible parametric analysis of the suspension system. In this section, we will briefly introduce the procedures of using Comsol Multiphysics and show how to combine Comsol with MATLAB for a flexible parametric analysis of the suspension system.
Line 5: Line 5:
Take the single suspended magnet for example, the procedure is the following: == Modeling Procedures ==

Take the single suspended magnet for example, the procedures are the following:
Line 75: Line 77:

'''Numerical results'''

The following figure shows the resulting magnetic force as a function of the separation between two magnets. The force
changes almost in the same way as in the case of two current loops near the maximum point. In this figure, the horizontal
scale is different from the case with current loops due to the finite thickness of the magnets.

attachment:fig_mag_force_numerical.JPG

In the previous sections, we used the current-loop interactions to gain qualitative understanding of the situation with real magnets; however, to gain a quantitative picture, we need to consider properties of real magnets and model them carefully. This will be achieved using Comsol Multiphysics modeling.

In this section, we will briefly introduce the procedures of using Comsol Multiphysics and show how to combine Comsol with MATLAB for a flexible parametric analysis of the suspension system.

Modeling Procedures

Take the single suspended magnet for example, the procedures are the following:

(i) Choosing the corresponding module in Comsol:

The corresponding model is built by choosing "AC/DC module>Statics, Magnetic>Magnetostatic, No currents". There is an example in the Comsol Model Library from which one can see how magnetic force is calculated. It is in "AC/DC Module>Tutorial Models>rod and permanent magnet".

(ii) Creating objects:

We then need to create two cylinder magnets. In addition, a large block needs to surround the two magnets to simulate the air. These can be produced in the "Draw" menu of the graphic interface of the Comsol.

The dimension of the magnets is identical to commercially available ones. Specifically, the dimension of the top magnet is 3 inch in diameter and 1/2 inch in height. The suspended magnet is 1.5 inch in diameter and 1/4 inch in height. The resulting model figure is shown by the following:

attachment:fig_model_2_mag_sketch.JPG

(iii) Specifying the physical property of the magnets:

Next step is to specify the physical property of the magnets. We need to choose "Physics>Subdomain Settings" where we can specify the permeability and the magnetization of the magnets which are also chosen to be identical to the real magnets. For the magnets, we choose attachment:fig_cons_relation.JPG and the magnetization of the top magnet is attachment:fig_magnization_1.JPG and the suspended one is attachment:fig_magnization_2.JPG, both of which are deduced from the specification given in http://www.kjmagnetics.com/categories.asp. In addition, we define a force variable for the suspended magnet as "sus" in the "Subdomain Settings>Forces>Electromagnetic force variables".

(iv) Specifying the boundary condition:

A further step is to specify the boundary conditions in "Physics> Boundary settings". Since no magnetic field extends to infinity, there is no magnetic field lines go through the infinity boundary. Therefore, to simulate this condition, we require that the magnetic fields should be tangential to all block surfaces, namely attachment:fig_mag_norm_boundary_cond.JPG.

(v) Creating the mesh:

The next step is to mesh the domain. In order to decrease the numerical errors, the mesh of the magnets need to be treated specially. We require that the minimal mesh size on the magnets to be 0.01. We leave the mesh for the block with its default value. The resulting mesh is shown in the figure below.

attachment:fig_model_2_mag_mesh.JPG

(v) Solving the problem:

Then we are ready to solve the problem simply by pressing the "=" icon. If one wants to specify the solver and meshing method, one can look at "Solve>Solver Parameters" for more details and change some of the specifications. Here we use the adaptive meshing to improve the accuracy. The resulting magnetic field strength at z-direction is shown in the figure below. The Comsol file for this model is also included.

attachment:fig_z_field_modified.JPG

attachment:model_2_mag_adaptive_mesh.mph

(vi) Postprocessing:

To obtain the z-direction force of the suspended magnet, we can simply look at the "Postprocessing>Data display>Global", and then enter the expression sus_forcez_emnc. The force is about 1.2 N.

COMSOL with Matlab

Given the Comsol model file, one can only change the configuration once at a time, which is very time consuming. In order to try different configurations and evaluate the corresponding magnetic force, we need to connect Comsol to Matlab which in turn uses the functions in Comsol for evaluations. Firstly, we save the Comsol model as a Matlab m.file. Secondly, we connect Comsol with Matlab in "File>Client/Sever/MATLAB>Connect to MATLAB". This will automatically start Matlab. Finally, we need to identify parts of the script that model the configuration, and then we can add "for" loops to change the configurations. The following is the modified script for finer mesh model.

attachment:model_2_mag_finer_mesh.m

Suspensions/MagneticSuspension/Modeling (last edited 2012-01-03 23:02:41 by localhost)