Soon, we will launch a new and updated customer portal, which is an important step toward providing our customers with one place to learn, interact, and get help.
Learn more.

How to Fit Temperature-Dependent Index Data to the Zemax Thermal Model

This article explains how to fit the observed temperature variation of discrete (e.g. experimental) refractive index data to the Zemax thermal model.
 
Sanjay Gangadhara
10/30/2008
Thermal Analysis

Introduction

Manufacturers will often provide discrete refractive index data for a glass, i.e. index as a function of wavelength and temperature. This data may be used to define a new glass in Zemax.

If the refractive index of the glass exhibits no temperature variation, the (n,l) data can be used to define a new glass in 1 of 2 ways: either by inputting the data into a glass catalog using the Glass Fitting Tool – as described in the Knowledge Base article “Fitting Index Data in Zemax” – or by using the data to define a Table Glass, as described in the Knowledge Base article “How To Enter Glass Data at Specific Wavelengths.”

If the index data exhibit temperature variation, this can be addressed in Zemax using a multi-configuration system, as described in the Knowledge Base article “How to Model Thermal Effects using Zemax”. If separate Table Glass files can be used to describe the dispersion of the material at each temperature, the thermal variation of the glass can be modeled in Zemax by specifying the appropriate file in each configuration.

However, if the wavelength variation of the data is to be described by one of the Zemax dispersion models, the data must also be fit to the thermal model employed by Zemax. This can be also done using the Zemax Glass Fitting Tool, located under Tools > Catalogs > Glass Fitting.


How to convert input data into relative values

To demonstrate how measured index data may be fit to the Zemax thermal model, we’ll look at an example of data measured with CHARMS measurement system, which has been developed at NASA’s Goddard Space Flight Center. The data that we will look at are for silicon, and can be obtained from an article entitled “Temperature-dependent refractive index of silicon and germanium”.1  Data at selected values of wavelength and temperature are provided in Table 2 of this article:

Absolute index data for Si

As described earlier in the article, the values presented in this table are generated by fitting data measured by the CHARMS system to a model referred to by the authors as the “Temperature-dependent Sellmeier model”. To demonstrate the use of the Zemax thermal fitting tools, we will fit the wavelength dependence of this fitted data (i.e. the data presented in the above table) to the Sellmeier 1 formula (as described in the chapter of the manual entitled “Using Glass Catalogs”) and the temperature dependence to the standard Zemax thermal model.

It is important to note that each of the dispersion formulas in Zemax describes the variation of the relative index of refraction with wavelength. The relative index is simply the index of refraction of the glass normalized to the index of refraction of air. The Zemax dispersion formulas describe the relative index at a reference pressure (P0) of 1 atmosphere (= 101,325 Pa) and at the reference temperature of the glass (T0). This can be calculated from input data for the relative index that is provided at arbitrary pressure (P) and temperature (T) using the following formulas:

nrel(P,T,l) = ninput(P,T,l)*nair(P,T,l)

nrel(P0,T0,l) = nrel(P,T,l)/nair(P0,T0,l) 

= ninput(P,T,l)*nair(P,T,l)/nair(P0,T0,l) 
where l is the wavelength. The index of air may be determined using:


Formulas used to calculate the index of air at arbitrary temperature and pressure

Details regarding the calculation of nair are provided in the chapter of the Zemax manual entitled “Thermal Analysis”. When using these two formulas to convert ninput(P,T,l) values into nrel(P0,T0,l) values, T is the measured temperature (in degrees C), P is the measured air pressure (in atmospheres), and l is the input wavelength in microns at the reference temperature (T0) and the measured pressure (P). This is the case because Zemax assumes that all inputted index data are relative to air at the measured temperature and pressure, and that all inputted wavelength values are referenced to T=T0.

The dispersion formulas also require values for the wavelength that are relative to air at atmospheric pressure. Wavelength data inputted at an arbitrary pressure P can be converted to relative wavelengths using a formula which is similar to the one used to convert inputted index data:

lrel(P0,T0) = linput(P,T0)*nair(P,T0,l)/nair(P0,T0,l)

As an example, let’s take a look at the silicon data provided in the above table. This table lists values for the absolute index of refraction at a series of wavelengths and temperatures. Since the index data are absolute, P=0. In this case nair(P,T,l) = 1.0 for all wavelengths and temperatures, since the index of refraction of vacuum is always unity.

We now need to choose a reference temperature. In this case, it makes most sense to select 295 K = 21.85 degrees C as the reference temperature, since this temperature is closest to the standard value of T0 (20 degrees C) used for most other glasses in the Zemax glass catalogs. The index of refraction of air at this temperature and at atmospheric pressure may be determined using the formula for nair provided above.

Over a wavelength range of 1.1-5.5 microns, as provided in the above table, the parameter nref varies from 1.00027265 to 1.00027388. At a reference temperature of 21.85 degrees C, the resultant variation in nair for this same wavelength range is 1.00026630 to 1.00026750. The values of nair(P0,T0,l) can be calculated for each wavelength in the table, allowing the inputted index and wavelength data to be converted into relative index values and wavelengths. In this case the conversion is simplified by the fact that nair(P,T,l) = 1.0 for all wavelengths and temperatures. However, Zemax also handles the general case – i.e. when P is not equal to zero – by calculating values for nair(P,T,l) at all wavelengths and temperatures and including these values in the conversion, as described by the above equations. The relative index and wavelength data can then be accurately fit to the standard Zemax thermal model and the Zemax dispersion model of choice.


