Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| course_planning:184_projects:s18_project_14 [2018/04/17 16:40] – created dmcpadden | course_planning:184_projects:s18_project_14 [2018/04/19 16:47] (current) – dmcpadden | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| * Use the right hand rule to check the direction of the induced current. | * Use the right hand rule to check the direction of the induced current. | ||
| </ | </ | ||
| + | |||
| + | ==== Project 14B: Sending signals ==== | ||
| + | |||
| + | You are able to use your successfully MacGyver' | ||
| + | |||
| + | < | ||
| + | GlowScript 2.6 VPython | ||
| + | |||
| + | ## Objects | ||
| + | |||
| + | charge = sphere(pos = vector(0, | ||
| + | charge.v = vector(0, | ||
| + | |||
| + | ## Constants and model parameters | ||
| + | |||
| + | q = 1e-6 | ||
| + | k = 9e9 | ||
| + | mu = 4*pi*1e-7 | ||
| + | mofpi = mu/(4*pi) | ||
| + | |||
| + | ## Set up time parameters | ||
| + | |||
| + | t = 0 | ||
| + | dt = 0.1 | ||
| + | |||
| + | |||
| + | ## Create list of arrows that encricle the charge | ||
| + | ## Each location has two arrows: one for E and one for B | ||
| + | |||
| + | N = 20 | ||
| + | theta = 0 | ||
| + | dtheta = 2*pi/N | ||
| + | R = 0.02 | ||
| + | ArrowList = [] | ||
| + | |||
| + | while theta < 2*pi: | ||
| + | | ||
| + | Loc = vector(R*cos(theta), | ||
| + | | ||
| + | ArrowList.append([arrow(pos=Loc, | ||
| + | | ||
| + | theta += dtheta | ||
| + | |||
| + | ## Calculation loop | ||
| + | |||
| + | while t < 1000: | ||
| + | | ||
| + | rate(100) | ||
| + | | ||
| + | ## Charge should oscillate | ||
| + | | ||
| + | | ||
| + | ## Loop through arrows to make E and B vectors | ||
| + | | ||
| + | for Arrow in ArrowList: | ||
| + | | ||
| + | r = Arrow[0].pos - charge.pos | ||
| + | |||
| + | E = vector(0, | ||
| + | B = vector(0, | ||
| + | |||
| + | Arrow[0].axis = E | ||
| + | Arrow[1].axis = B | ||
| + | |||
| + | t = t + dt | ||
| + | </ | ||
| + | |||
| + | <WRAP info> | ||
| + | === Learning Goals === | ||
| + | * Make predictions for the electric and magnetic fields from a moving charge over time | ||
| + | * Model (using VPython/ | ||
| + | * Explain the effect of changing a variable on your model of the electric and magnetic fields (i.e., what would you expect to change if you changed the magnitude or sign of the charge) | ||
| + | </ | ||
| + | |||