February 13, 2012

Measuring the speed of light in a microwave oven - is there a better way?



Did you see this video? I subscribe to the CoolStuff newsletter from Arbor Scientific.  They send out an email roughly once a month which usually has some sort of  interesting idea for a demonstration or lab activity that I can use in the classroom.

This month they included a video about how to measure the speed of light using a microwave oven. The idea is that if you put something soft in the microwave (I've seen this done with marshmallows or chocolate) and turn the microwave oven on until the first hint of melting occurs you can measure half of a wavelength of the electromagnetic wave (in the microwave portion of the EM spectrum) by measuring the distance between soft spots.  Multiply the wavelength by the frequency of the microwave wave (conveniently printed on the back of the microwave oven) and voila! you have the speed of light to within a few percent.

It's a great idea for an exploration into EM wave phenomena.  But, I was a little underwhelmed by the explanation given in the video and on the supplemental page.  I don't want to nitpick too much. Mainly, I was disappointed that the explanation given was very traditional in the way it was presented. Kind of like: "Here are the facts. Here are the equations. Here's the reason it happens. Here are our results."

There wasn't much discussion about the pattern left in the chocolate. I have questions about the video! Why was the pattern in the chocolate shaped the way it was? Was there something about the magnetron (or was it thewaveguide?) in the microwave oven that lead to this pattern?  Do microwave ovens still use magnetrons to generate microwave waves?  How does chocolate get heated in the microwave if it has almost no water content?  I thought heating of food was due to a resonance of water molecules in the foot.  (It's not.)

I took some notes on what bothered me about the explanation of the phenomena.  What did you notice about this video? Have you done this exploration in class?  How have you done it differently to make it more engaging?

February 01, 2012

Treadmill thoughts

I hate running.  But, I've learned that there are few ways to exercise which are easier and cheaper than running.  I mean, all you really need to run are a decent pair of shoes and a place to run, right?  (Barefoot runners need even less.)  Most of the time when I run (and, trust me, I don't run, I jog slowly) I am on a treadmill.  Knowing physics can be useful when you're on a treadmill.  I can pace myself and try to speed up or slow down as much as I think I need to when I want to.  But knowing physics can also be a curse when on the treadmill, since I can calculate how much longer I'll be running when I don't really want to be there in the first place.

To try to keep my mind off the running, I'm often staring at all the displays on the treadmill. One of the displays keeps track of how many calories (really kilocalorie, which I abbreviate as kCal) I have burned in my workout. The treadmill displays how many calories I can burn in an hour at whatever speed I'm going at.

One day last week when I was on the treadmill I started to think about how that rate at which I burn calories (really my power) should vary with speed.  It seems obvious that the faster I run, the more energy per hour will be required to maintain that higher speed.  But how does it vary with speed?  I made a naive guess that it would be proportional to my average kinetic energy:

$$KE = {1 \over 2} m v^2$$

$$P = {KE \over t}$$

So if my speed doubles, I would expect the rate at which I convert the stored internal energy into the energy used move at that speed to increase by a factor of four. When I asked on twitter and facebook last week what people thought about how power varies with speed on a treadmill, I only got one response from someone who said "I respectfully disagree with you." Time for some data.  I turned on the treadmill and started recording the rate of calories burned at each speed from 0.1 miles per hour to just over 7 miles per hour.  Here is that graph:



So, as you can see, the graph has two distinct regions, which are both linear.  The discontinuity occurs at around 3.7 mph, roughly where it becomes too difficult to maintain a walk, and I have to switch to a jog to stay on the machine.

I'm a little surprised by this graph. In case you're wondering, I did not enter in my weight or height or age into the treadmill.  I really don't even care if the power values are correct right now.  I'm was puzzled by why the trend is so linear.  Let's go back to the definition of power, I said power was related to the kinetic energy.  It would have been more correct to say power is related to the work I am doing:

$$P = {W \over t}$$

Since I assumed that all of my work went into kinetic energy, I don't feel too bad about the earlier statement.  Work is $\vec{F} \cdot \vec{d}$ or just $Fd$ if the force and displacement are in the same direction, so power is:

$$P = {Fd \over t}$$

But $d \over t$ is my speed!  Oh, so I should write my power as:

$$P = Fv$$

where $v$ is my speed.  Oh, this is linear.  I guess the treadmill designer got it right.  Bummer, I was really hoping to burn more calories by just increasing the speed a little bit.


January 31, 2012

All of physics in one diagram - via Creative Commons

Today, this came across my twitter stream:
I thought it was really cool that Ian had encapsulated many of the connections between the various branches of physics.

I couldn't help but notice, however, that one branch of physics which is near and dear to my heart was missing: acoustics.

