The Diffraction Of Light By Acoustic Wave In Water
This project deals with the diffraction pattern generated by light that passes through an acoustic wave in water. The aim of this project was to calculate the diffraction pattern, and display it graphically.
I want to thank Erez Ribak for his help, both with the physical model and the programming.
Index:
1. Introduction
2. The Physical System
3. Calculating The Acoustic Wave
4. Calculating The Optical Interference
5. The Parameters For The Calculation
6. Downloading The Program
7. Using The Matlab Version Of The Program
8. Using The 'C' Version Of The Program
1. Introduction
Light that passes through an acoustic wave in water, is affected by that acoustic wave, and with the right setup, a diffraction pattern can be obtained. It should be mentioned that the phenomena is not limited only to water. Similar results can be achieved in other liquids and even in transparent solids.
The acoustic wave is actually a change in the pressure of the liquid. The pressure directly affects the index of refraction. The optic length is directly proportional to the index of refraction (it is the same to say that the speed of light is inversely proportional to the index of refraction). This means that two different light beams passing through the liquid in two different points, see different optic lengthes, according to the pressure at each point.
Now consider a plane wave of light, propagating in perpendicular to the direction of the acoustic wave. As the speed of light is by far larger than the speed of sound, we can assume that the acoustic wave is static during the time it takes the light to pass through the liquid. This situation is demonstrated in figure 1 (in the acoustic wave, the brighter points represent higher pressure). A plane wave of light that enters the acoustic wave is no longer plane wave at the exit. The shape of the wave front depends upon the pressure at each point. The beams that pass through area of low pressure, travel larger distance than the beams that pass through area of high pressure, on the same time.
Figure 1
Each point on the wave front can be thought of as the starting point of a light beam directed normally to the tangent of the wave front at the same point. This is illustrated in figure 2.
Figure 2
These redirected light beams interfere with each other, giving the diffraction pattern
2. The Physical system
The physical system is described in figure 3. The water is held in a metal box, with transparent windows on two sides. Light enters the box from one side (parallel beam) and exits from the other side. The acoustic wave is generated by a membrane. The frequency and amplitude of the vibrations are electronically controlled. In order for the acoustic wave to be effective, the frequency should be selected to give a standing wave, where the amplitudes sum.

Figure 3
3. Calculating The Acoustic Wave
It is assumed that the membrane forms a spherical shape. The amplitude of the acoustic wave is proportional to the movement of the membrane. Given the diameter of the membrane D, and it's movement in the center Hmax, it is easy to calculate R, the radius of the sphere (assuming that Hmax is by far smaller than R). Given R, it is easy to calculate the movement of the membrane H, for each value of X (X being the distance from the center of the membrane). This is shown in figure 4.

Figure 4
This gives the amplitude for the direction of the membrane. For the direction of propagation of the acoustic wave the amplitude is a sine wave, with amplitude as calculated above for location on X direction. The shape of the acoustic wave can be seen on figure 5, where the color map was selected to show low pressure in blue and high pressure in red:

