# NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

## Easy Java Simulations (2001- ) => Collaborative Community of EJS => Topic started by: lookang on August 24, 2012, 10:19:21 pm

 Title: Ejs Open Source Wave Machine Model Java Applet Post by: lookang on August 24, 2012, 10:19:21 pm Ejs Open Source Wave Machine Model Java Applet by Wolfgang Christian, this remixed version by lookang.trying to make a version that allow changing of masses attached to the edge of the rods, following physics of inertia and rotations.work in progress.having difficulties solving the inertia[ejsapplet]Wave Machine by Wolfgang Christian, some minor edits by lookangThe Wave Machine model simulates the wave machine produced by John Shive at Bell Laboratories and made famous by the PSSC Simple Waves film.  The machine consists of n horizontal rods with moment of inertia In  welded to an axle torsion bar that is perpendicular to the rods.  The simulation allows the user to change the lengths of the rods, thereby simulating the effect of a wave propagating in a non-uniform medium. The default rods of length L=2 has a moment of inertia of oneusing http://hyperphysics.phy-astr.gsu.edu/hbase/mi2.html I = 1/12 M*L^2 = 1/12 M*2^2 imply 3 = M.The maximum allowed rods length is 4 giving a moment of inertia of 4 because I = 1/12 3*4^2 =  4and the minimum allowed length is 1/2 giving a moment of inertia of 1/16. because I = 1/12 3*(0.5)^2 = 1/16. Twisting a rods about the torsion rod causes the rods to oscillate because the rod produces a restoring torque.  Because a rods twist acts on neighboring rods, the motions are coupled and a traveling wave results.  The speed of the wave depends on the torsional coupling between bars k and the moments of inertia of the rods.  A damping force can also be added using the model's damping parameter b for the axle torsional bar. The simulation allows various pulse shapes to be sent down the machine by twisting the first rod with the desired functional form or by dragging the first rod.  For example, applying a Gaussian twist produces a Gaussian traveling pulse but the width of this pulse depends on the wave speed.  The far end of the wave machine can be free or clamped and this changes the nature of the reflected wave. Theoretical note:  The pulse shape will distort as the wave propagates on the wave machine because of dispersion effects.  This distortion is most apparent as the wavelength (or pulse width) approaches the rod separation.  Use the Driven Wave Machine model to explore dispersion these effects. The Wave Machine model is distributed as a ready-to-run (compiled) Java archive.  Double clicking the ejs_mech_osc_chains_WaveMachine.jar file will run the program if Java is installed.  Other coupled oscillator models are available.  They can be found by searching the OSP Collection for coupled oscillations. References"Standing waves in a non-uniform medium," Paul Gluck, The Physics Teacher, (in press)."Making waves: A classroom torsional wave machine (Part I)," Kenneth D. Skeldon, Janet E. Milne, Alastair I. Grant, and David A. Palmer Phys. Teach. 36, 392 (1998)"Making waves: A classroom torsional wave machine (Part II)," Kenneth D. Skeldon, Janet E. Milne, Alastair I. Grant, and David A. Palmer Phys. Teach. 36, 466 (1998)University of Maryland Physics Lecture-Demonstration website section G3 http://www.physics.umd.edu/lecdem/services/demos/demosg3/demosg3.htmSimilarities in wave behavior, John N. Shive, Bell Telephone Laboratories (1961). See also Am. J. of Physics 32, p572 (1964).Credits:The Wave Machine model was created by Wolfgang Christian using the Easy Java Simulations (EJS) version 4.3 authoring and modeling tool created by Francisco Esquembre. You can examine and modify this compiled EJS model if you run the model (double click on the model's jar file), right-click within a plot, and select "Open EJS Model" from the pop-up menu.  You must, of course, have EJS installed on your computer.  Information about EJS is available at: and in the OSP ComPADRE collection . Title: Re: Ejs Open Source Wave Machine Model Java Applet Post by: lookang on August 28, 2012, 04:40:04 pm changes made:added pointer masses at the tip of the rods by adding I[j]=Li*Li/4 + 2*m[j]*Li/2*Li/2; // rod original plus 2 massesfigure out how to draw the massesxm1[j] =  L[j]/2*Math.sin(theta[j]);zm1[j] =  L[j]/2*Math.cos(theta[j]);xm2[j] =  - L[j]/2*Math.sin(theta[j]);zm2[j] = - L[j]/2*Math.cos(theta[j]);added slider to make inquiry possible when amplitude (0 to pi/2), shorter wavelength, shortest wavelengthmake sliders control to my usual design, color, position.added tipsreorder the combo to be one cycle first, shorter, shortest next.made D = 20 m instead of the usual 10 to see the wave travelchange perspective to side view default to visual the wavesset n = 64 instead of 128 for loosen packed rods like the video http://www.nationalstemcentre.org.uk/elibrary/resource/2096/wave-machine