Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
repository:solar_system_springs [2021/03/31 23:52]
porcaro1 [Answer Key]
repository:solar_system_springs [2021/04/07 23:08]
porcaro1
Line 39: Line 39:
     - Case 5: The mass is between the equilibrium and bottom  ​     - Case 5: The mass is between the equilibrium and bottom  ​
   - Create a diagram showing the acceleration and velocity vectors for each of the aforementioned cases.   - Create a diagram showing the acceleration and velocity vectors for each of the aforementioned cases.
-  - Run the [[https://​trinket.io/​glowscript/​bf533ef826 | minimally working code]]. The code allows the user to input the value for the spring constant ($k$) and change the mass of the crate ($m$) using a slider. What problem(s) do you see with the simulation?+  - Run the minimally working code (below). The code allows the user to input the value for the spring constant ($k$) and change the mass of the crate ($m$) using a slider. What problem(s) do you see with the simulation?
  
 Fortunately,​ the code is not entirely complete; you have a fantastic opportunity to fix it! Modify the code to make the spring oscillate appropriately. Also, add some lines of code so that you can change the acceleration due to gravity and perform a check to make sure the value is in the "​down"​ direction (the "​up"​ direction is set as positive). Make sure that the acceleration due to gravity is reported in the window that prints the mass and spring constant. Once you have verified that your code is running properly, complete the following questions. Fortunately,​ the code is not entirely complete; you have a fantastic opportunity to fix it! Modify the code to make the spring oscillate appropriately. Also, add some lines of code so that you can change the acceleration due to gravity and perform a check to make sure the value is in the "​down"​ direction (the "​up"​ direction is set as positive). Make sure that the acceleration due to gravity is reported in the window that prints the mass and spring constant. Once you have verified that your code is running properly, complete the following questions.
  • repository/solar_system_springs.txt
  • Last modified: 2021/04/07 23:30
  • by porcaro1