fluid dynamics experiment

Accurate Fluid Dynamics By Video Analysis

Estimated Read Time: 10 minute(s)
Common Topics: data, velocity, experiment, frame, camera

Table of Contents


Providing accurate fluid dynamics experiments for undergraduate laboratories is challenging in several ways, including reproducibility, simplicity, and accessibility to introductory students.  The data from many introductory experiments, for example, is not sufficiently accurate to test whether a linear or a quadratic relationship more appropriately models the dependence of drag force on velocity.  An optimal laboratory experiment is sufficiently inexpensive for multiple groups of students to perform with accurate, repeatable results. Examples are plentiful in undergraduate kinematics laboratories, including simple harmonic oscillators and sliding block experiments.  Cost-effective and accurate experiments in fluid dynamics are less common.

Video cameras with good resolution and frame rates from 60-240 frames per second are widely available, providing an opportunity for cost-effective access to accurate experiments in fluid dynamics.  This article provides an example and explains the due care needed to ensure accurate dynamics in a laboratory experiment with common, inexpensive materials.  Simple lead and steel spheres are dropped through stacked layers of canola oil and glycerine in a clear graduated cylinder.  This design provides ample experimental data for the development and testing of predictive models with the spheres both speeding up after being released from rest in the canola oil and slowing down after transitioning from the canola to the glycerine.

materials data table

Table 1:  Diameter and mass for four spheres used in the experiment.  All digits may not be significant but are included to reduce rounding errors in anticipated predictive modeling.


Four different spheres of known diameters and masses, as described in Table 1, were individually suspended using forceps near the top of a graduated cylinder containing canola oil and glycerol, then dropped to go through both fluids before reaching the bottom of the cylinder.   Liquid thicknesses were a compromise between fitting into the height of an available graduated cylinder and having smaller spheres approach terminal velocity in each liquid.  The graduated cylinder and liquids are shown in Figure 1.  Pilot testing had shown that when released from the air, an air bubble attaches to and remains with the sphere for 5-10 cm into the liquid which significantly impacts the net force and dynamics of the sphere falling through the fluid.  Releasing the sphere from a position slightly immersed in the top liquid eliminates this confounding factor and ensures more accurate data.

A video camera (Nikon CoolPix B500)  was used to record each trial at 120 frames per second and analyzed using some “best practices” as described below apply to this experiment.  Videos were then downloaded onto a computer and then imported into the free video analysis program Tracker version 5.1.1.  The raw position vs. time data was entered into a spreadsheet, and velocity vs. time was determined for each trial as described below.

Graduated cylinder

Figure 1: Graduated cylinder including forceps, sphere, canola oil (golden upper liquid), and glycerine (lower liquid).  The glycerine layer is approximately 10 cm thick, and the canola layer is approximately 20 cm thick.

