course_planning:184_projects:f18_project_3

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
course_planning:184_projects:f18_project_3 [2018/09/20 16:35] – [Project 3A: StickyStuff and the Dust Particle] tallpaulcourse_planning:184_projects:f18_project_3 [2019/01/24 17:33] (current) tallpaul
Line 1: Line 1:
 ===== Project 3 ===== ===== Project 3 =====
 +==== Project 3A: Charge the Line ====
  
-==== Project 3A: StickyStuff and the Dust Particle ====+You have become trapped in the town of Lakeview. The town and surrounding landscape are under a constant barrage of storms. Not only are people being struck by lightning within the town but any vehicle or person trying to leave the city limits of Lakeview are instantly struck by lightning. The number of deaths due to lightning strikes in Lakeview in one week is larger than the amount the whole world has seen in the last 5 years. Jo Harding, a  crazy local scientist who has had a few run-ins with storms before has an idea of putting up giant metal T's, with the base of the T inserted into the ground to try and stop the townspeople from being struck with lightning. Jo wants the base of the T to be made of wood and the horizontal top of the T to be a metal. Mayor Rachel Wando is up for reelection and is willing to listen to any ideas to stop the rising death toll but ever since the lightning storms started she has been in non-stop meetings in which electric fields are being constantly talked about and is becoming very concerned about what the electric fields would be like for these T-shaped objects. Rachel reaches out to her friends at the storm chaser HQ for a model of what the electric field will be for one of these T's after it has been struck by lightning. The code below is the beginnings of your teams work on modeling the electric field from the giant T. 
 + 
 +<code> 
 +## Creating the scene for the code to run in 
 +scene.range = 2 
 + 
 +## Constants 
 +TotalCharge = 15 #C 
 +pointcharge = TotalCharge/  
 +k = 9e9   
 +vscale = 1e-4 
 + 
 +## Objects 
 +charge1 = sphere(pos=vec(-3,0,0), Q=pointcharge,  color=color.red,  size=5e-1*vec(1,1,1)) 
 +charge2 = sphere(pos=vec(-2,0,0), Q=pointcharge,  color=color.red,  size=5e-1*vec(1,1,1)) 
 +charge3 = sphere(pos=vec(-1,0,0), Q=pointcharge,  color=color.red,  size=5e-1*vec(1,1,1)) 
 +charge4 = sphere(pos=vec(0,0,0), Q=pointcharge,  color=color.red,  size=5e-1*vec(1,1,1)) 
 +charge5 = sphere(pos=vec(1,0,0), Q=pointcharge,  color=color.red,  size=5e-1*vec(1,1,1)) 
 +charge6 = sphere(pos=vec(2,0,0), Q=pointcharge,  color=color.red,  size=5e-1*vec(1,1,1)) 
 +charge7 = sphere(pos=vec(3,0,0), Q=pointcharge,  color=color.red,  size=5e-1*vec(1,1,1)) 
 +charges = [charge1, charge2, charge3, charge4, charge5, charge6, charge7] 
 + 
 +## Calculation Loop 1 
 +E = vec(0,0,0) 
 +point = vec(0,0,0) 
 +for c in charges: 
 +    r = point - c.pos 
 +field = arrow(pos=point, axis=vscale*E, color = color.cyan) 
 + 
 +## Calculation Loop 2 
 +x = -5 
 +dx = 0.5 
 +xmax = 5 
 +while x<=xmax: 
 +    theta = 0 
 +    dtheta = 0.1 
 +    R = 0 
 +    while theta < 2*pi: 
 +        E = vec(0,0,0) 
 +        point = vec(x, R*sin(theta), R*cos(theta)) 
 +        field = arrow(pos=point, axis = E*vscale, color = color.green) 
 +        theta += dtheta 
 +    x+=dx 
 +</code> 
 +Complete the program above to first represent the total electric field just to the right and left of the line of charges. Then,  calculate the total electric field surrounding the line of charges. 
 + 
 +<WRAP info> 
 +===Learning Goals=== 
 +  * Understand what a list (or an array) does in the code and why you would want to use one 
 +  * Understand how a "for" loop works and how it is similar/different from a "while" loop 
 +  * Make a model of a line of charge using point charges and be able to describe how you would improve your model 
 +  * Use superposition to calculate and visualize the electric field around a line of charge 
 +</WRAP>  
 + 
 +==== Project 3B: StickyStuff and the Dust Particle ====
 {{  183_projects:taperoller.png?500}} {{  183_projects:taperoller.png?500}}
  
Line 16: Line 71:
 </WRAP> </WRAP>
  
