Page 1 of 1

Defining coils currents / five coils example

Posted: 18 Jan 2019, 12:47
by raback
Hi All,

There are multiple ways in Elmer to define coil currents in hierarchical simulations for the Whitney AV solver to compute magnetic fields. Basically one can give "Current Density i", i=1,2,3 or "Electric Potential" which is used to internally compute the current sources in the AV solver.

Now the caveat of the given source is that they must be divergence free. Elmer has built-in automated logic to do this but it only works for the given current density, not for the potential. To control the fixing there is the keyword

Code: Select all

  Fix Input Current density = True
Since quite recently there is a possibility to also compute elemental fields of current density. These basically utilize the discontinuous galerkin features of Elmer where each nodal value is independent between elements. This avoids the intermediate and unnecessary projection to nodes and seems to be very beneficial for the convergence of the linear system of the vector potential.

Attached is a simple case with five coils (including geo file for netgen). The coil currents are generated automatically to the coil solver. Of all the choices the elemental currents works the best by far

Code: Select all

  Current Density 1 = Equals "CoilCurrent e 1"
  Current Density 2 = Equals "CoilCurrent e 2"
  Current Density 3 = Equals "CoilCurrent e 3"
The nodal values are not nearly as good

Code: Select all

  Current Density 1 = Equals "CoilCurrent 1"
  Current Density 2 = Equals "CoilCurrent 2"
  Current Density 3 = Equals "CoilCurrent 3"
Nor is the built-in function that returns the potential

Code: Select all

  Electric Potential = Variable "time"
     Real Procedure "CoilSolver" "CoilPotentialNormalized"
To conclude, if you precompute currents use the elemental ones, and set Jfix true if the currents are not divergence free.

-Peter

Re: Defining coils currents / five coils example

Posted: 21 Jan 2020, 03:04
by ftrillaudp
Dear Peter,

I have tried to apply your example to 2 racetrack-shaped coils on iron support. The current density is impressed into the coils. Actually, I do not understand how to build the current density in the coil and I have just copied your example. Especially, I did not grasp the Body Force for the coil: ".. CoilCurrent e 1", etc....

The geometry and mesh were built in Salome platform, exported via *.unv using ElmerGrid (ElmerGrig 8 2 assembly.unv).

The current density is not as expected. I would definitively appreciate some guidance here.

I have attached the geometry and the case.sif files to this post.

Thanks in advance,

Best regards,

Frederic

Re: Defining coils currents / five coils example

Posted: 21 Mar 2020, 20:28
by ftrillaudp
Dear all,

See solved post for coil + iron core: viewtopic.php?f=3&t=6954

Best,

Frederic