Include generated eddy currents in the model

General discussion about Elmer
Post Reply
fjimenez
Posts: 63
Joined: 27 Sep 2021, 23:40
Antispam: Yes

Include generated eddy currents in the model

Post by fjimenez »

Hi elmer gurus,

I am running a transient test case that consists of a coil and piece of metal in 2D (axi-symmetric). I can clearly see the eddy current generated in the metal when I put a sinusoidal input current in the coil and I am wondering how to include this current into the nonlinear iteration so it is included in the solution. Am I correct when I assume that this is not currently happening in my test case? Is there an easy way to do this?

Cheers,

Francisco
Rich_B
Posts: 423
Joined: 24 Aug 2009, 20:18

Re: Include generated eddy currents in the model

Post by Rich_B »

Hello,

It would help if you could post a working example of your issue, with sif, geometry files, and the output from the solver. Trying to guess an answer without the details is not practical.

Thanks, Rich.
fjimenez
Posts: 63
Joined: 27 Sep 2021, 23:40
Antispam: Yes

Re: Include generated eddy currents in the model

Post by fjimenez »

Hi Rich_B

Thanks for the reply. Sure, I can provide a sif and mesh file for a test case but I think that my question is more general, sorry If I did not frame it correctly. Is there a way to calculate eddy currents in between nonlinear iterations so they are included in the source term (include the field in black in the attached picture)? This is probably already happening, however, it seems to me that source terms are fixed during the iteration. I tried calculating the current density and then using scanning iterations and assign this current as a body force. This seems to work but the problem is that in the second iteration, when the eddy current is calculated at then end, the solver adds both the calculated eddy current and the body force. This approach obviously does not work if I try a third iteration because the body force just keep increasing.
magnet_falling_results.png
magnet_falling_results.png (382.91 KiB) Viewed 1470 times
So, here is what I am trying to do. The case is pretty simple: a cylindrical magnet falling down in a copper tube. For the sake of the argument let's say that is is a steady case. I include a dynamic component by having a Velocity Lorentz body force in the pipe. There is a Comsol example where they simulate this process (https://www.comsol.com/model/magnet-fal ... tube-13875) They couple the solution it with an ODE but say that I just want to run the case without this coupling (that would be another question, can I couple WhitneyAVSolver with a ODE in Elmer?). I am attaching the sif file and the salome script to generate the mesh. I partitioned the mesh so I can have a better control of the mesh size in salome and to have the boundaries as far a possible from the region of interest. Comsol has a very neat trick, similar to that of FEMM, that lets you can add infinite domains so your mesh does not get that big. You need to reduce the impact of boundary conditions as much as possible. There is probably an easier way to attain exactly this in Elmer but I haven't found it yet.
Attachments
magnet_falling.tgz
(3.87 KiB) Downloaded 121 times
raback
Site Admin
Posts: 4825
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Include generated eddy currents in the model

Post by raback »

Hi

I guess you need also the scalar potential in order to model eddy currents? The AV solver includes some heuristics that determine whether it is needed since no scalar potential saves quite a bit for the computation. It is triggered if the problem is transient, for example. I think you don't have anything trickering it here (element definition does not include nodal dof, n:1). Maybe adding "Static Conductivity = Logical True" would do the trick?

There is an ODE solver. We could probably get it coupled with the AV solver but it won't be too pretty. Currently it would include SaveScalars summing up magnetic forces and redirecting them into a variable that could be used as the r.h.s. for the ODE solver.

-Peter
raback
Site Admin
Posts: 4825
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Include generated eddy currents in the model

Post by raback »

Sorry, wrong alarm. The Lorentz velocity triggers this automatically:

Code: Select all

    IF( ListCheckPrefixAnyBodyForce(Model, "Angular Velocity") .OR. &
        ListCheckPrefixAnyBodyForce(Model, "Lorentz Velocity") ) THEN
      CALL Info("WhitneyAVSolver_Init0", "Moving material triggers the use of scalar potential",Level=10)
      StaticConductivity = .TRUE.
    END IF
So as far as I understand you should get the eddy currents automatically from the same system as A and V are solved from the same matrix equation.

-Peter
fjimenez
Posts: 63
Joined: 27 Sep 2021, 23:40
Antispam: Yes

Re: Include generated eddy currents in the model

Post by fjimenez »

Hi Peter,

Thanks for taking a look at this case. I actually do get Eddy currents, the problem is that these eddy currents should also generate a field that opposes the original field. Actually, the picture that I attached in my post is the magnetic field generated on the copper pipe by these eddy currents, it just that I disabled the magnetization in the permanent magnet for this particular plot. This is not a big problem for small velocities, but as soon as you increase it, they should have some impact on the solution. At least that is what I think because I am having some issues to replicate some results from Ansys Maxwell simulations for a industrial device when the velocity is high. For non and small velocities, I get very good agreement. I am not an expert on EM nor FE, I am more a FVM kind of person, and I have solved similar problems in the past doing some relaxation of the source term.

So this is what I did. I have two iterations, using the scanning type. I set up the case so the pipe has a body force. In this body force I added Lorentz velocity and current density. The Lorentz velocity is a constant and the current velocity is "equals Current Density e". I am not sure if this would be the right approach because I don't know at what point the current density vector is allocated, and to what value, so I am assuming that the current density is 0 for this very first iteration. I assumed that the current density vector was allocated only if I indicated that in MagnetoDynamicsCalcFields but this approach is however working (WhitneyAVSolver+MagnetoDynamicsCalcFields). Once the first iteration is done, I then run it again, and this second time the current density in the pipe is actually the one calculated in the first iteration and the process seems to be working. However, once this second iteration is done, the current density is doubled just because there is a current density calculated from the A-V formulation, and there is another current density from the body force. It would help if there is a way to calculate current density without body forces. All of this is based on the assumption that the current density from the A-V formulation is not included as a source in the main algorithm.

Cheers,

Francisco
Post Reply