Figure 5
4. Calculating The Optical Interference
The light enters the water as a parallel beam. The optic length for each ray is calculated according to the index of refraction at every point of the path (The index of refraction of the water is proportional to the amplitude of the acoustic wave).
The optic length is used for two calculations:
1. Calculating the shape of the wave front (as shown in figure 2).
2. Calculating the phase at each point.
The direction of each beam after exiting the water is calculated from the slope of the wave front. At each point, the light beams are summed, according to their phase, generating the interference pattern.
This calculation is repeated for different optic wave lengths, summing the intensities.
5. The Parameters For The Calculation
The Calculation requires a few physical parameters:
1. Acoustic wave frequency.
2. Result range
3. Acoustic wave width
4. Acoustic wave amplitude
The frequency of the acoustic wave is used to determine acoustic wave length. The frequency is entered in MHz.
The result range defines the area for which the diffraction pattern is calculated. The pattern is calculated from the acoustic wave to the distance defined by result range. This distance is defined in millimeters.
The acoustic wave width is the distance the light passes through acoustic wave (it is assumed to be the same as the diameter of the membrane). The acoustic wave width is used to calculate the intensity of the acoustic wave and the optic length. The acoustic wave width is entered in millimeters.
The acoustic wave amplitude is proportional to the movement of the membrane. It has no units but used as a proportion value.
In addition to the above parameters, another non physical parameter is requested by the Matlab version of the program. This is the number of waves to show. The result interference pattern is shown for the number of waves selected. This does not affect the physical result but only the appearance of the image.
Here is a set of values that gives a fine result:
Acoustic wave frequency: 8.0MHz
Result range: 10mm
Acoustic wave width: 20mm
Acoustic wave amplitude: 5
6. Downloading The Program
The program has two versions. A Matlab version and a 'C' version. The Matlab version has a user friendly GUI, both for controlling the parameters and for viewing the results. The 'C' version on the other hand, is not so user friendly but it runs much faster (about 50 times faster !!).
The Matlab version.
In order to use the Matlab version you need two files:
'acst.m' - this is the main code file.
'acst.mat' - this file holds tables used by the GUI.
See section 7 for instructions.
Download:
acst.m
acst.mat
The 'C' version
In order to use the 'C' version you need one file, 'acst.c' . This is the 'C' code. You need to compile it on your platform.
See section 8 for instructions.
Download:
acst.c
7. Using The Matlab Version Of The Program
Download 'acst.m' and 'acst.mat', and put them in your working directory.
Open Matlab, and change the directory to your working directory (use cd).
Type 'acst' and press enter.
The GUI should appear, like in figure 6. On the GUI you will find the following controls:
1. Input.
2. Defaults.
3. Resolution control.
4. Progress indication (active only during calculation).
5. Start calculation.
6. Show help.
7. Show Introduction.
8. Close window.

Figure 6
Use the inputs (1) to change the physical parameters. The parameters are described in section 5. In addition to the physical parameters, you can select the number of acoustic waves to show. This has affect on the appearance of the result but not on the physical result (note that the more waves are shown, the longer it takes to calculate). For each input, the valid range is shown. Default values are suggested for each.
The defaults buttons (2) suggest 3 different sets of values. You might want to try these values before entering your own.
The resolution control (3) lets you select the result's resolution. Note that the higher the resolution is, the longer it takes to calculate.
After setting the parameters and resolution, press the calculate key (5) to start the calculation. during calculation the progress is shown (4).
Use the help (6) and introduction (7) keys to display help and a brief introduction respectively. Press the same key again to hide the help / introduction.
Use the close key (8) to close the window.
After performing the calculation, the GUI will appear like in figure 7. The result image is displayed (10). You can click on the image and the relative intensity on that point is displayed (9). At the top of the image you will see a line who's intensity varies like sine wave. This indicates the acoustic wave, and is shown for reference.

Figure 7
Another example of calculation can be seen on figure 8. In this case, 4 acoustic waves are shown:

Figure 8
8. Using The 'C' Version of The Program
The 'C' version has no GUI. The parameters are input on a text window. The result image is stored in a file. The file is an ASCII that can be read by Matlab as described below. The advantage of using the 'C' version is it's speed, the calculation takes about 50 times faster than with the Matlab version.
To use the 'C' version you need to download 'acst.c' and compile it. The code was tested on two platforms:
-MS Windows, compiled with MS Visual Studio.
-Unix, compiled with g++.
Download 'acst.c' to your working directory.
For 'MS Windows' system: this file can be compiled using 'MS Visual Studio'.
For Unix system: This file can be compiled using 'g++'.
It was compiled on Technion/techunix using:
g++ acst.c -o acst.ex
After compiling, run the program.
The program asks for input parameters. See details and example of values in section 5.
In addition the program asks for an output file name. This name shall be used for the output file.
The output file is an ASCII file, with comma (,) separator. It can be read to Matlab using:
pic=dlmread( 'file_name' , ',' );
The image can be viewed using:
imagesc(pic)
colormap(gray)
Back to top