Fitting the relative index data

Once the inputted data have been converted to relative values at the reference temperature and pressure, this data is ready to be fit. The wavelength variation of the data at the reference temperature is first fit to one of the following Zemax dispersion models: Schott, Herzberger, Conrady, or Sellmeier 1. For the case of the silicon data provided in the previous section, we choose the Sellmeier 1 formula:
Sellmeier 1 dispersion formula
The standard algorithms used in Zemax for optimization are also used to determine the best-fit dispersion coefficients (K1, K2, …) for the reference temperature data. Data at other temperatures are then fit to the Zemax thermal model, which describes the variation of the absolute index of a glass with temperature:

The Zemax thermal model

In this formula n is the relative index at the reference temperature and pressure, and DT is the change in temperature relative to the reference temperature. Values for n are taken directly from the fits to the Sellmeier 1 formula (or in general, the dispersion model of choice) obtained for data at the reference temperature. The standard optimization algorithms used by Zemax are then used to determine the best-fit thermal coefficients (D0, D1, …) for the data.

Fits to the dispersion and thermal models are performed using the Glass Fitting Tool, located under Tools > Catalogs > Glass Fitting. Input data are provided to this tool via an ASCII text file, which must have the following format:
PRESSURE P

T0  l10  n10

T0  l20  n20

.

.

.

T0  lf0  nf0

T1  l11  n11

T1  l21  n21

.

.

.

T1  lf1  nf1

T2  l12  n12

.

.

.

Tf  lff  nff


where “f” stands for “final” (i.e. the last data set). For example, for the silicon data provided in the previous section, the table would look like:
PRESSURE 0.0

21.85  1.1  3.54394

21.85  1.2  3.52253

21.85  1.3  3.50616

21.85  1.4  3.49335

21.85  1.5  3.48314

21.85  2.0  3.45352

21.85  2.5  3.44011

21.85  3.0  3.43293

21.85  3.5  3.42864

21.85  4.0  3.42589

21.85  4.5  3.42404

21.85  5.0  3.42274

21.85  5.5  3.42180

-243.15  1.1  3.51113

-243.15  1.2  3.49071

-243.15  1.3  3.47508

-243.15  1.4  3.46285

-243.15  1.5  3.45309

-243.15  2.0  3.42478

-243.15  2.5  3.41196

-243.15  3.0  3.40509

-243.15  3.5  3.40100

-243.15  4.0  3.39837

-243.15  4.5  3.39661

-243.15  5.0  3.39537

-243.15  5.5  3.39449

-233.15  1.1  3.51123

.

.

.

-73.15  4.5  3.40982

-73.15  5.0  3.40855

-73.15  5.5  3.40765

-23.15  1.1  3.53555

-23.15  1.2  3.51437

-23.15  1.3  3.49818

-23.15  1.4  3.48551

-23.15  1.5  3.47540

-23.15  2.0  3.44609

-23.15  2.5  3.43283

-23.15  3.0  3.42572

-23.15  3.5  3.42148

-23.15  4.0  3.41877

-23.15  4.5  3.41694

-23.15  5.0  3.41566

-23.15  5.5  3.41474

where all of the temperatures have been converted to degrees C, and we have explicitly indicated that the data are for P = 0. The file containing this raw data is named SI.TID (all input data files used for thermal fitting must have the .TID extension, as described in the chapter of the Zemax manual entitled “Tools Menu”), and can be found in the .ZIP file located at the end of this article.

The Glass Fitting Tool is then used to fit this data to the Sellmeier 1 dispersion formula and the Zemax thermal model. A new glass corresponding to the fitted data may also be added to one of the existing user-defined glass catalogs (we do not allow new glasses to be added to any of the glass catalogs provided with the Zemax installation; those catalogs get overwritten every time a new version of Zemax is installed, and thus any user-defined glasses added to these catalogs would be deleted during each upgrade of Zemax!). For example, in this case a new glass named SI_THERMAL will be added to the SG_MISC catalog:

Inputs for the Glass Fitting Tool

A summary of the fit results is provided in a text window. These results may be saved to a file. The text file which is generated when fitting the data provided in SI.TID to the Sellmeier 1 dispersion formula and the standard Zemax thermal model is also included in the .ZIP file located at the end of this article (Zemax_fit_Si_data.txt). The text output includes best fit values for the dispersion and thermal coefficients, the maximum and RMS errors associated with the fitting in each case, and a comparison between the original relative index data and the fitted value for each input point:

Summary of fit results from Glass Fitting Tool

