NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
May 31, 2020, 10:54:15 am

Progress is impossible without change; and those who cannot change their minds cannot change anything. ..."George Bernard Shaw(1865-1950, Irish dramatist, essayist and critic, Nobel Prize for Literature 1925)"

 Pages: [1]   Go Down
 Author Topic: EJS version of Doppler effect (You can hear sound)  (Read 42945 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 : 1 users think this message is good1 EJS version of Doppler effect (You can hear sound) « Embed this message on: January 20, 2009, 10: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.
-*-

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
• 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
 shock-wave.jpg (5.87 KB, 226x172 - viewed 4097 times.)  sonic-boom.jpg (4.33 KB, 226x192 - viewed 3993 times.) Logged
j142
Newbie

Offline

Posts: 11

 « Embed this message Reply #1 on: January 28, 2009, 01: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.
 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #2 on: January 28, 2009, 04: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.
 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #3 on: September 12, 2011, 10:27:20 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

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

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!

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
• 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!
 wave.gif (2193 KB, 596x480 - viewed 5019 times.) « Last Edit: September 12, 2011, 10:29:15 pm by lookang » Logged
SidneyR
Newbie

Offline

Posts: 1

 « Embed this message Reply #4 on: November 24, 2013, 01:36:30 pm » posted from:Bangkok,Krung Thep,Thailand

Dear Professor,

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
 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #5 on: November 26, 2013, 10:15:52 pm »

attached is the file u requested
 *** There are 1 more attached files. You need to login to acces it! Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #6 on: November 26, 2013, 10: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

 Untitled.png (27.56 KB, 320x180 - viewed 974 times.) *** There are 1 more attached files. You need to login to acces it! Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #7 on: November 29, 2013, 08:39:26 am »

Dear Professor,

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.
 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3085

 « Embed this message Reply #8 on: December 04, 2013, 12:01:56 pm » posted from:,,Satellite Provider

Another version: source velocity, observer velocity,wave velocity can be changed.

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list