Simulate magnets?

Hello

Do you have a way or tricks and techniques to simulate magnets in Solidworks?

How else would you do it?

Hello

I guess it's Solidworks Simulation...
To my knowledge, there is no solution for applying a volume force field in SW Simulation. Except gravity and dynamic effects in a rotating motion.
A few clarifications would be useful: static? On a part, an assembly? What distribution for the volume force field? Magnets or a magnet?

Hello @m_blt
It doesn't matter the engine, flow sim, sw simulation, or even cheat to get the same behavior.

My goal is mainly to simulate their repulsion and attraction according to their polarity and strength, especially during a slide, and this according to the weight they have on their shoulders.

This is to create a movement study that would express the shift of the floating magnetic parts when they cross the identical polarities.

There must be dedicated software (for those who make electric motors for example).
Your desire is far from being the simplest because the transition zones will depend a lot on the type of magnet and edge effects that are probably weird (managing to place the magnets as you want may already be difficult): the simple magnet/magnetic powder experiment already shows that the magnetic field is not regular and there you will superimpose several fields...
image

1 Like

there is I think a module for magnetic simulation, yes, no, maybe ^tre?

An oscilloscope to position them correctly?

If not, see with your magnet manufacturer who will do the simulation for you?
When you don't have a skill, see with the manufacturer who normally has a technical palette on the subject.

I can't talk too much about the project but here's an animation of what I'd like to calculate/measure: the vertical range of motion of the yellow and green pieces. Varying according to the weight on the back of the green.

The magnets are, for the time being, 3x3mm N35 neodymium.

2 Likes

Good evening @Sylk ,
Finally, some data: a structure in the form of a diagram, and the dimensions of the magnets (3x3 mm section)...

Magnets are very small, and depending on the model of behaviour chosen, the attraction/repulsion force varies in 1/r^2 or 1/r^3. A simulation should be possible on the basis of one of these approximations, and the diagram below.

image

But since this is a problem of dynamics, the parameters of the elements of the system other than the magnets are not without effect on the behavior.
If the entire project is not revealed, it would be necessary to provide some additional data, at least orders of magnitude...

  • Spacing between magnets? I propose 10 mm.
    True / False
    Maximum attraction/repulsion force (detachment of two magnets in contact N/S)?

  • Number of magnets on each of the two mobiles? I propose 8 and 4, as in the diagram.
    True / False

  • Mass of the moving Mobile " Y " following y? I offer 1.0 kg.
    True / False

  • Is the diagram a profile view (vertical y-axis) or a top-down view (horizontal y-axis)?
    If it is vertical, the weight of the " Y " mobile intervenes in its movement. Otherwise, no influence of gravity.

  • Is there an additional external effort on the mobile " Y ", following y?
    Yes / No
    If so, constant or not? What value?

  • Law of displacement of the Mobile " X "? I propose a uniform movement (about 40 mm?), in a time of 1 second?
    True / False

  • Amortization? True / False
    Friction? True / False

Whew...! image

2 Likes

Good evening @m_blt thank you for your answer.

  • Spacing between magnets of 10mm (5mm from edges): TRUE

  • The number of magnets per mobile is doubled compared to the illustration because it is a cross-sectional view; In the 1st ground of each magnet there is another.
    This number is very variable, depending on the length of the Y mobile, which can range from 4 magnets (2x2) for 20mm wide to 40 magnets for 200mm.

  • Including magnets, the weight of the Y mobile can vary from 7 to 1218 grams.
    Knowing that the weight on only 4 magnets can go from 7 to 1127gr (161x7), and on 40 magnets go from 70 to 1218gr (174x7).

  • Diagram seen in profile, displacement in y for the mobile Y so influence of gravity: TRUE

  • Additional external effort in y: NO

  • Consistency and speed of movement of the X in x mobile is extremely variable because it is manual.

  • Amortization: FALSE

  • Friction: TRUE difficult to quantify but limited as much as possible (the prototype will be in 3D printing fdm, playing on the orientation of the layers).
    An extreme case of " 1127gr on 4 magnets " is the one that will have the most friction due to its overhang, while the case "1218gr on 40 magnets " will have a much better weight distribution and therefore very little friction.

There are many inaccuracies in my illustration; The goal was more to show what I meant by the discrepancy, not to be exact. I'll do one again I think.
The main ones are that in reality the width of the X mobile can only have one size; the entire width of the container, i.e. 200mm and 40 magnets. And that its tab is only used to completely remove the X mobile from the container, which is open on the side.

Advertised weights are subject to change. The best thing is that the min value (7) is a variable, the max values being only multiples of the min value.

I don't know if it helps so much more, but it should help to sketch out the " simu ". It's hard not to say too much without saying too much. :face_with_head_bandage:

1 Like

Hello @Sylk,

The wait was long, but not in vain: a VBA macro designed to simulate the dynamics of the two slides ' X ' and ' Y ' influenced by the magnetic fields of the rows of magnets.
Macro designed according to my interpretation of the animated scheme and the indications of the previous messages. Not sure that it reflects the reality of the project given the dark side of some information:

No doubt clear to the author, much less to the reader that I am...

Imperative: the app requires Excel to display the simulation results and save them.
Macro developed with VBA Solidworks to allow animation of the SW geometric model.

