Zemax OpticStudio glass catalogs store bulk optical material properties including refractive index, wavelength dispersion, internal transmittance, thermal, mechanical, and other data for each material in the catalog. This article describes the details and the structure of the Zemax AGF material catalog file format, to enable material manufacturers, suppliers, vendors and users to create new catalogs based on raw data.
Authored By Csilla Timar-Fulep
Zemax material catalog files
Zemax OpticStudio stores glass catalog data in two file formats, called the ANSI Glass Format (AGF) and the Binary Glass Format (BGF). The catalog data supplied with Zemax OpticStudio is in the AGF format, and AGF files may be used when material data needs to be modified or added by the manufacturer or user. When Zemax OpticStudio runs, AGF files are automatically converted, if required, to BGF files. The BGF files are only used by Zemax OpticStudio to speed up the loading of the glass catalogs, and should never be manually created, edited, or distributed. The AGF file is the master file used to define glass catalog data.
AGF file format definition
The AGF (ANSI Glass Format) file is a human-readable text file, so one can use any plain text editor such as Notepad or Notepad++ to write or modify these files. The structure of the file consists of a header line followed by a series of records, one for each glass. The header line format is as follows:
CC <Catalog Comment>
!Standard glass: write your definition of standard status
!Special glass: write your definition of special status
!Obsolete glass: write your definition of obsolete statusThe mnemonic CC stands for Catalog Comment, and any comment string up to 140 characters may be placed here to define a comment for the whole catalog. The lines starting with ! are optional and will not appear in the Materials Catalog in Zemax OpticStudio. These lines can be used to explain the classification between the different status of materials. Each subsequent record consists of a two-letter mnemonic followed by one or more data items separated by spaces. The format of a single record is the following:
NM <glass name> <dispersion formula #> <MIL#> <N(d)> <V(d)> <Exclude Sub> <status> <melt freq>
GC <Individual Glass Comment>
ED <TCE (-30 to 70)> <TCE (100 to 300)> <density> <dPgF> <Ignore Thermal Exp>
CD <dispersion coefficients 1 - 10>
TD <D0> <D1> <D2> <E0> <E1> <Ltk> <Temp>
MD <E> <nu> <HK> <cp> <k>
OD <rel cost> <CR> <FR> <SR> <AR> <PR>
LD <min lambda> <max lambda>
IT <lambda> <transmission> <thickness>
IT <lambda> <transmission> <thickness>
... multiple IT lines may follow
BD <lambda> <K> <-K11> <-K12>Then, comments on the individual fields follow. Let’s take a closer look at the two-letter mnemonics and the structure of the data items they refer to.
NM: Name of the glass record and other general overview data. The syntax is:
NM <glass name> <dispersion formula #> <MIL#> <N(d)> <V(d)> <Exclude Sub> <status> <melt freq>- The glass name specifies the name of the material within the catalog as used in Zemax OpticStudio.
- The dispersion formula number controls which dispersion formula is used for the calculations. The value is 1 for Schott, 2 for Sellmeier 1, 3 for Herzberger, 4 for Sellmeier 2, 5 for Conrady, 6 for Sellmeier 3, 7 for Handbook of Optics 1, 8 for Handbook of Optics 2, 9 for Sellmeier 4, 10 for Extended, 11 for Sellmeier 5, 12 for Extended 2 and 13 for Extended 3. If this setting is changed, then the dispersion data becomes invalid unless the appropriate coefficients are also entered.
- The MIL number is provided for backward compatibility and is not used anymore, but a placeholder value must be provided.
- The N(d) and V(d) values, i.e. the refractive index and the Abbe number at the d-line (587.5618 nm), are also provided for reference, but are not used.
- The Exclude Substitution binary flag is 0 for no and 1 for yes. If 1/yes, then this glass will not be selected during global optimization, conversion from model to real glasses, or be considered by the RGLA optimization operand.
- The status indicates the general availability of the glass. The setting is 0 for Standard, 1 for Preferred, 2 for Obsolete, 3 for Special, and 4 for Melt. The status values are generally specified by the manufacturer. Standard glasses are generally available for purchase. Preferred glasses are usually frequently melted glasses, and more likely to be available upon demand. Obsolete glasses are no longer manufactured, but may be available. Special is a general category used to indicate a glass that does not fall into one of the other categories. Melt is a flag used by Zemax OpticStudio to indicate glasses that have been created in the catalog by the melt fit feature. The status classification may differ slightly between vendors. The vendor-specific definitions for material status can also be described as header comments for the AGF file.
- Melt Freq is an integer between 1 and 5 to indicate the relative frequency of melting by the manufacturer. The convention used is 1 means the glass is melted very frequently, 2 means less frequently, etc. up to a value of 5 to indicate a very infrequently melted glass.
GC: Glass comment. This is an optional comment specific to the individual glass, and any text string up to 140 characters long may be placed here.
ED: Extra Data. The syntax is:
ED <TCE (-30 to 70)> <TCE (100 to 300)> <density> <dPgF> <Ignore Thermal Exp>- The two TCE values are the Thermal Coefficients of Expansion. These are dimensionless parameters, and the values displayed or entered need to be multiplied by 1e-6 to yield the actual values. Zemax OpticStudio uses the first TCE value to model linear thermal expansion independent of the temperature range being used. The catalog values supplied by the glass vendors are usually the TCE for the temperature range from -30 to +70 degrees Celsius, but OpticStudio will use the first TCE value for any temperature range. The second TCE value is usually in the 100 to 300 degree Celsius range, but this value is currently not used by Zemax OpticStudio. Further details about how to model thermal effects are discussed in this knowledgebase article:
How to model thermal effects using OpticStudio - The density is the material density in grams per cubic centimeter.
- The dPgF value is the deviation of the relative partial dispersion from the normal line. Further details about the dPgF deviation of the relative partial dispersion and its calculation can be found in this knowledgebase article:
How to use the Model Glass - The Ignore Thermal Expansion flag allows accurate thermal modelling of non-solid materials, such as gases and liquids, by allowing direct specification of the thermal coefficient of expansion in the Lens Data Editor rather than in the glass catalog. In this case, only the edge effects are considered; the radius of curvature and other thermal pickup solves will all use the adjacent material TCE, rather than the gas or liquid TCE. The binary switch is 0 for no and 1 for yes.
CD: Coefficient Data, which refers to the dispersion coefficients. Up to 10 coefficients may be provided. The displayed names and meaning of these coefficients depend upon the dispersion formula used.
TD: Thermal Data. The syntax is:
TD <D0> <D1> <D2> <E0> <E1> <Ltk> <Temp>These are the D0, D1, D2, E0, E1, and Ltk thermal coefficients, and the reference temperature value used by the thermal analysis model. The reference temperature is in degrees Celsius, and this is the temperature of the air to which the relative wavelength and index data is referenced. This is usually the temperature of the glass at which the data was measured, but not always. More details about the reference temperature and how the thermal data is used in index calculations can be found in these knowledgebase articles:
What is the "reference temperature" of a material?
How to fit temperature-dependent index data to the OpticStudio thermal model
MD: Mechanical Data to facilitate multi-physics application workflows. The syntax is:
MD <E> <nu> <HK> <cp> <k>- E is the Young’s Modulus in GPa (10³ N/mm²)
- The nu value describes the Poisson's Ratio.
- HK stands for the Knoop Hardness in kgf/mm².
- The cp value determines the Specific Heat Capacity in J/kgK.
- K denotes the Heat Conductivity in W/mK.
OD: Other Data, consisting of glass codes that indicate how resistant the material is to various environmental effects. The syntax is:
OD <rel cost> <CR> <FR> <SR> <AR> <PR>- The relative cost number is intended to indicate the approximate relative cost of the glass as compared to BK7. For example, a value of 3.5 would indicate the glass costs about 3.5 times as much as BK7 per pound. The number is only intended as a rough guide, and if data is not available -1 should be specified in the file. The exact glass cost may vary with the quality, amount, form, and availability of the glass being purchased. Users should contact the glass vendor for more information.
- The CR, FR, SR, AR, and PR codes correspond to Climate Resistance (CR), Stain Resistance (FR), Acid Resistance (SR), Alkali Resistance (AR), and Phosphate Resistance (PR). For these values, -1 should be specified if the data is not available. Otherwise, generally, the lower the number the more durable the glass is. That said, for a complete description of these codes and the test conditions used to measure them, users should contact the glass vendor.
LD: Lambda Data. The minimum and maximum wavelength in micrometers over which the dispersion formula is valid.
IT: Internal Transmittance. These lines describe the internal transmittance of the material for a given thickness as the function of the wavelength. Multiple IT lines can follow. The syntax is:
IT <lambda> <transmission> <thickness>- Each line defines a wavelength, the transmission value, and the corresponding thickness in millimeters. The wavelengths must be in ascending order, and up to 100 points may be defined for each glass record.
BD: Stress Birefringence Data, holding the Stress Optical Coefficients. Multiple BD lines may follow. The syntax is:
BD <lambda> <K> <-K11> <-K12>- Each line defines the wavelength lambda in µm, the Stress Optical Coefficient K = K11-K12 (unit 10-6 mm²/N), the photoelastic coefficient for light oscillating parallel to the direction of stress -K11, and the photoelastic coefficient for light oscillating perpendicular to the direction of stress -K12 (unit 10-6 mm²/N).
- More details about the Stress Optical Coefficients and how these values are used to calculate Stress Birefringence in Zemax OpticStudio STAR can be found in these articles:
Introduction to STAR Stress Birefringence
Stress Birefringence Analysis in Optical Design Utilizing FEA Data with OpticStudio STAR
As an example, the format for one material record is shown in the following picture.
Further information about how to use, edit and visualize the above discussed glass data directly in Zemax OpticStudio is available in these articles:
Fitting index data in OpticStudio
How to add new materials and glasses in OpticStudio
Conclusion
This article provides a detailed description of the structure and syntax of the Zemax AGF glass catalog file format, to facilitate sharing and maintaining material information based on raw data from manufacturers, through suppliers and vendors, to users in a format directly compatible with Zemax OpticStudio.