Problem When Running the Bipolar Junction Transistor Example

I have been having trouble running the bipolar junction transistor example for devsim. In the simdir directory, the README shows the following steps to create the refined mesh:

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

Upon running the command python bjt_refine.py in my terminal, I get the following error:

Traceback (most recent call last):
File “/home/masamune/Documents/devsim_linux_v2.1.0/examples/bjt/simdir/bjt_refine.py”, line 22, in
read_gmsh.run(“bjt.msh”, device, region, “Silicon”, (“base”, “collector”, “emitter”))
File “/home/masamune/Documents/devsim_linux_v2.1.0/examples/bjt/simdir/read_gmsh.py”, line 19, in run
create_gmsh_mesh (mesh=device_name, file=filename)
devsim_py3.error: line: 3: ERROR: MeshFormat 4.1 0 8 not supported

Does anyone know what’s causing this error and how to fix it? The system I’m running this on is an Ubuntu 22.04 Virtual Machine, and I ran the python bjt_refine.py command after using source ${HOME}/anaconda/bin/activate in my terminal.

Thank you for trying the software. This example was developed several years ago before the gmsh format 4.1 existed. Can you please invoke gmsh like this:

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

is able to run through.

1 Like