As indicated in the file, the original index and wavelength values are converted to relative index and wavelength values for a reference temperature of 21.85 degrees and a reference pressure of 1.0 atmosphere. This conversion uses the formulas provided in the previous section. For example, for a wavelength of 1.1 microns, the refractive index of air at 21.85 degrees C and 1 atmosphere is 1.00026750. The relative index values at this wavelength are then calculated by dividing the original index data by 1.00026750 (in general you would also need to multiply by the refractive index of air at the measured temperature and pressure, but since the pressure is zero the corresponding refractive index is always 1.0). The relative wavelength is calculated by dividing the original value by 1.00026750, i.e. lrel = 1.1/1.00026750 = 1.09970583. Note that this value matches the value shown in the text output to within numerical round-off, as expected.

The results indicate a very good fit of the reference temperature data to the Sellmeier 1 dispersion formula, with an RMS error of 2.5E-06 and a maximum error of 4.3E-06. The results also show that a good fit of the data to the Zemax thermal model has been obtained; the RMS error in this case is 2.9E-05, and the maximum error is 9.0E-05. The small values for the fit errors indicate that the Zemax thermal model plus the Sellmeier 1 dispersion model provide an accurate description of the input data in this case.


Confirming the fit results

Once the fit is performed, the resulting dispersion and thermal coefficients can be used to define a new glass. For example, for the case described in the previous section the glass SI_THERMAL was added to the glass catalog SG_MISC.AGF. Using the Glass Catalog tool, we see that all of the coefficient and wavelength information has been transferred to this glass, as has data for the reference temperature and the valid wavelength range:

Data for the new glass that was added to the user-defined catalog

As indicated in the previous section, all data in the glass catalogs are referenced to atmospheric pressure (P0 = 1 atm). Thus, the minimum and maximum wavelengths represent values for the relative wavelengths rather than the inputted wavelengths.

This glass may now be used in any Zemax lens design of interest. We can verify that the coefficients specified for the glass are correct by setting up a simple system which uses this glass at a pressure, temperature and wavelength corresponding to one of the input data values. For example, image a simple system with three surfaces in which the glass is placed on surface 1:




For this system, the wavelength is set to 1.1 microns:

Wavelength for testing new glass

and the system temperature and pressure are set to -243.15 degrees C and 0 atmospheres, respectively:

System environment for testing new glass

The “Adjust Index Data To Environment” button must be checked if the system pressure and temperature are to be used in calculating the index of refraction. We can determine the index at this surface using the Prescription Data Report:

Prescription Data report settings for index data

The reported value for the index is 3.51104019:

Index value reported in PDR for 0 atm

This value is within 9.0E-05 of the inputted index value (3.51113) for this temperature and wavelength. This temperature and wavelength represent the data point with the maximum fit error – as we can see in the fitting text output file Zemax_fit_Si_data.txt – so we would expect the difference between the Zemax result and the inputted data point to equal the maximum fit error, as it does. If we were to change the temperature and/or wavelength, we would find in all cases that the Zemax result would differ from the corresponding input value by an amount equal to the Delta value provided in the fitting text output file.

To test the calculations at a system pressure other than vacuum (e.g. at a pressure of 1 atmospheres), a bit more setup is required. When calculating the index values in vacuum, it does not matter what the surface temperature is relative to the system temperature – the data are always absolute. However, if the system pressure is non-zero, the surface and system temperatures need to be carefully specified, to ensure that the correct values for the relative index are calculated. This can be done using the Multi-Configuration Editor. For our simple system, we add 3 lines to the editor, as shown here:

MCE setup for testing new glass at 1 atm

The first line sets the temperature to -243.15 degrees C for all operands which follow this line in the editor. In this case only one GLSS operand follows this line, and it corresponds to the surface on which the glass has been placed. Therefore, this surface will have a temperature of -243.15 degrees C. All other surfaces in the system will be at the system temperature, which is set to be 21.85 degrees C (i.e. the reference temperature of the glass) in the third line of the editor (in general, the last TEMP operand in the Multi-Configuration Editor will always set the system temperature).

To calculate the index in this case, the system wavelength also needs to be converted from absolute to relative. Based on the formulas provided earlier in this article, we find that the relative wavelength at 1 atmosphere – the system pressure we will use for this test – corresponding to a vacuum wavelength of 1.1 microns is 1.09970583 microns. The value of the index at this wavelength and a temperature of -243.15 degrees C, for a system temperature of 21.85 degrees, may again be found in the Prescription Data Report:

Index value reported in PDR for 1 atm

The value reported by Zemax agrees with the value provided under the Fit column in the fitting text output file to within round-off error (4.0E-09 in this case). This is found to be the case for all values of temperature and wavelength provided in the input data file.
The results generated at system pressures of 0 and 1 atmosphere confirm that the dispersion and thermal coefficients obtained from the Glass Fitting Tool can be used to accurately model the glass in Zemax.

Summary

Temperature-dependent refractive index data may be fit to the Zemax thermal model using the Glass Fitting Tool. As there are a significant number of free parameters available to the user (six coefficients are available in the model), accurate fits to the data are generally obtained.


References

1Bradley J. Frey, Douglas B. Leviton, and Timothy J. Madison, Optomechanical Technologies for Astronomy, Proc. of SPIE, Vol. 6273, p. 62732J-1.