EM_levitation

Numerical methods and mathematical models of Elmer
kevinarden
Posts: 2312
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: EM_levitation

Post by kevinarden »

If only using the GUI, then you will have to open the msh file from the gui and save the Elmer mesh files from there. This can be done with the open command and the save as command. Note if you do a save in the same directory it will overwrite the file case.sif, so you need to keep a copy of your sif file under another name such as levitate.sif
Roland
Posts: 230
Joined: 12 Apr 2018, 11:29
Antispam: Yes

Re: EM_levitation

Post by Roland »

Ok I will try this and keep you informed
Roland
raback
Site Admin
Posts: 4828
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: EM_levitation

Post by raback »

Hi

This gives quite nice animations. The gravity and magnetic force have been scaled. Gravity down and magnetic force up. Takes quite a bit to compute.

-Peter
Attachments
LevitationMagFieldVelocityVectorsLiquidSmall.jpg
(52.71 KiB) Not downloaded yet
levit.sif
(9.14 KiB) Downloaded 134 times
Rich_B
Posts: 423
Joined: 24 Aug 2009, 20:18

Re: EM_levitation

Post by Rich_B »

Hello Peter,

Very nice!

You probably already know this, but from looking for articles about EM levitation and induction melting of metal, one use case for this model would be a 3D printer print head that can deposit drops of molten metal. So instead of simply containing the molten metal in a pear shape, control the separation of a droplet, perhaps by modulating the lower induction coil.

Here's a link to a hackaday project, where the creator is melting aluminum wire using an induction heater and creating droplets. The droplets aren't pretty, but he shows it is possible.
https://hackaday.io/project/174297-meta ... on-heating

This would mean adding phase change to the model, making the model even more multi-physical.

Rich.
Roland
Posts: 230
Joined: 12 Apr 2018, 11:29
Antispam: Yes

Re: EM_levitation

Post by Roland »

Hello,
Yes this is very nice and progressing fast(thanks Peter for your big efforts!)!
As we are specialized in electromagnetic processes we do do such things you describe, Rich, in my former lab in Grenoble(I am retired but still work part time in it). We are also dealing with many other EM processes like crystal growth, single phase and multi phase electromagnetic pumps and stirrers, and also materials processing in EM cold crucible. All these processes modeling require multiphysics coupling between electromagnetics, fluid mechanics, heat transfer, moving meshes with free surfaces, and phase change. This is why I would absolutely like to investigate further in such models like the current EM levitation model which is very promising. I took a quick overlook at Peter's levit.sif file, but didn't understand all the tricks like the "variables definition" especially those which concern the "J×B" EM Lorentz forces. It would be very nice if you could help me to better understand this. Thanks in advance.
Roland
Roland
Posts: 230
Joined: 12 Apr 2018, 11:29
Antispam: Yes

Re: EM_levitation

Post by Roland »

Hi,
I entered realistic parameters values in Peter's EM_levitation levit.sif file (here attached) meaning the same parameters as in the similar Comsol model (animation here attached) which works well.
Unfortunately in the Elmer model(results here attached at t=0s/t=0.05s/t=0.1s) the liquid charge goes upward normally with the classical inverted "pear" shape at the beginning, but at t=0.1s it falls down and the mesh becomes completely crazy with the free surface mesh nodes overlapping the neighboring nodes.
I have some doubts about the nodal forces which are entered as the Flow Bodyforces (with the additionnal downward gravity for the vertical component). Are these forces expressed as volume forces (meaning in N/m^3) or as mass forces (meaning in N/kg) ? The time average Lorentz forces FLav (volume forces in N/m^3) which are to enter as the Flow Body forces are: FLav = 0.5*real(Jxconjugate(B)) (J and B beeing complex values, and FLav, J and B also beeing spatial vectors).
Thanks a lot if you could take a look at that and give your opinion.
Thanks in advance for your help!
Roland
Note: 3 files are attached to this post/the other 2 files are attached to the following next post
Attachments
EM_levit_t=0s.JPG
EM_levit_t=0s.JPG (102.87 KiB) Viewed 1341 times
EM_levit_t=0.05s.JPG
EM_levit_t=0.05s.JPG (106.65 KiB) Viewed 1341 times
EM_levit_t=0.1s.JPG
EM_levit_t=0.1s.JPG (99.51 KiB) Viewed 1341 times
Roland
Posts: 230
Joined: 12 Apr 2018, 11:29
Antispam: Yes

