Magnetic Field Orientation

Dear Experts,

I am building a U-shaped magnetic yoke (with N and S pole on left and right side) to study electron trajectories.
The geometry is defined using two large boxes to form the yoke, and a smaller box is subtracted to create a vacuum gap. A dipole magnetic field is applied in the gap.

However, with the current magnetic field direction, the electrons are bending left or right and hitting the side walls of the yoke. I want the electrons to bend up or down, which means I need to change the direction of the magnetic field.

I checked the user manual and tried modifying the magnetic field definition, but the simulation fails with an error during execution.

Is there another way to change the dipole magnetic field direction correctly? Thank you

MF1_3.inp (1.6 KB)

MF1_3.flair (2.5 KB)

Dear @talktoshubhama,

you can assign a ROT-DEFINI transformation (e.g. with Axis=Z and Azm=90.0) to your MGNFIELD card to rotate the dipole field by 90 degrees.

Best regards
Roman

Dear @rmartin ,

Thank you for the suggestion.

Regards

Shubham

Dear @Shubham Agarwal,

you can actually solve magnetic field geometry for homnogeneous field, in several ways.

First, the approach you propose is functional in general.

Also, you can do it very easily (after you spend some time getting familiar with the code and its compilation) with source routing magfld.

In my opinion (based on Fluka errors) you have a parallel secondary problem, with creating a bunch of low-energy secondary electrons, that get to infinite circular trajectories, so they cannot be computed.

You need to adjust setting of the magnetic field simulation (MGNFIELD card) and cut off irrelevant electrons below a reasonable for you energy threshold.

Cheers,

Illia