Extract and evaluate recombination from a 3D simulation


Hello @aalam ,

I am doing a 3D simulation on DEVICE with my structure and I want to extract the optical recombination profile’s data, in order to calculate the percentage of recombinations happening inside the region of interest with respect to the total simulation one. So my strategy would be to integrate Ropt inside the volume of interest, then integrate Ropt in the total simulation volume and then perform the integral’s ratio. The problem is that if I execute the command “getdata(‘CHARGE’,‘recombination.Ropt’);” and then I try to visualize it, the graph seems to have unidimensional-discretized values, which is meaningless to my point of view, since I would expect to obtain a 3D matrix. Moreover, if I export it to a txt file, the data I find inside are meaningless as well for me: you can find below the google drive’s folder link containing the simulation and the txt file I am referring to. Could you help me reaching my goal, please?

Best regards,

Francesco Manegatti.



Hi @francesco.manegatti, the data that you get from the CHARGE solver is a finite-element data (defined on a finite-element grid). The recombination data will have a dimension of Nx1 where N is the number of vertices in the finite-element grid. The data will have three vectors x,y,z with sizes Nx1 which will have the x,y,z coordinates of the vertices. The final piece is a connectivity matrix (called elements) which will have a dimension of Mx3 (2D) or Mx4 (3D) that will contain information about how the elements (triangle in 2D, tetrahedron in 3D) are created in the grid.

In order to filter out the data in a certain region one easy thing to do could be tn interpolate the data onto a rectangular grid and then do whatever post-processing is needed. You can check out this KX post to see how you can interpolate a finite-element data from DEVICE onto a rectangular grid: Interpolate finite element data onto a rectilinear grid. Let me know if you have any questions about the process.


Dear @aalam,

thank you very much, that’s exactly what I needed. I have just one more question regarding the interpolation’s script shown on the post “Interpolate finite element data onto a rectilinear grid”. At a certain point, you define the variable Nv = kern(2), representing the number of bias point. Furthermore, you decide to upgrade n and p, picking just one bias point (the last one). I did not understand very well what do you mean for bias point, could you explain it to me, please? Many thanks.



When you run a CHARGE simulation, most of the time you run the simulation while sweeping the voltage (or bias) at an electrical contact. So the results that you get are a function of the input voltage (or bias). So when you will read the recombination rate after the simulation finishes, the result will have an additional dimension due to this dependency on bias voltage (The size of R will be N x NV, where NV is the number of points in your voltage sweep). Unfortunately the interpolation is unable to interpolate data for all the bias points at once so you will have to pick a bias point (input voltage) and interpolate the data for that voltage only. You can use a for loop in your script to do this for all bias points if you’d like.

Of course if you have run the simulation for a single input voltage then you will not need to worry about this at all.


Dear @aalam,

don’t worry, I solved also the last question I posed you. Thank you very much.