A large number of models in physics focus on point-like behavior of objects rather than extended bodies. For systems with few bodies in motion with one degree of freedom, it is easy enough to use various methods to locate an object ( e.g. ultrasound, interferometery, or even a linear potentiometer). Finding the two-dimensional location of an object in real time tends to take careful engineering of the situation, and three-dimensional locations even more so. Furthermore, many traditional methods work poorly on situations that involve a number of moving bodies.
While photographs have been used for capturing data from experiments since the late 1800s, digitally processing images is (obviously) newer. One turning for physics point came in 1959, when Paul Hough developed an algorithm to identify linear tracks in photos of bubble chambers. While incredibly useful, it was still difficult to digitize images in the first place. With semiconductor breakthroughs in the 70's and 80's, CCD and CMOS detectors were developed as a way of quickly and cheaply gathering digital image data.
Nowadays processing video has become common, to the point that there are readily available libraries that help with routine tasks. For this experiment, we'll be using the Open Computer Vision library, which runs on nearly every OS and can be used with C++, Java, and Python. To get your computer ready to go, you should do the following:
conda update conda
conda update -n base -c defaults conda –repodata-fn=repodata.json
Now type the following commands into the prompt:
conda create -n tracking
conda activate tracking
conda install numpy
conda install matplotlib
conda install scikit-image
conda install -c conda-forge av
pip install pims
pip install opencv-python
pip install ipympl
pip install jupyter
pip install pandas
jupyter notebook
If you've succeeded, you should have set up a new Anaconda environment named tracking
and installed the packages needed for the lab. To verify it worked, make a new Jupyter notebook and type the following commands
import os print (os.environ['CONDA_DEFAULT_ENV'])
It should print out tracking
; if not then we'll need to troubleshoot why you don't have the right environment set up.
Brownian motion is the random motion exhibited by a particle suspended in a fluid (either a liquid or a gas). This random motion results from the constant bombardment of the particle from all sides by the constituents of the fluid. Early observations of Brownian motion provided some of the first evidence of atoms. In 1905, Einstein published a paper showing that Brownian Motion could be explained by assuming that fluids were composed of atoms moving randomly with an average kinetic energy. In 1908, Jean Perrin experimentally confirmed the predictions of Einstein's theory, for which he was awarded the Nobel Prize in Physics in 1929. In this experiment, we will observe the Brownian motion of silica beads suspended in water, and use particle-tracking software to measure the mean-squared displacement of these beads over a period of time. Using a simple model from statistical mechanics, we can look at how diffusion scales with particle size.
A simultation of Brownian motion. The yellow circle represents a microscopic particle undergoing Brownian motion, while the white circles represents molecules from the environment colliding with it. Use the play button in the top menu bar to start, or visit the source page for a smoother running model. |
[2] F. Reif, Fundamentals of Statistical and Thermal Physics (McGraw - Hill, New York, 1965).
In this experiment you will observe Brownian motion of silica beads in water, and compare their motion to that predicted by statistical mechanics. Specifically, your objectives for this experiment include the following:
Consider a single particle immersed in a fluid. In a given time interval $t$, the random collisions with the particles in the fluid will give rise to a random displacement, and the probability for any particular displacement, $x$, is given by the Gaussian distribution
$P(x) = \sqrt{\dfrac{1}{2\pi\sigma^2}}e^{-x^2/2\sigma^2},$ | (1) |
where the width of the distribution can then be related to a quantity known as the diffusion coefficient,
$\sigma^2=\left< x^2\right>=2Dt.$ | (2) |
If one experimentally measures these displacements in one dimension (e.g. along either the x- or y-axes), you can plot a normalized histogram and fit to Eq. (1) in order to extract the diffusion coefficient.
The theory of the Brownian motion of spherical particles can be derived from statistical mechanical considerations. (See Refs [1] and [2] for a full treatment of the problem.) Here we will simply summarize the development of the theory. The motion of the particle is assumed to be governed by the following two forces:
Using the equipartition theorem, it can be shown that the mean squared displacement of the particle in one dimension, $\langle x^2 \rangle$, is given by
$\dfrac{\partial \langle x^2 \rangle}{\partial t} = \dfrac{2k_BT}{\mu},$ | (3) |
where $k_B$ is Boltzmann's constant and $T$ is the absolute temperature of the fluid. Since we are assuming spherical particles, we can use Stokes' law for the frictional force on a spherical particle moving through a viscous fluid,
$\mu = 6\pi\eta a$, | (4) |
where $a$ is the particle radius and $\eta$ is the viscosity of water (which varies slightly with temperature). Thus, integrating we find
$\langle x^2\rangle = \dfrac{2k_BT}{6\pi\eta a}t=2Dt$, | (5) |
where $D = k_BT/6\pi\eta a$ is defined as the diffusion coefficient.
There are quite a few assumptions about the nature of the forces that exist (and those that don't exist) that may be violated in practice, so don't panic if your results don't match the prediction precisely; look for ways to alter the experiment or test for trends.
The particles we will investigate are silica spheres of (close to) uniform size suspended in water. (Particle sizes ranging from about 0.5 to 5 μm are available.) Solutions may have been prepared ahead of time, or you may need to mix your own (with help from the lab staff).
Your sample will be a microscope slide consisting of a single drop of the sample solution held between the slide and a cover slip as shown in Fig. 1. It is important that the boundaries of the sample drop not reach the edges of the cover slip, microscope slide, or the spacer tape as this will create a flow of the solution towards the point of contact. Due to evaporation, your drop will disappear over the course of a day or so. Likewise, due to gravity, the particles will slowly settle out of solution on the scale of a few hours. It is therefore likely that you will not be able to reuse your sample slide from the first day on the second day of the experiment. Preparing a new sample on the second day (from the same dilution) will not impact the results of the experiment.
A compound binocular microscope will be used for viewing and recording movies of the particles undergoing Brownian motion. Several components of the microscope are illustrated in Fig. 2, and the device has the following characteristics of importance to the experiment:
The total magnification of the microscope is given by the product of the 10x eyepiece and the selected objective's magnification.
The condenser is used to take the light coming from the light source and focus it into a cone which narrows to a point at the sample, and then expands back into a cone of light entering the objective. The condenser needs to be adjusted separately for each objective, so that the cone angle matches the numerical aperture (or acceptance angle) for that objective. Getting the best image means adjusting the position of the condenser, the opening diameter of the iris, and the brightness of the light source.
For this exercise, you will be using the biological sample slides provided to practice using the microscope.
On the first day of the experiment, you will gain experience in performing the following tasks:
At the end of the first day (or before returning on the second day), you should obtain a histogram of particle displacements extracted for at least one video, and you should calculate at least a preliminary estimate for diffusion coefficient.
To process the video files, we have a Python notebook as well as an example file that you can test with.
The default plan for the second day is to continue experimenting with the Brownian motion system by choosing a parameter to modify (e.g. particle size, density, temperature, viscosity, etc.) and record a series of videos as you change the system. The goal is to then empirically determine how the diffusion coefficient was affected by your change. If you have a parameter that is easy to measure (such as particle size) then ideally you will create a functional relationship between that parameter and the diffusion coefficient. If you have a parameter that is difficult to precisely quantify (e.g. viscosity) then determining the presence (or absence) of a trend might be the best you can do.
To this end, you will want to have a fair number of trials (Think back to your first lab report about what datasets were characterized well and which ones were difficult to interpret).
For your analysis, you will need a plot of diffusion versus the modified parameter. If there is a notable trend in the data (or an expected trend) you should fit a function to it; otherwise you should explain why that is not possible.
If you choose a different system for day 2, then the specifics will be more flexible. For instance, some experiments might require more work in getting proper lighting for a video to be measurable, or more work with OpenCV to actually parse the video into manageable data.
If you want to save a video you've been processing, the following code _should_ be a good starting place. You might need to alter the codec at the start.
fourcc = cv.VideoWriter_fourcc(*'DIVX') out = cv.VideoWriter('output.avi', fourcc, 30.0 , (frames[0].shape[1],frames[0].shape[0]),False)) #True if color for f in frames: out.write(f) out.release()
The arguments for VideoWriter are the Filename
, Codec
, Framerate
, (width, height)
, and Color?
There will be some variability between groups here, but here are the general guidelines for what to hand in:
For a single video, provide the following:
For the second day's experiment, you may have either worked systematically investigating a parameter for the Brownian motion system or worked to track another system entirely. As such, the expectations will differ.
If you continued with Brownian motion, you should provide the following:
If you studied another system, you should provide the following:
The third day's system has the same expectations as the second day. If you can identify a clear through-line to connect them, great!