However entertaining modeling a drunk student back home after a long night may be, there is a physical system that corresponds to this movement. For example, gases and liquids both move according to Brownian motion. Brownian motion is the movement where molecules are free to move throughout their container. This movement is both based on random movements and on collisions with other molecules within the container. When looking at one molecule of gas or liquid, this movement appears completely random.
Although my programs model the motion of a wasted student, this random motion can be compared to Brownian motion easily. Not only that, but I can add additional and real physical variables to the code. I decided to focus mainly on drift. Drift for a drunk student can be thought of as a sober and conscious step towards their destination in addition to the random chance of stepping in that direction. This results in biased random motion, or random motion that is directed towards a specific region. In the college student’s case, it could be towards their room or a bathroom. Most Brownian motions in real physical systems include drift. Drift of gas can be caused by a temperature gradient, pressure gradient, physical force, or electromagnetic force.
My Matlab codes were designed to plot and determine the displacement squared of 3 different types of “walks.” The first is a very basic random walk. In this system, the walker has an equal chance of taking a step in the positive and negative x and y directions (Figure 1). This can be seen as a simplified system with completely homogenous conditions and one single molecule. The next system is a slightly more realistic system with more complicated and random directions (Figure 3). This is a better approximation for Brownian motion since it allows for the particle to move in any direction with a variable distance traveled for each time step. This also simplifies the system down to homogenous conditions. My final code is a manipulation on the first to account for drift (Figure 5).
Figure 1. Drunken Motion in 2D. No variables.
Figure 2. Statistics of Figure 1. Calculated with fitlm function of MATLAB.
Figure 3. Brownian Motion in 2D
Figure 4. Statistics of Figure 3. Calculated with fitlm function of MATLAB.
Figure 5. Drunken Walk with drift assigned with a 10% chance of taking 5 steps in +x or +y direction. fit=0.2550t^2+1.0161t+68.1101. R-squared=1.0000
Not only is drift visible on the motion map, the mean displacement squared is magnitudes larger between Figures 1 and 5. When drift was added, a second diffusion constant had to be added since the equation for mean displacement squared became parabolic. Since I am not comparing the mean squared displacements to a system with density (there is only one particle in my system), I can simplify the diffusion constants to be the slopes of their respective best fit lines. According to Figures 2,4, and 5, the diffusion constants are very precise and accurate (error is much less than 1% for linear diffusion), which indicate a statistically significant difference between the different walk methods.
The difference drift makes is considerable. This is important to keep in mind when considering chemical, biological, and physical systems. For example, a higher amount of drift, caused by a higher temperature or lower density on one side of a semi permeable membrane, alters solvent flux. Future directions for my experiment would be comparing the different sources of drift to each other. I would be very interested in modeling the real movement of solutes across a membrane under different gradients, such as temperature or solute density.
Figure 6. Brownian Motion in 3D. This isn’t all too significant to the rest of my project, but it is a visual representation of the path a liquid or gas molecule takes in a 3D homogenous box.
All 4 of my codes can be found here-https://docs.google.com/document/d/1nvyB5giUicIIiCJuKNKTwJagBlepP8J-IOQsMeMgB7Q/edit