I'm not sure why acoustics tends to not be taken seriously by some physicists.  Waves are fundamental to our study of physics, and sound is one example of a type of wave that we can study. Acoustics is a highly interdisciplinary field.  Scientists who use acoustics include biologists, physicists, medical doctors, medical physicists, neurologists, psychologists, geologists and astrophysicists. Astrophysics?  Fields like helioseismology and astroseismology look at the vibrations of the Sun and stars to study their interiors.  Acoustics tells us about the beginning of the the Universe.  And some planetary scientists have even proposed studying the subsurface ocean on Europa with acoustics.

Acoustics isn't easy, either. (Equations for the vibrations of thin plates involve fourth-order differentials.)  It's not like we've stopped learning about how sound behaves or how humans perceive sound.

So, I was thrilled to see that Ian released his diagram under a Creative Commons license.  I have given him appropriate attribution, and am releasing my revision of his Prezi under the same license.

Enjoy in full-screen mode.


January 23, 2012

Time for active reading in my class

Last week, Apple made a major announcement about their entry into the textbook market. The best criticism of Apple's plans was given by Audrey Watters.  I'm not going to recap what she said. You must read it for yourself.

And, if you are a believer that all textbooks are crap, you probably won't have much use for what I have to say here, either.  I'm often surprised by the number of teachers (college and high school) who have no use for the textbook. And, sorry Frank, building ramps doesn't count:


(Although, Frank does have some good ideas of what a physics ibook could look like.)

I do believe that it is my responsibility to (as much as possible) choose relevant and well-written texts for use in my classes. I also believe that there is no perfect textbook.

I have introduced to my calculus-based class what I am calling active reading.  The class has already been assigned readings from the text to complete before coming to class.  They complete short reading reviews online before the class starts that I look at before class starts.

But this is not enough.  Active reading requires:

  1. Note taking while reading. Both in the margins and in their notebooks. Underlining and judicious highlighting are also encouraged.
  2. Access to other reference materials, such as dictionaries or the web for looking things up.
  3. Repeated reading. My class knows that their first time reading through the material I don't expect them to become experts.  I do expect mastery of the concepts we cover in class before the next quiz or exam.
I don't think we do enough in the sciences to teach our students how to be active readers. I don't know how we can correct this deficit, but I think it's something that is long overdue.


December 01, 2011

Puzzling pair of wire loops


This is my stab at resolving the puzzle of the mutual inductance of the pair of wire loops posed last night by Andy Rundquist.

1-Subject Notebook 1 p. 71
brought to you by Livescribe


I hope Prof. Rundquist doesn't mind one more screencast to watch.

November 30, 2011

A not-so-dumb idea...

Two days ago Rhett Allain tweeted this video:   



and said it would make for a good blog post.  I thought it would make for interesting class discussion.

So I showed the video in class.  I didn't say anything other than: "Here's an interesting video I thought we could watch."  After the video I asked the groups to talk about what they had observed and whiteboard everything they could think of to describe the physics displayed in the video.  Here are what 3 groups came up with.




The group that came up with "the tangential force caused angular acceleration" was pretty proud of that statement.  We talked about how using the concept of torque was probably better.  And, of course the best whiteboard was not photographed because I didn't get my phone before it was erased. That group not only identified the torque and angular acceleration, but the change in moment of inertia when the guy's leg came out of the seat and the change in center of mass which caused him to tip the chair over.  I was really impressed.

Thanks, Rhett!

November 29, 2011

Another reminder to myself

Tonight I had another one of those deja vu moments where I realize (after too long stumbling around) that I've been down this particular road before.  I'm leaving this note here for myself to remind me in the future how to do this trick.

I wanted to post the daily image from the Astronomy Picture of the Day webpage to the class webpage in the college's CMS so that it updates everyday.  If I had access to the server, I'm sure I could write a perl/php/wget/python/bash script to automatically do this. I don't have access to the server, obviously. And, of course, I don't really know enough javascript to be dangerous enough to write a page to embed in the CMS course page.

After much googling, I found Feed2JS, an RSS feed to JavaScript converter. I put in the APOD feed and tweaked a few of the settings, then generated my javascript code, which I was able to embed in the course page.  Since I only want to show one image, I set the number of items to display to 1.

After getting it to work I decided that I wanted the full sized image for the course page.  A bit more googling, and I was able to find a better RSS feed which I plopped into the Feed2JS code generator.

Now I'm a bit scared to search through my blog archives because I'm wondering if this is something I tried leaving myself a note about in the past.

Too many links to FEA projects

Here is where I'm dumping some links to Finite Element Analysis (FEA) software that I was looking into a few weeks ago.


  • SfePy - FEA libraries in Python for those who want to roll their own solutions.
  • CalculiX - "A Free Software Three-Dimensional Structural Finite Element Program"
  • Z88 - Z88 Aurora (Advanced User inteRface fOr Reliable feA) - only available for 64-bit linux
  • SLFFEA - San Le's Free Finite Element Analysis
  • CAE Linux - Computer Aided Engineering linux distribution
  • Code_Aster - Mature code base, but lack of documentation in English
  • List of FEA software