Installation: Unpack the attached Aimants.zip file into a writable folder.
Open Solidworks and load the DigitalAxis.SLDASM assembly document located in the installation folder (SW 2022).
Launch the Magnets.swp macro, preferably after reading the Aimants.pdf document.

To be used without moderation, keeping in mind the fact that safeguards are rare.

Aimants.zip (83.7 MB)

4 Likes

Hello @m_blt frankly for an answer of this quality I could have even waited 1 more week :saluting_face: THANK YOU
I didn't expect so much, but no less from you. Well done.

Unfortunately I can't take advantage of the assembly and the parts because I'm in 2020, I could have said it but I admit that I didn't expect such a complete answer with an assembly as a bonus. It might have saved you some work, but I imagine it was useful for you anyway to test your macro.

I'm not sure I understood the way to model the slides described in your PDF (a gem :ok_hand:). More specifically, magnets.
Currently I create a pair of magnets (2x 2pairs since on 2 rows in z), each one oriented differently, and apply a repetition. But if I apply a repeat with nbMagnets related to the number of repetitions, and Intrvl related to the spacing between the pairs (which is 2 times the space between 2 magnets in the same pair), it's not going to do it, I'll end up with nbMagnets = half the magnets, and Intrvl = double the spacing between 2 magnets.

Your video shows the 2 rows correctly, but I think I expressed myself badly about their orientation (I didn't even specify it at all). It doesn't change anything about the result of the calculation, but rather about their modeling. Although technically, if I'm only looking for the result, I can model them with these orientations. For the presentation it's more embarrassing.

The sliderX would be more like this:


The orientation of the magnets on each side of each slide is identical to this visible side.
The 4 magnets included in the 20x20 green speaker are inseparable. These are what I mean by " 2x 2pairs ".

Once again, a huge thank you for your help!

Sorry, here are the illustrations of my obscure remarks.

(1) The extreme case in question, in green, the heaviest on the minimum of magnets, 1127gr on 4 magnets. And (2) the heaviest case on a maximum of magnets, 1218gr on 40 magnets:
image image

(3) The lightest on a minimum of magnets, 7gr on 4 magnets.
And (4) the lightest on a maximum of magnets, 70gr on 40 magnets:
image
image

With these images, I understand better. It's the opposite of what I imagined.

That being said, if we consider the 4-magnet configuration, the mass to be lifted can vary between a minimum of 7g and a maximum of 1127 g.
If they are the same magnets in both situations, and they are able to lift the maximum mass, they will " satellite" the minimum mass: effort well greater than 11 N to lift the maximum mass (let's say 30 N) and low mass (7g) = strong acceleration.
Old memory of a mecha class: F = m a . That is to say an initial acceleration of 30 / 7e-3 = 4300 m/s².
A nasty kick. Fortunately it doesn't last long and there is probably a stop (cf. ymax)...
image

Below is the document of the assembly used for my tests, in SW2020 version.
Recovered from the original in Parasolid, and saved in sldasm since a 2020 version.
No more constraints, no more native geometry, but overall the animation works.

AxeNumeriqueSW2020.zip (12.7 MB)

1 Like

These are the same magnets in all configurations.

According to the partial sample I have in hand, with N35, it shouldn't take off too high.
Even if I had considered that friction could be neglected, it is obvious that " pulling " the mini Y slider to the right by pulling the cX will create some friction between the right wall and the right face of the cY, in addition to making its potential inclination more prone to increasing friction (because the angle of the diagonal is greater on a small area), and therefore act as a natural brake. In addition to the " notches " on the wall side that could well act as stops.
And then the height of the container is still important, I doubt that it will be ejected. There is also another uncommunicated aspect that contributes to the " confinement " of the system and which in this case will depend on the results of this study, and one of the reasons why I am trying to simulate it.
It's still a point to watch.

I'm going to study everything you provided, hoping to be able to extend it to the case of the slideX interspersed between 2 slides Y (above) and Y' (below), illustrated by my 1st animation.

I would say that the repulsion under cX is a function of the cumulative weight of cX and cY as well as the repatition of the magnets of cY'. With progressive decrease related to the extraction of cX.

It's noted.
One last word: don't hesitate to increase the number of points in the bad kick situation. Or reduce the simulation time.
And one last question: why not a pebble on a corrugated ramp for better control of movement?

But let's say that the interest is precisely to know what maximum force will have to be contained between cX and cY. The primary goal of this study is to insert a kind of valve between the slides, which would prevent cX from rising, but the thickness of the valve that can be used being very small, it is very flexible and I try to evaluate its deformation. And if necessary, ways to strengthen it. I should certainly have started by saying it, but let's just say that I wanted to know to what extent I could do without valves...
I therefore think that the study of case (5) is the most relevant to consider.
image
All this to come back or almost to the first anim' :upside_down_face:

I see what you mean but it's impossible on this project.
It would be so much easier to expose all of them...

When I come back to this project, I will have questions about the use of your macro @m_blt , especially if it is possible to find the characteristics of the magnet according to its volume and category, because I have not found the specs that allow me to be sure that I have the right values for the simulation.

In the meantime I still validate your answer because it clearly answers the problem.

Thank you again for your involvement!!

Very interesting project/idea!!