beijing optics

Tutorial: Thermal Modeling in Zemax

Tutorial: Thermal Modeling in Zemax


Frequently an optical system must perform adequately over a range of temperatures; the Zemax multi-configuration tool offers a convenient means of analyzing optical performance for this situation. This tutorial presents a brief review of an analytical approach to thermal-optical analysis presented in Opti521 lectures, and then shows in detail how a Zemax-facilitated thermal analysis can facilitate design choice in a case where performance over a range of temperatures is required For both the analytical and Zemax approach, I chose to a single performance metric, RMS spot size, and analyzed an f/10 plano-convex acrylic lens with a detector distance controlled by a spacer of defined CTE. This problem is similar to an Opti521 homework problem in which thermal defocus was estimated for an acrylic lens mounted on one end of an acrylic tube with a detector glued on the other end of the tube. In the homework problem, the tube length was fixed to the lens focal distance at the nominal operating temperature of the system and we estimated the defocus caused by a 20 C ambient temperature shift from nominal. This tutorial expands the problem to analyzing performance over a 30 degree temperature span (15 – 45° C) and using Zemax to first find the tube length which optimizes performance over temperature for the completely acrylic system given in the homework, and then combining the Zemax and analytical approaches to choose a better material for the tube.

Design Parameters 

Figure 1 makes it clear that the tube controls the system back focal distance or BFD; Figure 2 gives the design parameters for the tutorial. Although the performance metric is RMS spot size, no specific limit is given; the tutorial simply seeks to minimize this parameter.

Screenshot 2023 07 22 100958 - Tutorial: Thermal Modeling in Zemax

Figure 1: Sketch of optical system. At the front of the tube sits the plano-convex lens; at the rear of the tube sits the detector.

Screenshot 2023 07 22 101138 - Tutorial: Thermal Modeling in Zemax

Figure 2: System requirements

Analytical Approach 

The focal length of the plano-convex lens changes with temperature according to Equation 1, while the tube length obeys Equation 2. In both these equations, nominal refers to the lengths at any temperature at which these lengths are explicitly known or specified; in our Zemax analysis, this temperature is 20° C. The coefficient of thermal expansion is denoted by Screenshot 2023 07 22 101546 - Tutorial: Thermal Modeling in Zemaxin both equations; for acrylic, Screenshot 2023 07 22 101546 - Tutorial: Thermal Modeling in Zemax = 60E-6. The index of refraction of the lens material relative to air is denoted by nr.

Screenshot 2023 07 22 101742 - Tutorial: Thermal Modeling in Zemax

Equation 1: Change in focal length with temperature of lens

Screenshot 2023 07 22 101918 - Tutorial: Thermal Modeling in Zemax

Equation 2: Change in tube length with temperature

Defocus distance at any temperature T is equal to the mismatch between the tube length and the lens focal length.

Screenshot 2023 07 22 102102 - Tutorial: Thermal Modeling in Zemax

Our first Zemax analysis looks at RMS spotsize of an acrylic lens paired with a tube made of exactly the same material. Equation 3 becomes particularly simple for this case:

Screenshot 2023 07 22 102314 - Tutorial: Thermal Modeling in Zemax

The derivative of the relative index of refraction is a much less well-known parameter for most materials than the CTE; however, Zemax provides a 6 parameter estimate of this parameter for many of the glasses in its catalogues. For acrylic, only one of the 6 parameters (D0 = -2.5920E-04) is nonzero, so dnr/dT becomes the constant value given below

Screenshot 2023 07 22 143303 - Tutorial: Thermal Modeling in Zemax

Equation 5: Dependence of dnr/dT on the Zemax D0 parameter when all other opto-thermal parameters = 0.

We can then write

Screenshot 2023 07 22 143441 - Tutorial: Thermal Modeling in Zemax

Equation 6: Final equation for the defocus distance for the completely acrylic system

Our ultimate goal is to obtain an estimate for the RMS spotsize, which is related to defocus distance via the
maximum spot diameter Dmax:

