B My particle simulation version of the Double Slit experiment

  • Thread starter sqljunkey
  • Start date
I created this in java just a while ago.
 

Drakkith

Staff Emeritus
Science Advisor
2018 Award
20,461
4,155
Very nice. Interesting pattern formed by the particles after passing through the slit. Have you just modeled them as classical particles?
 
Thanks,
All classical, the particles are random none of them collide with each other, only with the slits.
I opened the slits more and made the center thinner and the effect is more visible.

 

sophiecentaur

Science Advisor
Gold Member
23,001
3,629
It's great when someone has taken the trouble to do something like this. Something that we all talk about but never actually get round to doing.
The range of densities in actually a lot easier to see than with the traditional humped graph. The thickness of a graph line makes a linear graph hard to read near zero. The brain makes a much better job and we easily 'see' extremes of density.
I assume you take the standard interference pattern equation and use that to calculate the probabilities (?).
 
It's great when someone has taken the trouble to do something like this. Something that we all talk about but never actually get round to doing.
Thanks!

I assume you take the standard interference pattern equation and use that to calculate the probabilities (?).
I didn't use wave equations. You can look for yourself I uploaded the code : https://github.com/sqljunkey/sim.particle all the action happens in Engine.java .

I'll probably add some sliders and input bars, I want to open many slits and see if I can simulate diffraction grating next.

Fun stuff :)
 

sophiecentaur

Science Advisor
Gold Member
23,001
3,629
You can look for yourself I uploaded the code :
I tried to make sense of the code but I gave up. I don't know Java - sorry - and I couldn't locate the core operation amongst all the declarations of variable types etc.. If you haven't included some (perhaps implied) wave behaviour then how do you get an interference pattern? Did you go straight from an idea in your head to the code? I know that's often the way stuff is done but it does make communication difficult from person to person. What's it all based on (no code please)?
 

Nugatory

Mentor
12,029
4,521
You can look for yourself I uploaded the code : https://github.com/sqljunkey/sim.particle all the action happens in Engine.java .
As I read the code, you are sending small solid balls towards the screen and when they collide with the edge of a slit you are adding a fixed transverse amount to their momentum. This isn't simulating the double slit in either classical or quantum mechanical form.

I don't think there's any way of getting a plausible simulation without using some of the mathematics of wave propagation - interference requires the possibility of negative amplitudes.
 
I coded this thinking how something like a black hole with the mass of the moon traveling at high velocity to the sun would get caught in it's orbit for a brief time and then escape. Since the moons would be of the same size all the time the orbit escape angles would be nearly the same for a range of "orbit entering positions". That is not what actually happens with particles probably, but that is(I think) what creates the effect you see.
 

sophiecentaur

Science Advisor
Gold Member
23,001
3,629
I don't think there's any way of getting a plausible simulation without using some of the mathematics of wave propagation - interference requires the possibility of negative amplitudes
Not only negative values but a continuum of phase.
Cheers for finding the problem with the code. I do hate it when the Physics, Maths or Logic of a process is only described in esoteric code; it can so easily lose me.
This is something that makes me very suspicious of simulations in general and particularly 'simulations' that are included in some games, which are just written to give a 'convincing' picture for a limited range of conditions.
 

sophiecentaur

Science Advisor
Gold Member
23,001
3,629
I coded this thinking how something like a black hole with the mass of the moon traveling at high velocity to the sun would get caught in it's orbit for a brief time and then escape. Since the moons would be of the same size all the time the orbit escape angles would be nearly the same for a range of "orbit entering positions". That is not what actually happens with particles probably, but that is(I think) what creates the effect you see.
It's a nice looking animation (and pretty convincing as a one off demonstration) but not based on any accurate physics at all, I'm afraid. Neither the physics of waves nor the likely behaviour of objects around black holes.
It would be very easy to include some proper wave calculations to give a probability distribution of your animated particles. The rest of the application would work as it is.
 
As I read the code, you are sending small solid balls towards the screen and when they collide with the edge of a slit you are adding a fixed transverse amount to their momentum. This isn't simulating the double slit in either classical or quantum mechanical form.
I could change the momentum to be proportional to the distance and it would probably be the same thing. Probably even better. and I'm not simulating waves and wave interference.
 

Drakkith

Staff Emeritus
Science Advisor
2018 Award
20,461
4,155
I could change the momentum to be proportional to the distance and it would probably be the same thing. Probably even better. and I'm not simulating waves and wave interference.
The same as what? It certainly won't be the same as simulating waves, if that's what you meant.
 

sophiecentaur

Science Advisor
Gold Member
23,001
3,629
I could change the momentum to be proportional to the distance and it would probably be the same thing. Probably even better. and I'm not simulating waves and wave interference.
Your thread title suggests something fairly different from that.
 

Nugatory

Mentor
12,029
4,521
I'm not simulating waves and wave interference.
That is correct, although someone reading the thread title might be forgiven for thinking that you were trying to.

In fact, you are simulating a system in which balls are fired towards an array of immobile demons that capture some of the incoming balls and throw them in a different direction. Depending on how you program the demons you should be able to get pretty much any pattern you want.
 

Want to reply to this thread?

"My particle simulation version of the Double Slit experiment" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top