Author Topic: Ejs Open Source Ripple Tank Interference Model java applet  (Read 53677 times)

lookang

• Moderator
• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
Ejs Open Source Ripple Tank Interference Model java applet
« on: January 09, 2011, 12:20:50 am »
Ejs Open Source Ripple Tank Interference Model java applet a remix from Interference Model: Ripple Tank written by Andrew Duffy http://www.compadre.org/osp/items/detail.cfm?ID=9989

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!

Description adapted from the original by Andrew Duffy
Interference in Two Dimensions of 2 source
With this simulation, you can explore the interference pattern that results from the superposition of two sources of waves. The simulation models what happens
a) two speakers, emitting sound waves;
b) two oscillating bobbers or dippers in a water tank, producing water waves;
c) two light sources, so the interference is with two light waves.

In the simulation,
1) red regions (depending on the type of visualization selected) are areas where the net displacement is positive (such as when two peaks overlap)
2) blue regions are areas where the net displacement is negative (such as when two troughs overlap).
3) In the black regions, the net displacement is zero, or close to zero.

To understand this pattern, we use the idea of the path-length difference, S1P - S2P. There is a movable blue-point P in the simulation. The path-length difference (?L) for this point is the distance the point is from one of the sources minus the distance the point is from the other source, or simply S1P - S2P. These distances are expressed in units of the wavelength ?.
When the sources send out waves that are in phase with one another, the waves will interfere completely constructively when the path-length difference is an integer number of wavelengths, and they will interfere destructively when the path-length difference is an integer number of wavelengths, plus half a wavelength. We can express this in the form of equations.
When the sources are in phase
condition for constructive interference: ?L = m ?, where m = 0, 1, 2, ...
condition for destructive interference: ?L = (m + 0.5) ?, where m = 0, 1, 2, ...

