2D-PNjuction's capacitance

Dear Juan,
I’m sorry to bother you. This problem occurs when the simulated 2D-PNjuction’s capacitance varies with the external voltage. When I changed the voltage, the capacitance didn’t change.Here is my code.

and this is my doping:

I used the ssac_cap.py analog capacitor in devsim-main.
Its results remain at a constant without change.I wonder where such a question might come from.
I guess if I have a wrong concept in simulating capacitance.Do we use fc =\frac {1}{2πRC} to calculate capacitance?
Sorry to bother you again.Thank you very much!
P.S.If I get a 2Delectric field.How can I find the change of electricFiled_x(/y) in the X-axis(/Y-axis) components with respect to the corresponding coordinates.

The ssac_cap.py example does not consider doping, it is only an insulator so its capacitance will be constant.

Please look at:


It is located in:


on Linux if you are using Anaconda python. The edge model values are not useful to get x and y components, or for visualization. Even in 1d each position can sometimes point in the wrong direction.

To generate the x and y components from 2d simulation, us something like:

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

and the plot the components in the visualizer as ElectricField_x and ElectricField_y

Thank you for your reply:
Now x and EField_x have different dimensions and it seems it can’t plot by python.How can I change to get a picture like it in Tecplot?


I suggest first starting with creating some kind of “cut line” or “slice line” in VisIt or Tecplot.

If you want to do this in Python, it is more difficult. The electric field on each triangular element can be getting from the element_model_values as every 3rd value:


since each triangle has 3 edges and the length of the element model values is 3 times the number of triangles.

It looks like @SinglePhotonGuy has done something similar by plotting the magnitude of the electric field in 2d.
Basic questions from a new user - Visualization of Resuls and Mesh for 1D and 2D Sims

Thank you for your reply.I will test this way.
Aa for electric field,I want to export as csv file.I will try if that way works.
Thank you!

Sorry for bothering you again.
I have another question.

Can I change v=151 to do next loop?Like this:

Do we need to manually save the results of previous iterations and import them into later loops?
Thank you!

The solve command will use the previous solution as an initial guess for the next bias point. If you want to start a sweep from an origin point, you would need to save Electrons, Holes, Potential using get_node_model_values.

You can then set them using set_node_values

Thank you for your reply!

Now I save the values into txt file,can it read from txt files?

I tried this way,it seems like I can’t load data from these txt files.

Please see hear for an example of doing this in memory:




Thank you!
The problem has been solved!
Thank you very much.

1 Like