Differences
This shows you the differences between two versions of the page.
course_planning:184_projects:s19_project_8 [2019/02/26 17:46] – created tallpaul | course_planning:184_projects:s19_project_8 [2019/02/28 17:46] (current) – [Project 8A: Detecting magnetic fields] tallpaul | ||
---|---|---|---|
Line 49: | Line 49: | ||
* Explain the similarities and differences between electric and magnetic fields | * Explain the similarities and differences between electric and magnetic fields | ||
</ | </ | ||
+ | |||
+ | ==== Project 8B: Sorting Hawkions ==== | ||
+ | Since your team was so successful at creating the magnetic field detector for the Hawkions, the Lakeviewians have now hired you to analyze other characteristics of the Hawkions. The Hawkions appear to have a variety of masses, so you start by trying to sort the Hawkions by mass for further analysis (using a mass spectrometer). Before building the spectrometer, | ||
+ | |||
+ | <code python> | ||
+ | GlowScript 2.6 VPython | ||
+ | |||
+ | |||
+ | ## Model parameters | ||
+ | B = vec(0,0,-2) | ||
+ | magconstant = 1e-7 | ||
+ | |||
+ | ## Objects | ||
+ | magplateN = box(pos=vec(1, | ||
+ | magplateS = box(pos=vec(1, | ||
+ | catchingplate = box(pos=vec(4, | ||
+ | xaxis = cylinder(pos=vector(-3, | ||
+ | yaxis = cylinder(pos=vector(0, | ||
+ | zaxis = cylinder(pos=vector(0, | ||
+ | |||
+ | |||
+ | ## Set up particles | ||
+ | i = 0 | ||
+ | N = 20 | ||
+ | particleList = [] | ||
+ | |||
+ | while i < N: | ||
+ | | ||
+ | particleList.append(sphere(pos=vec(-2-4*random(), | ||
+ | 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, | ||
+ | | ||
+ | t = t + dt | ||
+ | </ | ||
+ | |||
+ | <WRAP Info> | ||
+ | === Learning Goals === | ||
+ | * Use the right hand rule to relate the charge' | ||
+ | * Use circular motion to relate the radius of the particle' | ||
+ | * Understand what an "if statement" | ||
+ | </ | ||
+ |