Visulization problems of Mesh structure and results

Do any one know some easy way to plot the geometry structure or meshed structure in anaconda (spyder)?

Hi @caihng

You may find this post useful:
Basic questions from a new user - Visualization of Resuls and Mesh for 1D and 2D Sims

@Juan Thanks a lot and could you please tell me how to plot the graph below,especially the stream traces are for components of ElectricField

Hi @caihng

That plot was done a long time ago in Tecplot, which is a commercial tool. It should be possible to do the same thing using the open source Paraview and VisIt tools.

For the stream line plot, you would need to convert the ElectricField into its components, ElectricField_x and ElectricField_y, using the

element_from_edge_model(edge_model="ElectricField",   device=device, region=r)

for each region, and then saving to the vtk or tecplot format using the write_devices command.

Then each of the programs has the ability to plot these vector components using scripting. I no longer have a license to Tecplot. I have had good luck with VisIt:

The color plot is possible by plotting the Potential

1 Like


1 Like

I was able to show mesh information from DEVSIM in Jupyter Notebooks by using pyvista, see recent PRs at our project Experimental Tcad crosssection by simbilod · Pull Request #587 · gdsfactory/gdsfactory · GitHub

It should make it to the main version of the software soon; I made an example notebook

Hello @simbilod

Thanks so much for sharing this. I was not aware of this project. Please feel free to make an announcement topic in this forum concerning this.

Hi @Juan, as suggested I prepared a short visualization example from notebook in devsim/examples/diode (the example I am most familiar with), see diode plotting notebook examples by simbilod · Pull Request #87 · devsim/devsim · GitHub

I can also just share it on the forums if you prefer

Thanks @simbilod , please give me a few days to check it out.