# How OpticStudio calculates refractive index at arbitrary temperatures and pressures

There are two common methods for referencing refractive index measurements: absolute and relative. This article explains how OpticStudio calculates the refractive index of a material for a given wavelength, temperature, and pressure.

## Introduction

There are two common methods for referencing refractive index measurements: absolute and relative. Absolute measurements are made using vacuum as the reference material, and relative measurements use air as the reference - normally at Standard Temperature & Pressure (STP), which is 20 degrees C and 1 Atm. Further, wavelengths are also measured in a specified medium: the vacuum wavelength of the red He:Ne laser line, for example, is 0.632991 m in vacuum and 0.632816 in air.

In this article, we will discuss the formulas that OpticStudio uses to calculate the index of refraction. We will also provide a quick example of those formulas in action.

## System settings

In OpticStudio, we define a "System" Temperature and Pressure for each optical design under the System Explorer...Environment: There are two important points to note:

• Wavelengths are always defined as being measured in 'air' at the System Temperature & Pressure. Therefore, if the System Pressure is zero, wavelengths entered in the Wavelength dialog box are vacuum wavelengths, and if the pressure is 1 (or any number other than zero) then wavelengths are measured in 'air' at that temperature and pressure
• When the 'glass' column of a surface is left blank, it is assumed to be 'air', and the refractive index of 'air' is always exactly 1 at all wavelengths.

We write 'air' in quotation marks, because it is air at the System Temperature and Pressure. If the pressure is zero, then 'air' is a vacuum! In the rest of this article we will drop the emphasis for simplicity.

Note that the surfaces in a design can be at different temperatures and pressure than the System values. There are no restrictions on the temperature or pressure a particular surface can be at.

Most lens designs in OpticStudio utilize glasses which are found in a glass catalog file (e.g. N-BK7 from the SCHOTT.AGF catalog file). The index of refraction of such a glass at any given wavelength is determined using the appropriate dispersion formula and the corresponding dispersion coefficients for the glass. However, these coefficients provide values for the refractive index relative to air at the reference temperature of the glass (T0) and at a reference pressure of 1 atmosphere (P0 = 1 atm). How does OpticStudio then calculate the index when the operating temperature (T) and pressure (P) of the glass differ from the reference values?

## Formulas for calculating the index

Values for the refractive index at arbitrary temperatures and pressures may be related to values of the index at the reference temperature and pressure through the absolute (vacuum referenced) refractive index of air (nair). Again, in OpticStudio the refractive index of air is always equal to 1.0 at the system temperature (Ts) and pressure (Ps).

The following formulas are used to calculate absolute values for nair at Ts and Ps, as well as at other temperatures and pressures such as T0 and P0 (the reference temperature and pressure): In these equations λ refers to the input wavelength (at the system temperature and pressure), P is the pressure in atmospheres, and T is the temperature in degrees C. More information about these formulas may be found in the OpticStudio Help System at The Setup Tab...System Group (the Setup Tab)...System Explorer...Environment...Index of Refraction Computation

To calculate index data at arbitrary T and P, we first calculate nair(P0,T0) and nair(Ps,Ts). Both of these quantities are calculated at the input wavelength. These values are then used to determine the “relative” wavelength, which is simply the input wavelength scaled to the reference temperature and pressure, using the formula: The relative index of refraction at the reference temperature and pressure is then calculated from the appropriate dispersion formula using the relative wavelength: where f represents the functional form of the appropriate dispersion formula and the vector c0 represents the dispersion coefficients for the glass. This relative index value is converted to an absolute index value using the formula: Since the relative index was calculated at the reference temperature and pressure, the absolute index is calculated using the absolute index of air at this same temperature and pressure. The absolute index of the glass at the glass temperature and “pressure” (= system pressure) is determined from: where Δnabs is calculated using the following formula: In the above formula, n is the relative index of the glass at the reference temperature and pressure, ΔT is the difference between the glass temperature and the reference temperature, λ is the relative wavelength (λrel as calculated above), and the variables D0, D1, … represent the thermal dispersion coefficients for the glass. Finally, the relative index at the glass temperature and pressure is obtained from: It is this value that OpticStudio uses for the refractive index of the glass during ray trace calculations.

## A simple example

From the formulas provided in the previous section, it is clear that when the system temperature and pressure equal the reference temperature and pressure that nair(Ps,Ts) = nair(P0,T0). If the glass temperature is also equal to the system temperature, then Δnabs = 0, yielding: as we would expect. Now let’s take a look at a slightly more complicated example. Let’s consider the case of BK7 glass at a temperature of 30 degrees C and a pressure of 2 atmospheres. In this example, we shall set the system temperature and pressure equal to the glass temperature and pressure, and the input wavelength will be 0.55 mm.

The reference temperature for BK7 glass is 20 degrees C, as provided in the Schott glass catalog: For T0 = 20 degrees C and P0 = 1 atmosphere, nair(P0,T0) = 1.00027308. For the given system temperature (30 degrees C) and pressure (2 atmospheres), nair(Ps,Ts) = 1.00052810 (this is the absolute index of the air, of course). Using these two values we calculate that the relative wavelength (i.e. the wavelength at 20 degrees C and 1 atmosphere) is 0.55014022 mm.

At this wavelength, the relative index of BK7 at the reference temperature and pressure is 1.51851533 (calculated from the Sellmeier 1 formula, using the wavelength dispersion coefficients K1, L1, … as provided in the glass catalog). The absolute index of BK7 at T0 and P0 is calculated by multiplying this relative index value by nair(P0,T0), yielding a value of 1.51893001.

The change in absolute index due to difference between the glass temperature and the reference temperature is calculated from the OpticStudio thermal model (as described in the previous section), using the thermal dispersion coefficients (D0, D1, …) provided in the glass catalog. For this case, we find that Δnabs = 0.00001547. Thus, the absolute index at the glass temperature and pressure is 1.51893001 + 0.00001547 = 1.51894548. The relative index at T and P is then calculated by dividing the absolute index by nair(Ps,Ts), yielding a value of 1.51814375. This final value agrees exactly with the value used in OpticStudio, as shown in the Prescription Report:

INDEX OF REFRACTION DATA:

• System Temperature: 30.0000 Celsius
• System Pressure: 2.0000 Atmospheres
• Absolute air index: 1.000528 at wavelength 0.550000 µm
• Index data is relative to air at the system temperature and pressure.
• Wavelengths are measured in air at the system temperature and pressure.
 Surf Glass Temp Pres 0.55 0 30.00 2.00 1 1 BK7 30.00 2.00 1.51814 2 30.00 2.00 1

KA-01466