How to Create Complex Non-Sequential Objects


This article explains:
  • How to create complex non-sequential objects by combining multiple objects
  • How to use pick-up solves to lock groups of objects together
  • How to duplicate groups of objects in the Non Sequential Component Editor

The article is accompanied by a ZIP archive containing the file referred in the article. This can be downloaded from the final page of the article.

Authored By: Nam-Hyong Kim

Parametric Objects Make Design Simpler

Most non-sequential objects in Zemax are parametric, that is, based on an underlying equation. For example, the Standard Lens object is defined by parameters like radius of curvature, conic constant, center thickness etc. Parametric objects can be easily modified just by entering new parameter data in the Non-Sequential Component Editor (NSCE). These objects can then be recreated on-the-fly, with data changes entered by hand, via the slider, by a macro or extension program, and -most importantly- by the optimizer.

Zemax also supports non-parametric objects, like the polygon object or imported CAD objects. These objects are ultimately represented by a string of data. There are some real advantages to using such objects in some applications. For example, in opto-mechanical stray light simulations, lens mounts and other mechanics can be simply and easily imported. But during the design stage, we need the flexibility to easily change objects in order to obtain the desired performance. Parametric objects are the ideal tool for this job.

There are many parametric objects already built-in to Zemax and new objects are constantly being added. The complete list of the objects is available in the current manual. Furthermore, there is an interface to allow you to write your own parametric objects: the user-defined object. This is very general and very powerful.

You also have the option to combine existing objects to make a compound object. This is a fast and flexible way to develop complex objects without programming. The keys to success are:

  • to know what objects are already available in Zemax. This involves reading the manual ;-)
  • to know how to place an object relative to other objects in such a way that shared volumes and surfaces have the correct properties. This is referred to as "nesting rules" in the manual
  • to use pick-up solves to lock the sub-objects together, so that by changing just a few defining parameters, all other parameters in the compound object update automatically .

The goal of the this article is to create a rectangular acrylic lightpipe with a 90° bend, commonly used in printed circuit boards to relay light from an LED (light emitting diode) to an instrument panel, and analyze what happens to the irradiance distribution at the end of the pipe when the bend radius is changed. We will also create a hole in the pipe in which mounting hardware can be inserted and place a circular aperture at the end of the pipe so that the shape of the light as seem from the instrument panel is circular. After the complete lightpipe has been created, we will duplicate and place it at some distance from the original lightpipe.

Now if we wanted to analyze the effect of the bend using non-parametric objects,like CAD objects,  we would have to create in advance several CAD files corresponding to each discrete bend radius. We will see shortly, that by combining built-in parametric objects, one parameter in the editor can control the shape of the entire object. Also, any changes made to the parameter will be immediately reflected in any analysis without limiting us to discrete values of the parameter.

The animated image below shows the lightpipe to be created. Notice how the irradiance at the end of the pipe changes as a function of the bend radius. As this model is completely parametric, any desired value of bend radius can be entered, and the object will be dynamically recreated

The appearance of multiple elliptical beam at the detector is due to rays going through different number of total internal reflection, as evident from the following layout.



Setting up Basic System Properties

It is evident from looking at the listing of current NSC objects in chapter 12 that there is no single object of the desired shape. There are however, Rectangular Volume and Rectangular Torus Volume objects that can be combined to create the lightpipe.

Let’s go ahead and create the lightpipe from scratch.

Open Zemax and switch to pure non-sequential mode. (File > Non-Sequential mode)

Set the system units to mm and W/Cm2 (System > General > Units)

Set the wavelength to 0.55 um (System > Wavelengths)

Set the Maximum Nested/Touching Objects under System>General>Non-Sequential to 5. This defines an upper limit on how many objects can be inside, straddled, or in direct contact with each other. Do not set this number larger than you need since it will require more memory without any additional benefit.



Creating the main body of the light pipe: A

