Confusion about the diode simulation

Hello Juan and everybody,

I am working on modeling a 1-D InAs diode. I try to do this by modifying the example diode simulation but I have some questions about the commands there:

  • Could I just state InAs as a material in add_1d_region() command?
  • There are some commands which I don’t understand and can’t find in the manual. I don’t know how to adapt these into the InAs diode:
    CreateSiliconPotentialOnly
    CreateSiliconPotentialOnlyContact
    CreateSiliconDriftDiffusion
    CreateSiliconDriftDiffusionAtContact

My question is basically how I should create my code if I just want to simulate a 1-D diode of a different material.

Bonus:
What should I do to create the doping profile of a simple abrupt P-N junction? I know that I should use the step function but are there any examples which I can look at?

Thank you very much in advance
Yigithan

As discussed here:

You just need to set the material parameters, using a function like SetSiliconParameters.

The scripts in python_packages are not documented in the manual. You would have to look at the code. I will work on adding docstrings in the future.
https://github.com/devsim/devsim/issues/146

This function solves the Potential equation in a semiconductor region, assuming equilbrium.

This function sets the boundary condition at a contact for the potential equation in equilibrium.

Setups up the Potential, Electron, and Hole equations for drift-diffusion simulation.

Sets up an ideal ohmic contact for drift diffusion simulation.

Set the material parameters for your material. The existing equations should work for a single region device.

Please check the discussion here:
https://forum.devsim.org/t/simulation-of-simple-2d-sic-diode/328/2

One approach is to use the Step function. However, if you want to have an abrupt junction that is independent of meshing effects, you can have a P region and N region with an interface between them. Then the
CreateSiliconSiliconInterface function would be useful.

Thank you very much for the thorough response. So, then I could use those commands (CreateSiliconDriftDiffusion, etc.) just by defining the material properties, right? I mean, they are not just for silicon. I just need to do things like:

ds.node_model(device=device, region=region, name=“IntrinsicConcentration”, equation=“1e13”)
ds.node_model(device=device, region=region, name=“ElectronMobility”, equation=“3000”)

Hi @yigithanmkose

Please see this example for using devsim.set_parameter:

1 Like

Thank you very much! I’ll give it a try

Thank you again for demonstrating this. I adapted this into my code; however, I still need help about some additional points:

1- When I run the code from the example, I get this error:

import * only allowed at module level

2- In the example code, it only prints the current but I need to have it as data, so I decided to use the devsim.get_contact_current() command, so should I write “Potential” in the place of “equation”?

3- I need to add surface recombination, and I’ve read your thread with @simbilod but I couldn’t conclude how to use it just like SRH recombination.

I’m sorry if I am being silly but I need to use this software in my paper and thesis, which have a strict timeline so your help is very appreciated.

  1. Can you please show the full error and the import line that is failing? Python has multiple ways to do import statements.

For example, if you are not in a module, and you want to import from example.py in the same directory as your script.

from example import *
  1. For saving data, please consider something like:

which calls

as an example.

I do not know the answer to 3.

The full error is:

import * only allowed at module level

It happens at this import statement:

from devsim import *

used in a python script at a random directory.

Thank you very much for the help

I am not sure what the issue is. This is an issue with the python import system and:

from devsim import *

is a valid line for import. Does:

import devsim

move past this error? Are you using a Python 3 virtual environment?

Is your import statement inside of a function?

Yes! Since I need to integrate it into an optimization routine, I put this import statement inside a function.

When I try to import these outside of a function, I got:

ModuleNotFoundError: No module named ‘simple_physics’

Additionally, I get no problem with this:

import devsim

The full path is devsim.python_packages.simple_physics, unless you have your own version in your working diredtory. Perhaps try:

from devsim.python_packages import simple_physics

I settled it like that but instead of using “*”, which means import everything, I imported each function one by one

1 Like