Director Lewis calls you, very excited. She says that one of the FTOE scientists, Dr. Paul Triste, has developed a theory that the Hawkions could be used to dispel the storms around Lakeview! Since your team was so successful at creating the magnetic field detector, Director Lewis wants your help to take some final measurements to confirm his theory.
The Hawkions appear to have a variety of masses, so they need to start by trying to sort the particles by mass for further analysis, using a mass spectrometer. Before building it, your team is asked to develop a model of the spectrometer. The lab director has specified that they would like to use a constant magnetic field of 2 T and to isolate the effects of the B-field within the magnetic housing box, but they are unsure what direction the magnetic field should be relative to the catching plate. Below is the beginning of a model that was developed by another team before they mysteriously disappeared.
GlowScript 3.0 VPython ## Model parameters B = vec(0,0,0) ## Objects mag_housing = box(pos=vec(1,0,0), length=2, height=2, width=2, opacity=0.2) catchingplate = box(pos=vec(4,0,0), length=0.1, height=10, width=10, opacity=1) xaxis = cylinder(pos=vector(-3,0,0), axis=vector(6,0,0), radius = 0.05, color=color.white) yaxis = cylinder(pos=vector(0,-3,0), axis=vector(0,6,0), radius = 0.05, color=color.white) zaxis = cylinder(pos=vector(0,0,-3), axis=vector(0,0,6), radius = 0.05, color=color.white) ## Set up particles (DO NOT EDIT LIST) i = 0 N = 20 particleList = [] while i < N: particleList.append(sphere(pos=vec(-2-4*random(),0,0), radius = 0.1, m = 20*(random()+1), v = vec(2,0,0), q = 10, color=color.red)) i = i + 1 ## Calculation Loop t = 0 dt = 0.01 while t < 30: rate(300) for thisParticle in particleList: thisParticle.pos = thisParticle.pos + thisParticle.v*dt if thisParticle.pos.x > catchingplate.pos.x: thisParticle.v = vector(0,0,0) t = t + dt