Magnetic field particle dynamics

Numerical methods and mathematical models of Elmer
carstenp
Posts: 37
Joined: 17 Oct 2012, 23:17
Antispam: Yes

Magnetic field particle dynamics

Post by carstenp »

Hello,

I am currently trying to simulate the movement of charged particles in an electromagnetic field. The field consists of an electrostatic field generated by a set of electrodes and a constant magnetic field acting in one direction (earths magnetic field).
The interaction of the particles with the electrostatic field works quite well and the simulation results are in good agreement with analytical solutions.

However, I would like to include the static magnetic field as well. Is it possible in the particle dynamics solver to specify an analytic expression for the magnetic field and include the Lorenz Force as additional force term or specify the resulting force term directly (as an additional force that acts perpendicular to the current velocity of a particle)?

Thanks!

Carsten
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Magnetic field particle dynamics

Post by raback »

Hi Carsten

Unfortunately Lorenz force has not been implemented. It should go into ParticleDynamics module. There is gravity, viscous drag, electrostatic force, and boyancy. Adding Lorenz force should not be that big a task following the style and logic of these forces.

-Peter
Wil
Posts: 72
Joined: 10 Jan 2014, 13:26
Antispam: Yes
Location: Austria

Re: Magnetic field particle dynamics

Post by Wil »

Dear Carsten,
Is it possible to share your model? I would like to simulate something related (see below) and have no starting point until now.
Thanks in advance.


Dear Peter,
I am also interested in the particle solver to simulate positive and negative charges in an air-filled volume under the application of an electrostatic field.
Is this possible with viscous drag in ParticleDynamics module? Are there any demos/tutorials? Could not find anything in the Gui- and nonGui-tutorials?
There are some tests (https://github.com/ElmerCSC/elmerfem/tr ... /fem/tests) without the use of electrostaitcs but a tutorial would be more helpful for the combination with es or ec module 8-) .
Thanks in advance,
Wil
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Magnetic field particle dynamics

Post by raback »

Hi Wil,

Sorry, there does not seem to a be a test. This has been done though. You need "potential variable name" and "particle charge" to couple, I think. Read the documentation of ParticleDynamics from Elmer Models Manual.

-Peter
jeremie
Posts: 28
Joined: 11 Jul 2019, 11:31
Antispam: Yes

Re: Magnetic field particle dynamics

Post by jeremie »

Hi,

I ran a test case of ParticleDynamics to simulate the movement of charged particles through an electrostatic field and it worked correctly.

I would like to simulate the movement of charged particles through a magnetic field, by using ParticleDynamics + MagnetoDynamics.
In "ParticleFieldInteraction" I have only found the electrostatic potential but not the magnetic force (Lorrentz force), as you said Peter.

Are there any plans to add the magnetic field force in "ParticleFieldInteraction"?

Or is there another way for coupling ParticleDynamics + MagnetoDynamics ?

Jeremie
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Magnetic field particle dynamics

Post by raback »

Hi Jeremie,

No, there are no plans but this would of course be really nice feature. I geuss you want to have force acting on a charged particle as

F = q(E + v x B)

and now the 2nd part is missing.

If you would provide a nice consistency test, make some runs and report the results here, you would have done >80% of the job. We could try to squeeze in the rest.

One question is whether to use B computed by MagnetoDynamicsCalcFields or calculate the B field on the fly from A. The 1st would be somewhat less work as one does not need to introduce the Hcurl conforming basis functions in the play.

Do you have one or several types of particles?

-Peter
jeremie
Posts: 28
Joined: 11 Jul 2019, 11:31
Antispam: Yes

Re: Magnetic field particle dynamics

Post by jeremie »

Hi Peter,

Exactly, I need the second part of F = q(E + v x B)

Yes, I can provide a consitency test and report results here.

I am thinking about comparing the trajectorie of an electron obtained from numerical and analytical solution.
It would be an electron propagating through a magnetic field perpendicular to its velocity so that v x B = vB.

I would use B computed by MagnetoDynamicsCalcFields, it sounds good for me.

In my case, I have only one type of particle and I am interested in electrons.

From the user manual, I saw that only classical mechanics is used.
If improvements are also made for relativist particles (e.g. high energy electron) I can also provide another consistency test.

Thanks!

Jeremie
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Magnetic field particle dynamics

Post by raback »

Hi Jeremie,

This was surpricingly simple: 15 minutes for commit. So probably it does not work since things are never this simple. If you have used the electric potential then the code should explain how to use this:

https://github.com/ElmerCSC/elmerfem/co ... 383feee302

Sorry that I don't have time to dwell more. I hope this helps.

-Peter
jeremie
Posts: 28
Joined: 11 Jul 2019, 11:31
Antispam: Yes

Re: Magnetic field particle dynamics

Post by jeremie »

Thanks Peter! I am going to have a look and I will post feedback here.

Jeremie
jeremie
Posts: 28
Joined: 11 Jul 2019, 11:31
Antispam: Yes

Re: Magnetic field particle dynamics

Post by jeremie »

Hi Peter,

In ParticleDynamics.f90 I think GotB is missing here (line 1066):

GotField = ParticleToField .OR. GotVelo .OR. GotPot .OR. &
VeloCond .OR. CoordCond .OR. GotBuoyancy

Isn't ?
Post Reply