In the Non-Sequential Component Editor, insert a Null object as object #1 with all parameters set as default, then insert a Rectangular Volume object as object #2 referencing it to the previous object (-1 for Ref Object parameter). The reason for using a relative object reference (current object number -1) instead of simply giving the absolute reference will be apparent later when we duplicate the complete lightpipe.

Set the following parameters for the Rectangular Volume.

Ref Object: -1
Material: Acrylic
X1 Half Width: 5
Y1 Half Width: 5
Z Length: 20
X2 Half Width: 5
Y2 Half Width: 5
All other parameters: Default



To help us visualize the location and the orientation of the local axis to the object, double or right click on the Object Type column in the editor to open the Object Property window and check the Draw Local Axis box.



Open the 3D layout to see the object.

Insert new object (#3) and make the type Rectangular Torus Volume with the following parameters.

Ref Object: -1
Material: Acrylic
Outer R: 40
Inner r: 30
Start Angle:0
Stop Angle: 90
Thickness: 10
#Angle Facets: 20
All other parameters: Default

As mentioned in the beginning of this articles, the faceted representation of the Rectangular Torus Volume is for layout purpose only. For the raytrace calculation, the object is represented exactly by its equation to the full limit of the numerical precision in Zemax.

We now need to specify the appropriate X, Y and Z positions so that the Rectangular Torus Volume is in contact with the Rectangular Volume, regardless of the "Outer R" parameter of the torus. Remember, we will be varying the "Outer R" parameter later on to study the effect of light transmission.  We will use pick up solves to connect the two volumes and to make the "Outer R" – "Inner r" value to be always 10 mm. 

Set the following pick up solve on the "Inner r" parameter.




The first column after the “Material” column in the editor is parameter 1, which for the torus object is the "Outer R" parameter. This solve will make the "Inner r" value always 10 mm less than the Outer R parameter.

One end of the torus should contact the +Z end of the Rectangular Volume; you can make the "Z position" parameter of the torus the same as the "Thickness" parameter (parameter #3) of Rectangular Volume. Place the following solve on the "Z position" parameter of the Rectangular Torus Volume.



Creating the main body of the light pipe: B

Update the 3D layout.

Finally, we need to shift the torus in X direction by -1*(Outer R – 5mm) (see drawing above)

Set the following solve on the "X position" parameter of the torus.

The updated 3D layout shows the two objects as being connected.



Insert another Rectangular Volume object as object #4 with the following parameters:

Ref Object: -1
Material: Acrylic
X1 Half Width: 5
Y1 Half Width: 5
Z Length: 50
X2 Half Width: 5
Y2 Half Width: 5
All other parameters: Default



Dispaly the local coordinate for object #4 in the layout.



Creating the main body of the light pipe: C

We need to rotate the Rectangular Volume (object #4) by -90 degrees around Y axis; enter -90 for "Tilt About Y" parameter. According to the right-handed coordinate system, used consistently by Zemax, the negative rotation about the Y axis yields clock-wise rotation as seen from the +Y axis.



The "Z position" parameter for this object should also be (Outer R -5mm); set the following solve on the "Z position" parameter.

Updated 3D layout shows.



Placing a hole in the lightpipe

Next step is to place a hole (air) in object #4. Insert object #5 of type Cylinder Volume with the following parameters.

Ref Object: -1
Y position: 5
Z position: 40
Tilt About X: 90
Material: Blank (leave empty)
Front R: 2
Z length: 10
Back R: 2



To make the overlapping volume between the Rectangular Volume (#4) and the Cylinder Volume (#5) air, the Cylinder Volume has to be listed after the Rectangular Volume, as it is in this case. Consult the manual for more detailed information about the volume nesting rule.

Let’s insert a Source Rectangle to the left of object #1 to send rays though the pipe. Make object #6 of type Source Rectangle with the following parameters.

Ref Object: -5 (referenced to the Null object)
Z position: -10
# Layout Rays: 20
# Analysis Rays: 400000
X Half Width: 4.8
Y Half Width: 4.8
All other parameters: Default



The zoomed layout shows TIR (total internal reflection) for certain rays at the edge of the hole, because the refractive index of the hole is lower than that of the rectangular volume.



Placing an aperture at the end of the lightpipe

To create a circular aperture at the end of the pipe, we will nest 2 surface objects; a rectangular obscuration and a circular (flat) surface made or air. We will list the rectangular obscuration first. Insert an Object # 7 of type Rectangle (surface object) with following parameters.

Ref Object: -3 (referenced to Object #4)
Z position: 50
Material: Absorb
X Half Width: 5
Y Half Width: 5
All other parameters: Default

And Object #8 of type standard (flat circular hole over the object #7)

Ref Object: -1
Material: Blank (leave empty)
Max Aperture: 2.5
All other parameters: Default



If you update the layout you will get the following message

The reason for the geometry error, in this particular case, is because we have violated one the surface nesting rules. One of the rules in chapter 12 says:

“Surface objects may not share boundaries with volume objects unless the surface object is reflective (Mirror) or absorbing (Absorb), or unless the volume object is listed after the surface object; in which case the volume defines the properties of the common boundary”

In this case, object #8 which is made or air (not Absorb or Mirror) is sharing a boundary with object #4. We can move the aperture (object #7 and #8) 1um away from the pipe by making the Z position parameter of object #7 50.001 mm rather than 50 mm.



In the layout above,  the rays outside the circular aperture are blocked as expected.



Tracing analysis rays to the detector

We will now place a detector for optical analysis. Place a detector object as object #9 with the following parameters.

Ref Object: -1
Z position: 20
Material: Absorb
X Half Width: 25
Y Half Width: 6
# X Pixels: 400
# Y Pixels: 100
Data Type: 0 (incoherent irradiance)
Color: 0 (Gray scale for the detector viewer)



Open the detector viewer

Trace analysis rays to the detector with the "Use Polarization" option checked. The polarization option is used so that the energy lost due to partial reflections and bulk absorption is accounted for.

As discussed in the beginning of this article, the appearance of multiple elliptical beam at the detector is due to rays going through different number of total internal reflections.  



To see how the layout changes when changing the Outer R parameter, use the Slider Tool under Tools>Miscellaneous>Slider. Set the parameters for the slider as follows and press Animate

The layout shows how the bend radius changes

You can change the Outer R parameter and re-trace the detector to see the effect on the irradiance distribution. A simple ZPL macro can be written to trace the detector and save the result for each parameter value. The following movie with changing irradiance distribution in it was created by using such a macro.



Duplicating the lightpipe

Let's create a second identical lightpipe and place it at some Y distance from the first one.

Inset a null object after the detector.

Select objects 1 through 9 by clicking the first object, holding the shift key and pressing the down arrow key.

Select copy object under Edit.

Select object 10 and click paste in the Edit menu.

Enter 20 for Y position parameter of object # 10 (Null object) to place the second lightpipe 20mm way from the first one in +Y direction. Also place a pick solve on the Outer R parameter of Torus Volume #12 to pick up values from the first torus.

The layout now shows 2 lightpipes.

Replicating group of objects is straightforward in this example because we used relative object reference (negative number in the Ref Object column) everywhere. If absolute object referencing was used instead, we would have had to modify the reference object numbers for all objects corresponding to the second lightpipe.



Summary and References
This article has demonstrated how to nest volume and surface objects in non-sequential Zemax to create complex objects. In summary:
  • Parametric objects should be used when possible
  • Volume and surface nesting rules outlined in the user manual should be carefully followed
  • Combining objects is a powerful way of creating complex parametric objects
  • Properly referenced object positions allows for easy duplication of group of objects in the editor

References

  • User Manual




Attachments





© All Rights Reserved.