Over the years, our laboratory has developed some practices for ensuring greater accuracy in video analysis that was used in this experiment:

  1. The camera is held in a fixed position (not handheld).  A tripod is used here.
  2. The motion is kept in a single plane as equidistant as possible from the camera.  Since truly equidistant is a sphere or circle, a better approximation to equidistant is achieved by placing the camera further away so the motion subtends a smaller arc of the circle.  Here, the camera is 3 m away for vertical motion close to 30 cm.
  3. The zoom feature of the camera is used to nearly fill the frame to allow as many pixels as possible to track the motion.
  4. The camera is rotated to the appropriate orientation (portrait or landscape mode) so that more pixels are along the dimension of greater motion.  For vertical motion here, portrait mode was used.
  5. The experiment is performed in the brightest light possible to capture motion with the fastest shutter speeds.  Here, videos were taken outside, in direct sunlight.
  6. In the dimension of motion, the camera is positioned as near as possible to the center.  For the vertical motion here, the parallax of graduations on the cylinder were used to position the camera at the vertical center.
  7. An appropriate and known length scale is used for calibration as near as possible to the plane of motion.  Length scales much closer or further away from the motion introduce calibration errors.  Here, the graduations on the cylinder are used for the length scale.
  8. With a little practice and due care analyzing the video, the human eye is capable of determining the position of objects in each frame more accurately than the automated features in many tracking programs.  This is especially true here where resolution is limited (640 pixels) and the image is distorted by materials of varying refractive indexes between the moving object and the camera.  Stepping through and determining the object’s position manually in each frame takes a little more time (5-10 minutes per video), but yields more accurate results since the image quality present difficulties to the automated trackers.
  9. Deciding whether to track the leading edge of the center of mass requires some thought.  In relatively low resolution and significantly distorted cases like the current experiment, the center of a symmetric object can be determined by the eye more reliably than the leading edge, especially since the motion is stopped effectively by the fast shutter speed ensured by full sun.  The optical distortions produce an image approximating an ellipse, and in most frames, the center of that elliptical image can be determined with an accuracy better than the height of 1 pixel.  In contrast, once slower shutter speeds result in blurs along the direction of motion, it is more reliable to use the leading edge since the size of the blurred object in each frame depends on its velocity which may be changing.
  10. Tracking programs often use overly-simplified nearest neighbor algorithms to determine velocity and acceleration or use other black-box methods hidden from the user.  Here, raw position vs. time data is entered directly into a spreadsheet for further analysis.
  11. Position errors on the order of 1 pixel translate to significant velocity errors when nearest neighbor positions are used as the best estimate for velocities at each frame.  More accurate velocities for each frame are determined using the idea of velocity as a “local” slope of position with respect to time.  The local slope is computed from some number of nearest neighbors usually ranging from 3-7 data points.  Here, the five nearest neighbors are used with a spreadsheet command “= slope()” as an acceptable trade-off between true instantaneous velocity and the smoothly varying velocity expected from physical considerations.
  12. A range of analysis techniques produces what appears to be accurate position data, and a range of models often produces what appears to be a good visual match for position data.   Velocity data tend to provide more stringent tests both for experimental and analysis techniques, as well as for predictive models.
  13. The trade-offs between frame rate and resolution require some consideration.  Pilot testing showed that the sphere would be falling for less than 0.5 seconds in each trial.  Even the highest frame rate of the camera used here (120 frames/second) would provide less than 60 data points at 640 pixels mapped over 30 cm or so for a spatial resolution close to 21 pixels per cm. Sacrificing frame rate (30 or 60 frames/second) at the expense of data points to increase the spatial resolution would not improve accuracy given the experimental design and planned analytical approach.  Comparing the data with predictive models seemed best served with at least 20 data points in each liquid.
  14. When manually using the Tracker video analysis software, calibrating in cm rather than m provides more precision in the digits in the displayed position of the cursor.
  15. Determining when t = 0 can be tricky.  It is difficult for inspection to identity the first frame where the object is free from its holder.  For cases such as this one where velocity increases linearly with time for the first few frames, a least squares fit for velocity vs. time is performed for the first few frames, and then the time axis is shifted in a matter that effectively defines t = 0 to be the instant where the velocity is extrapolated back to zero.  This also compensates for any accidental velocity arising from an imperfect manual release.

Predictive models require accurate fluid densities to accurately compute the buoyant forces on the falling spheres.  For the temperature at which the experiment occurred (28 °C), the densities of canola oil and glycerol were experimentally determined by measuring the mass of each fluid at 10 equal increments in a graduated cylinder on a calibrated digital scale and performing a linear least squares fit to determine density as the slope of the best fit line of mass vs. volume.  With distilled water, this technique has been shown to give agreement with accepted values to within 0.1%, which is the uncertainty in the slope performing the measurement with distilled water.  Uncertainties with canola oil and glycerine are larger, likely due to the higher viscosities of these liquids.  However, the differences between the measured densities reported here in Table 2 and typical values are significant, likely due to variations in production and purity of these consumer products. Given these variations, it is recommending that any modeling use measured densities from the experiment in question rather than typical values.

liquids tested table of data

Table 2: Densities of canola oil and glycerine needed for predictive modeling.  The relative uncertainty is computed from the reported uncertainty in the best-fit slope.  The relative error is computed from the difference between typical reported densities and the measured density reported here.


fluid velocity vs time

Figure 2: Velocity vs. time for 1.204 g lead sphere.


Velocity vs. time is shown in Figure 2 for the smaller lead sphere.  The data shows the expected behavior of the sphere accelerating from rest and approaching a near-terminal velocity close to 0.93 m/s as it falls through the canola oil.  As expected, the sphere begins to slow when it enters the more viscous glycerine, showing the expected behavior and slowing to a near-terminal velocity near 0.4 m/s.  To allow for potential predictive modeling, the velocity vs. time data is presented in Table 3 for the four spheres used in this experiment.  Position vs. time data is omitted to encourage modeling attempts to compare predicted and measured velocity rather than position because a wider array of models all produce an apparent agreement with the position.

