Changing the material work function via a script

workfunction
script
device

#1

Hello,

(As there are no replies yet, I edit this post to make it easier to understand and to add the solution I found to my second question. Hopefully this is correct etiquette.)

Two questions:

  1. From my understanding of the ?setmaterial(); command I don’t think that this is possible, but I will ask anyway…

In DEVICE, is it possible to set the work function of a material via a script?
The work function of the material I am simulating isn’t well established, so I would like to be able to vary it within a script instead of doing it ‘manually’ each time. (Using ‘Optimization and Sweeps’ would also be ok.)

  1. Note: I solved this myself, see below.
    To save the conduction band data I can use this command
    pinch(getdata(“CHARGE::band”,“bandstructure.Ec”));
    What command can I use to save the corresponding z-data? That is, when I use the inbuilt visualizer in DEVICE to view the conduction band as a line, the parameter “z” is set as the “Plot x axis”. I can work out how to save the y-axis (Ec), but not the x-axis (z).

Solution to #2: Worked out from this page https://kb.lumerical.com/en/ref_scripts_datasets.html
band = getresult(“CHARGE::band”,“bandstructure”);
z = band.z;

Thanks in advance


#2

Hi @ie5003_allison, unfortunately the material properties in DEVICE cannot be accessed using script. If you would like to run a sweep to vary the work function of a material then I am afraid the awkward workaround would be to create multiple copies of the material in the material database all with different work functions. Then you can run a sweep and change the material in the corresponding geometry property to run multiple simulations with different work functions.


#3

I see. Thank you for clearing it up.
Presumably this is also the case for other parameters such as dc permittivity etc.


#4

Yes. Unfortunately that is the case at the moment.