for electron kg,

So you can calculate acceleration.

However, the time for the particle to accelerate is very small.

You can not do a real time simulation. However, you can change the time step to small enough number.

e.g. If the velocity is m/s , and the gap is 2cm=m, then the time step should be much smaller than s.

, You can use this equation to determine the value of .

You need to define what is the maximum energy the charge particle will gain in the cyclotron, which will determine the maximum velocity, and you should be able to find B.

The energy for electron should be much smaller than 511keV (or velocity much small than speed of light),

otherwise, you also need to consider correction due to special relativity effect.