Scripting in Dispersive Refractive Indices into Lumerical Material Database
-
-
December 17, 2024 at 11:11 pm
adevata
SubscriberHello,
I am trying to script in refractive indices (both anisotropic and dispersive) into Lumerical's material database within FDTD/FDE. My current testing is done with FDTD, but I believe the database operates the same way in both solvers. I have a Sellmeier model for my material, and have crossreferenced the parameters with my calculations by hand. It is important for the simulation to accurately depict the dispersion from this model. The imaginary component of my refractive index is not important as long as it is close to 0 (<1e-8). Ideally, I would have control over this too. I have tried the following methods below:
- Using the built-in Sellmeier model: When I open the Materials Explorer to verify the properties, there is no dispersion in all 3 axes. The imaginary index is also non-dispersive with a value of 0. I am unable to apply a fit to this to enable dispersion, and changing the tolerance( <1e-6), imaginary weight (~3), and max coefficients (7-30) but nothing changed. This would be the easiest for my workflow, but I feel like I am missing something simple.
- Using "sampled data" material property of Sampled 3D Data material: I made a script to convert my Sellmeier coefficients into a frequency-permittivity matrix over my wavelengths of interest. I then used the "sampled data" property of a Sampled 3D Data material to import this matrix in. However, since I do not have control over the refractive indices, I'm noticing that each time I import the exact same freq-perm matrix, the imaginary component of the dispersive indices change. For the most part, these values are <1e-12. (While this is satisfactory, I would like more control of my system;Â this is similar to a problem others are facing.) Unfortunately, most attempts at loading in the freq-perm matrix using "sampled data" will generate an imaginary number of around 0.1 or higher (I have seen as high as 50) in at least one wavelength per direction. Even with a tolerance of less than 1e-6, the entire fit is thrown off and the generated refractive indices are no long realistic.
- Using "Import Data" button: I've successfully converted my freq-perm matrix into a lambda-n-k matrix which is then saved in a .txt file. Here, I've set the imaginary component to be 1e-8 for all wavelengths and directions. Using the "Import Data" button in the Materials Database, I'm able to upload this l-n-k matrix into the material, and the fit is consistent since the fitted data is consistent every time I upload it (no random imaginary matrices). However, I am unable to find a way via script to access the "Import Data" button and the subsequent options that follow it (others have had this issue before). Due to the scale and speed of my simulations, I need to change these refractive indices often; it will completely ruin the workflow if I have to import a new dataset every 10-20 minutes.
Is there any advice on how to best script this? I ultimately need this material to have anisotropy, dispersion, and a low extinction coefficient (consistently <1e-8). Not using a script is not an option for this workflow due to the scale and speed of my simulations. Thank you for the time and help!
- AD
-
December 18, 2024 at 6:04 pm
Kirill
Ansys EmployeeDear Subscriber,
The Sellmeier model implementation does not support dispersion at the moment; this is expected behavior. The page you're citing, Standard optical permittivity material models in FDTD and MODE, includes a note stating that "This type of material model should only be used for single-frequency simulations."
The following script example demonstrates how to add an artificial sampled 3D material with a complex refractive index that varies across three axes:
lambda = linspace(400e-09,700e-09,7);
f = c/lambda;
ri_comlplex_x = 1.4+1i*0.1;
ri_comlplex_y = 1.5+1i*0.2;
ri_comlplex_z = 1.6+1i*0.3;
eps_x = ones(7,1)*ri_comlplex_x^2;
eps_y = ones(7,1)*ri_comlplex_y^2;
eps_z = ones(7,1)*ri_comlplex_z^2;
sampledData3D = [f, eps_x, eps_y, eps_z];
mat_name = "MyNewSampled3DMaterial";
temp_material = addmaterial("Sampled 3D data");
setmaterial(temp_material, "name", mat_name);
setmaterial(mat_name, "max coefficients", 6);
setmaterial(mat_name,"tolerance", 0.01);
setmaterial(mat_name, "sampled data", sampledData3D);This is how the MyNewSampled3DMaterial looks in Material Database.
Feel free to adapt the script by loading your sampled data from a file.
I hope this helps.
Best regards,
Kirill
-
- You must be logged in to reply to this topic.
- Difference between answers in version 2024 and 2017 lumerical mode solution
- Errors Running Ring Modulator Example on Cluster
- Import material .txt file with script
- Trapezoidal ring
- Help for qINTERCONNECT
- Absorption cross-section of AuNR excited by prism-based TIR
- Issues with getting result from interconnent analysis script
- How to measure transmission coefficients on a given plane .
- Topology Optimization Error
- Edge Coupler EME Example Issue
-
1882
-
802
-
599
-
591
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.