course_planning:184_projects:s19_project_8

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

course_planning:184_projects:s19_project_8 [2019/02/26 17:46] – created tallpaulcourse_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 
 </WRAP> </WRAP>
 +
 +==== 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, your team is asked to develop a model of the spectrometer to determine where the magnetic field should be relative to the catching plate, which stops the Hawkions. Below is the beginning of a model that was developed by another team that mysteriously disappeared.
 +
 +<code python>
 +GlowScript 2.6 VPython
 +
 +
 +## Model parameters
 +B = vec(0,0,-2)
 +magconstant = 1e-7
 +
 +## Objects
 +magplateN =  box(pos=vec(1,0,1), length=2, height=2, width=0.1, opacity=0.2)
 +magplateS =  box(pos=vec(1,0,-1), length=2, height=2, width=0.1, 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
 +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
 +</code>
 +
 +<WRAP Info>
 +=== Learning Goals ===
 +  * Use the right hand rule to relate the charge's speed and external magnetic field to the force on that charge.
 +  * Use circular motion to relate the radius of the particle's trajectory to it's force
 +  * Understand what an "if statement" does in the code
 +</WRAP>
 +
  • course_planning/184_projects/s19_project_8.1551203162.txt.gz
  • Last modified: 2019/02/26 17:46
  • by tallpaul