This article describes how to make complex objects in OpticStudio without the need to import an external CAD file. Using Non-Sequential Mode, the user will learn how to combine multiple objects, how to use Pickup solves to lock groups of objects together, and how to duplicate groups of objects.
Authored By Nam-Hyong Kim
Downloads
Introduction
In Non-Sequential mode, users are able to import or create objects to model opto-mechanical designs. When focusing on design over analysis, it is most convenient to use easily-definable parametric objects. Parametric objects are based on an underlying equation which allows modifications to be quickly applied by hand, via the slider, by a macro, or by the optimizer. OpticStudio provides many built-in parametric objects that may be used or combined. This article will show 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.
Parametric objects make design simpler
Because they are defined by an equation in OpticStudio, parametric objects can be recreated on-the-fly, with design alterations coming easily from quick data changes in the Non-Sequential Component Editor (NSCE). While OpticStudio also supports non-parametric objects - like the Polygon Object or imported CAD Objects - these objects cannot be easily changed. These objects are represented by a string of data and are useful in opto-mechanical stray light simulations or modeling lens mounts and other mechanics. However, during the design stage wherein components aren't set in size, we need the flexibility to easily change objects to obtain the desired performance. Parametric objects are the ideal tool for this job.
There are many parametric objects already built-in to OpticStudio and new objects are constantly being added. The complete list of the objects is available in the current Help Files. 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 OpticStudio. A complete list is available in the OpticStudio Help Files.
- 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 Help Files.
- to use Pickup 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.
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.
Setting up the system
The goal of this article is to create a rectangular acrylic light pipe 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 light pipe has been created, we will duplicate and place it at some distance from the original light pipe.
The animated image below shows the light pipe 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.
It is evident from looking at the listing of current NSC objects in the Help Files 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 light pipe.
Let’s go ahead and create the light pipe from scratch.
Open OpticStudio and navigate to Setup...Non-Sequential to switch to pure non-sequential mode. In System Explorer...Units, set Lens Units: Millimeters and Analysis Unit: Watts per cm2. Under System Explorer...Wavelengths, define one wavelength at 0.550um. Finally under System Explorer...Non-Sequential, set Maximum Nested/Touching Objects: 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, because it will require more memory without any additional benefit.
Creating the main body of the light pipe
In the Non-Sequential Component Editor, insert a Null Object (object 1) and a Rectangular Volume (object 2), as displayed below. Enter the following parameters for the Rectangular Volume Object. The reason for using a relative object reference (Ref Object: -1) instead of simply giving the absolute reference will be apparent later when we duplicate the complete light pipe.
Ref Object | -1 |
Material | Acrylic |
X1 Half Width | 5 |
Y1 Half Width | 5 |
Z Length | 20 |
X2 Half Width | 5 |
Y2 Half Width | 5 |
To help us visualize the location and the orientation of the local axis to the object, navigate to Object 2 Properties...Draw and check Draw Local Axis.
Open the 3D layout to see the object.
In the Non-Sequential Component Editor, Insert a Rectangular Torus Volume as object 3. Set the following parameters for it.
Ref Object | -1 |
Material | Acrylic |
Outer R | 40 |
Inner r | 30 |
Start Angle | 0 |
Stop Angle | 90 |
Thickness | 10 |
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 OpticStudio.
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.
In the Non-Sequential Component Editor, define a Pickup Solve for the Inner r parameter, as follows.
The next column after the Material column in the editor is Parameter 1, which for the torus object is the Outer R parameter. This Pickup 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 Z Length parameter (parameter 3) of Rectangular Volume. Place the following solve on the Z Position parameter of the Rectangular Torus Volume.
Update the 3D Layout.
Finally, we need to shift the torus in X direction by -1*(Outer R – 5mm), as shown above. Define a Pickup Solve on the X position parameter of object 3, as shown below.
The updated 3D Layout shows the two objects as being connected.
Insert a second 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 |
Display the local coordinate for object 4 in the layout.
We need to rotate the Rectangular Volume (object 4) by -90 degrees around Y axis; in the Non-Sequential Component Editor, set Tilt About Y: -90. According to the right-handed coordinate system, used consistently by OpticStudio, 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); Define a Pickup Solve on the Z position parameter of object 4, as shown below.
The updated 3D layout show:
Placing a hole in the light pipe
The next step is to place a hole (made of air) in object 4. Insert a Cylinder Volume object as object 5 of type with the following parameters.
Ref Object | -1 |
Y Position | 5 |
Z Position | 40 |
Tilt About X | 90 |
Front R | 2 |
Z length | 10 |
Back R | 2 |
To make the overlapping volume between the Rectangular Volume (object 4) and the Cylinder Volume (object 5) air, the Cylinder Volume has to be listed after the Rectangular Volume, as it is in this case. Consult the Help Files for more detailed information about the volume nesting rule.
In order to trace rays through the light pipe, insert a Source Rectangle to the left of object 1 with the following parameters.
Ref Object | -5 |
Z Position | -10 |
# Layout Rays | 20 |
# Analysis Rays | 400000 |
X Half Width | 4.8 |
Y Half Width | 4.8 |
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 light pipe
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 of air. We will list the rectangular obscuration first. Insert a Rectangle object as object 7 with following parameters.
Ref Object | -3 |
Z Position | 50 |
Material | Absorb |
X Half Width | 5 |
Y Half Width | 5 |
Also insert a Standard Surface as object 8 with the following parameters. This will represent a circular aperture at the end of the light pipe.
Ref Object | -1 |
Max Aperture | 2.5 |
If you update the layout you will see the following message displayed.
Similarly, running a ray trace (Analyze...Ray Trace) gives the initial information below.
The reason for the geometry error, in this case, is because we have violated one the surface nesting rules. As stated in the OpticStudio Help System under The Setup Tab...Editors Group...(Setup Tab)...Non-Sequential Component Editor...Non-Sequential Overview...Object Placement:
“Surface objects may not share boundaries with volume objects unless the surface object is reflective or absorbing, 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 88 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 equal to 50.001 mm rather than 50.0 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. Insert a Detector Rectangle 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 |
Navigate to Analyze...Ray Trace, check on Use Polarization and select Clear & Trace. 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 (Parameter 1), use the Slider Tool under Optimize...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 light pipe
Let's create a second identical light pipe and place it at some Y distance from the first one.
Insert a Null Object after the Detector Rectangle. Select objects 1 through 9 by highlighting object 1 and then pressing <Shift + down arrow> on your keyboard.
Right mouse click and select Copy Objects.
Select object 10, right mouse click again, and choose Paste Objects. The NSCE will now look like image below.
Enter 20mm for the Y Position parameter of object # 10 (Null object) to place the second light pipe 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 displays 2 light pipes, 20 mm apart:
Replicating groups 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 light pipe.
References
OpticStudio Help System
Previous article: Fly’s eye arrays for uniform illumination in digital projector optics
Next article: How to export a lens to CAD
KA-01364
Comments
Please sign in to leave a comment.