Real Diffusion Experiment (for Home or School)

9.1K3635

Intro: Real Diffusion Experiment (for Home or School)

As part of my research and my physics degrees I've been studying a lot about diffusion and diffusion-related subjects. After a while it finally hit me that I learned about diffusion before - in my highschool biology class. I thought about the experiments they showed us, and something didn't make sense. So I searched YouTube for diffusion demonstrations, and they looked pretty much the same - someone drops a bit of dye into a large water-filled beaker, and after a few minutes the entire beaker is colored.

At this point I realized how big the misconception about diffusion is! Most diffusion demos are completely wrong!

As I'll show you soon enough, diffusion on these scales takes weeks to happen! All of these demos in fact show a process called 'convection' in which the dye mixes due to currents and swirls in the liquid, not due to diffusion.

So, in this instructable I'll first try to convince you that there's something wrong with these experiments, and that we should re-evaluate how we demonstrate diffusion to student. Then, I'll show you how you can perform diffusion experiments the right way (there's more than one way, of course!). Finally, I'll discuss some of the consequences of the results, which can actually teach us a lot about the world we're living in.

My hope is that - if I convince you that the typical diffusion demos are wrong - you spread the word! Teach the ones you can! And on the other hand, if you think that I'm wrong here - I'd love to hear your opinion, see your experimental data, and talk about it!

I've been waiting to make an instructable about this subject for a while now, but I never really got to it. Finally, the science fair contest motivated me getting it done and posting this article :) I hope you like it!

I made a video about this project for those who like watching narrated videosIf you have any questions or comments, I'd love to hear all of them!

STEP 1: What's Wrong With Typical Diffusion Demos

In the diffusion demonstrations we're used to seeing, the main things that cause the dye to mix are not diffusion. It is swirls and currents in the liquid, a process called convection. Most commonly, a drop of dye is injected into a large water-filled beaker, and the audience watch as the color mixes (see the GIF I attached of such experiment I performed myself). The spread of the dye is said to be due to diffusion. However, this is not true. You can clearly see currents and swirls in the liquid (convection).

There are many things that cause the convection. First, the beakers are often wide open and so any currents in the air are transferred to the water, causing them to swirl. Next, since the top of the beaker is open, there's evaporation of water happening (see the drawing I attached). This means that the top of the water container becomes cooler than the bottom. Since cold water is slightly denser, it tends to sink, which leads to currents and swirls again. Finally, these experiments are often done with warm water in intent to show that diffusion is temperature-dependent. However, everything I just mentioned is also enhanced with the increased temperature! The difference between the beaker's temperature and the rest of the room is bigger, and so the water develops an even steeper temperature gradient, which makes everything even worse!

Diffusion, as it turns out, can be very very slow. Humans are used to seeing big things - things on the scale of a mm (1/25") are already pretty small for the human eye. However, diffusion is extremely inefficient at these sizes! Diffusion is fast and efficient only on the scale of microns and smaller, and if you follow along, you'll see exactly why!

This should not be discouraging - the fact that diffusion is slow on large scales - but quick on small scales - explains so much of the world around us, including a lot of biological phenomena, and I'll elaborate on that in the final section.

I'm not trying to say that diffusion experiments are impossible to see and demonstrate, I'm just saying that the most common form of diffusion demos is wrong! There are ways to do it right!

STEP 2: Experimental Setup

We need to make sure that convection doesn't happen in our experiment. Here are the things that helped me get it done. I tried skipping some of these, but it didn't work :)

  • Use a thin container. Glass test tubes or other things with similar proportions could work. These are pretty cheap, I bought mine from AliExpress.
  • We should make sure that when we inject the dye, it doesn't swirl right from the start. To do that, I used salt water (5% salt) instead of tap water. This made them heavier and so the dye floated on them. It doesn't change anything for diffusion (why? you can ask your students questions like this one! let me know if you want the answer), but it helps with the initiating the experiment in a controlled manner.
  • Let all of the liquids rest at room temperature before starting. If they have different temperatures, it'll cause convection.
  • Inject the dye gently to the top of the container so that it floats at the top. Avoid dropping it from a distance.
  • Use plastic wrap or a cork cap to seal the test tube after you initiate the experiment. This will help fight the evaporation and air currents from messing with your experiment.
  • Finally, this experiment is best done in a constant environment where the temperature is pretty constant over time. If you want to film it, a good place would be inside a cabinet or a closet.