Screenshot 2023 07 22 143604 - Tutorial: Thermal Modeling in Zemax

Equation 7: RMS spot radius as a function of defocus distance for an acrylic tube and lens system

The second Zemax analysis will try to point the way to a better tube material choice than acrylic. Optimizing performance requires minimizing defocus across temperature. Setting the tube length equal to the lens focal length, we find we need a tube CTE given by Equation 8.

Screenshot 2023 07 22 143748 - Tutorial: Thermal Modeling in Zemax

Equation 8: Optimal value of CTE for tube

Zemax advises extreme caution when using the results of a thermal analysis in which D0 is the only non-zero thermal parameter in the relative index of refraction estimate. In this tutorial, I have simply proceeded with the dnr/dT estimate made from the catalogue D0 value, but in an actual design I recommend consulting the Handbook of Optical Materials or other published sources to find tabulated index vs. temperature data from which to construct dnr/dT.

Zemax Approach 

Acrylic Lens and Tube at 20° C 

First, establish a baseline metric for the RMS spot radius by optimizing the lens and BFD for use at the nominal operating temperature and pressure of 20 C and 1 ATM. 

  1. Using the “Gen” button in the main window area, set the system aperture to 20 mm and the environment to the nominal operating temperature of your system at which you will specify the system thickness and radii. Make sure that the box “Adjust index data to environment” under the “environment” tab is checked. For this tutorial, I chose 1 ATM pressure and T = 20 C.
  2. Enter an acrylic plano-convex lens into the lens data editor. Define the convex radius to be 100 mm, the thickness to be 4 mm and set the stop on the rear, flat lens surface. Set the thickness of the lens to 4 mm. Note that “Acrylic” is found in the “MISC” catalogue. D0 and CTE are the only non-zero thermal parameters for Acrylic in this catalogue
  3. Use Tools->Miscellaneous->Make Focal to set the focal length of the system to 200 mm. To obtain an f/# of exactly10, reopen the Gen tab and redefine the aperture to exactly 20 mm following the Make Focal step.
  4. . Use Tools->Merit Function Editor->Tools->Default Merit Function->RMS Spot Radius to create the merit function.
  5. . Set the last thickness before the image plane to variable and use the “Opt” button in the main window to optimize the lens-detector distance. At this point, the system is optimized for 20C

The LDE should now look like Figure 3, and the system performance should match that shown in Figure 4. I used Reports-> Report Graphic 4 tab to create Figure 4, with the settings shown in Figure 5. To change the plot range, pattern type etc, for the sub-windows in this report, place the cursor on the plot you wish to alter and right-click. Because I intend to re-use this report format, I saved the format using the “save” button shown in Figure 5. Note that because the system is slow, the RMS spot is slightly less than the Airy disc. The optimum performance at 20C is obtained for a back focal distance (BFD) of 196.97 mm.

Screenshot 2023 07 22 144854 - Tutorial: Thermal Modeling in Zemax

Figure 3: LDE after BFD optimization at 20 C

Untitled 21 - Tutorial: Thermal Modeling in Zemax

Figure 4: Summary report of optimized performance at 20C. Note the RMS spot radius of 5.5 microns is actually less than the Airy radius

Screenshot 2023 07 22 145357 - Tutorial: Thermal Modeling in Zemax

Figure 5: Report settings to generate Figure 4.

Acrylic Lens and Tube at 15-45° C

Now, examine lens performance across temperature for an acrylic tube. To do this, we specify the CTE of the BFD to be the acrylic value of 60E-6, and then utilize the merit function and multi-configuration editor (MCE) to optimize the tube length for this material across temperature.

     6. Go to the right-most column of the surface defining your lens-detector distance (surface 5 in my example). Enter 60 in the TCE column, as shown in Figure 6.

Screenshot 2023 07 22 150114 - Tutorial: Thermal Modeling in Zemax

