# Export Visualizer Data

I am trying to export the raw data from a 3D Charge simulation. From the visualizer, I plot the charge with attribute “n”. I then use the “Export to” and export to a text file. However, I do not understand the formatting of the data. The data are placed in rows with what looks like x-coordinate values, followed by y-coordinate values, followed by z-coordinate values, followed by the surface charge data (n), and lastly, followed by a 4-column data set which I believe are some kind of index values. I have uploaded a file below. My questions are:

1. The coordinate data is out of order and there seems to be duplicates of the same values. What is the mapping for these data so I can get the correct charge value at the correct location?
2. What do the 4-columns of data at the bottom represent?
3. I sweep a parameter (voltage on an electrode) in the simulation. Does the mapping stay consistent between parametric runs?

charge_n_v_LiNbO3_on_Si_m10V…txt (98.1 KB)

Hello @myamagat,

Thank you for the questions.

The coordinate data is out of order and there seems to be duplicates of the same values. What is the mapping for these data so I can get the correct charge value at the correct location?

The finite element mesh used by the CHARGE solver is not rectilinear, so there isn’t really an “order” to the data the same way there would be for FDTD data, for example. The x, y, and z data with index i gives the location for the corresponding charge density in the n data with the same index i. There can be duplicates of values because some mesh points may have the same x coordinate, for example.

This data can be difficult to export and use in other programs. If you want to interpolate the data to a rectilinear grid you can do this via script, as discussed in this KX post:

What do the 4-columns of data at the bottom represent?

The four column data labelled elements is the connectivity matrix of the finite element mesh, which describes how the tetrahedral grid elements are connected to eachother.

I sweep a parameter (voltage on an electrode) in the simulation. Does the mapping stay consistent between parametric runs?

Yes, the mesh is created before the simulation is run, so it stays constant through parameter sweeps.

I hope this helps. Let me know if you have any more questions.