course_planning:183_projects:s23_week_3_geostationary_orbit

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
Next revisionBoth sides next revision
course_planning:183_projects:s23_week_3_geostationary_orbit [2023/01/25 19:09] hallsteincourse_planning:183_projects:s23_week_3_geostationary_orbit [2023/01/25 20:06] hallstein
Line 102: Line 102:
   * **Tutor Question:**  If you added in another body, what two forces would constitute the net force acting on the satellite?   * **Tutor Question:**  If you added in another body, what two forces would constitute the net force acting on the satellite?
   * **Expected Answer:**  $\vec{F}_{\rm net}=-GM_{1}m\hat{r}_{1}/r_{1}^{2}-GM_{2}m\hat{r}_{2}/r_{2}^{2}$   * **Expected Answer:**  $\vec{F}_{\rm net}=-GM_{1}m\hat{r}_{1}/r_{1}^{2}-GM_{2}m\hat{r}_{2}/r_{2}^{2}$
- 
-{{course_planning:geostationary_part_1_questions.png}} 
  
 </WRAP> </WRAP>
Line 185: Line 183:
  
 <WRAP alert> <WRAP alert>
-The addition of the non-constant Newtonian force is challenging for students.  If the group is struggling to correctly model it, do not push them to add in a graph. Rather, focus on correctly completing the previous tasks and ask any remaining tutor questions.+The addition of the non-constant Newtonian force is challenging for students.  If the group is struggling to correctly model it, do not push them to add a graph. Rather, focus on correctly completing the previous tasks and ask any remaining tutor questions.
 </WRAP> </WRAP>
  
Line 210: Line 208:
   * **Expected Answer:**  It is the step in time that passes every loop of the calculation loop.  Increasing the time step makes for a "rougher" approximation to the real world phenomenon.   * **Expected Answer:**  It is the step in time that passes every loop of the calculation loop.  Increasing the time step makes for a "rougher" approximation to the real world phenomenon.
  
-{{course_planning:georobitconceptualq2.png}}+
  
 </WRAP> </WRAP>
Line 282: Line 280:
     Earth.rotate(angle=theta, axis=vector(0,0,1), origin=Earth.pos)     Earth.rotate(angle=theta, axis=vector(0,0,1), origin=Earth.pos)
 </code> </code>
 +
 +Changes made to the given code:
 +{{course_planning:project_solutions:project_3_code_b.png}}
  
 ====== Project 3: Part C: Geostationary orbit ====== ====== Project 3: Part C: Geostationary orbit ======
Line 293: Line 294:
 Inside the while loop, add: graphExample.plot(t, mEarth) Inside the while loop, add: graphExample.plot(t, mEarth)
  
 +====== Project 3: Part D: Geostationary orbit ======
 +
 +On a single graph, plot both the x-component of the satellite's momentum and the x-component of the net force acting on the satellite.
 +
 +
 +Solution code for parts C and D
 +
 +<code>
 +GlowScript 2.9 VPython
 + 
 +get_library('https://cdn.rawgit.com/PERLMSU/physutil/master/js/physutil.js')
 + 
 +#Window setup
 +scene.range=7e7
 +scene.width = 1024
 +scene.height = 760
 + 
 +#Objects
 +Earth = sphere(pos=vector(0,0,0), radius=6.4e6, color=color.blue)
 +Satellite = sphere(pos=vector(42164e3, 0,0), radius=1e6, color=color.red, make_trail=True)   #modify position of satellite
 + 
 +#Parameters and Initial Conditions
 +mSatellite = 15e3   # edit mass of the satellite
 +pSatellite = mSatellite*vector(0,3073,0) #edit momentum of the satellite
 +G = 6.67e-11   # add universal gravitational constant
 +mEarth = 5.97e24  # add mass of Earth
 + 
 +#Time and time step
 +t = 0
 +tf = 60*60*24
 +dt = 1
 + 
 +#MotionMap/Graph
 +SatelliteMotionMap = MotionMap(Satellite, tf, 20, markerScale=2000, labelMarkerOrder=False)
 +FnetMotionMap = MotionMap(Satellite, tf, 20, markerScale=2000, labelMarkerOrder=False)   # add Fnet force arrows - also need to add in loop)
 +
 +graphSeparation = PhysGraph(numPlot=1)   # initialize the magnitude of the separation vector vs time plot
 +graphFnet = PhysGraph(numPlots=1)   # initialize the magnitude of the net force vs time plot
 +
 +graphpF = PhysGraph(numPlots=2)   # initialize the x componets of p and Fnet vs time plot
 +
 + 
 + 
 +#Calculation Loop
 +while t < tf:
 +    rate(10000)
 + 
 +    Fgrav = -G*mSatellite*mEarth*Satellite.pos/(mag(Satellite.pos)**3) # Add Fgrav change Fnet
 +    Fnet = Fgrav                                                       # change Fnet from zero
 + 
 +    pSatellite = pSatellite + Fnet*dt
 +    Satellite.pos = Satellite.pos + (pSatellite/mSatellite)*dt
 + 
 +    SatelliteMotionMap.update(t, pSatellite/mSatellite)
 + 
 +    FnetMotionMap.update(t, Fnet)  # Add Fnet vector arrows
 +    #separationGraph.plot(t,mag(mSatellite))
 +    graphSeparation.plot(t,mag(Satellite.pos))  # update magnitude of sep vector vs time plot
 +    graphFnet.plot(t,mag(Fnet))    # update magnitude of Fnet vs time plot
 +    scale=1.0E4   # add scale to make fluctuations in Fx visible (units of 10^-4 N)
 +    graphpF.plot(t,pSatellite.x,scale*Fnet.x)   # update x-components of Fnet and p vs time
 + 
 +    t = t + dt
 + 
 +    #Earth Rotation (IGNORE)
 +    theta = 7.29e-5*dt
 +    Earth.rotate(angle=theta, axis=vector(0,0,1), origin=Earth.pos)
 +</code>    
  
 +Modification of solution to part B to get |r| vs t, |Fnet| vs t and Fnet,x and P,x vs t:
  
 +{{course_planning:project_solutions:project_3_code_cd.png}}
  
  • course_planning/183_projects/s23_week_3_geostationary_orbit.txt
  • Last modified: 2023/10/18 01:20
  • by hallstein