November 14, 2011

The original Veritasium?

I have four videos I want to remember for potential future use. I've been reading about and discovering the wonders of the work of Julius Sumner Miller. I discovered him when I was rummaging through our department's kit of "Physics of Toys". I had asked our lab coordinator if we had the manual for the kit, and he pulled out the book Physics Fun and Demonstrations which is essentially the manual for the kit. It seems like Professor Miller was the Paul Hewitt of his day.

Or maybe he was the Derek Muller of his day:



Notice that with the exception of rushing a bit at the start of that clip through the question of what the other person will predict, he starts by eliciting the misconception of the concept he is about to demonstrate. Also, he asks the other person (and therefore, the audience) to make a prediction before the demo is done.  Channeling Eric Mazur or Interactive Lecture Demos?

Not all the Miller videos are so pedagogically sound.  Here's a video that Miller did of his toys series, which he rushes through all the demos and skips over some of the explanations.   I picked one of the series to show here, but there are several other in the series to watch.  They are good for experts in physics, but not so much for novices.



I had no idea that Miller became a commercial spokesman for a candy company in Australia toward the end of his life.  Can you imagine a company hiring a physicist today and blending physics concepts with ad copy?  (I'm not sure the ads do anything to get people learning or thinking about physics, but it's interesting to think "what if" nonetheless.)




Finally, someone remixed a few clips of Prof Miller to come up with a re-imagined video (explicit lyrics warning!) of a classic Cypress Hill jam:

October 25, 2011

What is good about the Khan Academy?

I've already hinted at what I think is bad about the Khan Academy (KA), but in my upcoming talk at the Illinois Science Education Conference, I promised to talk about what is good about the KA.

I have identified four specific things which I think represent the good parts of the KA.


  1. Breadth of topics - Having what is closing in on 3000 videos in the KA, there is no doubt that the breadth of topics that is covered is incredibly wide. If you are a student in grades 4-12 and/or college, chance are good that the KA has a video which is related to something that is being discussed in one of your classes. That alone doesn't make KA a good resource, but if a video can serve as a launching point for discussion in class that would be a good thing. The more videos they have, the greater the chance that topics in more classes could have discussions related to something students watched on KA.
  2. Resource for "flipping" - Much has been said about the potential for using KA to "flip" the classroom model. I don't want to make this discussion all about whether or not trying using "flipping" in a physics classroom is a good thing or not. I can see the value in the idea doing something to encourage engagement with the course material is a good thing.  Full disclosure: I made videos for 2 terms that students were encouraged to watch to guide their reading of the assigned material. I believe that critical reading is a skill we overlook in the college curriculum, and that I should be doing more to help my students be better readers. With respect to the KA, I think that if you have decided to use a "flipping" technique in your classroom then you owe to yourself to at least look at KA and decide if it could be a resource for you.
  3. Connection to Peer Instruction - One of the basic principles of Eric Mazur's "Peer Instruction" technique of teaching is that the students learn by talking to each other more effectively that by hearing a lecture because the students in class who just learned the concept can explain the concept in a way that makes sense to others in the class. That's the "peer" in Peer Instruction, right?  Students learn from other students better since the professor has forgotten what it was like to not understand the concept and can't connect with a struggling student as well as another student.
  4. Virtual Tutor - I do believe that one of my jobs as a teacher is to have alternate ways of explaining a concept to students. Not everyone is going to understand every concept the first time we cover it, and there may be students who don't understand something the second, third or tenth time I explain it. If a KA video provides an alternate explanation for something that didn't click for a student in class, then I'm all for that. It is sort of like having a virtual tutor, except you can't really ask questions of the tutor.
So there you have it.  Four things I think are good about the Khan Academy.

 

October 23, 2011

Khan Academy is the free online "for dummies" resource for learning



Would you recommend any of these books to someone taking a physics class?

If someone was taking a physics class and told you they were using one of those books as a supplement, would you tell them not to?

I don't think there is a right or wrong answer to either one of those questions, but I do have my own opinions. :-)

I think, in general, the condensed review-guide style or "for dummies" type books are not particularly great resources for students in my classes to turn to. I would not recommend them, if asked by a student, but if a student said they had picked one up and was trying to use it to help study, I wouldn't necessarily discourage that, either. I would encourage that student (and ALL my students) to focus on the material and concepts we are engaged with in class, but if another books helps facilitate that, maybe that is okay.