1.204 g Lead3.113 g Lead2.052 g Steel8.364 g Steel
time (s)v (m/s)time (s)v (m/s)time (s)v (m/s)time (s)v (m/s)

Table 3: Velocity vs. time data for four spheres.  The data point corresponding to the first frame showing the sphere in the glycerine is shown in bold.  All digits shown may not be significant, but are shown to allow comparisons with modeling, including more accurate computations of RMS errors for different predictive models. 


Even though this experiment was performed with a dedicated camera, many smartphones have comparable frame rates, with phones being released as early as 2012 being able to record at 120 fps with equal or higher resolution.  The accuracy of this experiment depends on due experimental care rather than expensive equipment.  The two layers of liquid allow quantitative observations of both positive and negative accelerations in each trial.  The frames after the sphere transitioned between liquids were observed carefully, and the transition appears relatively “clean” in that canola oil is not observed being dragged significantly into the glycerine.  This is in contrast to dropping spheres from the air into liquids when an air bubble attaches to and follows the sphere into the liquid and affects the motion.

Data from tracking the lead spheres was slightly more uniform than the data from tracking the shiny steel spheres.  I surmise that tracking the shiny steel spheres is more challenging under the existing optical conditions because they are reflecting light from all angles rather than providing a uniform color as the lead spheres.  It is recommended that those repeating this experiment paint or otherwise color shiny steel spheres a dark, matte color (prior to measuring diameter and mass) for more accurate tracking as the spheres fall through the liquids.

The uncertainty in the velocity determination of most data points in this experiment is between 0.5% and 2.0%, as determined from the uncertainties in the slope of the position vs. time.  One might think that greater accuracy might be obtained with some combination of higher frame rates and/or higher resolution.  However, experience has shown that once due care is exercised in video kinematics experiments as described in the method, the factor most limiting accuracy is the linearity of the mapping of pixels to distance in the light-sensing element of the camera itself.  Higher resolution and higher frame rates will not improve accuracy using a single linear calibration if the fundamental limitation is in the sensing element of the camera.  The accuracy potential of most cameras can be determined by dropping a lead sphere in the air over a distance of 0.5-0.75 m and using a least squares fit a quadratic of height vs. time to determine the acceleration of gravity.  Comparing trial variations and how the experimental value of g compares with the known value for a location suggest the accuracy potential of a given camera if due care is exercised in the experiment.  Most consumer cameras of reasonable quality provide accuracy potential from 0.5% to 2%.

Students will likely gain the most educational value by repeating an experiment substantially similar to the one described here.  Learning the due care to produce accurate data helps develop of useful laboratory skills.  However, sufficient data is also provided in this article to develop and test predictive models if a theoretical approach is preferred.  It would be instructive and useful to develop a model with the data from one trial and then use the other three trials to test the model.  For example, each fluid viscosity might be treated as an unknown, and the first trial used to determine the viscosity of each fluid by treating it as an adjustable parameter.  Then the other trials might be used to test the model by computing RMS differences between predictions and experiments using the model without any additional adjustable parameters.  Alternatively, models testing linear and quadratic dependence of drag force on velocity may be tried, using RMS differences between models and data to identify the better model (rather than visual appearance).

Comment Thread

3 replies
  1. Dr. Courtney says:
    Interesting – same idea very good for basic projectile motion eg Calculation of g. Can you perhaps provide basic models which one can apply to the given data set. Am assuming something like exp(-kt) or 1 – exp(-kt).

    HarmonicGeneration suggested this when analyzing the data, but as the adviser on the project I dissuaded him. In general, I prefer not to promote the fitting of data to closed form functions that give the impression only algebra is required when I know the underlying problem really needs the application of calculus and solving a differential equation. I encouraged HG to focus on a good experiment to provide good data that would support a variety of theoretical and analysis approaches rather than to begin steering readers toward specific theoretical viewpoints. My experience has been most short fluid dynamics articles are too heavy on theory and too light on good data. There are probably 5-6 productive directions theory could take with the data in the article. HarmonicGeneration may take one of those directions in a follow-up article, but he included the data in a convenient form for interested readers to take different directions if they choose.

  2. neilparker62 says:
    Interesting – same idea very good for basic projectile motion eg Calculation of g. Can you perhaps provide basic models which one can apply to the given data set. Am assuming something like exp(-kt) or 1 – exp(-kt).

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply