Differences
This shows you the differences between two versions of the page.
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 18:06] – hallstein | course_planning:183_projects:s23_week_3_geostationary_orbit [2023/01/25 20:10] – hallstein | ||
---|---|---|---|
Line 102: | Line 102: | ||
* **Tutor Question: | * **Tutor Question: | ||
* **Expected Answer: | * **Expected Answer: | ||
- | |||
- | {{course_planning: | ||
</ | </ | ||
Line 185: | Line 183: | ||
<WRAP alert> | <WRAP alert> | ||
- | The addition of the non-constant Newtonian force is challenging for students. | + | The addition of the non-constant Newtonian force is challenging for students. |
</ | </ | ||
<WRAP tip> | <WRAP tip> | ||
==Tutor Questions: | ==Tutor Questions: | ||
- | * **Question: | + | * **Question: |
- | * **Expected Answer: | + | |
- | Aside from just eyeballing it, we can add in a graph of the distance from the center of Earth! (Moved to separate part C of the problem) | + | |
- | <code python> | + | |
- | # | + | |
- | separationGraph = PhysGraph(numPlots=1) | + | |
- | + | ||
- | # | + | |
- | separationGraph.plot(t, | + | |
- | </ | + | |
- | + | ||
- | | + | |
* **Expected Answer: | * **Expected Answer: | ||
Line 210: | Line 197: | ||
* **Expected Answer: | * **Expected Answer: | ||
- | {{course_planning:georobitconceptualq2.png}} | + | * **Question:** How can you prove that the orbit is actually circular? |
+ | * **Expected Answer: | ||
+ | Aside from just eyeballing it, we can add in a graph of the distance from the center of Earth! | ||
+ | Part C includes adding this graph: | ||
+ | |||
+ | <code python> | ||
+ | # | ||
+ | separationGraph = PhysGraph(numPlots=1) | ||
+ | |||
+ | # | ||
+ | separationGraph.plot(t, | ||
+ | </ | ||
</ | </ | ||
Line 282: | Line 280: | ||
Earth.rotate(angle=theta, | Earth.rotate(angle=theta, | ||
</ | </ | ||
+ | |||
+ | Changes made to the given code: | ||
+ | {{course_planning: | ||
+ | |||
+ | ====== Project 3: Part C: Geostationary orbit ====== | ||
+ | |||
+ | While you have continued to impress Carver, he remains unsure about the size of the force acting on the satellite and its distance from Earth. | ||
+ | |||
+ | The syntax you need to work with in order to include a graph involves two lines of code(mass of Earth vs time is given as an example). | ||
+ | |||
+ | Outside the while loop, add: graphExample = PhysGraph(numPlots=1) | ||
+ | |||
+ | Inside the while loop, add: graphExample.plot(t, | ||
+ | |||
+ | ====== Project 3: Part D: Geostationary orbit ====== | ||
+ | |||
+ | On a single graph, plot both the x-component of the satellite' | ||
+ | |||
+ | |||
+ | Solution code for parts C and D | ||
+ | |||
+ | < | ||
+ | GlowScript 2.9 VPython | ||
+ | |||
+ | get_library(' | ||
+ | |||
+ | #Window setup | ||
+ | scene.range=7e7 | ||
+ | scene.width = 1024 | ||
+ | scene.height = 760 | ||
+ | |||
+ | #Objects | ||
+ | Earth = sphere(pos=vector(0, | ||
+ | Satellite = sphere(pos=vector(42164e3, | ||
+ | |||
+ | #Parameters and Initial Conditions | ||
+ | mSatellite = 15e3 # edit mass of the satellite | ||
+ | pSatellite = mSatellite*vector(0, | ||
+ | G = 6.67e-11 | ||
+ | mEarth = 5.97e24 | ||
+ | |||
+ | #Time and time step | ||
+ | t = 0 | ||
+ | tf = 60*60*24 | ||
+ | dt = 1 | ||
+ | |||
+ | # | ||
+ | SatelliteMotionMap = MotionMap(Satellite, | ||
+ | FnetMotionMap = MotionMap(Satellite, | ||
+ | |||
+ | graphSeparation = PhysGraph(numPlot=1) | ||
+ | graphFnet = PhysGraph(numPlots=1) | ||
+ | |||
+ | graphpF = PhysGraph(numPlots=2) | ||
+ | |||
+ | |||
+ | |||
+ | # | ||
+ | while t < tf: | ||
+ | rate(10000) | ||
+ | |||
+ | Fgrav = -G*mSatellite*mEarth*Satellite.pos/ | ||
+ | Fnet = Fgrav # change Fnet from zero | ||
+ | |||
+ | pSatellite = pSatellite + Fnet*dt | ||
+ | Satellite.pos = Satellite.pos + (pSatellite/ | ||
+ | |||
+ | SatelliteMotionMap.update(t, | ||
+ | |||
+ | FnetMotionMap.update(t, | ||
+ | # | ||
+ | graphSeparation.plot(t, | ||
+ | graphFnet.plot(t, | ||
+ | scale=1.0E4 | ||
+ | graphpF.plot(t, | ||
+ | |||
+ | t = t + dt | ||
+ | |||
+ | #Earth Rotation (IGNORE) | ||
+ | theta = 7.29e-5*dt | ||
+ | Earth.rotate(angle=theta, | ||
+ | </ | ||
+ | |||
+ | Modification of solution to part B to get |r| vs t, |Fnet| vs t and Fnet,x and P,x vs t: | ||
+ | |||
+ | {{course_planning: | ||
+ |