The warning that I would give my students is that I cannot possibly review all the material out there to know the quality of that particular book.  I wouldn't know if it has any errors or misconceptions presented in it. I also have a bit of trouble knowing whether or not to trust the author without reading the book and evaluating it myself. From the four books shown above, I've only ever heard of one of the co-authors: Eugene Hecht, who has written an optics textbook that I have used in teaching.  Finding and verifying the credentials of the other authors is difficult or impossible in many cases.

I go to bookstores frequently, and I have no doubt that any of these books are going away anytime soon. A few new ones trickle out every year or so and eventually old ones go out of print.

If someone was to decide to write a new physics study guide, that wouldn't be a big deal. But what if that person decided to give it away for free on the internet.  Would that be a big deal?  Would you point your students to that resource?  (Maybe you would.  Maybe you wouldn't.  Again, there is no wrong answer to that question.)

Of course, you can find study guides or collections of notes all over the web. Some are great, some are not so great.

It should be no big deal if someone posts a new resource online. Yet, there is no denying that the Khan Academy has got the attention of teachers, administrators, school boards, foundations and policy makers who are all concerned with the future of education.

My question is WHY are so many people excited about the Khan Academy when the quality of the product is no better than the "for dummies" series of books, and in some cases, isn't even as good as those?

September 18, 2011

Rembrandt's "Aristotle contemplating a bust of Homer"


I love using a mostly historical approach to teaching the first part of introductory astronomy.  To me, it seems the most logical way to organize the class. We as a class can talk about what in the universe can be observed with the naked eye, and what we can learn from those observations.  We can talk about the progression of scientific understanding and the process by which science works as we follow the chronology of astronomical achievements.

I like giving examples from ancient Greece.  There are the Greek astronomers Aristarchus and Eratosthenes, which are credited as the first to make (relatively) successful measurements of celestial object. But, I like to start our discussion of the origin of modern scientific thinking and processes by discussing Aristotle and Hesiod.

I am not a historian, so I don't claim to be an expert on Aristotle or any of the Greek poets. Nor do I claim to be an expert of art or art history. But, I like sharing the image of Rembrandt's portrait of Aristotle, which is now at the Museum of Metropolitan Art in New York City. I first stumbled onto the painting when I was looking for images of Aristotle years ago, trying to put together slides for class.

I found the following excerpt from "Sister Wendy's American Masterpieces" on this webpage:

"Rembrandt had one foreign patron, a Sicilian nobleman, who asked him to paint a philosopher. The request came at a time when Rembrandt had become embroiled in serious financial trouble, and this commission seems to have sparked off some deep inner response. The combination of his personal anxieties and the idea of philosophy drew from Rembrandt one of his greatest masterpieces, in which he contrasts two ways of being a genius.

"He ponders visually the importance in life of material success, fame, and power, compared with being true to art. He does so by confronting the greatest Greek philosopher, Aristotle, with the greatest Greek poet, Homer. In the 4th century B.C., philosophy included the whole of science, and Aristotle understood it, integrated and systemized it. He was dazzlingly successful. We see his rich, wide, silken sleeves - those of a man who does not need to work - and, above all, his thick gold chain. The chain was a gift from Aristotle's most prestigious pupil, Alexander the Great, who had left Aristotle an enormous fortune, but whom the philosopher had failed to influence spiritually.

"Rembrandt imagines Aristotle in all his fame and wealth, looking at a bust of the great blind poet Homer. From the meagerness of the bust, we can see that Homer was poor. He wandered around Greece with his harp, playing at evening parties, and earning a pittance. Homer was true to his genius: he made no money from his art, and he did not care. With the medallion, representing both his great material success and his great teaching failure, swinging between them, Aristotle ponders - and Rembrandt with him: What matters most? How can one be certain that one is not selling out? Of course, I can say nothing about Aristotle, but I am certain that Rembrandt never sold out. Perhaps it was precisely these moments of profound self-questioning that kept him pure."
(Sister Wendy Beckett is a Consecrated Virgin and an expert in art history.)

To me, it is an interesting juxtaposition of the portrait of the great thinker and teacher Aristotle looking at the portrait (in the form of a bust) of the poet Homer. Homer lived three centuries prior to Aristotle, and although there is little or no evidence that Homer was scientifically inclined there is a connection (in my mind) between Homer and astronomy.

The connection is through another poet by the name Hesiod.  Hesiod probably did not live at the same time as Homer, but the writings of these poets are generally considered to be the earliest known writings of ancient Greece. Homer and Hesiod wrote down stories that were traditionally transmitted orally. Hesiod's piece "Works and Days" contains the earliest know reference to the star Sirius. Additionally, there are many other references in other ancient writings to a work by Hesiod known as "Astronomy" which contains the legend of Orion, although that work itself has been lost.