I used a dye called Fluorescein which is very common in laboratories (often used for diffusion experiments). However, food coloring or ink work perfectly fine. If it's water soluble and has a strong color, it should be fine.

STEP 3: Data Capture

Capturing the data is important if we want to have a quantitative understanding of the phenomena. It will also let us see the diffusive behavior as a function of time even though things are moving slowly (see the GIF I attached - that's 48 hours!).

  • You want the capture data with a nice clear background. I found that using a black paper works well, but it often depends on the type of food coloring or dye you're using.
  • You also want to capture images with constant lighting and camera settings. For that reason, I kept the experiment running inside a closet with a fixed light source :) sunrise & sunset can interfere with your data.
  • I found a really nice app called 'Open Camera' (thanks Orit!). It allows you to take timelapse images, set the image resolution, and fix the focus / exposure so it doesn't change automatically. You can also save the data to a google drive folder which means you can check how things are going without opening the closet and having the risk of a ruined experiment. You shouldn't take more than an image every 5-10 minutes. Nothing happens that fast anway, the experiment will probably be running for days.
  • Before initiating the experiment, take an image with something of a known size. For example, taking a picture of a ruler would be useful. You'll see more about why this is needed in step 6.
  • Initiate the experiment and wait. Take the time and follow the images over your google-drive folder. Try to avoid opening the closet while the experiment is running!

STEP 4: Data Analysis Software - 'Tracker' (free Academic Software)

There are many ways analyze the experimental data. I found Tracker can be used in so many physics experiments that it's worth getting to know. It's available in many different languages (not only English), so young students from all over the globe can use it.

Download the Tracker software here. There's an online version but it doesn't work well.

An alternative to 'Tracker' is a software called 'ImageJ' or 'Fiji' (basically the same). It works great too, and has some advanced options too.


To start analyzing your videos, import them. Tracker accepts videos of many formats, but also sequences of images. Note that sequences of images need be named in a fixed format with a incrementing numbers. For example, Img001, Img002, Img003... are good file names (see first image)

You'll often want to rotate the image so that the direction you're interested in is horizontal. To do that, right-click the video, and press filters -> new -> rotate. Rotate the image in the desired direction (see second image).

I've also written a code python to analyze a sequence of images automatically, more about that (file included) in the data-analysis step.

STEP 5: Calibrate Pixels to Physical Units

We took images or videos of the real world, but the software has no way of knowing what we're looking at, what's it's size, and how often images were taken. We need to calibrate both space (distances) and time to physical units. You'll need to do this even if you analyze the data in a different software.

