# Edge/Surface Force Density Calculation in 2D by Field Calculator for Permanent Magnets.

Hi dear friends,

Nowadays i am working on the analysis of attraction force between 2 permanent magnets.

Structure is simple and consists only 2 permanent magnets in air with same direction magnetization.

My first thought is to check the results in 2D FEM and analytically.

The results i met in 2D and the analytical calculations by hand are both similar so no doubt.

Also the result by field calculator by taking line integral of Edge Force Density over the magnet and multiply with depth also give right solution.

But i have problem to calculate Edge and Surface Force Density by field calculator.

I make the calculations in field calculator based the equation on the picture1 but results are so different .

Then i tried to make calculation based on as in picture2 but no success.

Can you pls share your kind experience how to calculate Edge and Surface Force Density by field calculator in 2D for reluctance type forces as in attraction force between permanent magnets.

Regards,

Sami

## Answers

Hi,

Once you open the field calculator you will find an inbuilt named expression for edge force density.

Copy to stack and integrate over the edge to get the result. Please refer the below Screen shot

Regards

Navya

Hi dear Navya,

Thanks for your concern and reply me.

Yes, i know that directly edge and surface force density can be calculated in field calculator.

But my thought is how to calculate edge and force density in field calculator by using Maxwell Stress Tensor or etc equations.

Do you further guide me?

Regards,

Sami

Hi dear colleagues,

Still cannot find the solution.

I preciate if any idea can be shared?

Regards,

Sami

@EEE

Maxwell Stress Tensor (MST) force density method is calculated as below.

Regards

Navya

Hi dear Navyai

Thank you for your kind help but i still cannot achieve to get correct result.

I will share you the model in the attachment, i also add the formula you gave above.

You will see 3 formula in the field calculator in the model. 2 of them gives correct result where maxwell edgeforcedensity is used, 1 of them gives wrong result where your formula is used.

So can you pls check and fix for me if i have a problem while using your formula?

My best regards,

Sami

HI,

As an Ansys employee, I can't access any attachments in this forum.

Can you please attach some screenshots that show how you implemented this in the field calculator and what is model setup on 3D modeler window.

Please use the upload image option, not the upload file.

Regards

Navya

Hi Navya,

Thank you for your response.

I am new in this forum so i will pay attention from this time not to upload any file, if any comment will help to much:

1) The objective is to determine the force between magnets by using field calculator by using Maxwell Stress Tensor or edge or surface force density.

2) The structure consists 2 similar permanent magnet magnetized at x direction both.

3) The force calculate directly by Maxwell is 3.14N in x direction that is correct result as i calculate by my hand.

4) I will try to confirm it by field calculator, so as first step i directly use Maxwell already formed edge or surface force density and get right solution as below:

5) Now the next steps are to use Maxwell stress tensor (force density) over surface or edge, but when do this i cannot get right solution. The matter i look for the help is to calculate this Maxwell Stress Tensor or edge force density or surface force density by formulas in field calculator.

Regards,

Sami

Updated...

for eddy current solution;

Quantity > B Loads the B vector

Function > Phase > OK

Complex > At Phase

Geometry > Line >

`edge of your material`

> OKUnit Vector > Normal

Dot

Quantity > H

Function > Phase > OK

Complex > At Phase

Multiply

Quantity > B

Function > Phase > OK

Complex > At Phase

Quantity > H

Function > Phase > OK

Complex > At Phase

Dot

Number > Scalar > 0.5 > OK

Multiply

Geometry > Line >

`edge of your material`

> OKUnit Vector > Normal

Multiply

Neg

Add

Scal? > ScalarX

Geometry > Line >

`edge of your material`

> OKIntegrate

Add…

Hi dear John,

Thank you for your kind response.

Actually this is transient solution type but you give the solution over eddy current solution type.

Indeed, the method you give is very similar which i did and showed above but the results come with error.

Can you review my field calculator equation above if mistake is avaialble or not?

Regards,

Sami

Hi again,

Your problem may be caused by choosing the edges of your geometry. Would you choose the line of geometry and try? I am doing a similar study right now.

Hi dear friend,

Actually for the edges, i do not form the edges, i use directly the edges comes from automatically. I directly use the line of geometry coming automatically.

But re-calculate and get wrong results too.

Do you get right result in transient solution?

Regards,

Sami

Hi sami,

I'm getting close solution on eddy solver. Other than that, I didn't see any other errors in your formula. I am surprised. It must be the little detail we missed. I am really curious about the solution to this problem. If you can find a solution or if I can help you, please write to me about anything or anything else at [email protected] I'll be thinking a little more.

I'm also having problems setting the region size. How did you set it up? I can never be sure of its accuracy.

Hi dear John,

Thank you for your care. Actually on eddy current type there is no problem but in transient problem goes on.

Actually i am also obsessed with the solution since to proof the solution by calculator is really important. I am working on it too. I think the problem comes from the border of edges.

For the region size will not be important if you can define boundary and meshes correctly.

When i get solution i will inform you too, beside i sent the model to your e-mail you can use it directly.

For any help you can tell me too.

Regards,

Sami

Hi @EEE ,

In eddy current solver, mesh is automatically thrown, so I can't do anything manually. but I have no specific information about boundary. Classically, I throw the vector potential and enter value: 0. I would like to give you my model so that you can understand more clearly.

Hi John,

Pls reply my e-mail to review.

I will check it.

Regards,

Sami