Ansys Learning Forum › Forums › Discuss Simulation › Photonics › Updating a Lumerical example › Reply To: Updating a Lumerical example
Hi again,Â
Thank you for your answer, I was actually trying to implement the sweep in the script.Â
My goal is to run charge and extract the electric field for each value of the gap.Â
I want to store the value of the electric field for each value of the gap in a matrix and use it outside of the loop to compute the perturbed index.Â
The issue I am encountering is regarding the electric field :Â
The matrix E that is generated in the script with these commands :
electro = getresult("CHARGE::monitor","electrostatics");
E = pinch(electro.E);}
is different from the one I see when I go : monitor > electrostatics > E > view dataÂ
Is it because the simulation is using unstructured dataset ?Â
Anyhow, I have some issues understanding to what corresponds the 3rd size of the E matrix :
?size(E);
result:Â
23828 Â 11 Â 3Â
I assume that the first value is the x values ?Â
The second one corresponds to the voltage appliedÂ
And the third one .. I have no idea ?Â
Â
Thank you again for your assistance!
Â
Â