Complete bjt.geo

Hello,author:
I am a student, I am trying to run the simulation of bjt, but I don’t know how you generate the bjt.msh file, according to me you should be operating on gmsh, but inside the bjt.geo file there is only the most basic record, there is no mesh delineation, can you share the complete geo file, thank you very much!

Hi @Hay,

If you are interested in running the existing example with files in:
https://github.com/devsim/devsim_bjt_example/tree/main/simdir

there is a mesh file in bjt.msh. It was generated from the bjt.geo as well as a bjt_bgmesh.pos. The .pos file is used to specify refinements in order to make the simulation more accurate.

If you want to do refinements on your own device, please see the README file for an example:
https://github.com/devsim/devsim_bjt_example/tree/main/simdir#readme

If you are interested in recreating the files in the documentation, please see the .sh files which run the simulations used in the report.

Hello, author:
I ran bjt_refine and found that it generates bjt_bgmesh.pos. However, I found that I need the file bjt.msh to run the bjt_refine programme.

Now my obstacle is that I don’t know how bjt.msh is generated, you said “there is a mesh file in bjt.msh. It was generated from the bjt.geo as well as a bjt_bgmesh.pos.”, this I don’t understand,I do not know by what method are bjt.geo and bjt_bgmesh.pos combined to form bjt.msh.

Based on the results,bjt_bgmesh.pos was generated from the bjt.msh. The README inside also doesn’t seem to say how bjt.msh is generated ,it just says that bjt_bgmesh.pos can be generated through bjt_refine.

ps:Thank you very much for replying to me in the midst of your help, I think I must be missing some part of my knowledge, I’ll definitely give your reply some serious thought, thank you!

Are you running on Windows, macOS or Linux?

Where did you download the files from?

I will test to make sure these files are still running. The example is pretty old.

I run on remote server,the environment is linux.

I download them from devsim_bjt_example/simdir at main · devsim/devsim_bjt_example · GitHub

I put the bjt_geo on gmsh and export it as the bjt2.msh.And I use the bjt2.msh to run the bjt_refine,it can generate bjt_bgmesh.pos(not the same one as the example).

I was wondering if I could convert this bjt_bgmesh.pos into a msh file ,so that I can put it in bjt_refine again.Is that the procedure?

I apologize for not having the time to run the example yet. It is quite old, and the instructions need to be updated to account for the change in the gmsh format.

Unfortunately, the background mesh can only be read in the .pos format.

Running:

gmsh -2 -format 'msh2' bjt.geo 

should create a bjt.msh file in the appropriate format. Then running the refine script.

python bjt_refine.py 
gmsh  -format 'msh2' -2 bjt.geo -bgm ./bjt_bgmesh.pos 

will update the bjt.msh file every time you run these 2 commands. You should see the bjt.msh file get bigger each time you run these commands.

I will have time soon to review the bjt example further in the next couple of days.

Hello author:

I ran
gmsh -2 bjt.geo
python bjt_refine.py
gmsh -2 bjt.geo -bgm . /bjt_bgmesh.pos

it generates a new msh file without any problems, but when I enter the loop again, the msh file is not updated.

Hello @Hay

This is the initial run

gmsh -format 'msh2' -2 bjt.geo

which outputs:

nfo    : 2993 nodes 5992 elements
Info    : Writing 'bjt.msh'...

and this is the loop:

python bjt_refine.py
gmsh -2 bjt.geo -format 'msh2' -bgm ./bjt_bgmesh.pos

which outputs:

Info    : 10845 nodes 21696 elements
Info    : Writing 'bjt.msh'...

and on the next run:

Info    : 13039 nodes 26084 elements
Info    : Writing 'bjt.msh'...

and after that:

Info    : 13740 nodes 27486 elements
Info    : Writing 'bjt.msh'...

Hello, author:
I’ve solved the problem about the grid refinement, I’ve been able to run through your example completely.

I changed the size of the device, i.e. I changed the parameters in the .geo file and make it bigger. At the same time,I changed the Mesh.CharacteristicLengthMax to 20e-25 and found that the mesh generation was good enough.

Now the problem is that after generating the mesh and putting it into the refine program again(I changed the netdoping too and I want to ask that why sub_collector_width is longer than the size of device on gmsh), I found that the background mesh in the generated .pos file is too dense, what could be the reason for this?

Or what is the most important thing I should pay attention to after I change the geo file? I’m really trying to figure out this example of yours. Thanks again for your patience!

The result I got:

It’s so dense that I can’t even see the emitter.

Hi @Hay
Are you sure you have the Mesh.CharacteristicLengthMax=20e-25? That does not seem possible.

I am not sure what the NetDoping problem would be. The profile is not specified in the geo file, and would be specified in netdoping.py.

The refinement method may not be the best. The was based on my ideas in 2013. One way to see the emitter is to plot the fields without the mesh in your visualization program.

An alternative doping approach is shown here:
https://github.com/devsim/devsim_misc/tree/main/refinement

Hello, author:

I think my problem is that I don’t know the meaning of Mesh.CharacteristicLengthMax, hdiff and vdiff and the principle of setting them, can you explain it to me?

The followings are the changes and the result I got:

Obviously this is not a desirable outcome.I don’t know what to do.

This is the result of the first iteration of your example, obviously mine is not satisfactory because the mesh is too dense.There must be something wrong somewhere. :mask:

Hi,

Please experiment with this line in bjt_refine.py

refinement.run(device, region, outfile="bjt_bgmesh.pos", mincl=2.0e-6, maxcl=1e-4, pdiff=0.025)

The mincl and maxcl control the characteristic lengths and pdiff sets the potential difference maximum across each mesh edge.

Hello,author:

Hello, the parameters of these two models are for si materials, I would like to ask if you have studied the parameters of these two models for sic, I would like to change the material to sic

I"m not personally aware of SiC material parameters for these models. The most important ones would be the one for electron and hole density of states and bandgap.