To Convert Pixels to Distance Units (GIF #1):

  • Select the 'calibration tools' from the toolbar.
  • Add a new calibration stick.
  • Align it along a known distance. For example, I took a picture of a ruler.
  • Calibrate the measured distance. I'm using meters, but you can change to any units you like by pressing the 'Coordinate system' tab -> 'Units...' and setting your preferred system of units.

To Calibrate Time (GIF #2):

  • Right-click the video (anywhere on the screen), and press 'Clip Settings'
  • Set the frame rate (FPS) or the time interval between images in a sequence (dt). I analyzed images that were taken every 30 minutes, so I set 'dt' to 1800 seconds.

You can set the coordinate system (where x, y = 0) and its orientation on the screen by pressing the coordinate axes tool in the toolbar (see third image).

That's it, from this point on your measurements will be in physical units.

STEP 6: Measure the Diffusion Process Over Time

I'm including here 3 different types of analysis. I'll list them in order of complexity, the first one being the easiest one to use but also the least accurate, and the last one being the most complex and accurate method of analysis.

First Method - 'By Eye' (GIF #1):

The food coloring (or whatever ink or chemical you're using as dye) colors the water. We can look for the point where it is no longer visible, and track it's position over time.

  • In the 'Tracker' software, press 'Track' -> 'New' -> 'Point Mass'.
  • Hold 'Shift' and use the mouse choose the point at which the paint is not longer visible. Each time you click, the software will move on to the next frame.
  • You can go back and edit points if you like. You can also decide to skip multiple frames in each click by changing the 'step size' at the bottom. This can be useful especially when things change slowly.
  • Keep going until you went through all of the video / image sequence.


Second Method - Intensity Profile (GIF #2):

The previous method lacks some accuracy. 'The point where the dye is not longer visible' is not well defined, and depends on the person analyzing the data. A more robust way of analyzing the data is by looking at the intensity profile of the image. Brighter regions have higher intensity than darker regions. We can measure in Tracker as well.

  • Add a new Track of a 'Line Profile' type.
  • Use Shift to place it along the direction of the diffusion process.
  • A window will open on the right side of the screen showing the intensity as a function of distance. Define a point in the intensity profile that you want to track. For example, 'the point where intensity is equal to 50'.
  • Measure it's position over time. You'll need to write down the time and position of each point manually (you can write it into an Excel sheet). Students can do this in pairs to save time. I realize this can be time consuming if you go through all of the captured frames, but analyzing about 20-30 frames should be plenty! Adjust the 'step size' so you skip through more than one image at a time.


Third Method (GIF #3):

This method is basically an upgrade of the previous one. I wrote a python code that analyzes the data automatically. It runs through each image and measures the intensity profile along a selected region. It does a few extra things like removing the background noise and such. Also, I used a green dye so it analyzes the green channel of an RGB image, but you can make a small modification to the code to analyze other colors or all of them combined.

  • Run the code and analyze your images.
  • You'll end up with all of the intensity profiles. All that is left is to track a selected point along the profile. Say, 50 gray points above the background. Define a threshold that would work for your images.
  • For each profile, calculate it's distance from the threshold, that is: abs(profile - threshold). The smallest value of this vector will be the point where the profile is equal to the intensity threshold you've chosen, so the easiest way to find it is by looking for: min(abs(profile - threshold). I've attached MATLAB code that does all of this, plots the profiles, and saves them as images.

STEP 7: How Fast Are Things Moving??

Now that we have tracked the diffusion process over time, we can start the final part of the experiment. In this part we will try to answer questions about the rate at which diffusion occurs.

By looking at the images we've aquired we already have an intuitive feeling for it - diffusion starts off pretty fast, but then, as time passes, it slows down. My experiment was running for 48 hours, and the test tube was far from well mixed. The typical distance the dye I used propagated was about 1cm (less than 1/2"). This is very slow, and very typical for diffusion in water!

I made a GIF of the time dependence of the intensity profile for the first 48 hours of the experiment. We can see that the profile changes very rapidly at first, but then it slows down. This is what we see in the images too, so that's a good sign the analysis works :) I then defined the point where the front of the intensity profile reaches a value of 50 gray points above the background intensity, and marked it with an orange circle on each of the profiles (see third method in the previous step for details). I called this point 'x_D' (D for diffusion).

Finally, I plotted x_D as a function of time (see the graph I attached). x_D is shown with orange markers. There's also a blue line on the graph. This graph describes a theoretical fit to the data. Diffusion has a very precise physical formulation which matches reality to very high accuracy. It suggests that diffusion should occur at a rate that scales as the square root of time. In other words, x_D should scale as: x_D ~ sqrt(D * t), where 'D' is the diffusion coefficient of the dye in water and 't' is time. So, I tried to fit the x_D data to a function of the form x_D = sqrt(D * t). The fit is very good, so it seems that diffusion does scale as the square root of time, as expected! I could also use the fitted function to get an estimate for the diffusion coefficient, and found that it is of the order of 4 * 10^-6 [cm^2/sec]. This is very close to the real value of the dye I used (5.5 * 10^-6 [cm^2/sec]). This difference was expected since I could have defined x_D slightly differently and end up with other results. Measuring the exact diffusion coefficient takes a little more effort than what I did here, but for an estimate and order-of-magnitudes this is perfectly fine.

STEP 8: Conclusions

We saw that x_D scales as x_D ~ sqrt(D * t). We can now ask, if we wanted for the dye to reach a point x_D away from the source of the dye, how long should we wait? This is answered by inverting the equation: t_D = (x_D ^2)/D. This seems mondane - nothing special, right? But this equaion dictates so much in biology and life. For example, have you ever wondered why cells are small? Why don't we see huge elephant-sized cells? One of the main reasons for that is that cells depend on diffusion to obtain nutrients. If cells were too big, diffusion would become inefficient. Using the diffusion coefficient we found, we see that diffusion will take about 40 minutes to pass just 1mm (1/25.4"), but it would take less than a second to pass a distance of 10 microns, a typical distance to travel when thinking about cells. For instance, when you exercise, your muscle cells need constant supply of oxygen. If the cells were too big (1mm sounds small, right?), diffusion would become inefficient and the oxygen supply wouldn't reach the inside of the cells fast enough. [the sizes-GIF was created base on Learn Genetics]


To conclude,

We saw that diffusion experiments need careful attention and a lot of patience. I found that the best way to demonstrate this phenomenon is by capturing a video. You can do that with the students if you want to take this into the class-room. Another option would be to initiate the experiment on one day and looking at the results the next day. You'll see the dye has started to mix into the water.

On large scales, diffusion takes a very long time (over a mm or 1/25.4 of an inch is already considered large!), but on very small scales, such as the sizes of cells (a few microns), diffusion is a very efficient way to move things around. This explains a lot about biological processes and other physical phenomena. I think that once you develop intuition for the process and its time-scales, you can appreciate so many things about the world around us.

I hope you found this topic as interesting as I find it! And if you're in the world of teaching, I hope you spread the word! There's a huge misconception about diffusion due to wrongful demonstrations, and it's our job to make things right :)


If you like my instructable and want to see more, you're welcome to visit my instructables page and my website


By the way, if you want to support my projects - subscribing to my new YouTube channel is currently the best way to do that! :)

29 Comments

Great work. Even though I used to differentiate molecular diffusion and turbulent diffusion I never thought of modifying the experiment to minimize the impact of turbulence on molecular diffusion. Thank you for sharing.
Thanks for the nice comment :) Another easy way to modify the experiment is to use some water-based gel like agar or something edible.
Nine job, but I think there's a misleading point in your discussion. You say : "In the diffusion demonstrations we're used to seeing, the main things
that cause the dye to mix are not diffusion. It is swirls and currents
in the liquid, a process called convection."

Well... yes and no. Yes, because convection is not diffusion, you are perfectly right. And no, because 99% of the time, i.e. when the Reynolds is big enough, convection and swirls are not stable and start the transition toward turbulent mixing.

From there, the keywords are : Kolmogorov Cascade, and Turbulent Diffusion... the latter ends exactly in the molecular regime, as imagined by Reynolds, and later on demonstrated by Kolmogorov.

So, the basis is that there are two diffusion mechanisms inside a fluid : turbulent diffusion and molecular diffusion.

The most significant example of what I say is the process of breathing for vertebrates : each time you breath, the fresh air inside your lumbs never stays long enough to let to molecular diffusion the time to operate and transfer oxygen from the core of your lumbs toward your blood, staying at your lumb's walls. Inside your lumb, there is just air, and molecular diffusion would take hours for oxygen to reach the vacuols at your lumb's walls.

If you want to know more, any good lecture on Turbulence in fluids will show you how it works. The keywords are "turbulent viscosity", "Reynolds tensor", and "Dissipation scale" for Turbulence.
Hi,
Thanks for the comment :) I tried to keep things simple, but did I write about this in my conclusion. It is obvious that there are two processes - turbulent flow on large scales and diffusion on the small scales.
I think we agree on everything (because it's all about facts here), but still:

In my conclusion section I tried to emphasize that diffusion is very efficient at short distances, but it is not efficient at generating large-scale effects because of the scaling as t^0.5 (which explains a lot about our world). This explains what you said about breathing as well - humans have to breath in and out to replace the air in our lungs. We don't wait for diffusion to do that. But (!) our lungs built in a special structure that has a lot of surface area - the oxygen-rich air gets in close contact with the inner parts of our lungs, which means diffusion can finally act. So it's the combination of convection and diffusion that allows oxygen into our body - convection does the quick, long-range part (inhaling/exhaling), and diffusion does its sub-millimeter level magic.

Of course there is diffusion in the classic class-room demonstration, I didn't try to claim there isn't. My instructable tried to show that diffusion is not the major player in these experiments, convection is. By the way, I think that if you had turbulent flow without diffusion you'd still have a pretty well-mixed solution when viewed on the macroscale. Of course, if you zoomed in you'd see that the fluid is not well mixed at all, some regions have lots of dye whiles others have none, but on the macroscale, the way we see it, the solution would appear pretty mixed.

In any case, thanks for your comments and for the discussion :) I'm sure it'll be helpful to readers.
Great project and documentation!
Thanks for sharing. I enjoyed reading from start to finish.
Thank you so much for the very kind comment! :) I love your projects by the way!
You are welcome ! I'm glad you like my projects! I wish I had more time to make them!
Thank you for the illuminating discussion and demonstration. It reminds
me of why only small creatures can survive without a circulatory
system.
Thank you as well for the link to the Tracker software. I
also followed the link near the description of the time lapse software, but
did not succeed in finding that app. Can you tell us the program's name
or provide a link? Thanks again.
Thanks for the question :)
I think you're referring to the code I wrote in python. It's not too complicated but you'd need a bit of coding knowledge to use it (it has no user-interface). Does that help? Not sure if I answered your question!
Thanks a lot for the kind feedback by the way:)
[quote] I found a really nice app (thanks Orit!)
that allows you to take timelapse images, set the image resolution, and
fix the focus / exposure so it doesn't change automatically. [/quote]
I was referring to this statement. The app sounds like a powerful data acquisition tool. It might be the way to determine the effect of temperature on the diffusion speed curve (though that's an experiment for someone other than me to do ;) . Is there a link to that app? Thanks.
Oh wow I missed that! I added a screenshot of the app but didn't include it name. *Fixed!*
Thank you!
It's called Open Camera by the way :)
Your very careful experiment seems to show colored bands that move downward and broaden over time. My guess is that the downward movement of the band reflects the sedimentation (in 1 G field) of dye molecules that are more dense than the 5% salt solution, while the broadening of the band reflects diffusion of dye molecules down the concentration gradient (i.e., upwards and downwards from the center of the band).
Thanks for the comment!
Well, the expansion and the downward movement are actually the same process here - diffusion. To make sure, I did similar experiments where I took distilled water and injected a solution of dye + salt to the bottom of the test tube. It turns out to look the same. You can also do experiments with soft agar gel or jell-o, they allow for particles to diffuse but not for convection. I didn't use gels for this demo because I thought it might raise some questions.

Another thing that supports that this is actually all due to diffusion is the fact that the rate of expansion was proportional to the square root of time (x~t^0.5). However, particles moving due to gravity inside the water would also feel a drag force. This would result in them falling with a terminal velocity (my friend orit posted an instructable about it: https://www.instructables.com/Tracking-Parachute-...) So, particles moving with a constant (terminal) velocity would sink at a constant rate, which means the bands should travel at a rate that is constant in time (x~t), which is not the case here (see step 7).

What do you think?:) I'd love to hear your thoughts

Thanks for this really nice demo and especially the clear explanation. As a follow-up to the above comments, I note that the change in the importance of gravity with length scale is another huge source of confusion and misconception in science that is often not taught well. Here's my attempt at an explanation:

The gravitational force on an object is proportional to its mass (or difference in mass between the object and the fluid in which it is suspended), which is proportional to its size to the 3rd power (pi*diameter cubed over 6 for a sphere, length times width times height for a box, etc.). For small objects, the drag force on an object as it sinks down or floats up is proportional to its surface area or cross-sectional area, or size to the 2nd power and also proportional to the speed at which it is moving. When these forces balance, the object moves at constant speed (size squared times speed = size cubed times some constant value, or teminal speed = size times some constant, shape-dependent value). Thus, for small objects, the speed of settling decreases in proportion to the size of the object (e.g., diameter of a sphere). Meanwhile, diffusion coefficients increase as the size gets smaller. At some small size, settling is so slow compared to diffusion, which acts to randomly redistribute the small objects to make their concentration uniform, that the object doesn't ever settle. For example, one can go to a museum and see dispersions of gold nanoparticles produced by Michael Faraday in the 1850's in which the gold particles have not settled out, despite the huge difference in density between gold and water (https://www.rigb.org/explore-science/explore/colle... ).

A really cool (but expensive, see e.g., http://www.nanocs.net/detection-reagents/fluorescent-silica-beads.htm) variation on your experiment would be to add fluorescent silica beads somewhere in the middle of the tube. These are roughly twice the density of water, and if large enough will sink. For beads of a size at which diffusion and gravitational settling are both important, the band of beads will simultaneously move downward due to gravitational settling and broaden due to diffusion, in ways that are both quite mathematically well defined. The central position will change in proportion to time, while the width of the band will increase in proportion to the square root of time.
Thanks a lot for for the kind feedback and for your great input here! You definitely did a better job replying to pghs251 than I did :)
There's a cheaper alternative to fluorescent beads - it's basically just beads without the fluorescence part (often used to track fluid dynamics). They are not as pretty, but much cheaper. The experiment you're suggesting sounds fun, I might just order some beads!

By the way, a nice way to see what happens when you apply a constant force to a group of diffusing particles is by using electrophoresis methods. In short, two electrodes (positive and negative) are put inside a salty solution and create a rather constant electric field across it. Then, you can submerge a piece of agar gel in it. Finally, you put some colorful ions (Fluorescein worked great) on one side of the gel, say in a small well, and watch as it moves toward the other side through the gel. The center of the colored spot moves at a constant speed (due to the explanations you mentioned basically), but it also expands at a rate that is proportional to t^1/2. Soon enough, the distribution of ink follows a Guassian distribution whose center moves at a constant speed. It's beautiful :)

Great instructable!
I have a very perplexing question. I hope you can help explain to me what is happening.

I have a syringe filled with say a 10-20% household glycerine to water mixture. The ratios are not critical. The tip of the needle is then made to come into contact with food dye. So in other words the tip is just touched onto some household food dye.

After a brief time the dye is drawn into the syringe's chamber. It doesn't matter what orientation the syringe is in.

Are you able to explain or mabe replicate this observation?
It doesn't seem to work with just plain water. We observed it a great deal in a commercial environment.

Thank you for a very detailed explanation.
That sounds like an interesting phenomenon!
Since you're saying that it does not happen with plain water, my next guess would be that this happens due to the difference in surface tension of the two liquids. Does that make sense? (I would be happy to say more if you want).

Also, we have glycerol at the lab, so I'll give it a shot and get back to you with my findings :)

And thanks for the very kind feedback!
My pleasure. I always enjoy reading and seeing fascinating observations/experiments such as yours.

Yes, please do try to replicate what I experience! It is actually an unwanted behaviour in the products I try to manufacture. I just can't seem to work out what's going on. I would very much like to see and understand what's going on with my situation.
It looked so similar to some of the photos from you instructable here. That is what got my curiosity going.
Yes, glycerol should be exactly the same thing as glycerine. We use food grade glycerine in our sugared fondants. The syringe needle is one that has no sharp tip to it, not sure if this affects the observations.
Maybe you can replicate this too. I would be fascinated by your experiments.
It doesn't seem to matter what orientation the syringe is in for this occurance to happen. It looks fantastic but very much unwanted behaviour.
I haven't tried it in any other configuration because this is the only work setting we use.
I look forward to seeing what you can deduct from this.

Keep up the interesting content.
Oh, I forgot to mention that the syringe is a 15ml one. Apologies.
Your fine description reminds me of a real life effect of the slow pace of pure diffusion. In the summer, a thermocline forms in lakes, preventing vertical mixing of warm surface water with cooler deeper water. Without mixing, diffusion alone is not enough to get oxygen from air into the deep water, so oxygen concentration down there can drop low enough that fishes and other aerobic critters die.
More Comments