Author Topic: EJS version of Doppler effect (You can hear sound)  (Read 45499 times)

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
EJS version of Doppler effect (You can hear sound)
« on: January 20, 2009, 11:46:47 pm »

This java applet show the Doppler effect.
Click inside the simulation region to select initial position for wave center.
While press down the mouse, drag the mouse to change the velocity for the wave source. (This is a moving point source)

The wave speed and the period of the wave (f=2*?/T) is adjustable by sliders.
If the source speed is smaller than wave speed. An ear gif image will appear in the simulation region(you can drag it to other position).
You will hear a sound click when the wave front pass the ear. (The frequency of the click sound is related to Doppler effect)

You will find wave pattern for shock wave when the source speed is larger than wave speed.
-*-

Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!


The following is a flash demo

j142

  • Newbie
  • *
  • Posts: 11
Re: EJS version of Doppler effect (You can hear sound)
« Reply #1 on: January 28, 2009, 02:14:51 pm »
Can you upload the sound of train or ringing bell instead of clicking sound?

we will be have  experience of frequencies change while we are at railway station.

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: EJS version of Doppler effect (You can hear sound)
« Reply #2 on: January 28, 2009, 05:22:59 pm »
All the simulations I have created at this web site are ailable for offline use.
The above simulation was created with EJS 4.
You can click "get files for offline use" button and get the jar file.
You will find ejs source code if you unzip the jar file with any UNZIP program.
Load the source with latest EJS 4 and you can switch to any sound file (.wav format) you have.

However, it is still different from the experience in real life. 

lookang

  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
Re: EJS version of Doppler effect (You can hear sound)
« Reply #3 on: September 12, 2011, 11:27:20 pm »
dear Prof,

i am wondering, can make a scalarField that is for doppler effect?

i am thinking with a template of your codes, i can try to make
http://www.falstad.com/ripple/

with many options


currently, my attempt is not working

a summary of the codes is


for (i=0; i < number; i++)
{
 xscalar = xmin+(xmax-xmin)*i/number;
 for (j=0; j < number; j++)
 {
  yscalar = ymin+(ymax-ymin)*j/number;
  d[ i ][ j ]=Math.sqrt((xscalar-x)*(xscalar-x)+(yscalar-y)*(yscalar-y));
//sum [ i ][ j ]= A1*Math.cos(omega*t-k*d[ i ][ j ]);
//sum[ i ][ j ]= A1*Math.cos(omega/4*t);
sum[ i ][ j ]= A1*Math.cos(-k*d [ i ][ j ]);
}
}


Thanks!  :D

Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!
« Last Edit: September 12, 2011, 11:29:15 pm by lookang »

SidneyR

  • Newbie
  • *
  • Posts: 1
Re: EJS version of Doppler effect (You can hear sound)
« Reply #4 on: November 24, 2013, 02:36:30 pm »
Dear Professor,

This is very helpful stuff.  I'm curious though - when I downloaded
the Doppler Effect program, there was no ear, and I couldn't hear any
sound.  Is there supposed to be an ear in the download version?

Many thanks,
SidneyReilly

lookang

  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
Re: EJS version of Doppler effect (You can hear sound)
« Reply #5 on: November 26, 2013, 11:15:52 pm »
attached is the file u requested

lookang

  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
Re: EJS version of Doppler effect (You can hear sound)
« Reply #6 on: November 26, 2013, 11:18:20 pm »
i also have another version that does the same thing but i have edited it to be have inquiry features.
http://weelookang.blogspot.sg/2011/09/ejs-open-source-1-dimension-doppler.html


Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: EJS version of Doppler effect (You can hear sound)
« Reply #7 on: November 29, 2013, 09:39:26 am »
Dear Professor,

This is very helpful stuff.  I'm curious though - when I downloaded
the Doppler Effect program, there was no ear, and I couldn't hear any
sound.  Is there supposed to be an ear in the download version?

Many thanks,
SidneyReilly


Yes. There is an ear in the simulation. However, I do not know why it was missing in the downloaded version.
It is fixed now.
Please download it again.

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: EJS version of Doppler effect (You can hear sound)
« Reply #8 on: December 04, 2013, 01:01:56 pm »
Another version: source velocity, observer velocity,wave velocity can be changed.

Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!