Khashayar Ghaffari
Ansys Employee

In general when working with variables saved from the visualizer, it is helpful to use the “.” operator to find all the related parameters and attributes; when writing “variable+’.’” in the script prompt, the autocomplete feature will show these quantities in bold.

For example here you have probably used a command like:
charge = getresult("CHARGE","charge");
Jn = charge.Jn;
To define the current density matrix.

Now by starting to write “charge.” in the script prompt you will see that t (time), and x,y,z (coordinates) are other related attributes. For example try:
T = charge.t;
X = charge.x;
Using the size of these new matrices you can tell what each dimension of your original Jn matrix corresponds to.

In the case of a 2D transient simulation the three dimensions correspond to coordinates (XY), the time steps (t), and the component of the current density (x, y, or z).

Best regards