Question on Example cap2d.py

Hi, I am a beginner of Devsim and I am learning it with the 2d capacitance example. I ran it and visualized the result with ParaView. I obtained potential well. But when I tried to visualize the electric field, I noticed that there are three data on electric field, ElectricField, ElectricField_x, and ElectricField_y. What exactly are these results? Since the ElectricField has negative value, it doesn’t seem to be the absolute value. Also, from the graph, it does not seem that ElectricField is not square root of (ElectricField_x)^2+(ElectricField_y)^2. Please tell me what these numbers are. Thank you.

The vector electric field components in the cap2d.py script was created with this command:

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

To get the magnitude of these vector components, you can either do some sort of vector to scalar conversion in “ParaView”, or you can add an equation in devsim:

element_model(device=device, region=region, name="Emag",
equation="(ElectricField_x^2 + ElectricField_y^2)^(0.5)")

just after the statement I mentioned above.

Juan, thank you very much for your reply. Now I understand how ElectricField_x and ElectricField_y is created, and how to get the magnitude of the electric field. I have two more questions.

  1. In the VTK data format, it also lists the value of ElectricField. What exactly is this value means?
  2. If you use VTK format in the write_devices, will it write all variables used in the simulation?
    I really appreciate your time and effort in advance.
    Tadao

This value is what is called an “edge model” and should not be used for visualization as it is not very useful, other than to the basis for the element_from_edge_model command. A future version of the software may remove edge models from the vtk and tecplot formats.

The latest versions makes it possible to limit the data written to the file.
https://devsim.net/releasenotes.html#reduction-in-data-file-sizes

Juan, thank you for your reply and the link. I will check it. Tadao