LENSxxx.PRO: Small lenses

3D MMP, Electrodynamics, Conversion 2D to Axisymmetric, OpenGL movies, Copies of 3D Objects

Ch. Hafner, Computational Optics Group, IFH, ETH, 8092 Zurich, Switzerland

Back to MaX-1, MaX-1 Examples Overview

Download ZIP file containing the MaX-1 projects described here

Before you study the LENS projects, you should be familiar with the simpler PECS, PECT, and METS projects and you should have experience in 2D modeling. This project is more difficult and it is assumed that you already know how to model axisymmetric problems using ring multipoles, how to generate 3D objects, how to visualize them using OpenGL, and how to generate movies. In the following, it is mainly explained how to convert a complete 2D model into an axisymmetric 3D model (Project LENS001) and how to duplicate 3D objects (Project LENS002).

Generating a complete 2D model (LENS000.PRO)

First, we generate a complete 2D model of a dielectric lens with an arbitrary cross section, i.e., we model the material properties and the boundary conditions like in the METS project. Because of the symmetry, we only model the right half of the cross section of the lens in the xy plane and let y be the symmetry axis. We define a plane wave excitation propagating in y direction and set the corresponding YZ symmetry number in the Project dialog. Note that the Cylindrical box should be checked for the 2D model and the XY symmetry number should be 0. The main difference to the METS project is that we define a different, more complicated boundary that has the shape of a lens. In order to avoid problems with sharp corners, we introduce small radii in all corners of the C-polygon.

For a complicated C-polygon, we need a bunch of 2D multipoles along the 2D boundary. You can either first define a dummy multipole and run one of the automatic 2D multipole setting routines or you can manually define the 2D multipoles. For getting quick results, you should not define too many 2D multipoles and use not too high orders. This is not very important here, but since the evaluation of ring multipoles is quite time-consuming, it will be important in the next step.

Note that you can not only specify the minimum and maximum orders and the maximum number of parameters but also the minimum degree, the maximum degree, etc. although these values are not used for the 2D model. If you don't set these values now, this will not be a big problem. You can easily modify the data of the ring multipoles also after you have generated them using movie directives.

Proceed as usual until you obtain reasonable results with the desired accuracy. If you are already familiar with 2D modeling, you may also skip the steps mentioned above and load the LENS000 project that contains a simple lens. Figure 1 shows the resulting field.

Figure 1: Time average of the Poynting vector field for a simple, dielectric lens, 2D model.

Converting a 2D model into an axisymmetric 3D model (LENS001.PRO)

When you want to create a 2 slice model as in the PECS004 project, you need at least two identical boundaries with different, Specific boundary conditions. Furthermore, you need a third, dummy boundary (Weight 0) with the same geometry for the field representation on the surface of the lens. You may use this dummy boundary also for converting the 2D multipoles into 3D ring multipoles. You can easily obtain these boundaries by copying and adjusting the 2D boundary you defined in the previous project. When you want to visualize the field in the yz plane, you add a straight dummy boundary as in the simple spherical projects.

Now, you should tell MaX-1 that this is now a 3D project by turning the Cylindrical box in the Project dialog off.

When you take the xy and yz symmetry planes into account (set the symmetry numbers in the Project dialog as in the PECS004 project), you need ring multipoles in the first sector (Minimum angle 0, Sector angle 90 degrees). Furthermore, it is sufficient to visualize the field on the surface of the lens in this sector only. Therefore, you best define a Torus with Minimum angle 0 and Sector angle 90 in addition to the two thin slices. You can use this object both for field visualization and for generating ring multipoles. For doing that, you should check the numbers of the 2D multipoles in the Expansion dialog. When you have loaded LENS000, you should have 14 2D multipoles with the numbers 1 up to 14. Therefore, you set Min. expansion 1 and Max. expansion 14 for the third 3D Object (which is the 90 degree sector of the lens). Furthermore, make sure that the Max. multipoles value of this object is 0. When you would have another value, 3D multipoles would be generated instead of the desired ring multipoles. As soon as you have specified the third object, you may open the Expansion Dialog and press the Generate 3D button. In the dialog that pops up, you specify Object number 3 and press the Generate!! button. Back in the Expansions dialog, you should now have the 3D ring multipoles with the numbers 15-28 in addition to the 2D multipoles with the numbers 1-14. Note that the latter now have the Object # -1. During the MMP evaluation expansions with negative Object # will be ignored. Therefore, you don't need to delete the 2D multipoles.

When you check the parameters of the ring multipoles, you see, that some of them don't have the desired values (same values as in the METSxxx projects). Adjusting these parameters for all ring multipoles is easy with the following movie directives:

set expansion 15-28 re4 2

set expansion 15-28 ie3 1

