Sunday, July 13, 2014

Longitudinal Wave Simulation

In the wake of the big Java security crisis, Java applets have become increasingly inaccessible and/or onerous to use, due to security settings. Add to this issues like Java 7 needing a 64 bit browser in OSX and Linux, and it's rather difficult to get a classroom set of computers, much less a BYOD environment, to effectively run Java applets in class.

I've found that I can just forget asking students to use them at home, given their computer setups and ability to navigate these complications. Because some of my favorite applets seem to be going extinct, I'm going to try to duplicate as many as I can in Glowscript, which is a kind of mashup between JavaScript and VPython. It has much of the readability and ease of VPython, and can run in WebGL-enabled broswers, which covers most situations (maybe just 'many' in the mobile world, at this point). More importantly, that coverage is on the way up, while Java is on the way down.

My first applet is an attempt to replace Walter Fendt's longitudinal standing waves animation. I love this for my students - it's difficult for them to picture particle motion in longitudinal pulses, but nearly impossible for them to visualize what the particles are doing in a longitudinal standing wave. This depiction is obviously idealized, but it can help them get over that hump.

The second thing that I like about this setup is that it shows SW diagrams/graphs of not only particle displacement, but also the change in pressure. At this point in class, we've been merrily drawing standing wave diagrams for waves in tube as if they were waves on strings (or some kind of string that can have an unconstrained end or two). What have we actually been drawing? This helps to clarify that we had been illustrating the change in position of the particles and shows that we can also describe the change in pressure that they undergo. Looking back up at the animation gives students a sense of why the two trends are related the way that they are.

I've decided to leave out (at least for now) the numerical data on the side, as I hadn't generally found much use for it. Perhaps I'll add it - let me know if you see a good reason for including that.

Click through the screenshot for the applet itself - enjoy!

No comments:

Post a Comment