Modeling Velocity Distribution in Matlab

In summary, the conversation discusses the difficulties in modeling a velocity distribution in Matlab for an effusive atomic beam exiting from a circular aperture. The equations for the speed distribution and angle of the atoms have been figured out, but there are challenges in conceptualizing the probability distribution of longitudinal and transverse velocities. One approach suggested is using a Monte Carlo simulation to generate a large sample and calculate the corresponding velocities.
  • #1
msgreyson
1
0
I'm having some hang ups while trying to model what is probably a fairly simply velocity distribution in matlab.

It's just an effusive atomic beam exiting from a small circular aperture with negligible thickness. I have figured out the equations to use for the speed distribution of the atoms leaving the aperture, and the angle at which they leave, which matches our experimental setup.

Probability(speed) goes as A(speed^2)exp(-speed^2/B)exp(-C/speed)
Probability(angle) goes as cos(theta)

Ultimately, I'm trying to find an expression for the probability distribution of the longitudinal and transverse atom velocities relative to the direction of propagation of the atom beam. I think I'm having issues conceptualizing it since it seems to me that the velocity distribution in any direction will depend on both the angle and the speed of the atom.

Just considering the longitudinal velocity distribution, I can easily model the speeds without applying the angles. Applying the angular distribution should, I think, cause the longitudinal distribution to widen but ultimately stay in the same place, since the highest probability of angle to to continue going straight in the longitudinal direction. Yet simply multiplying the two probabilities moves the curve to the realm of higher velocities in the longitudinal.

Perhaps it's an issue of indexing in my coding or something along those lines. But if anyone is willing to offer advice or has any questions that might nudge me in a useful direction as to the physics here, it would be greatly appreciated.
 
Physics news on Phys.org
  • #2
Thanks!The way I would approach this problem is to use a Monte Carlo simulation. Essentially, you generate a large sample of atom speeds and angles, and then calculate the corresponding longitudinal and transverse velocities. You can then plot the histograms of the longitudinal and transverse velocities to get a good approximation of the velocity distribution. You can also use the Monte Carlo method to calculate the expected value of the longitudinal and transverse velocities given the speed and angular distributions.
 

1. How can I create a velocity distribution plot in Matlab?

To create a velocity distribution plot in Matlab, you can use the histogram function. This function will automatically calculate the velocity distribution and plot it as a histogram. You can also customize the plot by specifying the bin size and range.

2. Can I model a non-uniform velocity distribution in Matlab?

Yes, you can model a non-uniform velocity distribution in Matlab by using the randn function. This function generates random numbers from a normal distribution, which can be used to create a non-uniform velocity distribution.

3. How do I fit a curve to my velocity distribution data in Matlab?

To fit a curve to your velocity distribution data in Matlab, you can use the fitdist function. This function allows you to specify the distribution type and parameters to fit the curve to your data. You can also plot the fitted curve on top of your velocity distribution plot for visualization.

4. Can I simulate a velocity distribution in Matlab?

Yes, you can simulate a velocity distribution in Matlab by using the random function. This function allows you to specify the distribution type and parameters to generate random velocities that follow that distribution. You can then use these simulated velocities for further analysis and modeling.

5. Is there a way to compare two different velocity distributions in Matlab?

Yes, you can compare two different velocity distributions in Matlab by using the ksdensity function. This function calculates the kernel density estimation for each distribution and plots them on the same graph for comparison. You can also perform statistical tests, such as the Kolmogorov-Smirnov test, to determine if the two distributions are significantly different.

Similar threads

  • Mechanical Engineering
Replies
3
Views
931
  • Advanced Physics Homework Help
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Mechanics
Replies
6
Views
2K
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
6
Views
2K
Replies
1
Views
902
  • Quantum Interpretations and Foundations
Replies
21
Views
2K
  • Quantum Interpretations and Foundations
Replies
10
Views
1K
Back
Top