Skip to content

Commit 872941e

Browse files
committed
fix convergence issue
update documentation
1 parent 8781069 commit 872941e

File tree

6 files changed

+21
-27
lines changed

6 files changed

+21
-27
lines changed

doc/bjtexample.pdf

600 Bytes
Binary file not shown.

doc/bjtexample.tex

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ \section{Running the Examples}
5353
\texttt{initial\_guess.py} & Creates initial guess from Potential only simulation\\
5454
\texttt{refinement.py} & Sets up E-field based refinements for creating background mesh\\
5555
\texttt{netdoping.py} & Specifies analytical doping profile\\
56+
\texttt{bjt\_dd.py} & Creates the zero bias drift diffusion solution for later sweeps\\
5657
\texttt{bjt\_refine.py} & Runs \devsim\ to create a background mesh\\
5758
\texttt{bjt\_bgmesh.pos} & Background mesh generated by \devsim\ for refinement using \gmsh\\
5859
\texttt{physics/} & subdirectory containing physics files used in simulation.
@@ -67,15 +68,15 @@ \subsection{Meshing and Refinement}
6768
The steps are:
6869
\begin{verbatim}
6970
gmsh -format msh2 -2 bjt.geo
70-
devsim bjt_refine.py
71+
python bjt_refine.py
7172
gmsh -format msh2 -2 bjt.geo -bgm ./bjt_bgmesh.pos
72-
devsim bjt_refine.py
73+
python bjt_refine.py
7374
gmsh -format msh2 -2 bjt.geo -bgm ./bjt_bgmesh.pos
74-
devsim bjt_refine.py
75+
python bjt_refine.py
7576
gmsh -format msh2 -2 bjt.geo -bgm ./bjt_bgmesh.pos
76-
devsim bjt_refine.py
77+
python bjt_refine.py
7778
gmsh -format msh2 -2 bjt.geo -bgm ./bjt_bgmesh.pos
78-
devsim bjt_refine.py
79+
python bjt_refine.py
7980
\end{verbatim}
8081
\end{minipage}
8182
\\~\\
@@ -84,31 +85,40 @@ \subsection{Meshing and Refinement}
8485
\begin{verbatim}
8586
visit bjt_refine.tec
8687
\end{verbatim}
88+
89+
\subsection{Zero bias drift diffusion solution}
90+
When creating a new device, it is necessary to create initial zero bias solution for all the subsequent sweeps.
91+
\begin{verbatim}
92+
python bjt_dd.py
93+
\end{verbatim}
94+
This creates \texttt{bjt\_dd\_0.msh} file that is read in the next section.
95+
8796
\subsection{Simulation}
8897
The dc and ac sweeps used in the publication are listed in \texttt{simsbatch.txt}. These simulations can be run in sequence or in parallel.
8998

99+
90100
\subsubsection{$V_c$ sweep}
91101
For a given value of $V_b$, sweep $V_c$ from $0$ to $1.5$~V.
92102
\begin{verbatim}
93-
bjt_circuit2.py 0.1 &> data/vb2_0.1.out
103+
python bjt_circuit2.py 0.1 &> data/vb2_0.1.out
94104
\end{verbatim}
95105

96106
\subsubsection{$V_b$ sweep}
97107
For a given value of $V_c$, sweep $V_b$ from $0$ to $1.0$~V.
98108
\begin{verbatim}
99-
devsim bjt_circuit3.py 0.0 &> data/vc_0.0.out
109+
python bjt_circuit3.py 0.0 &> data/vc_0.0.out
100110
\end{verbatim}
101111

102112
\subsubsection{$V_e$ sweep}
103113
For a given value of $V_c$, sweep $V_e$ from $0$ to $-1.0$~V.
104114
\begin{verbatim}
105-
devsim bjt_circuit4.py 0.0 &> data/ve_0.0.out
115+
python bjt_circuit4.py 0.0 &> data/ve_0.0.out
106116
\end{verbatim}
107117

108118
\subsubsection{Small-signal ac sweep}
109119
For a given value of $V_c$, sweep $V_e$ from $0$ to $-1.0$~V. Do a small signal frequency sweep from fmin to fmax with given points per decade.
110120
\begin{verbatim}
111-
devsim bjt_circuit5.py 0.0 1e3 1e11 3 &> data/ssac_0.0.out
121+
python bjt_circuit5.py 0.0 1e3 1e11 3 &> data/ssac_0.0.out
112122
\end{verbatim}
113123

114124
\subsection{Visualization}

simdir/README

Lines changed: 0 additions & 16 deletions
This file was deleted.

simdir/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
See the ``doc/bjtexample.pdf`` for information about the simulation scripts in this directory.

simdir/physics/ramp2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def rampbias(device, contact, end_bias, step_size, min_step, max_iter, rel_error
9494
try:
9595
devsim.solve(type="dc", absolute_error=abs_error, relative_error=rel_error, maximum_iterations=max_iter)
9696
except devsim.error as msg:
97-
if msg[0].find("Convergence failure") != 0:
97+
if str(msg).find("Convergence failure") != 0:
9898
raise
9999
devsim.set_parameter(device=device, name=GetContactBiasName(contact), value=last_bias)
100100
step_size *= 0.5

simdir/setup_dd.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
def run(device, region):
1919

2020
# this is our solution variable
21-
CreateSolution(device, region, "Potential")
2221
CreateSolution(device, region, "Electrons")
2322
CreateSolution(device, region, "Holes")
2423

0 commit comments

Comments
 (0)