Rutherford scattering using MatLab

Click For Summary
SUMMARY

The forum discussion centers on simulating Rutherford scattering using MATLAB to analyze the angle distribution of particles scattered from a gold nucleus. The user is uncertain about the accuracy of their results and seeks advice on whether to vary both initial speed and impact parameter in a single program or to create separate programs for each variable. The provided MATLAB code initializes parameters such as mass, charge, and Coulomb's constant, and iteratively calculates the trajectory of particles based on varying initial speeds.

PREREQUISITES
  • Understanding of MATLAB programming
  • Familiarity with classical mechanics concepts, specifically particle dynamics
  • Knowledge of Coulomb's law and electrostatic interactions
  • Basic understanding of scattering theory and angle distributions
NEXT STEPS
  • Explore MATLAB's built-in functions for numerical integration to improve simulation accuracy
  • Research the impact of varying both initial speed and impact parameter on scattering outcomes
  • Learn about advanced plotting techniques in MATLAB to visualize scattering distributions more effectively
  • Investigate the theoretical foundations of Rutherford scattering to validate simulation results
USEFUL FOR

Physics students, researchers in particle physics, and MATLAB programmers interested in simulating scattering phenomena will benefit from this discussion.

ShayanJ
Science Advisor
Insights Author
Messages
2,802
Reaction score
605
I'm writing a program for simulating the angle distribution of scattered particles from a gold nucleus but I doubt the results. I don't know...But it would be very good if someone check it and give some hints.
I also want to ask should I vary both initial speed and impact parameter in one program or I should write two different programs?
In this program I only vary the initial speed.
Here's the code:
Code:
clear
clc

m=4*1.67*10^(-27);
e=1.6*10^(-19);
q=2*e;
Q=79*e;
k=8.9875518*(10^9);

dt=.01;
t=[0:dt:20];
n=length(t);

da=5;
alpha=[0:da:360];
m=length(alpha);

flags=zeros(m);

y(1)=1;
x(1)=-100;
vy(1)=0;

for v0=0:100
	
	vx(1)=v0;
	
	for i=2:n-1
	
		x(i)=x(i-1)+vx(i-1)*dt;
		y(i)=y(i-1)+vy(i-1)*dt;
		
		rcs=(x(i-1)^2+y(i-1)^2)^(3/2);
		
		vx(i)=vx(i-1)+((k*q*Q*x(i-1))/(m*rcs))*dt;
		vy(i)=vy(i-1)+((k*q*Q*y(i-1))/(m*rcs))*dt;
		
	end
	
	temp=atan(y(n-1)/x(n-1));
	
	if(temp<0)
	
		temp=temp+2*Pi;
		
	end
	
	theta=temp;
	
	for j=1:m
	
		if (theta==alpha(j) | (theta>(alpha(j)-da) & theta<(alpha(j)+da)))
		
			flags(j)=flags(j)+1;
			
		end
		
	end
	
end

plot(flags,'o')
hold on
grid on

Any idea is welcome
Thanks
 
Physics news on Phys.org
I'm sorry you are not finding help at the moment. Is there any additional information you can share with us?
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 11 ·
Replies
11
Views
5K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
5
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K