NTNUJAVA Virtual Physics Laboratory
Enjoy 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 April 19, 2011, 11:00:34 pm



Title: Ejs Open Source Wave Representations Model Java Applet Simulation
Post by: lookang on April 19, 2011, 11:00:34 pm
Ejs Open Source Wave Representations Model Java Applet Simulation by Andrew Duffy, remixed by lookang

http://www.compadre.org/osp/items/detail.cfm?ID=7618&S=2
The Ejs Wave Representations model displays two representations of a sinusoidal wave on a string.  One shows a movie of the wave traveling along a string - you can think of this representation as a sequence of photographs. The second representation is a plot of the displacement as a function of time for two points on the string (you can select which two points to use). Using only these two representations, you can determine the values of many different parameters that describe the wave.  You can modify this simulation if you have Ejs installed by right-clicking within the plot and selecting "Open Ejs Model" from the pop-up menu item.  

[ejsapplet]

Wave representations by Andrew Duffy
In this simulation, you have two representations of wave motion to work with. One shows a movie of the wave traveling along a string - you can think of this representation as a sequence of photographs. The second representation is a plot of the displacement as a function of time for two points on the string (you can select which two points to use). Using only these two representations, you can determine the values of many different parameters that describe the wave.

Activities by Andrew Duffy
Keep pressing the "Get a new wave" button until you have a wave you are happy with. Then, play the simulation until you have a nice position versus time graph. Then, pause the simulation so that you have a photograph of the string as well as your position vs. time graph to work with. For each parameter below, figure out which of the two representations you need to determine the value of the parameter, and then find the value. You can check your answers as many times as you want.
The amplitude.
The wavelength.
The period.
The angular frequency.
The wave speed.
The maximum transverse speed of a single point on the string.
and now!! frequency // remix by lookang
and Phase lead of blue point x1 to green point x2 // remix by lookang


Title: Re: Ejs Open Source Wave Representations Model Java Applet Simulation
Post by: lookang on April 19, 2011, 11:03:33 pm
changes made:
fixed the " with ' which is giving some error message in Ejs 4.3.3
re arrange to usual layout and color scheme
made the 2 x1 and x2 points drag-gable to improve usability
made feedback immediate, improve user experience
added frequency = 1/T
added phase lead of x1 to x2 = (xval2-xval)/lambda*2*Math.PI;
added a better code to code for phase lead in multiple of 2*Math.PI thanks to Hwang Fu-Kwun expert advise
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2179.0

if (Math.abs(phi%(2*Math.PI)-enterphi%(2*Math.PI)) < 0.1){
 phicorrect = " Yes";
   phicorrectbackground = java.awt.Color.GREEN;
  }
  else {
   phicorrect = " No";
   phicorrectbackground = java.awt.Color.RED;

  }


work in progress
done!
enjoy!