1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Physics simulation of a collision in 1D

  1. Jun 25, 2013 #1
    1. The problem statement, all variables and given/known data

    I am designing a physics simulation that models two balls colliding along a straight line path. I can change the coefficient of restitution, the initial velocities, and their masses. THe assignment asks that we vary at least three parameters, so in my case, the three are the coefficient of rest., the masses, and the velocities.

    I have gotten the program working but my instructor keeps telling me that if the user changes the initial velocities of either ball, it only changes the point at which the collision occurs. I've made it so that the collision occurs at time zero, and yes, changing the initial velocity before time zero will change where the collision occurs, but I'm not worried about that. THe point is that I calculate the final position based on the initial velocity, initial mass, and the time. And this final position at any time will depend on whatever the initial velocity was.

    I've attached my code. If someone could let me know if there is anything wrong with it, I would appreciate it.

    2. Relevant equations

    --

    3. The attempt at a solution

    See above
     

    Attached Files:

  2. jcsd
  3. Jun 25, 2013 #2
    Never mind, the confusion has been settled. Nothing was wrong with the code.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Physics simulation of a collision in 1D
  1. Heat Transfer in 1D (Replies: 0)

  2. 1D transient problem (Replies: 12)

  3. Simulating an OpAmp (Replies: 1)

Loading...