Activities by Andrew Duffy
1 First, press the Play button to start the simulation running. One thing the simulation can help with is in understanding how this interesting pattern is formed, from two sources that put out identical single-frequency waves. Click-and-drag the blue dot P to change its location on the screen. You should observe that, whenever the blue point P is at a position in which there is a large amplitude displacement, that the path-length difference for that point (shown in blue bar at the bottom right) is an integer number of wavelengths (or close to it). In contrast, whenever the blue point P is at a position in which there is generally no displacement (it's always dark there), the path-length difference for that point is an integer number of wavelengths plus half a wavelength (or close to it).

2 Explore different points on the line joining the two sources. In between the sources, along the line joining the sources, you should observe a standing wave, with nodes (zero displacement points) and anti-nodes (maximum displacement points) that are fixed in position. For a node, you should measure a path-length difference that is close to an integer number of wavelengths plus half a wavelength. For the anti-nodes, you should observe a path-length difference that is close to an integer number of wavelengths. Is this what you find? Explain why you will always find an anti-node at the place that is halfway between the two sources.

3 Let's keep exploring what happens along the line joining the two sources, but now place the blue point P on this line, to the right of the source on the right. Adjust the frequency of the waves, or the x-coordinate of one or both of the sources, until the path-length difference is 3 wavelengths. Is constructive interference taking place at the point, or is it destructive interference? What is the distance between the sources (expressed in terms of wavelengths) in this case? Repeat, when the path-length difference is 3.5 wavelengths.

4 The wave speed has a constant value in the simulation. With the wave speed constant, what happens to the wavelength when the frequency is increased? In general, what happens to the pattern when the frequency is increased?

5 In general, what happens to the pattern when the two sources are move closer together?
« Last Edit: February 21, 2019, 09:59:16 am by lookang »

lookang

• Moderator
• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
Re: Ejs Open Source Ripple Tank Interference Model java applet
« Reply #1 on: January 09, 2011, 12:21:29 am »

1 redesign layout and color scheme
2 add v and lambda slider controls
3 add time to show the progress for student to use v to calculate how much the wave move
4 add the 4 types of visualization
5 add the 10 mode of color visualization
6 add legend, suspect buggy but will try to activate it for relation learning to the visualization meaning of color
7 add S1 and S2 y displacement as vertical bar for understanding of phase difference at the sources S1 and S2
8 add y1 and y2 and y1+y2 for the y displacement for understanding of superposition of point P
17Jan2010
9 added coherence and incoherence check-box for exploring what if scenario for exploring in-depth the meaning of incoherence.
incoherence here refer to v=!v2 || f=!f2 || lambda=!lambda2
31January 2011
10 added screen effects (instantaneous patterns and average intensity patterns) of the interference patterns for both coherent and incoherent sources from http://www.cabrillo.edu/~jmccullough/Applets/OSP/Oscillations_and_Waves/waves_interference.jar by Juan M. Aguirregabiria. now it is very easy to visualize the meaning of coherent sources.
10 February 2011
11 add check box to visual true S1, S2 and P bar values
12 add check box for visual instant and average pattern of the end of the screen for relating to future cases of interference as such light waves
14 fix a bug on the S1 and S2 bar with phase is change
15 made the area to display top view of ripple tank bigger to solve the bug of a line showing
16 made some animated gif to others to use here http://weelookang.blogspot.com/2011/01/ejs-open-source-ripple-tank.html
13 February 2011 Sunday
made the screen on the right more obvious by adding BR text "screen on the right"
add hint for activating the side views
30 March 2011
fix bug
the border on top and right corner of ripple tank is due to a fix relationship for the screen effect arrayoutofbound error that i cannot seem to fix
arrange the code inside
04 Jan 2012
reintroduce a side view versus time of the displacement at point P. the displacement-time graphs of S1, S2 and the resultant at any position P
fixed some 0.00 format on the bars of S1 S2 and P
fixed the bug by moving the codes to evolution page instead of fixed relationship, was difficult to find the bug or cause, but i did it!
made hide and show after clicking the check-boxes, a bit neater now, we agree that it could be still useful to be able to fine-control position of S1 and S2, let keep it inside the sim
dded a margin 10%, now can see the maximum and minimum values of 2 and -2 easily.
05 Jan 2012
selectable width now using split panels
« Last Edit: January 05, 2012, 05:19:49 pm by lookang »

ahmedelshfie

• Hero Member
• Posts: 930
Re: Ejs Open Source Ripple Tank Interference Model java applet
« Reply #2 on: January 09, 2011, 12:23:31 pm »
Nice applet, many days ago born my first baby

lookang

• Moderator
• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
Re: Ejs Open Source Ripple Tank Interference Model java applet
« Reply #3 on: January 10, 2011, 10:36:43 pm »
all the best ahmedelshfie. parenting is super tiring especially if you are juggling make applet at home and using free time

Based on a rough idea i had some years ago
http://www.scribd.com/doc/46322449/Weelookang-Conceptual-Design-ProjectV1 p 11
the real difference today is i can make interactive java applet standing on the giants of Open Source Physics community instead of the conceptual paper i did which is pretty much just struck at the an idea stage.

Thanks to Andrew Duffy for his source original codes
and Fu-Kwun Hwang for this fantastic CoP forum
Paco for Easy Java Simulation
Wolfgang for Open Source Physics !

and many others whom i have not met but have learnt for the source codes and simulation!

Other Ripple Tank Inference Simulation
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2074.0 Interference of two point sources in 3D by Fu-Kwun Hwang
« Last Edit: January 11, 2011, 02:10:47 pm by lookang »

lookang

• Moderator
• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
Re: Ejs Open Source Ripple Tank Interference Model java applet
« Reply #4 on: January 13, 2011, 10:49:21 am »
http://www.seab.gov.sg/aLevel/20102011Syllabus/9646_2011.pdf
SECTION lV WAVES Superposition
(d) explain the meaning of the term diffraction.

(e) show an understanding of experiments which demonstrate diffraction including the diffraction of water waves in a ripple tank with both a wide gap and a narrow gap.

(f) show an understanding of the terms interference and coherence.

(g) show an understanding of experiments which demonstrate two-source interference using water, light and microwaves.

may have to finer customized some more the meaning for coherence.

i argue that the best pedagogy method is in this case learning by making
the best way to demonstrate understanding of coherence is to get students to use Ejs to change the codes inside.
hint:
v1 = f1*lambda1
v2 = f2*lambda2
should do it.
when v1 =! v2 & f1=!f1 & lambda1=! lambda2 it will result in phi1=! phi2 in general except for those time of coincidence!

The less pedagogy effective method but more time efficient method is to make it happen in the sim by teacher.

the trade offs of deep pedagogy learning vs efficient time.

« Last Edit: January 13, 2011, 11:20:10 am by lookang »

lookang

• Moderator
• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
Re: Ejs Open Source Ripple Tank Interference Model java applet
« Reply #5 on: January 17, 2011, 01:03:39 pm »
17Jan2010
9 added coherence and incoherence check-box for exploring what if scenario for exploring in-depth the meaning of incoherence.
incoherence here refer to v=!v2 || f=!f2 || lambda=!lambda2

posting from Kuala Lumpur, Malaysia! Holiday!
« Last Edit: January 31, 2011, 12:38:16 pm by lookang »

lookang

• Moderator
• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
Re: Ejs Open Source Ripple Tank Interference Model java applet
« Reply #6 on: January 31, 2011, 12:33:40 pm »
31January 2011
10 added screen effects (instantaneous patterns and average intensity patterns) of the interference patterns for both coherent and incoherent sources from http://www.cabrillo.edu/~jmccullough/Applets/OSP/Oscillations_and_Waves/waves_interference.jar by Juan M. Aguirregabiria. now it is very easy to visualize the meaning of coherent sources.

sick today so at home.

i also found good resources
Like: a lot of possibilities
very complex and realistic

http://www.cabrillo.edu/~jmccullough/Physics/Interference_Wave_Nature.html
collection of good applets
« Last Edit: January 31, 2011, 01:02:28 pm by lookang »

lookang

• Moderator
• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
Re: Ejs Open Source Ripple Tank Interference Model java applet
« Reply #7 on: January 04, 2012, 03:16:48 pm »

a side view versus time of the displacement at point P. as suggested by chee wah, i think the original sim had it already.
fixed some 0.00 format on the bars of S1 S2 and P

lookang

• Moderator
• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
Re: Ejs Open Source Ripple Tank Interference Model java applet
« Reply #8 on: January 05, 2012, 11:20:36 am »
request by teacher Wed 1/4/2012 3:47 PM

We are wondering if you could include an optional check box to show
(i) the displacement-time graphs of S1, S2 and the resultant at any position
(ii) the intensity-position profile of the resultant wave
working on it, maybe next week can produce
As we explore the EJS, we realize that after some time, it seems that the resultant pattern was not correctly represented. We wonder if there might be a bug there. I have attached a word document for your reference.
i fixed the bug by moving the codes to evolution page instead of fixed relationship, was difficult to find the bug or cause, but i did it!

Also, we found that there may be no need to move the source horizontally, thus would it be possible to remove the slider-bars so as to keep the platform neater.
made hide and show after clicking the check-boxes, a bit neater now, we agree that it could be still useful to be able to fine-control position of S1 and S2, let keep it inside the sim

request by teacher Thu 1/5/2012 9:34 AM
I just managed to run the superposition EJS and would like to request the following changes if possible:

1. Currently in the graph mode, the pattern shifts right to the top and it is difficult to identify the position of P. I wonder if the graphs could be shown individually on the right side of the panel so that the students know which graph corresponds to which source and know which is the resultant wave. I would propose that the size of the pattern should remain the same, if possible.
i added a margin 10%, now can see the maximum and minimum values of 2 and -2 easily.

2. Currently, after running the EJS in the graphical mode and pausing it to show the step function. The graph continues to show the same shape. Clicking the step button causes the graph to shift forward in time, I was a bit confused initially trying to interpret the implication of the graph. I wonder if there is any way to help clarify this by looking at the graph. If not, I suppose the worksheet will need to try explain the meaning of it.

the graph data was currently is set to display only 75 data-points, to save memory.
if i set to infinity, it will slow down as the calculation to display all the infinity point takes a lot of memory.

3. After pausing the EJS, I start to shift point P around. Initially the graph still looks sinusoidal but after some time, the graph shows vertical line corresponds to the particular time paused. As the lines all overlap, I could not figure out what they are the values of the lines. The line does not seem to correspond correctly to the pattern as I shift point P around.

the student-scientist need to understand the graph shows old data, to collect new data on new position of P, click play again to start collect y1+y2 at P.
the values can be read from the bars on the right.

Thanks for the great simulation!
my pleasure

On a side note, for those who downloaded the file *.jar, Windows7 may associate it as a zip file. What my TA did was to change the file extension to jar instead of zip. To view the file extension, you would need to go the folder option/view and unchecked the "hide file extension".
yes agreed.

SMS Thu 1/5/2012 12:16 PM
Hi, my colleague prefers to view the JS without colors. Can this be the default screen? Also it seems that the legend slows down the system a bit. We think there may be no need for the legend, if it affects the computation. Ty.
done

SMS Thu 1/5/2012 12:26 PM
Thanks. Btw, did you experience the program hanging after some time, especially after changing the phase a few times and allowing it to run say around 100 s the EJS starts to slow down till it has no response
i didn't notice it on my computer, i ran for >100 seconds.

fix a useability issue of S12 and S2 draggable on simulation is playing, change to only when paused.

fix an array issue of border top and right white by  changing sum = [number][number]
« Last Edit: January 05, 2012, 02:57:48 pm by lookang »

lookang

• Moderator
• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
Re: Ejs Open Source Ripple Tank Interference Model java applet
« Reply #9 on: January 05, 2012, 03:59:25 pm »
As NRF-MOE eduLab001 project,
May I share one computer model on ripple tank that I have designed for learning, for your use and further sharing-scaling up (a MP3 goal) with others interested in physics.
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2067.0
I have also attached the computer model, requires at least version 1.5 of Java (JRE)

1.   http://weelookang.blogspot.com/2011/01/ejs-open-source-ripple-tank.html or
2.   http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2067.0

Many thanks to
1.   Professor Andrew Duffy for his original simulation http://www.compadre.org/osp/items/detail.cfm?ID=9989
2.   Professor Juan M. Aguirregabiria for his simulation http://www.compadre.org/osp/items/detail.cfm?ID=7876
3.   Professor Fu Kwun Hwang for his OSP learning network and  2000+ models
4.   Innova JC , Chee Wah and Soo Kok for useful feedback to customize to their L&T requirements for their research in eduLab.
« Last Edit: January 06, 2012, 08:52:23 am by lookang »

lookang

• Moderator
• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
Re: Ejs Open Source Ripple Tank Interference Model java applet
« Reply #10 on: January 05, 2012, 04:19:28 pm »
From a teacher Thu 1/5/2012 4:13 PM.

You are indeed amazing!

Yes, I suppose you are right that we may do away with the intensity graph as it looks pretty good with the current features. I suppose we can design the worksheet to check how students perceive from the pattern the intensity-position graph.
agreed

For the computer hanging of the JS, it seems that I didn't encounter it this time round with the update. We will explore further to see if it gives us problem again.
good

Some observation:
1. In the full screen mode, the graph seems to be occupy about a fifth of the screen. I wonder how it would look like if it occupies say a third? On the other hand, the size looks perfectly fine so long as I do not maximize the EJS.
it is selectable width now using split panels

2. I observe that the bar for S1P and the line S1P are in purple[magenta] while the S1 source is in red. Is it intended to be so?
yes!
i design that source S1 is RED and the path S1P is magenta
see picture

Thanks for the great EJS. We are truly impressed.
thank you! Open source Physics is awesome

Hi Professor Hwang!
you are truly amazing too hahahaha
« Last Edit: January 05, 2012, 05:10:21 pm by lookang »

ahmedelshfie

• Hero Member
• Posts: 930
Re: Ejs Open Source Ripple Tank Interference Model java applet
« Reply #11 on: January 06, 2012, 08:39:00 am »
Nice work lookang, keep it up

lookang

• Moderator
• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
Re: Ejs Open Source Ripple Tank Interference Model java applet
« Reply #12 on: January 06, 2012, 01:53:10 pm »
thanks ahmed

another request from teacher Fri 1/6/2012 1:48 PM

We prefer the previous design but we are wondering if the size of the graph can be made a bit bigger, in compromise of either the wave pattern or the fringe pattern. One suggestion is as shown in the document. You may make other adjustment as you deem necessary.
i set the graph to be width = 450, in full screen view, it looks great. in applet default view, it looks big.
i also made the intensity patterns from width = 100 to 75 each

« Last Edit: January 06, 2012, 02:49:27 pm by lookang »

lookang

• Moderator
• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
Re: Ejs Open Source Ripple Tank Interference Model java applet
« Reply #13 on: January 25, 2012, 02:56:01 pm »
another good request from teacher Wed 1/25/2012 11:45 AM
I was working on the worksheet for superposition and would like to request for the following feature:
1. Instead of S1P - S2P, could it be shown as |S1P - S2P| to show that we are measuring the magnitude. Alternatively we can show S1P - S2P to be negative to indicate that S1P is shorter than S2P. For your consideration, please
done made " |S1P-S2P| = 0.## "

2. Can the distance S1P - S2P, Px and Py be shown to 2 s.f.?
two decimal place can? implemented
2 significant figures could be look like this
1.2E0 = 1.20
9.9E-1 = 0.99
a bit harder to read but it is 2 significant figures:)

3. Also, was wondering if there is a need for the pop up when we first open the EJS? The information provided may be slightly different from the activities that the students would be exploring.
hidden now
« Last Edit: January 25, 2012, 03:09:30 pm by lookang »

lookang

• Moderator
• Hero Member
• Posts: 1774
• http://weelookang.blogspot.com
Re: Ejs Open Source Ripple Tank Interference Model java applet
« Reply #14 on: January 25, 2012, 03:50:49 pm »
request Wed 1/25/2012 3:18 PM

It seems that you have yet to change Px and Py to 2 d.p.
done now!

Also, realised that at destructive interference at some position, it shows S1P = 8.47 and S2P = 7.96 but the difference is 0.50(lamda), I suppose it is due to the division and rounding off. Is there a possibility of having this fixed?
yes, i think i see some rounding off error, but i don't know if it is serious bug that need to solve.
seems ok to me when i play with it through the slider
the error seems to be possible when the user drag the point P, i think it is a trade-off between round-off error possible sometimes or disable the drag-gable point P.
« Last Edit: January 25, 2012, 04:41:28 pm by lookang »