Figure 6: LDE editor with surface 5 (lens-detector distance) CTE specified to be equal to the acrylic CTE

    7. Use Editors->Multi-configuration Editor->Tools->Make Thermal to define the analysis temperatures. To define configuration temperatures of 15, 25, 35, 45, mimic the choices shown in Figure 7; the nominal system temperature of 20° C also appears as a configuration in the MCE. Checking “sort by surface” in Figure 7 ensures that the MCE editor arranges the data as shown in Figure 8: by surface, not operand.

Screenshot 2023 07 25 102220 - Tutorial: Thermal Modeling in Zemax

 Figure 7: MCE window defining 4 temperature configurations

Screenshot 2023 07 25 102339 - Tutorial: Thermal Modeling in Zemax

    8. Zemax calculates the change in focal and tube length for all configurations except configuration #1 using Equation 1 and Equation 2. We wish Zemax to choose a spacer thickness in configuration #1 so that the spacer thicknesses calculated for the other 4 configurations yield the optimum RMS spot radius across temperature. Therefore, define the spacer thickness as a variable in the MCE editor, choosing Tools->Solves->Variable Toggle. The MCE should now match Figure 8. 9. Hit the “opt” button in the main window. Figure 

      9 shows that the lens-detector spacing in both the MCE and the LDE lengthens from the 196.96 mm spacing found in step 5 for the 20° C-only configuration.

Screenshot 2023 07 25 102559 - Tutorial: Thermal Modeling in Zemax

 Figure 9: LDE editor showing an optimized acrylic spacer distance of 197.09 mm across temperature.

      10. Use Reports->Report Graphic 6 to summarize performance across temperature as shown in Figure 10. Figure 11 shows the settings chosen for my report, with the scale for each plot set to 100 Screenshot 2023 07 25 102845 - Tutorial: Thermal Modeling in Zemax the pattern to dithered and the ray density to 12.

Untitled 23 - Tutorial: Thermal Modeling in Zemax

 Figure 10: System performance across temperature with an optimal thickness acrylic spacer

Screenshot 2023 07 25 103213 - Tutorial: Thermal Modeling in Zemax

 Figure 11: Settings for Report Graphic 6

Performance obviously suffers a great deal as temperature changes. We can compare the RMS radii given by Zemax in Figure 10 to the values predicted analytically using Equation 7; this is shown below.

Untitled 24 - Tutorial: Thermal Modeling in Zemax

 Figure 12: Analytical prediction vs Zemax estimate of RMS spotsize over temperature for completely acrylic system

The analytical and Zemax estimates have a similar curve shape, but are quantitatively significantly different. I do not advise using the analytical calculation to estimate spotsize. While the poor RMS spotsize performance is not surprising, we can hope to do better. Since Zemax has optimized the tube length, the single adjustable parameter left in the design is choice of tube material. In the next section we change the CTE of the spacer to match the optimum value of 267E-04 found in the analytical section.

Acrylic lens and Very High CTE Tube 15-45 C

        11. Replace the acrylic CTE of 60E-6 with the predicted optimum value of 267E-06 for surface 5 .
    12. Reoptimize the system and update performance report graphic. Figure 13, which reproduces this report, shows that Zemax’s estimated RMS spot radius is now essentially constant and less than the Airy radius over temperature.
Untitled 25 - Tutorial: Thermal Modeling in Zemax

 Figure 13: RMS spotsize over temperature for the optimal CTE value of 267E-06

A brief web search for high CTE materials did not find any materials with a CTE of 267 or more. However, lists several plastics with CTEs of 200+ , including polyethylene, a variety of acrylic listed as “extruded” and ethylene ethyl acrylate. At the worst-matched CTE of 200, the Zemax analysis yields an RMS radius ranging from 5-19 microns for the 5 configurations investigated here, which is about 1-3X the size of a diffraction-limited spot. At this point, we have met the tutorial goal of showing how to use Zemax thermal analysis to guide design.


  1. Field Guide to Geometrical Optics, John Grievenkamp, 2004 
  3. Zemax User Manual, Chapter 19 “Thermal Analysis” 
  4. Zemax User Manual, Chapter 5 “Editors Menu: Multi-Configuration editor”
Click to rate this post!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top