Can not delete node model related to "Intrinsic"

21 views
Skip to first unread message

Qiusong Chen

unread,
Jun 23, 2020, 11:22:03 PM6/23/20
to DEVSIM TCAD
Hello Juan:

While I try to delete some models to shrink the exported file's size, it reports some errors like below. Is there anything others that I should do before deleting them?

Regards,
QS.C

while evaluating node model IntrinsicHoles on Device: mos_topContact on Region: bulk
There was a Divide-by-zero floating point exception while evaluating pow(IntrinsicElectrons,(-1))
while evaluating model IntrinsicHoles: expression (pow(n_i,2) * pow(IntrinsicElectrons,(-1))) evaluates to invalid
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
devsim_py3.error: DEVSIM FATAL


Juan Sanchez

unread,
Jun 24, 2020, 12:32:28 AM6/24/20
to DEVSIM TCAD
Hello,

I consider the delete model functionality unsafe in the simulator.  If you look inside the mesh file, you will see that expressions are stored instead of actual data: 

begin_node_model "IntrinsicElectrons"
COMMAND node_model -device "diode3d" -region "Bulk" -display_type "scalar" -name "IntrinsicElectrons" -equation "(n_i * exp((Potential * pow(V_t,(-1)))));"
end_node_model

begin_node_model "IntrinsicElectrons:Potential"
COMMAND node_model -device "diode3d" -region "Bulk" -display_type "scalar" -name "IntrinsicElectrons:Potential" -equation "(n_i * exp((pow(V_t,(-1)) * Potential)) * pow(V_t,(-1)));"
end_node_model

begin_node_model "IntrinsicHoles"
COMMAND node_model -device "diode3d" -region "Bulk" -display_type "scalar" -name "IntrinsicHoles" -equation "(pow(n_i,2) * pow(IntrinsicElectrons,(-1)));"
end_node_model

begin_node_model "IntrinsicHoles:Potential"
COMMAND node_model -device "diode3d" -region "Bulk" -display_type "scalar" -name "IntrinsicHoles:Potential" -equation "(-pow(IntrinsicElectrons,(-2)) * pow(n_i,2) * IntrinsicElectrons:Potential);"
end_node_model

Please make sure you are using the "devsim" instead of the "devsim_data" format.  There is certainly data that can be deleted from the file, especially since much of the data can be regenerated.

You may want to consider looking at the generated file, and writing a python script to delete the unneeded data.

Regards,

Juan


--
You received this message because you are subscribed to the Google Groups "DEVSIM TCAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devsim+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/devsim/edbff172-2908-4ed6-86a9-2916fcaa74ado%40googlegroups.com.

Qiusong Chen

unread,
Jun 24, 2020, 2:49:10 AM6/24/20
to DEVSIM TCAD
Hi:

This error will not only happen while exporting the data, but also happen during fabricating the equations. After the initial solution for the static dopping state, I plan to delete the models which will not be used anymore. Then the errors come out like below. 
It seems that the deleting process will evaluate the actual value of the node model. 

Warning: Replacing equation with equation of the same name.
Region: bulk, Equation: PotentialEquation, Variable: Potential
while evaluating node model IntrinsicHoles on Device: mos_topContact on Region: bulk
There was a Divide-by-zero floating point exception while evaluating pow(IntrinsicElectrons,(-1))
while evaluating model IntrinsicHoles: expression (pow(n_i,2) * pow(IntrinsicElectrons,(-1))) evaluates to invalid
Traceback (most recent call last):
  File "ferromos_topContact.py", line 69, in <module>
    DeleteIntrinsicNodeModelDerivatives(device, i)
  File "simple_physics.py", line 169, in DeleteIntrinsicNodeModelDerivatives
    delete_node_model(device=device, region=region, name=i)
devsim_py3.error: DEVSIM FATAL

Regards
QS.C
To unsubscribe from this group and stop receiving emails from it, send an email to dev...@googlegroups.com.

Juan Sanchez

unread,
Jun 24, 2020, 8:09:56 AM6/24/20
to DEVSIM TCAD
Hi,

The delete model functionality may have a bug.

Since the mesh is static, you may have more success storing the solution variables (potential, electrons, holes) into a file of your own format, and loading them back in using set_node_values.

They are double precision values, so be sure to store them with the appropriate number of decimal places.  

 print('%1.15g' % 1.000000000001)

1.000000000001


Alternatively, you can store them in a binary format, or use compression on the data.

Regards,

Juan


To unsubscribe from this group and stop receiving emails from it, send an email to devsim+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/devsim/f8b5827d-515f-4d6e-8e13-02218ca2ca7eo%40googlegroups.com.

Qiusong Chen

unread,
Jun 25, 2020, 12:48:22 AM6/25/20
to DEVSIM TCAD
Hi:

Thank you very much for your careful reply. I will try according to your guidance.

Regards,

Qiusong Chen

Juan Sanchez

unread,
Jun 25, 2020, 1:11:15 AM6/25/20
to DEVSIM TCAD
Looking examples/diode/diode_2d.py

It is necessary to delete the models in this order:
delete_node_model(device=device, region=region, name="IntrinsicHoles")
delete_node_model(device=device, region=region, name="IntrinsicElectrons")

when the order is reversed, the error you see will occur.  This is since IntrinsicHoles depends on IntrinsicElectrons.  If deleted in the wrong order, the simulator treats missing models as having a value of 0. Then the evaluation of IntrinsicHoles results in the floating point error because of the evaluation of pow(0, -1).

Please note the memory storage of the values is
8*number of nodes (double precision)
16*number of nodes (extended precision)  

in bytes.

Regards,

Juan



To unsubscribe from this group and stop receiving emails from it, send an email to devsim+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/devsim/8cfd140e-98cc-496e-b9e7-d51abd1533fao%40googlegroups.com.

Juan Sanchez

unread,
Jun 25, 2020, 1:50:53 AM6/25/20
to Qiusong Chen, DEVSIM TCAD
Please confirm I have fixed the model deletion issue with v1.4.10-rc2.

There was a bug where the model was being evaluated just before it was deleted.

Regards,

Juan


To unsubscribe from this group and stop receiving emails from it, send an email to devsim+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/devsim/8cfd140e-98cc-496e-b9e7-d51abd1533fao%40googlegroups.com.

Qiusong Chen

unread,
Jun 25, 2020, 4:31:12 AM6/25/20
to DEVSIM TCAD
Hi :

Thanks for the timely update. It worked perfectly.

Regards,

QS.C
Reply all
Reply to author
Forward
0 new messages