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

sara.bassil
Subscriber

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!

 

Â