The VCSEL Design Tool is currently in an early adopter stage. For more information, please contact us via the contact form, or via the Ansys Innovation Space.
Introduction
Graded optical alloys are often used in the fabrication of Vertical Cavity Surface Emitting Laser (VCSEL) devices. The Ansys Lumerical Multiphysics™ software allows for definition of these materials with custom refractive index via a scripting interface. This feature is only available to if the VCSEL Design Tool feature is enabled.
Graded optical alloys are added to the simulation in a similar way to all other materials and can be assigned to a reference geometric object in the same way as other materials. The spatial dependency of mole fraction can then be assigned in the same way as electronic and thermal alloys.
This article will outline the procedures and caveats of adding a graded optical alloy with a custom refractive index function. For more information on setting the spatial distribution of the alloy mole fraction, see the Knowledge Base article Setting the alloy mole fraction. For more information on assigning materials to geometries, see the Knowledge Base article on Simulation Workflow Overview.
Creating a Scripted Material
Graded optical alloys are defined as scripted materials, to create a new scripted material, follow the instructions below.
- Open the Optical Materials Database by clicking on the “Optical” button in the “Design” Tab.
- Click on the dropdown menu near the top right of the window, and find “Script”.
- Click on the material type script, and a new material is added to the Optical Material Database.
Note: This material will not be saved until you save it by assigning it a name and adding it to the database using instructions in the section below.
A new scripted material is now created, and its refractive index can be defined via the script editor on the right-hand side.
Defining and Testing the Index Function
The refractive index of the alloy as a function of alloy mole fraction can be defined via the script editor, which acts as a function with mole fraction as the input and refractive index result as the output.
Material Types
Currently, depending on material type, three different types of functions are supported, with the type selected via the dropdown near the top of the script editor.
For all function types, the following applies:
- The script must be able to accommodate a vectorized input of an assumed size and produce the a correctly sized result for the output. The expected size of each variable is defined below with their function type. The sizes of the input variables f and x are defined by the solver while the simulation is running.
- You must not define variables with the same name as the input inside the script.
- You must define an output with the name index_result of the correct size in the script.
Each function type supports different inputs and are detailed below.
-
index(f)
– non-alloy material- This option allows for definition of a dispersive non-alloy material.
Variable name Type Definition Assumed/Expected Size f Input Frequency in Hz \( N \times 1 \)
\( N \in \mathbb{Z},\ N > 0 \)index_result Output Index of alloy \( N \times 1 \) #Create a non-alloy material with frequency dependence
f0=c/900e-9;
index_result = 1+ (f/f0);
- This option allows for definition of a dispersive non-alloy material.
-
index(x,f)
– alloy controlled by one mole fraction- This option allows for definition of a dispersive alloy controlled by one mole fraction variable,
x
, such as binary alloys with a general formula of A1-xBx or ternary alloys with a general formula of A1-xBxD. The value ofx
must be between 0 and 1.
Variable name Type Definition Assumed/Expected Size f Input Frequency in Hz \( N \times 1 \)
\( N \in \mathbb{Z},\ N > 0 \)x Input Alloy mole fraction x \( M \times 1 \)
\( M \in \mathbb{Z},\ M > 0 \)index_result Output Index of alloy \( M \times N \)
#Create an alloy material with frequency and alloy fraction dependence
f0 = c/900e-9;
index_result = 1 + mult(x, transpose(f)/f0);
- This option allows for definition of a dispersive alloy controlled by one mole fraction variable,
-
index([x,y],f)
– alloy controlled by two mole fractions- This option allows for definition of a dispersive alloy controlled by two mole fraction variables,
x
andy
, such as quaternary alloys with a general formula of AxB1-xCyD1-y or AxByC1-x-yD. The value ofx
andy
must be between 0 and 1.
Variable name Type Definition Assumed/Expected Size f Input Frequency in Hz \( N \times 1 \)
\( N \in \mathbb{Z},\ N > 0 \)x Input Alloy mole fraction x in the first column, and alloy mole fraction y in the second column \( M \times 2 \)
\( M \in \mathbb{Z},\ M > 0 \)index_result Output Index of alloy \( M \times N \)
#Create an alloy material depending on both alloy fractions x and y, as well as frequency
y = x(:,2);
x = x(:,1);
f0 = c/900e-9;
index_result = 1 + mult(x+2*y, transpose(f)/f0);
- This option allows for definition of a dispersive alloy controlled by two mole fraction variables,
Script Editor
Following the function inputs and outputs above, the material is defined via the script written in the script window. To test the script, a script output window is provided, and the test button can be used to run the current script and verify that the relationship is correct.
Not all script commands are available from this script editor, but those relevant to the creation of a custom index are. A list of available script functions in this editor can be found via the command ?getcommands;
.
Saving the Material
After the scripted material is defined, it is saved in the optical material database. You can also add this material to the current project using the “Send to Current Project” fields on the bottom left of the window. The material will then be available to be assigned to a geometry object, either through GUI or script.
For more information regarding assigning materials to geometry objects, see the Knowledge Base Article on simulation workflows for Ansys Lumerical Multiphysics, and the self-paced course on CHARGE, which utilizes the same design environment in Multiphysics.
Multiple scripted materials, each with a different script, can be created for a given project.
Script Access
Creating Scripted Materials
Graded alloys can be created using the addemmaterialproperty script command. The script can also be written using a text field by setting the “script text” property of the material.
Example
addmaterialproperty(“Script”); #Add a scripted material property
set(“index model”,”index(x,f)”); #Set index model
set(“script text”,”index_result = mult(1.4*2*x, ones(1,length(f)));”); #Set relationship between mole fraction, frequency, and index
Assigning Scripted Materials
Once a scripted material is created and available in the material database, the scripted material can also be added to an existing material object using the addmaterialproperties script command.
See Also
VCSEL Design Tool - User Manual, Setting the alloy mole fraction