Re: EM_levitation

Post by Roland »

following of former post:
2 other files attached
Roland
Attachments
levit.sif
(8.44 KiB) Downloaded 118 times
EM_levit_Comsol_t=2s.gif
EM_levit_Comsol_t=2s.gif (584.7 KiB) Viewed 1341 times
Roland
Posts: 230
Joined: 12 Apr 2018, 11:29
Antispam: Yes

Re: EM_levitation Ok!

Post by Roland »

Hi,
Great news: the Elmer EM_levitation model works now well!
For that, In the Peter's levit.sif file which I posted yesterday with realistic parameters values, I just replaced, as you did it in your lattest levit.sif file, Peter, the Flow Body force, initially determined by the EM "nodal forces", by the JxB (real part and then divided by the density/ and added with the downward gravity for the vertical component) Lorentz forces (after adding the command line "Calculate JxB = Logical True" in the Magnetodynamics post processing solver).
Now it works very nicely (see the here attached animation/ after unzipping
it, right click on "open with Windows media Player"/the definition and mesh are rough so that the attached zipped file holds in less than 1 MiB).
There is just one thing left which is to fix: as I said it in my former post, the Flow Body force is the time averaged EM Lorentz force, which expresses as: 0.5*real(Jxconjugate(B)), and not real(JxB) as it has been entered in the sif file (but as it works fine with the latter expression, this is probably due to the fact that the two expressions are close).
Please, Peter, could we discuss this remaining detail and fix it when you have a little moment?
Anyway this is a very huge progressing step for the modelling of EM processes with Elmer and opens the way for great perspectives!
We keep us informed.
Roland
Attachments
EM_levitation_Elmer.zip
EM levitation t=0.5s
(506.43 KiB) Downloaded 122 times
raback
Site Admin
Posts: 4828
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: EM_levitation

Post by raback »

Hi

Great progress! I felt this was close, this is nice animation!

Now the JxB in Elmer actually includes the factor 0.5 in harmonic case for Elmer. However, it might not have complex conjugate, this is in line 1666-> in Magnetodynamics/CalcFields.F90 code. We have

J*xB=(Jre-i*Jim)*(Bre+i*Bim)=(Jre*Bre+Jim*Bim)+(Jre*Bim-Jim*Bre)i.

So without the cc the sign of the 2nd term could be wrong. I guess the complex part is not doing any work as is often the case with this lazy component.

-Peter
Roland
Posts: 230
Joined: 12 Apr 2018, 11:29
Antispam: Yes

Re: EM_levitation

Post by Roland »

Hi Peter
For me one must take O.5*real(JxB*).
We have JxB* = (Jre+i*Jim)*(Bre-i*Bim)=(Jre*Bre+Jim*Bim)-(Jre*Bim-Jim*Bre)i
meaning that in this expression the real part is the same as in your expression and only the imaginary part is inverted (minus sign) compared with your expression. But as you say it, it does not matter since only the real part is taken for the Body force.
But as I told you by mail, there is still a problem after a few time steps: as seen in the 2 here attached results at t=0.09s and t=0.11s, for this latter time the mesh becomes crazy in the bottom of the liquid with mesh nodes overlapp and a node which goes in the x negative direction beyond the symmetry axis. What is your opinion about that? Is there a way to fix this remaining problem?
With Gmsh I tried to make a finer mesh and reimported it in the GUI model. But when I try to run again the model with this finer mesh, the solver stops immediately and gives following error message:
"Program received signal SIGSEGV: Segmentation fault - invalid memory reference"
How is it possible to avoid this problem?
Thanks in advance for your help and we keep us informed.
Roland
EM_levit_t_0.09s.JPG
(142.14 KiB) Not downloaded yet
EM_levit_t_0.11s.JPG
(141.48 KiB) Not downloaded yet
"
Post Reply