This article demonstrates the thermal modeling capabilities available both in the EE and SE versions of ZEMAX. The sample files can be donwloaded from the last page of this article.
The thermal modeling capabilities in ZEMAX can model changes in refractive indices due to temperature changes and also the expansion/contraction of components. In this article, we will model thermal effects in three different systems; a simple system with flat windows, for the sample Cooke Triplet design and a cemented doublet.
Open the included sample file "thermal_flat_glass.zmx" 
In this particular example, the beam is perfectly collimated and the optics flat so that the change in temperature only affects the size of the components and not the beam quality. At nominal temperature, the thicknesses and the semi-diameters of the windows are 100mm and the distance between the two windows 200. Let's suppose that we want to see how the window size changes going from 20 degree Celsius to 500 degrees. The maximum temperature is of course unrealistic but it will allow us to visually observe the changes in the layout. 
The thermal coefficients of expansion (TCE) of the air space between the two glass windows is set to 23 parts per million (ppm) which is approximately that of aluminum. For air spaces, ZEMAX assumes that the spacers are infinitesimally thin cylindrical shells. The semi-diameter of the spacer at the reference temperature is the semi-diameter of the air surface specified in the Lens Data Editor. The spacer expands longitudinally in the Z direction as well as in the radial direction of the XY plane. In this example the radial expansion of the spacer has no effect on the center distance between the windows since they are flat.
Note that in general, the radial expansion of the spacer does affect the center thickness between 2 surfaces since the radial height of contact between the spacer and the lens changes.
The TCE of the glass is specified in the glass catalog. 
To perform thermal modeling, we need to specify the parameters that are affected by the temperature in the Multi Configuration Editor (MCE) and use the thermal pick up solve to scale these parameters. To model the thermal effects, follow these steps:
Open the MCE.
All parameters affected by temperature change should be listed in the MCE. The first configuration is at 20 degrees Celsius and the seconds at 500.
Place Thermal Pickup solves on all the parameters in the second configuration, picking up from the first configuration which is the system at a reference temperature of 20 degrees C. 
This means that the values of these parameters are computed by ZEMAX's built-in thermal scaling calculations.

Notice how the parameter values in the second configuration are automatically calculated by ZEMAX, according to the temperature assigned to that configuration.
Update the 3D layout to show both configurations. The top-half of plot in the layout below is the configuration at higher temperature. 
You can clearly see the effect of the thermal expansion on the location of the second window. You can also notice in the multi-configuration editor the change in window thickness and semi-diameter values.
Now, let's say that only surfaces 3 and 4 in the second configuration are at 1000 degrees. You need to insert another TEMP operand so that those surfaces are at different temperature than operands under the first TEMP operand.
Insert a second TEMP operand after all the operands that belongs to surfaces 1 and 2 and set the values to 20 for configuration 1 and 1000 for configuration 2. 
Notice how the thickness of surface 3 is larger than surface 2 in the second configuration.
We will model the thermal effect using the Cooke Triplet sample file. Open {zemaxroot}/Samples/Sequential/Objectives/Cooke 40 degree field.zmx
This sample ifle has a marginal ray angle solve on surface #6 radius parameter, which automatically changes the curvature to satisfy the specified marginal ray angle; it should be removed before performing thermal analysis.
Before doing any thermal modeling, make sure that the "Adjust Index Data To Environment" option under System > General > Environment is checked. If not, the index of glasses will not change as function of temperature, even if the coefficients for the thermal equation are provided in the glass catalog. 
Instead of manually inserting all necessary operands in the MCE we will use a tool built-in to ZEMAX that inserts all parameters in the MCE.
Open the MCE and click Tools > Make Thermal.
Beside the nominal temperature (configuration 1) we will add configurations at -20 and +40 degrees C for total of 3 configurations. Enter the following values in the tool window. 
Click OK and the MCE should look like this.
Toggle between the configurations (CTRL-A) and observe the analysis windows display the effect of temperature change.