Thus Hesiod is (in my mind) the world's first science writer. (He'd be a blogger if he lived today.) He did not do science, but he wrote down what the current understanding (such as it was) of the cosmos was during his lifetime.

Aristotle, a great teacher and thinker, is one of the first scientists to try to use observation to draw conclusions of the workings of the universe. He didn't get everything right, but he did set science on its course.

August 31, 2011

Logarithmic scaling in acoustics


I want to say first that I really like what Vi Hart does with her videos.

Last week a few people in my twitter stream linked to a pair of videos that Vi did with Sal Khan of the Khan Academy.  Here's one of them:



The point of this video (as I see it) is to discuss the difference between linear and logarithmic scales. It's a great concept that deserves discussion, and they make a decent effort to get their point across, I think.

It's just that the examples from the musical scales are filled with little inaccuracies that could easily have been corrected before they recorded the video.

Vi says at one point (somewhere around the 3:50 mark and after) "C is more like ...I don't know...let's say 300 all right so if this is 300 or 300x or just x...then this frequency would be 600..." Sal was trying to help her out since she didn't know the note frequencies that she was trying to use in her example, so he suggested just calling it "x". I think there can be more confusion introduced by trying to use the "x", but maybe that's just me.   I can get past that, I guess.

There is a whole lot wrong with this small section, I barely know where to start. First, there are no units included at all. Actually, Sal is trying to help Vi by suggesting that they use 440 as a note frequency, but he actually starts to say 440 kHz.  The highest frequency the human ear can hear is around the 20 kHz range for healthy (and young) people. So hundreds of kHz are way out of the range of hearing.  But, Vi wants to use C and picks the number 300 to work with, no units included. This is something I don't let freshman get away with on their work, and I work hard to not let myself forget units, either.

Okay, though, we'll assume the units they are using are Hz. Why pick 300 Hz for a C? (Clearly, she forgot to look up note frequencies. I get it.) Next time Sal and Vi talk about musical notes, I'm sure they will have the note frequencies handy. Why is this important? There is an international standard for note frequencies. Without making this all about tuning and temperament and the origin of harmony, let me say that the standard says that the pitch we call A above middle C is associated with 440 Hz. Based on that standard, if we are looking at an equal temperament scale (the most commonly used scale in music), the frequency of middle C is then 261.63 Hz.  Vi even comments that they have chosen a really "weird" musical scale. Yeah, no kidding.

I know that her point was that the difference in frequencies between notes separated by an octave increases as you go up the keyboard, but is it so hard to use the right frequencies? If the point of posting videos is to be educational, then why have wrong information in them? The details matter. It reminds me of the tuning fork set which have C labeled as having a frequency in multiples of 256 Hz. There have been proposed scales which are based around middle C having a frequency of 256 Hz, but no musician uses this scale today.  Yet, we have countless physics and math teachers who believe that middle C on a piano has a fundamental frequency of 256 Hz. It's unfortunate, because the teachers and their students are missing an opportunity to learn more about music when they use this artificial scientific scale.

Here's a graph of the note frequencies for the equal tempered scale which I took from the page linked above. The horizontal axis is arbitrarily labeled "note number". The point of the graph is to show how the frequency difference between each successive note changes over a wide range of octaves. Each successive point on the graph represents a semitone higher in pitch than the previous note. Your ear perceives each tone as being the same "distance" in pitch as the previous tone, even though the change in frequency is not the same over the whole range.



Let's take the same graph, and make a semi-log plot.  Here, I'm making the vertical axis (frequency) logarithmic.



Notice how now it is a straight line? This is what it means for something to scale logarithmically. The wikipedia page for logarithmic scale has some more examples.

Also, it was too bad that they didn't have any of the actual tones in the examples they were using.  Here's a piano keyboard you can use to hear for yourself how the intervals sound similar across octaves:


ButtonBeats.com

Toward the end of the video (around the 6:00 minute mark) Sal makes a comment that the logarithmic scale of frequencies is not the only logarithmic aspect to sound. He refers to the "magnitude of frequencies" and then quickly amends his statement to refer to the decibel scale. Vi chimes in with an example of talking loudly and softly, then starts to say something about the "distances between loudnesses" before Sal interrupts and the video wraps up.  I have no idea what "magnitude of frequencies" and "distances between loudnesses" actually mean.  From the context, it's clear that they are talking about the sound pressure, or sound intensity, or even sound power. All of those are ways to quantify the amplitude of a sound wave. They all mean different things, but the relevant point is that they all scale logarithmically, in a way similar to the pitch scale discussed above.

It's too bad they didn't take the time to go into the example of sound intensity and the decibel level. It's a great example of logarithmic scaling.  Here's an example from an awesome website on musical acoustics at the University of New South Wales in Australia:


Credit for the sound files and flash animation: John Tann and George Hatsidimitris