set expansion 15-28 ie4 1

set expansion 15-28 ie6 -30

set expansion 15-28 ics 2

set expansion 15-28 parameters 100

The first expansion tells MaX-1 to set the RE4 parameters of the expansions 15-28 equal to 2. RE4 is the fourth real parameter, i.e., the fourth entry in the box that contains the real parameters in the Expansion dialog. When you inspect for example expansion number 15, you see that this is the degree factor. By default, the degree factor is 1 and this is not appropriate for axi-symmetric models with two symmetry planes. Similarly, ie3 and ie4 are the Minimum degree and the Maximum degree of the ring multipoles and ie6 is the number of multipoles to be used for the evaluation of the ring. ICS indicates the angular phi dependence of the ring multipole (cos or sin, i.e., even or odd in the Expansion dialog). ICS 2 stands for even (1 for odd, 0 for both). The final directive tells MaX-1 to set Max. 100 parameters for each ring multipoles. This number is too high and MaX-1 will automatically reduce it to the correct value. In fact, the correct value was already present before, but since this is not always the case, you should run this directive for security reasons.

After you have defined the desired ring multipoles, you should also adapt the excitation, i.e., the plane wave expansion 29. You can do this also with movie directives. Since this is a single expansion, you also may do it in the Expansion dialog. Note that you already had a plane wave expansion in the 2D model, but the definition of the corresponding plane wave in the 3D model is slightly different, because more data are required for defining a plane wave in 3D space.

When you have defined all boundaries, expansions, and objects, you can run the MMP solver and visualize the field as usual. You now should obtain the result illustrated in Figure 2. Although this is similar to the 2D case shown in Figure 1, there are obvious differences.

Figure 2: Time average of the Poynting vector field for a simple, dielectric lens, 3D model.

Frequency dependence, OpenGL movies (LENS002.PRO)

For a more detailed study of the lens, you should now use the OpenGL Graphics window as you did in the simple spherical projects. Furthermore, it is recommended to study the frequency dependence. For doing this, you can generate a movie within the OpenGL Graphics window. For doing this you write movie directives exactly as when you want to create a movie in a standard graphics window. In order to let MaX-1 draw the field and other things in the OpenGL Graphics window, you use the DRAw OGL directive. Furthermore, make sure that the number of Frames is 0 in the OpenGL window dialog. Otherwise, the movie directives would be ignored and a simple time dependent movie would be generated. To start the movie generation, donít press the button you use for standard movies! Instead of this, select generate movie from the OpenGL dialog. Before you do this, make sure that all directives and settings are correct. Namely, the view and size of the OpenGL window should be correct. To verify this, select draw 3D objects from the OpenGL dialog. This is important because you cannot stop an OpenGL process with the STOP button and must always wait until it terminates!

Duplication of 3D objects (LENS003.PRO)

Once you have defined a 3D object by defining 2D boundaries, expansions, and one or more objects in the 3D Objects dialog, you may easily copy it to another place. For example, when you want to add a second lens at some distance from the lens you have defined before (using the objects 1, 2, and 3), you simply copy the objects (1, 2, and 3) and move the new objects to the desired location (press the Location button in the 3D objects dialog). Once you have done this, let MaX-1 generate appropriate ring multipoles for the new lens as you did it for the first lens.

Note that you also may modify the orientation of the second lens in 3D space, but this would break the rotational symmetry and would therefore require more time-consuming models. The same also happens when you move the second lens away from the y axis. Therefore, you should only modify the y coordinate of the location.

You may also move any object with the movie directive MOVe OBJect. This directive moves both the boundary of the object and the corresponding expansions. Therefore, you can easily produce a movie with two lenses and varying distance between them.

When you go back to the METS projects, you may also generate a second sphere. When you do this, you should know that the same domain number is used for the interior of both spheres. Therefore, the two Bessel expansions used for the interior fields now are used simultaneously for both spheres. Since the field of the Bessel expansions does not decay with the distance as the field of the multipoles, this may cause numerical problems. There are two ways to avoid these problems: 1) Specify a maximum radius R for each Bessel expansion in such a way that the entire boundary of one sphere is within and the entire boundary of the other sphere is outside the sphere with radius R around the corresponding Bessel expansion. 2) Use different domain numbers for the interior domain of each sphere. This requires the definition of additional domains in the Domain dialog, of additional 2D boundaries in the Boundary dialog, and an appropriate modification of the corresponding expansions and 3D objects. Although the second way is more complicated, it has an important benefit even when no Bessel expansions are used (as in our model of the two lenses): The resulting MMP matrix is more sparse. This may be of especial importance when you model problems with many particles.

Animation: Time average of the Poynting vector field for two lenses with varying distance, Laser beam illumination, additional planes for the visualization of the field.