fluid dynamics experiment

Accurate Fluid Dynamics By Video Analysis

Introduction


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 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 experiment.  All digits may not be significant but are included to reduce rounding errors in anticipated predictive modeling.

Method


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 applied 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 were used in this experiment:

  1. The camera is held in a fixed position (not hand held).  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 are 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 presents difficulties to the automated trackers.
  9. Deciding whether to track the leading edge or 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 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 the 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.

Results

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 apparent agreement with 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)
0.02450.15480.02920.19920.04380.24240.03130.2040
0.03280.21720.03760.26520.05220.29640.03960.2592
0.04110.28200.04590.32640.06050.34920.04800.3192
0.04950.33480.05420.38400.06880.40200.05630.3768
0.05780.38880.06260.44160.07720.44760.06460.4296
0.06610.44040.07090.49800.08550.48480.07300.4836
0.07450.48840.07920.55200.09380.52800.08130.5316
0.08280.53880.08760.60120.10220.57000.08960.5784
0.09110.57480.09590.65040.11050.60720.09800.6192
0.09950.61440.10420.70080.11880.65040.10630.6600
0.10780.65520.11260.74160.12720.67680.11460.6936
0.11610.69000.12090.78240.13550.70680.12300.7188
0.12450.72120.12920.81480.14380.73560.13130.7500
0.13280.74280.13760.84480.15220.75240.13960.7776
0.14110.76680.14590.88080.16050.77640.14800.8112
0.14950.79080.15420.91200.16880.78960.15630.8424
0.15780.81600.16260.94560.17720.80880.16460.8580
0.16610.83640.17090.96840.18550.83040.17300.8772
0.17450.85320.17920.99360.19380.84600.18130.8952
0.18280.87240.18761.02120.20220.86040.18960.9168
0.19110.88320.19591.04280.21050.86160.19800.9492
0.19950.89160.20421.06440.21880.86640.20630.9804
0.20780.90120.21261.08240.22720.87240.21461.0056
0.21610.90480.22091.09800.23550.88920.22301.0260
0.22450.91680.22921.11480.24380.90240.23131.0416
0.23280.92160.23761.13280.25220.92520.23961.0620
0.24110.92280.24591.14000.26050.94200.24801.0848
0.24950.93000.25421.12870.26880.93960.25631.0848
0.25780.92880.26261.09800.27720.94080.26461.0824
0.26610.93120.27091.04900.28550.92300.27301.0622
0.27450.92110.27921.00240.29380.91340.28131.0402
0.28280.88750.28760.95590.30220.88940.28961.0073
0.29110.82800.29590.90560.31050.83270.29800.9781
0.29950.75600.30420.86210.31880.77650.30630.9451
0.30780.68540.31260.82420.32720.71400.31460.9118
0.31610.63080.32090.79080.33550.66840.32300.8833
0.32450.58920.32920.76100.34380.64510.33130.8407
0.33280.55080.33760.74120.35220.60890.33960.8112
0.34110.53110.34590.72580.36050.58270.34800.7927
0.34950.50690.35420.72200.36880.5598
0.35780.49320.37720.5269
0.36610.47530.38550.5190
0.37450.46090.39380.5036
0.38280.45980.40220.4861
0.39110.45000.41050.4775
0.39950.44440.41880.4596
0.40780.43440.42720.4566
0.41610.43010.43550.4462
0.42450.42700.44380.4499
0.43280.42580.45220.4487
0.44110.4202
0.44950.4164

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. 

Discussion

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 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 air over a distance of 0.5-0.75 m and using a least squares fit to 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 experiment 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

2 replies
  1. 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