Skip to content

Commit

Permalink
fix convergence issue
Browse files Browse the repository at this point in the history
update documentation
  • Loading branch information
tcaduser committed Apr 24, 2024
1 parent 8781069 commit 872941e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 27 deletions.
Binary file modified doc/bjtexample.pdf
Binary file not shown.
28 changes: 19 additions & 9 deletions doc/bjtexample.tex
Expand Up @@ -53,6 +53,7 @@ \section{Running the Examples}
\texttt{initial\_guess.py} & Creates initial guess from Potential only simulation\\
\texttt{refinement.py} & Sets up E-field based refinements for creating background mesh\\
\texttt{netdoping.py} & Specifies analytical doping profile\\
\texttt{bjt\_dd.py} & Creates the zero bias drift diffusion solution for later sweeps\\
\texttt{bjt\_refine.py} & Runs \devsim\ to create a background mesh\\
\texttt{bjt\_bgmesh.pos} & Background mesh generated by \devsim\ for refinement using \gmsh\\
\texttt{physics/} & subdirectory containing physics files used in simulation.
Expand All @@ -67,15 +68,15 @@ \subsection{Meshing and Refinement}
The steps are:
\begin{verbatim}
gmsh -format msh2 -2 bjt.geo
devsim bjt_refine.py
python bjt_refine.py
gmsh -format msh2 -2 bjt.geo -bgm ./bjt_bgmesh.pos
devsim bjt_refine.py
python bjt_refine.py
gmsh -format msh2 -2 bjt.geo -bgm ./bjt_bgmesh.pos
devsim bjt_refine.py
python bjt_refine.py
gmsh -format msh2 -2 bjt.geo -bgm ./bjt_bgmesh.pos
devsim bjt_refine.py
python bjt_refine.py
gmsh -format msh2 -2 bjt.geo -bgm ./bjt_bgmesh.pos
devsim bjt_refine.py
python bjt_refine.py
\end{verbatim}
\end{minipage}
\\~\\
Expand All @@ -84,31 +85,40 @@ \subsection{Meshing and Refinement}
\begin{verbatim}
visit bjt_refine.tec
\end{verbatim}

\subsection{Zero bias drift diffusion solution}
When creating a new device, it is necessary to create initial zero bias solution for all the subsequent sweeps.
\begin{verbatim}
python bjt_dd.py
\end{verbatim}
This creates \texttt{bjt\_dd\_0.msh} file that is read in the next section.

\subsection{Simulation}
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.


\subsubsection{$V_c$ sweep}
For a given value of $V_b$, sweep $V_c$ from $0$ to $1.5$~V.
\begin{verbatim}
bjt_circuit2.py 0.1 &> data/vb2_0.1.out
python bjt_circuit2.py 0.1 &> data/vb2_0.1.out
\end{verbatim}

\subsubsection{$V_b$ sweep}
For a given value of $V_c$, sweep $V_b$ from $0$ to $1.0$~V.
\begin{verbatim}
devsim bjt_circuit3.py 0.0 &> data/vc_0.0.out
python bjt_circuit3.py 0.0 &> data/vc_0.0.out
\end{verbatim}

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

\subsubsection{Small-signal ac sweep}
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.
\begin{verbatim}
devsim bjt_circuit5.py 0.0 1e3 1e11 3 &> data/ssac_0.0.out
python bjt_circuit5.py 0.0 1e3 1e11 3 &> data/ssac_0.0.out
\end{verbatim}

\subsection{Visualization}
Expand Down
16 changes: 0 additions & 16 deletions simdir/README

This file was deleted.

1 change: 1 addition & 0 deletions simdir/README.md
@@ -0,0 +1 @@
See the ``doc/bjtexample.pdf`` for information about the simulation scripts in this directory.
2 changes: 1 addition & 1 deletion simdir/physics/ramp2.py
Expand Up @@ -94,7 +94,7 @@ def rampbias(device, contact, end_bias, step_size, min_step, max_iter, rel_error
try:
devsim.solve(type="dc", absolute_error=abs_error, relative_error=rel_error, maximum_iterations=max_iter)
except devsim.error as msg:
if msg[0].find("Convergence failure") != 0:
if str(msg).find("Convergence failure") != 0:
raise
devsim.set_parameter(device=device, name=GetContactBiasName(contact), value=last_bias)
step_size *= 0.5
Expand Down
1 change: 0 additions & 1 deletion simdir/setup_dd.py
Expand Up @@ -18,7 +18,6 @@
def run(device, region):

# this is our solution variable
CreateSolution(device, region, "Potential")
CreateSolution(device, region, "Electrons")
CreateSolution(device, region, "Holes")

Expand Down

0 comments on commit 872941e

Please sign in to comment.