-/* 
-==== Project 3B: Better Thundercloud Model ==== 
-{{  184_projects:project4b.png?300}} 
-The storms over Lakeview have gotten worse, with an almost permanent pitch black cloud system hovering overhead. A new model for the thundercloud needs to be produced to obtain a better understansding of how it is functioning. While they greatly appreciated the model you created last week for the Mapping N$\vec{E}$twork Sensory Array (MNSA), the data they are collecting from the sensors are simply not matching the model's predictions. They have concluded that modeling storm clouds as point charges was, in fact, problematic. Based on some research from the [[184_notes:lightning|National Weather Service]], it looks like a better model for clouds would be two flat sheets of charge since the negative charges in the cloud collect on the bottom of the cloud and the positive charges collect near the top.  
- 
-Given that the negative charge is much closer to the ground (and headquarters), the Lakeviewians want to prioritize what the Mapping N$\vec{E}$twork Sensory Array (MNSA) around HQ will show based on the bottom of the cloud. (If you have time though, they'd be interested in whether the top of the cloud has any effect.) They have shared their model of the bottom of the most recent storm cloud (which is thankfully fully functioning, well-commented code), but they are having trouble getting the electric field on the ground. The Lakeviewians have asked your team for your help completing the code.     
- 
-<code> 
-#Set up of the objects 
-ground = box(pos = vec(0,0,0), width=5000, length=5000, height=0.1, color=color.green) 
-mountains = [cone(pos=vec(-1800,0,0), axis=vec(0,1000,0), radius=700, color=vec(1,0.7,0.2)), 
-            cone(pos=vec(-1800,0,-1600), axis=vec(0,1000,0), radius=700, color=vec(1,0.7,0.2)),  
-            cone(pos=vec(-1800,0,1600), axis=vec(0,1000,0), radius=700, color=vec(1,0.7,0.2))] 
-HQ = box(pos = vec(-100,100,0), width = 15, length = 15, height= 200, color = color.blue) 
-cloud = box(pos = vector(0,1000,0), size = vector(500, 1, 500), color = color.white) 
- 
- 
-#Lines 13-48 create a grid of spheres to represent the bottom of the cloud (this part of the code doesn't need be modified): 
- 
-#Define how many chunks to split the cloud in the x direction (define x size of the cloud grid) 
-nx = 10 
-#Define how many chunks to split the cloud in the z direction (define z size of the cloud grid) 
-nz = 10 
- 
-#Define where the cloud should start/stop in the x direction 
-startx = -250 
-endx = 250 
-#Define the spacing between each chunk in the x, based on where the cloud start/stops and how many chunks there are 
-stepx = (endx - startx)/nx 
- 
-#Define where the cloud should start/stop in the z direction 
-startz = -250 
-endz = 250 
-#Define the spacing between each chunk in the z, based on where the cloud start/stops and how many chunks there are 
-stepz = (endz - startz)/nz 
- 
-#Create an empty list to store each cloud chunk 
-listOfCloudChunks = [] 
- 
-#For each cloud chunk in the x-direction 
-for i in range(0,nx): 
-     
-    #Define the x-location of the cloud chunk 
-    xloc = startx + i*stepx 
-     
-    #For each cloud chunk in the z-direction 
-    for j in range(0,nz): 
-         
-        #Define the z-location of the cloud chunk 
-        zloc = startz + j*stepz 
-     
-        #Make a sphere at that x-z location 
-        cloudChunk = sphere(pos = vector(xloc,1000,zloc), radius = 50, color = color.red) 
- 
-        #Add the sphere to the list of cloud chunks (so we can use it later) 
-        listOfCloudChunks.append(cloudChunk) 
- 
-#This part needs to be fixed and commented... 
-obsLocation = vector(0,0,0) 
-Enet = vector(0,0,0) 
- 
- 
-Q = -15 
-dQ = Q/(nx*nz) 
-k = 9e9 
- 
- 
-for chunk in listOfCloudChunks: 
-     
-    Enet = vector(0,0,0) 
-</code> 
- 
-<WRAP INFO> 
-=== Learning Goals === 
-  * Visualize the electric field from a 2D plane of charge 
-  * Use multiple loops to create many observation points from many charges 
-  * Identify patterns in the electric fields between 1D, 2D, and 3D charge distributions 
-  * Compare/contrast process for a 2D charge distribution with a 1D charge distribution 
-</WRAP> 
-*/ 
  • course_planning/184_projects/f18_project_3.1537461306.txt.gz
  • Last modified: 2018/09/20 16:35
  • by tallpaul