Resonating magnets

Thread index  |  Previous thread  |  Next thread  |  Start a new discussion

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   6 Replies   Last post: March 27, 2013 7:57pm UTC
Dirk Oude Egbrink

Dirk Oude Egbrink

March 23, 2013 2:50pm UTC

Resonating magnets

Hi folks,

Me and my team-mates are working on a project and we now need to simulate a design we made.

We have a tube with a length of 10cm and a diameter of 2cm. At both ends of the tube, say x = -5cm and x = 5cm, a fixed magnet is placed. These magnets will be of same strength. We also place a magnet in the center of the tube (x=0). If the magnet is in the center of the tube the whole system will be in equilibrium. However, when we distort this equilibrium, The middle magnet will start resonating at a certain frequency. We now want to simulate this using Comsol.
We already have managed to create the three magnets in the tube using the mfnc physics. We now need to simulate the resonating middle magnet somehow. I'd be great if someone could give us some indication on how to do this. We think it needs to be done by using Moving mesh. I've read through some tutorials provided in the knowledge base but it didn't quite help me.

Help would be appreciated:)

Many thanks,

Dirk

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

March 23, 2013 6:44pm UTC in response to Dirk Oude Egbrink

Re: Resonating magnets

Hi

if you have only MF running and get out the force on the central magnet you need to add somehow the rigid body physics to define the rest position of the magnet (with or without gravity). I would also choose ALE for the air in the tube around the floating magnet, but then "solid" is not the physics for rigid body motion, its mainly for flex motion, so I would say use rather PDE physcs and solve the Newton law F = m*a.

You can use some of the "solid" equations as baseline

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Dirk Oude Egbrink

Dirk Oude Egbrink

March 26, 2013 8:04pm UTC in response to Ivar Kjelberg

Re: Resonating magnets

Ivar, thanks for your fast answer!

We did manage to get some things to work in our design, but we've encountered another problem.

Just a basic question actually, and I couldn't find an answer here at the forum. Is it possible to use a 'derived value' in the parameters section?
In our case, we want to use the force applied on the middle magnet ('mfnc.Forcex_middleMag') again to calculate the displacement of this magnet. We want to do this by using the calculated force on the middle magnet in a formula set in the parameters section, to calculate the displacement of the middle magnet. we are using parametric sweep to sweep the time value (time dependent solver didn't work somehow).

If we try it, the line in the parameters section containing 'mfnc.Forcex_middleMag' turns red and when we try to run a study, comsol gives an error.

Thanks in advance

Dirk

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

March 26, 2013 8:28pm UTC in response to Dirk Oude Egbrink

Re: Resonating magnets

Hi

Normally Parameters are evaluated at program/solver start, once, or in the Parameter call, your force value should be rather used in a variable definition.

I'm not sure you can use it for a parameter and have the parameter to change your geometry (nice and interesting try anyhow, pls check, perhaps it works)
normally the force would act on a "solid" physics, it might then displace the "solid" and you use ALE to map the air around to have the mesh deform along the solid motion and hence to be able to refalculate the foce based on the new position.

There is somewhere a falling magnet in a tube example, this gives one way to handle "solid" motion and MF

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Dirk Oude Egbrink

Dirk Oude Egbrink

March 26, 2013 8:33pm UTC in response to Ivar Kjelberg

Re: Resonating magnets

Ivar, thanks again.

I've just looked up the falling magnet in the tube example, which seems very useful.
It somehow has great similarities with our own design.

Dirk

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Dirk Oude Egbrink

Dirk Oude Egbrink

March 26, 2013 10:02pm UTC in response to Ivar Kjelberg

Re: Resonating magnets


Hi

Normally Parameters are evaluated at program/solver start, once, or in the Parameter call, your force value should be rather used in a variable definition.

I'm not sure you can use it for a parameter and have the parameter to change your geometry (nice and interesting try anyhow, pls check, perhaps it works)




Ivar,

When I use a parameter and make it dependent on t (time) and use a time-dependent solver, I see no change in geometry whatsoever. However, when I use a parametric sweep, and solve for 0t to 1t in steps of 0.1, I do see change in geometry. Pretty weird.

Another problem: when I use a variable definition for my variable and use it for the x position of the middle magnet, Comsol doesn't accept it. Comsol apparently only wants parameters used in geometry and doesn't like variables?

Dirk

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

March 27, 2013 7:57pm UTC in response to Dirk Oude Egbrink

Re: Resonating magnets

Hi

I do not think it's so "weird", in programming too you have "static variables" = Parameter or constants, evaluated at compiler time, and true variables (memory storage) that update with solution. Just do not mix them

Now geometry does only update on parameters, not on running solver variables, but Parameters (only exception I know about) might be updated by a "parameter solver statement"

Consider then rather deformed geometry, that could work with variables (I haven't used it recently, check the doc)

You have different types of variables, and in COMSOL scalars or fields look similar (the (x,y,z,t) dependence is implicit and not written out, except via the element reference (Domain, Boundary, Edge or Point). You need to understand this difference for local or global variables, dependent or not on the spatial coordinates and/or time. This is a notation issue, its all in the doc, but you might need to reread it a few times (I had too ;)

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse


Rules and guidelines