Pages

Wednesday, 17 August 2016

Simulation with Excel Series: Lab 4 Brownian Motion

Title: Simulation of Brownian motion of smoke particles.

Basic Theory:
In this lab, we try to simulate the motion of multiple particles in two dimensions, which depicts Brownian motion. Brownian motion is a stochastic model in which changes from one time to the next are random draws from a normal distribution. It is a physical phenomenon which can be observed, for instance, when a small particle is immersed in a liquid. The particle will move as though under the influence of random forces of varying direction and magnitude. There is a mathematical idealization of this motion that allows us to simulate the successive positions of a particle undergoing Brownian motion. It is an example of Markov Chain.  

Procedure:
For simulation of Brownian motion, we first specify a collection of random particles with randomly distributed values of motion in X and Y directions (dx and dy). This will characterize that the particles move randomly in a two-dimensional space. This can be described using a random function in Excel as,

dx =1-2*RAND()

We can use dx =1-3*RAND() for a more scattered motion. This is same for y as well.
Now, we assign the drift values for X and Y points. They will further define the movement of particles due to some specific drift forces that act on them. So, the positions of particles are defined by

Xn = Xn-1 + Drift(x) + dx
Yn = Yn-1 + Drift(y) + dy

This formula shows that the points will be plotted with respect to their last values, and the values prior to that do not make direct contributions. Hence, we can observe the Markov property in Brownian motion.

After that, we generate a Scatter plot of the X and Y values and see the particle motion. We can experiment with drift values to see the changes in the behavior of particle motion.

Thus, we were able to visualize Brownian motion using random distribution and assuming Markov property.

Sample Data:
Table1: Sample Data for Brownian motion is
dx
dy
X
Y
-0.89132
-0.9203
0
0
0.208206
-0.7602
1.208206
0.239804
0.021238
-0.78757
2.229443
0.452233
-0.78564
0.614743
2.443803
2.066976
0.765821
0.259244
4.209624
3.32622
-0.2025
0.748862
5.007128
5.075081
-0.03483
0.09562
5.972299
6.170702
-0.89046
-0.70513
6.081844
6.465568

Output:

Below are the graph plots for Brownian motion for 300 particles:


Conclusion:
Hence, we could see that the Brownian motion of particles was consistent with chosen drift values. The more the drift in any one direction, the obtained curve gets wavier. We can further increase the precision of the simulation by increasing the number of random points, thus being able to observe larger number of particles. However, the excel worksheet will become too slow if we generate a lot of random numbers because of large number of calculations.  

No comments:

Post a Comment

Was this post helpful? Ask any questions you have, I will try to answer them for you.