Ansys Learning Forum Forums Discuss Simulation Photonics Updating a Lumerical example Reply To: Updating a Lumerical example

kghaffari
Ansys Employee

Great to hear the information was helpful!

I wonder if this will work better if you calculate Vpi and loss first and then change the gap before calculating these attributes again. In this way, you no longer need to create the E vs gap matrix (and instead collect Vpi vs gap). As you mentioned, by changing the gap the mesh will change too and therefore, the dimension of the field data will not match. Even if you exclude datapoints to match dimensions, there's not an exact correspondance between E datapoints (e.g. E(1),gap(1) and E(1),gap(2) will correspond to different locations). An alternative may be to calculate average of E for each gap to create avg(E)vs gap but I'm not sure if this will be helpful for your FEEM calculations.

In any case, specifically for the addattribute error, the issue might be that the added attribute needs to have the same size as the dimensions (x,y,z). There are few examples of this command used in the following two articles which could be helpful: addattribute_command, Lumerical_datasets.

On another note, I will be away for few weeks during holiday season. Please submit a new ticket in case you need more immediate help in the meantime, so my colleagues can assist you. Best, Khash