Finding the radius of proton trajectory in magnetic field

Dear Fluka Users,

I am trying to determine the radius of a charged particle’s trajectory in a magnetic field. As a starting point, I chose a proton beam with an energy spectrum of 1 MeV to 100 MeV and a magnetic field strength from 1 T to 3 T.

First, I created a map to plot this relationship between the proton energy, magnetic field strength and the trajectory radius on MATLAB and attached the map here.

Now, I am trying to validate my results with FLUKA and would like to get the radius values for several proton energies and magnetic fields.

I did some visual inspection after plotting the beam trajectory by using a USRBIN card for a chosen scenario, for example, 20 MeV proton entering in magnetic field of 2 T. The radius from MATLAB calculations I found is approximately 31 cm whereas, in FLUKA plotting, I see it is around 34 cm.

If we ignore my near-hit calculations, is there any way to get radius values for an energy and magnetic field spectrum? It is similar to finding mass attenuation coefficient, I assume, but for a 2-dimensional matrix scenario, i.e., proton energy and magnetic field. So it might be a little bit more tricky than finding MAC.

I am sort of a beginner and finding user routines challenging. So it would be great if there were any FLUKA user routines to carry even a similar work. Please let me know, many thanks!

Kindest regards,
Gokhan

Dear @gsancak,
Would you mind starting sharing your Fluka input?
Thank you

Dear Gokhan,

When I do my analytical calculation for a 20 MeV proton in a 2 T field, I get a Larmor radius of 32.48223 cm.
Similarly, I get exactly the same result with my FLUKA simulation.

To automatize the calculations, you may need to implement an mgdraw.f routine, using the BXDRAW entry to record the coordinates of a particle crossing a boundary between two regions.

Cheers,
David

2 Likes

Dear @amario

Apologies, I forgot to attach them.

mapping.flair (3.1 KB)
mapping.inp (2.3 KB)

Kindest regards,
G

Dear Gokhan,

If you check your result carefully, you can see that your simulation’s radius is around also ~32.45 cm.

Cheers,
David

1 Like