{'fraction_non_alphanumeric': 0.027886644558335845, 'fraction_numerical': 0.006783237865541152, 'mean_word_length': 4.926306386779812, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Simulating Interference and Diffraction in Instructional Laboratories

Studies have shown that standard lectures and instructional laboratory experiments are not effective at teaching interference and diffraction. In response, the author created an interactive computer program that simulates interference and diffraction effects using the Finite Difference Time Domain method. The software allows students to easily control, visualize, and quantitatively measure the effects. Students collected data from simulations as part of their laboratory exercise, and they performed well on a subsequent quiz---showing promise for this approach.


I. INTRODUCTION
Often, interference and diffraction is taught by showing the mathematics in lecture and then performing laser interference and diffraction experiments in an instructional laboratory. However, studies show this teaching method is lacking.
Consider the following problem (see Figure 1), which should be straightforward for a student who understands the concepts. Two point sources, 2.5 wavelengths (λ) apart, generate waves in phase. Is there constructive interference, destructive interference, or neither at points A, B, and C?
A University of Washington study asked this and other questions to ≈ 1200 undergraduates in their standard, calculus-based, introductory physics course. Only ≈ 35% answered correctly for both points A and B, and only ≈ 5% answered correctly for point C. Graduate students also performed poorly; only ≈ 25% answered correctly for point C. 1 These mistakes were primarily due to fundamental misunderstandings; post-quiz student interviews included responses like, ''I suppose that 2.5λ [the slit separation] is small compared to 400λ and 300λ, so the sources here act like a single source.'' 2 Moreover, the typical instruction method did not help; the scores for point C before and after lecture and laboratory were basically unchanged. 1,2 Part of the problem is that light's wave nature is only visible indirectly-though effects like interference and diffraction. Light's peaks and valleys cannot be viewed directly. Hands-on experience seeing and controlling the waves' interactions is useful for student understanding, so a better wave medium is needed. Ripple tanks provide this, but there are significant trade-offs between easy of use, cost, and measurement accuracy. For example, Wosilait et al. provided students with simple ripple tanks-pans, dowels, and sponges. They are cheap and easy to use but do not allow quantitative measurements. Still, they proved effective as part of an intensive tutorial system that raised scores for point C to ≈ 45%. 1 Measurements can be performed with a ripple tankat the price of increased cost and complexity. They require a strobe device and a consistent wave source-not a student rolling a dowel back and forth. The strobe can either be a light 3 (easier but more expensive) or a spinning, slotted disk 4 (cheaper but more complicated). Either makes the waves appear frozen, making their measurement easier.
Computer simulations can also display waves, and they have potential advantages over ripple tanks. Simulations can allow finer control and more accurate measurements. They are available for free. They can be used outside of laboratory. And they allow better visualization by avoiding unwanted reflections, being easily paused, and having superior contrast.
Dozens of simulations are available (search http: //www.merlot.org/). Some display what would be seen in a laser experiment-without showing the waves interacting. 5 Others are non-interactive animations. 6 Some have interactive displays. 7 A few allow measurement of the instantaneous wave height/field strength. 8 Those simulations are primarily used for qualitative understanding. However, I wanted a simulation that could answer questions like the aforementioned onealbeit on a smaller scale-and could thereby test interference conditions. This requires easily measured amplitudes at any user desired grid point. No simulations combined that with interactive, easy to control, animated waves.
Similar simulations have been proposed, but their use in instructional laboratories has not been reported. terference and diffraction effects, but they have only reported its use in lecture demonstrations. 9 Werley et al. also suggested using FDTD simulations in laboratories, but they instead used pre-recorded videos of actual propagating radiation. 10 So, I wrote an FDTD simulation that allows easy and accurate measurements, and I constructed a laboratory exercise that uses the simulation for quantitative measurements, not just qualitative understanding.

II. THE PROGRAM
The FDTD technique solves differential equations by discretizing them in both space and time. It has proved popular and effective for simulating electromagnetics, and there are many fine references on the technique. [11][12][13] So, the equations are not reproduced here; 1 this section summarizes aspects of the simulation and interface relevant to its use. Figure 2 shows the program's interface, which has five plots. The two large plots show E z (upper plot) and E zRM S (lower plot). For both, black is the smallest value and white is the largest value, with shades of gray in between. The three smaller plots show E z and ± √ 2E zRM S -an envelope for E z -along the horizontal and vertical dashed lines through the two larger plots. Those lines can be moved with the keyboard or mouse, and x, y, E z , and E zRM S at those lines' intersection is displayed in the center right area between the two vertical plots. Knowing E zRM S at that point allows users to home in on extrema.
A plane wave-with a wavelength of 20 grid cellsenters from the left. It is not simulated but calculated analytically. At the start of the simulation, the wave's magnitude is ramped up gradually to avoid potentially unstable high frequency components.
The barrier-the red line visible in both large plotsis a perfect conductor, and the openings in the barrier are hard sources that inject the incoming wave in to the FDTD domain-the area to the right of the barrier. Openings in the barrier can be added, removed, and modified using the barrier control frame-at the right of the interface.
Split-field perfectly matched layers 12,14 terminate the other three sides of the FDTD domain. These boundaries reduce reflections to imperceptible levels, effectively giving the simulation open boundaries.
When the simulation starts or the barrier is modified, a timer appears over the E zRM S plot-counting down until steady state is reached. Afterwards, E zRM S is reset to remove transients, and another countdown appears for one wave time period. The steady state E zRM S is calculated by averaging over that time.
Among its other features, the simulation also has a fast forward mode, which saves time by not updating the plots. In that mode, the simulation runs until the current countdown is done.
The laboratory's computers-running Windows 7 with Intel Core 2 Duo processors-take ≈ 55ms per timestep, resulting in a smooth animation.
The software is written in Python using NumPy for the calculations, TkInter for the interface, and the Python Imaging Library for the plots.
Those libraries are available for Windows, OS X, and Linux. Executables, source code, and program information are available at http://lnmaurer.github.com/ Interference-Inference-Interface/; the program's source code available under the GNU Public License version 2.

III. THE SIMULATIONS
The laboratory was tailored for a particular classaimed at future physics majors, but tweaking the exercises for other courses should be straightforward. Besides simulations, the laboratory also included pen and paper work and short laser/slit experiments. 2 However, four simulations are at the laboratory's heart: of narrow single, double, and triple slits and a wide single slit.

A. Narrow Single Slit
See Figure 2. This simulation provides a baseline for comparison. It shows that a single narrow opening is not responsible for the interference patterns seen in the following simulations.
The course's lectures included a mathematical description of point sources in 3D, so this simulation introduced students to the asymmetric sources used in the laboratory. To acquaint students with the simulation's controls, I had them roughly measure how fast the amplitude decreased with distance from the opening; because this is a 2D simulation, the amplitude falls off less quickly than in 3D.

B. Narrow Double Slits
See Figure 3. This is the key simulation; it lets students discover the conditions for constructive and destructive interference. Students were asked to find four maxima and four minima of E zRM S -in eitherx orŷ and in the right half of the domain, calculate |d0−d1| λ for eachwhere d 0 and d 1 are the distances from the extrema to the openings, and then find the pattern in those numbers.
In principle, the students already knew the conditions, but they seemed new to many. Furthermore, most students seemed to be comprehending the conditions for the first time. 3 Pen and paper work followed to reinforce their understanding. This included drawing a couple waves that resulted in those conditions (using a simplified version of 15,16 ) and mathematically verifying that the conditions lead to waves in or out of phase.

C. Narrow Triple Slits
See Figure 4. The additional slit makes students closely consider the logic behind the extrema conditions.
Here, the students were asked to find points that were simultaneously extrema in bothx andŷ. This is straightforward with the simulation, but-since this requires fine control in bothx andŷ-this would be difficult using the standard experimental setup.
The condition for constructive interference still holds. To get a maximum, all pairs should be maximized.
However, the minimization condition is more complicated. 17 The two slit condition caused the two waves to roughly cancel. That would leave the third wave undiminished. Additionally, it is mathematically impossible for all differences in the distances to be a half integer number of wavelengths. This is an instructive example that is missing from laboratories that do not use simulations for quantitative measurements.
However, |d 0 − d 1 | was always within one. For example, the point where the dashed lines crosses is a maximum in Figure 3, and

D. Wide Single Slit
See Figure 5. The right side of the domain gets close to the far field limit. While the domain is too small to truly display far field effects-a limitation common to many ripple tanks, the simulation successfully shows diffraction effects arising from waves. The simulation could be used to investigate near field effects-something difficult with normal instructional laboratory equipment. Only 15 students used the finial version of the laboratory, so the only conclusion I can draw with confidence is that students enjoyed it; I collected anonymous feedback, and it was overwhelmingly positive. Still, for a rough gauge of the method's effectiveness, I quizzed the students with questions from the University of Washington study. Scores for point C are in Table I.

IV. RESULTS
They did well on all parts of the quiz, relative to others. 60% of the students answered correctly for point C. B-students in the old University of Washington system scored 35%. 1 The quiz included another question from the University of Washington study. See Figure 6. What would be observed at the far away point-first with just the left two slits and then with all three slits? 80% got both parts right.

V. CONCLUSION
Interference and diffraction are tricky subjects to teach, but this approach shows promise in making them more accessible to students. The simulation allows them to easily control, visualize, and quantitatively measure interference and diffraction effects. That makes the software a powerful tool.
The progression of simulations described here appears effective. First, a single narrow slit familiarized students with the simulation and showed more was needed for interference. Then, a double slit simulation showed Young's experiment in a new light, with visible waves and easy measurements. Next, a triple slit experiment made students reconsider the constructive and destructive interference conditions; one held but the other fell. Finally, a diffraction simulation showed that similar effects could arise from one wide slit.
While the sample size here was small, the results are encouraging. I hope eventually to try this approach with more students in more classes.
It would be difficult to experimentally mimic some of the simulations with instructional laboratory equipment. The simulation could also easily demonstrate more advanced topics with minimal modification. The permittivity, permeability, and conductivity are definable at every point in the simulation domain. Changing those parameters would allow the simulation to demonstrate waveguides, reflection due to changes in dielectric constants, etc. Simulations of a modified two slit experimentwhere the upper and lower halves of the domain have different indices of refraction-could illustrate more conceptual topics, like the difference between physical and optical path length. 18