The example has broadband noise decreasing such that the sound power is halved each step. Sound power is proportional to the square of sound pressure, so if the sound power is halved, the sound pressure is reduced by the square root of 2 in each step. The above animation has the sound pressure envelope outlined in red on a linear scale If I put the sound pressure envelope on a logarithmic scale it looks like this:



I'm graphing sound pressure on the vertical axis using arbitrary units. In many cases where we are looking at measuring sound pressure we don't necessarily need the actual pressure measurement. Many times we only care how it compares to another sound pressure measurement. In this case, I know that the sound pressure level (which is different than the sound pressure!) is changing by -3 dB in each case. It doesn't matter what the original sound pressure is, since it is the relative change between the two that we are interested in.

As with the example of pitch, the sound pressure graph appears linear on a semi-log plot. This is what is meant by something scaling logarithmically. Notice that this example covers 4 orders of magnitude! That is a huge range, but it is only a part of the range of hearing for human ear.  A healthy ear is sensitive to roughly 6  orders of magnitude in sound pressure: from the threshold of audibility to the ear's threshold of pain.

Since it is often unwieldy to deal with values covering several orders of magnitude, even on a semi-log plot, we convert the sound pressure measurements to sound pressure levels (SPL) which is sometimes referred to as a sound level for short. A sound level measurement is always with respect to a reference.  Here's the formula for sound pressure level:

$$L_p = 20 log({p \over p_0})$$
where $L_p$ is the sound pressure level, $p$ is the sound pressure measurement and $p_0$ is the reference sound pressure. Note that the reference sound pressure does not have to be the threshold of audibility. We can use any sound pressure measurement as the reference sound pressure, then the sound pressure level is just a comparison between the two sound pressures.  That's why I didn't need to know the units of sound pressure in the previous graph.  I was only interested in the relative change in the sound pressure level between the sound samples.  In this case, they decreased by 3 dB.  I can use the sound pressure level equation to find the sound level and make a graph of that:



Note now that the graph uses a linear scale, and has the same shape as the semi-log plot of the sound pressure. The logarithmic nature of sound pressure scaling is accounted for by the definition of the sound pressure level.

And just to be clear, I really do like Vi's videos.

August 22, 2011

Parsing XML with python

I'm transitioning my classes from the "Desire to Learn" (D2L) CMS to the ANGEL CMS.  Unfortunately, I didn't export my classes before I lost access to D2L.  Fortunately, I know a great person who was able to export the D2L files and send them to me. 


Unfortunately, ANGEL doesn't recognize D2L files.  Bummer.  


All of my "Reading Quiz" questions are stored in a question bank which is an xml file.  If I knew how to parse XML, I could probably cut and paste questions in to ANGEL.


I don't know how to parse XML, but I do know how to use Google. I found a bunch of tutorials, but ultimately settled on the Dive into Python tutorial.  


My question bank had 2345 entries in it.  The entries were made up of three things: a) the actual questions, b) multiple choice answers and distractors, and c) empty entries between questions.   All the entries were identified with the 'mattext' tag, although there didn't seem to be an easy way to separate the various types of entries.


Here is some code I wrote.  I'm putting it here so I don't lose it.

#!/usr/bin/env python


from xml.dom import minidom 


xmldoc = minidom.parse('./questiondb.xml')
mattextlist = xmldoc.getElementsByTagName('mattext')


for i in range(2345):
#print i
try:
print mattextlist[i].firstChild.data
print "
\n"

except AttributeError:
print "
\n"



An AttributeError was triggered by every one of the empty entries.  Printing the blank lines every time an empty entry was reached made the output of the script easier to interpret visually.


This was a fun little bit of python.  I'm glad I was able to salvage stuff from the D2L class files.

August 11, 2011

After the Global Physics Department chat, I'm still very confused as to how the sig fig haters instruct their students to report numerical values.

I did a quick experiment measurement tonight: I measured the length and width of a sheet of printer paper in centimeters.  I came up with \( l = 27.95\space \text{cm} \) and \( w = 21.60\space \text{cm} \). Each of the measurements I believed to be within \( \pm 0.05 \space \text{cm} \).

If I want to find the area, what value should I report? \( l \times w = 603.72 \space \text{cm}^2 \) without regard to the number of figures being reported.

Now, if I use the "crank three" method to get the range of values for the area, so that I can report the uncertainty in my area calculation, I would have:

$$l_{max} \times w_{max} = a_{max} = 605.1175\space \text{cm}^2 $$
$$l_{min} \times w_{min} = a_{min} = 601.245\space \text{cm}^2 $$

Then the uncertainty in the area calculation should be:

$$\Delta a = {a_{max} - a_{min} \over 2 } = 1.93625 \space \text{cm}^2 $$

