Jim's
Tutorials

Spring 2019
course
site

Jack - March 5

So I got stuck on the simulation of interacting particles. I think I actually have a way forward now, but as of writing this part I am not certain. In case I don't make progress, my issue is with the setting of new velocities after the collision, and moving the particles back to the moment of collision. Im currently working on the function to move the particles back to the moment of the collision. It was going well until I remembered the large particle also moves. Oh wait, I just had an idea. I think I can use my large particle as a frame of reference. Alright, I will test that out. Anyway, but once I have the particles at the point of collision I am a bit confused as to how I calculate the new velocities. Something about center of mass reference frame? I'm currently unsure how to do that. Maybe I'm simply not thinking right, and it's really easy.

Since I was stuck I decided to try writing some of the other program, the one that accurately reflects the actual experiment. I managed to calculate intensity and plot it for gaussian movement of particles. It isn't exactly accurate right now. It's fairly messy. Also, all the constants are just equal to 1 and the time step is 1 second, but I believe if I just adjust those everything will be accurate. Well, there is one more thing. The angle between the light and the detector I am currently calculating as if it were 90 degrees, but I might want to make the angle a variable and I would have to adjust some of my math to make that work.

And it isn't just a calculation of intensity, it's a plot too! The next thing to do is to calculate and plot the autocorrelation and power spectrum for this data. I know numpy has some commands that can be useful, but I can't quite figure them out. np.correlate does autocorrelate, but only for \( \Delta t = k \) and I have no idea what k is. It isn't variable because it just spits out one number, and that isn't very helpful. I think there is some other stuff that can help with autocorrelation but I am not certain so far.

Jim says

I've uploaded two files , brownian.html and collision_center_of_mass.pdf

$ jupyter nbconvert brownian.ipynb    # creates brownian.html so we can see it

The pdf is the physics of a two body collision using center of mass coordinates. The last step is to convert the velocities after the collision back into frame coordinates by adding the center of mass position and velocity.

https://cs.marlboro.college /cours /spring2019 /jims_tutorials /jtuttle /mar4
last modified Fri May 3 2024 5:30 pm

attachments [paper clip]

  last modified size
TXT brownianlab.html Fri May 03 2024 05:30 pm 290K
TXT brownianlab.ipynb Fri May 03 2024 05:30 pm 9.5K
TXT collision_center_of_mass.pdf Fri May 03 2024 05:30 pm 221K