In the Essential Macleod, the Formula tool is used to generate designs with regular features. Some designs have more complex features that cannot be expressed by using Formula, such as chirped reflectors. For these designs, the Generate Design tool can be used to generate the layers in the design.
A Generate Design definition consists of default layer parameters represented by single letter symbols, the number of layers in the design and a Formula that specifies the parameters of each layer as a function of layer number.
The Formula is used to enter a set of statements that specify how the layer parameters vary through the set of layers. The formula consists of one or more statements. Each statement consists of an optional Condition, and an Assignment. A Condition is specified by an Expression followed by a colon (“:”) An Assignment is a Variable name followed by an equal sign (“=”) followed by an Expression and ends with a semi-colon (“;”). Any text after an exclamation point (“!”) is ignored up to the end of the line.
When a design is being generated, the statements in the Formula are executed in order from top to bottom. If a statement has a Condition, then the Assignment is only executed if the value of the Expression in the Condition is not zero. If the statement does not have a Condition, then the Assignment is always executed. The Assignment calculates the value of the Expression and stores the value in the Assignment Variable. Variables are
automatically created if they do not already exist. There are several special variables:
L The current layer number. This variable cannot be
modified. The first layer is numbered 1 and the last layer has the value N.
N The number of layers as entered in the Number of
Layers box. This variable cannot be modified.
OpticalThickness The total optical thickness of the design excluding the current layer. This variable cannot be modified.
PhysicalThickness The total optical thickness of the design excluding the current layer. This variable cannot be modified.
LayerOpticalThickness The optical thickness of the current layer.
LayerPhysicalThickness The physical thickness of the current layer.
LayerLocked The lock state of the current layer. A value of 0 means the layer is not locked. A value of –1 means the layer is locked.
LayerLink The link number of the current layer.
LayerPackingDensity The Packing Density of the current layer.
LayerVoidDensity The Void Density of the current layer.
LayerN The refractive index of the current layer. This variable cannot be modified.
LayerK The extinction coefficient of the current layer. This variable cannot be modified.
MaterialN The refractive index of the current layer material. This variable cannot be modified.
MaterialK The extinction coefficient of the current layer material.
This variable cannot be modified.
VoidMaterialN The refractive index of the current layer void material.
This variable cannot be modified.
VoidMaterialK The extinction coefficient of the current layer void material. This variable cannot be modified.
Layer This is used to initialize the parameters of the layer. It should be used before any layer parameters are modified.
Thickness Cumulative Thickness to center of current layer: (L-1)
* LayerThickness + LayerThickness / 2. This variable cannot be modified.
ReferenceWavelength Reference Wavelength as entered in the Reference Wavelength box. This variable cannot be modified.
PackingDensity The Packing Density of the current layer. After all the statements have been executed, the current layer’s packing density will be the value of this variable. This variable can be modified.
InhomogeneityFactor The Inhomogeneity Factor of the current layer. After all the statements have been executed, the current
inhomogeneity factor will be the value of this variable.
This variable can be modified.
MinimumPhysicalThickness The Minimum Physical Thickness for the current layer.
After all the statements have been executed, the current layer’s minimum physical thickness will be the value of this variable. This variable can be modified.
MaximumPhysicalThickness The Maximum Physical Thickness for the current layer.
After all the statements have been executed, the current layer’s maximum physical thickness will be the value of this variable. This variable can be modified.
MinimumOpticalThickness The Minimum Optical Thickness for the current layer.
After all the statements have been executed, the current layer’s minimum optical thickness will be the value of this variable. This variable can be modified.
MaximumOpticalThickness The Maximum Optical Thickness for the current layer.
After all the statements have been executed, the current layer’s maximum optical thickness will be the value of this variable. This variable can be modified.
The following operators are supported in Expressions:
() sub-expressions
>, >=, <, <=, <> logical comparison
&, | logical "and", logical "or"
An operator that is listed on a line above another operator has a higher precedence.
The following functions are also supported (they are not case sensitive): Abs, Sin, Cos,
Tan, ACos, ASin, Atn, Log, Log10, Exp, Sqr, Int, Frac, Ceil, and Floor. Trigonometric functions accept and return angles expressed in radians or degrees, depending on the setting of Angle Units.
For each layer generated, the formula must perform a layer initialization as follows:
Layer = <symbol>
Where symbol is a defined symbol in the table shown at the top of the form.
For example, the formula:
Odd = ((L % 2) =1);
Even = ((L % 2) = 0);
Odd: Layer = L;
Even: Layer = H;
will generate an design of alternating H and L layers with no modifications to the layer parameters.
Click on Preview (Optical) to generate an index profile plot of the design as a function of optical thickness. Click on Preview (Physical) to generate an index profile plot of the design as a function of physical thickness. These commands allow you to verify that the correct structure has been generated. The design can be made available in two ways: Clicking on Generate will put the layers of the design onto the clipboard.
These layers can be pasted into any design in the normal way. Clicking on Replace Design will cause the current design’s layers to be completely replaced with the layers of the formula. Selecting a variable name in the Formula and then clicking on Plot Value (Optical) or Plot Value (Physical) will display a plot showing the value of the variable as a function of optical thickness or physical thickness respectively. This is useful for making sure that the variable’s value is set correctly during design generation.
This example shows the implementation of an amplitude thickness modulated design presented in Chapter 3 of “Thin Film Design Modulated Thickness and Other Stopband Design Methods by Bruce E. Perilloux ISBN: 0-8194-4525-8 Pub SPIE Press 2002. The function for modulating the thickness is given as:
𝑇(𝐿) = 𝑇𝐴𝑉𝐺[1 + 𝑘′sin(2𝜋𝑓1𝐿) cos(2𝜋𝑓𝐿)]
In the Generate Design tool, this function appears as:
Pi = 3.1415926;
The first four lines define constants for the formula. The next two lines specify that the design is made from alternating layers of H and L material. H material is used on the odd numbered layers and L material is used on the even numbered layers. The final line performs the modulation function. The optical thickness of the layer is modified by the modulation function.
A 50 layer design using Ta2O5 for the H material and SiO2 for the L Material, with the optical thickness in the table set at 0.25 at a reference wavelength of 1000nm produces the following reflectance performance:
Contexts
Contexts are used to specify the behavior of Agile Materials. An Agile Material is a material whose optical constants depend upon the Context. An Agile Material has a name and for each Context, a material name. When a calculation is performed using a particular Context, the optical constants of the agile material are those of the corresponding material in the Context.
Contexts are used during performance calculation and during refinement. Using Contexts, it possible to refine designs for production on multiple substrates, refine designs for production using a range of different real materials. This includes producing a single design for manufacture in coating plants that produce different optical constants for the same raw material.
The design above is an antireflection coating that has been optimized for Glass and Silica substrates. This Design has one agile material: Substrate. To see the specifications for Substrate, click on the Context tab.
The Context that is shown is the Normal context. In this Context, the Agile Material Substrate has the optical constants of the material Glass. You can use the dropdown arrow to select a different Context.
In the Context named Alternative, the Agile Material Substrate has the optical constants of the Material SiO2. By specifying different contexts, the properties of the coating on Glass and on SiO2 can be calculated. The performance parameters dialog (Parameters menu -> Performance) allows you to specify a Context when calculating performance, so, for example, you can display the performance of the coating on both substrates on a single plot.
A Context can also be specified for each target in a refinement specification. To show the Context, select Display Setup from the File menu when the Targets window is active.
Select the Context item and then click on Close. You can now set the Context for each target.
A Design always has one Context. When a design is created, this Context is named Normal. You can add Contexts to a design by clicking on the Add button in the Context tab. Enter the name of the new Context in the dialog that appears and click on OK. Agile Materials are entered by typing the desired name in the Agile Material column. The optical constants to be used for the displayed Context are selected by choosing from the drop list in the Material column. There is no restriction to the number of Agile Materials that may be defined in a design.
In the Design editor, the Agile Materials are displayed at the top of the materials list.
The displayed optical constants are those of the first Context. Contexts are only used in the Design editor. In the rest of the Essential Macleod where a design file is used, the first Context is used to specify the optical constants of the Agile Materials., the other Contexts are not used.