Which means, that if I am a student just learning how to do this, I might report my answer as:

$$ 603.72 \space \text{cm}^2 \pm 1.93625 \space \text{cm}^2 $$

If I'm a really good student, I might remember that my instructor mentioned something about the uncertainty indicating how many digits should be reported in the answer.  Maybe I even have in my notes a simple example from class.  Hmmm, now I'm just confused.  It seems like there should be a way to round my answer (both the value and the uncertainty) appropriately.  But, how? (Remember, I'm still a beginning physics student.)

Here's my (the physics instructor, not the student, now) point: if you hate the rules or guidelines surrounding the traditional way of doing sig figs, that's fine with me.  I'll even hop on that bus with you most of the way.  But at some point, there has to be an actual discussion about the significance of the digits in the answers and the uncertainty.  From there on out, we can choose whatever (appropriate) method we want for finding uncertainty, right?

August 10, 2011

Significant figures are significant

Have you heard about the Global Physics Department Meetings? Physics teachers (high school and college) meet online every Wednesday night for about an hour to chat about a topic related to teaching physics.

This week the topic is about uncertainty, error propagation and significant figures. It seems that there is no shortage of physics teachers who are opposed to teaching about and requiring students to use significant figures.

Count me in the camp which thinks significant figures have a place in our classes and labs that we run.

Here's why:

The goal of a student getting a college degree in physics may not be to ultimately become a Ph. D. physicist (although that is a path that some physics majors start to pursue after graduation). But, there is a reasonable expectation that our students, once graduated, will be in a technical field of some sort that will require them to present data, calculations, results, whatever-you-want-to-call-it. In a word: numbers. (Oh, numbers with units, of course.) If a student graduates having never worked with significant figures, then writes a technical report for their employer with nonsensical data reporting it could reflect poorly on my department or the college and potentially negatively affect future applicants from our program.

I want my students to be thinking about the proper reporting of their numbers from the start of their physics career. I find that encouraging first-year student to wrestle with the idea of proper data reporting is easier than forcing juniors and seniors to have to go back to the concept of significant figures while they are undertaking more complicated laboratories and undergraduate research projects. If the concept of significant figures is already habit for them, it saves time and effort in the long run.

I tend to mostly agree with what Rhett said about significant figures in one of his posts, especially this part:

I believe that many people (you know who you are) either treat significant figures as some fundamental truth, or they haven’t thought about them one way or the other. This is a huge problem when you are sig-fig-stickler.
I'm not (I hope!) a sig-fig stickler. I want my students to be able to follow the general guidelines for using significant figures, but also have the critical thinking skills to be able to break the guidelines, where appropriate.

I've updated a handout that I give to some of my classes (usually general education astronomy classes, although sometime introductory physics classes as well) to emphasize that guidelines are only that: a guide.  We should follow them when appropriate, but only when appropriate.

Here's the handout, if you're interested.

July 28, 2011




I love Fox Trot, as I suspect many physicists do.  Bill Amend was a physics major in college and many of the Fox Trot strips have science themes and humor built in them.

When I saw the above strip recently, some questions came to mind:

What volume of tube is needed to provide the depicted motion in the strip?

If the estimated volume is not realistic, then what would the motion look like for a realistic volume for the tube?

Here's how I'm going to approach answering these questions: I'm going to model Jason's jump as a body in free-fall with an acceleration less than \(9.8 m/s^2\), and I'll determine the acceleration by estimating the buoyant force provided by the tube.

The first thing I want to do is draw a free body diagram.  Consider a spherical Jason:


There are only two forces on Jason while he is falling: the buoyant force upward provided by the tube and the force of the Earth, his weight, pulling him downward. For a quick review of the concept of buoyancy, you can refer to Rhett's post on the physics of balloons in the movie Up. Note he points out that the buoyant force doesn't depend on whether the balloons are in the house or tied to the house by strings.  Similarly, in this comic the buoyant force applies with the tube wrapped around Jason: it still points up.

So let's look at what we have (yes, the forces are vectors, but it's in one dimension and the vector notation isn't looking so great here right now):
$$ W = M  g$$
$$ B = \rho_{air} V  g$$
where \(V\) is the volume of the tube. Now let's apply Newton's second law:
$$ F_{net} = M  a =  B -  W = \rho_{air} V  g - M  g$$
Okay, now that I have a free body diagram and the application of Newton's second law let me think for a second about what I wanted to know.

I wanted to know the volume of the tube required to produce the depicted motion.  So, I need to estimate something reasonable for what motion is being depicted. I'm going to make some assumptions:


  1. The height of the springboard is 3 meters.
  2. Based on that height, I'm estimating that Jason falls 2.0 meters from the board. (Two sig figs? No, not really, but I want two digits in my solution.) 
  3. I'll neglect the small upward jump at the beginning. It looks small and maybe he is simply pulling his legs up which makes the upward part of the trajectory more obvious. With this assumption the initial velocity will be zero.
  4. I'll estimate Jason's mass to be 30 kg. (I don't need it now, but I'll put it here with all my other assumptions.) I'm also assuming the tube's mass is negligible.
  5. The air density is \(1.2 kg/m^3\) based on the temperature of a hot summer day.
  6. The important question is what is the time interval being depicted. I'm going to take a cue from the artist and guess that since there are seven panels depicted after the jump, the time interval is roughly seven times longer than it would have been without the jump. Is that reasonable? I don't know, but it's my interpretation of the comic.
Okay let's apply the kinematics using the assumptions:
$$\Delta y = {1 \over 2} g t^2$$
Since I assumed that the time interval is going to be 7 times longer than without the tube, I should find what the time to fall 2 meters is without the tube. In this case \(g= 9.8\: m/s^2\):
$$t = \sqrt{ 2 \Delta y \over g} = \sqrt{4 m \over 9.8 m/s^2}= 0.64\: s$$
So the length of the fall with the tube would be \(7 \times 0.64 s = 4.5\: s\).  With that time, I want to solve for the acceleration with the tube:
$$a = 2\Delta y \over t^2 = 4.0 m \over (4.5 s)^2 = 0.2\: m/s^2$$
That's a pretty low acceleration. Cool, now I can solve for the volume of the tube:
$${a \over g}M + M =  \rho_{air} V$$
Solving for \(V\):
$$V = 26\: m^3$$
Hmm...is that big?  Yes it is.  I have one of the jumbo sized hoberman spheres that I bring in to class to show what one cubic meter is.  There is no what the tube has that large of a volume.  Okay, then what would the acceleration (and the time of the fall) be if the tube has a realistic volume. Let's estimate the volume to be around \(1.0\: m^3\). So that means the acceleration Jason will experience is:
$$a = ({\rho_{air} V - M \over M}) g$$
which for our estimated tube volume gives an acceleration of \( 0.96\: g\ = 9.4\: m/s^2\). The time to fall 2 meters at this acceleration is 0.65 seconds. (Now you see why I wanted 2 sig figs?)

Note that the change in acceleration is linear with changing tube volume, but that the time for falling a given distance is NOT linear.  I'd go into that more, but this has already taken me longer to write than I was intending.

July 10, 2011

Acoustics link dump - July 2011 version

My browser tabs are again full of links that I haven't fully digested.  I need a place to file them, so I'm putting them here so I can hope to remember them for future reference.

Equation behind noise canceling headphones - probably over-simplified, but neat to see on Wired nonetheless.

Tibetan singing bowls - this was all over physics/science/tech blogs this week.  It's interesting, but not so much for the acoustics and/or the videos.  The fluid dynamics presented in the paper is the really interesting stuff here.

Earliest known recording discovered - very cool story, more links from the metafilter post on the topic.

Demo of Air Temperature on Wind Instrument Tuning - Here's something you can use in a classroom demo.  Simple and elegant.

June 23, 2011

Summer is the time for tenderloins

I ran into another physics professor (at the college down the street from where I live) at the awesome Naf Naf Grill a couple months ago.  We got to talking, and it turns out that he has a really cool map of all the places to get tenderloins in Iowa.

This made me think of Porky's in Des Moines, which was across the street from the grocery store I worked at during high school. Unfortunately, Porky's is no more.  Too bad, since the cruise nights were always a lot of fun.

I did find a new blog to follow: Des Loines. Their tagline is beautiful. "The Breaded Pork Tenderloin Sandwich: It's like the filet-mignon cut of pork, deep fried to perfection."

June 22, 2011

Venturi pumps, injectors, ejectors and eductors

We've had some severe weather blow through our area recently, and I've been thinking a lot about backup sump pumps.  It turns out that there is a lot of interesting physics in backup sump pumps.

It also turns out that the interesting physics is not as simple as I was hoping it would be.

This is a backup pump which requires no power (battery or otherwise) because it uses the Venturi effect to pull water out of the sump well. That sounded really interesting to me, so I sat down this morning and tried playing around with the Bernoulli equation and the continuity equation to see if I could come up with some interesting questions to ask my intro physics class next time we do fluid mechanics.

After struggling for five hours, and not coming up with anything remotely looking physically possible (47 meter pump extraction height? negative water pressure?), I've come to the conclusion that an intro level analysis (even making typical assumptions) is not possible.

After much searching through reference databases, I'm not sure I've even located a decent analysis of these pumps at an advanced level.

Since this pump is simple to conceptually understand, I'm having trouble figuring out why I can't locate a decent reference with the physics of how it works.  If anyone has seen anything on this, please let me know.