# How to simulate basic semiconductor models using the Drift-diffusion model on Python?

I'm trying to simulate basic semiconductor models for pedagogical purposes--starting from the Drift-diffusion model. Although I don't want to use an off-the-shelf semiconductor simulator--I'll be learning other (common, recent or obscure) models, I do want to use an off-the-shelf PDE solver.

But even for the simple 1D case, the drift-diffusion model consists of a number of coupled nonlinear PDEs.

Current density equations:

$$J_n = q n(x) \mu_n E(x) + qD_n \nabla n$$ $$J_p = q p(x) \mu_p E(x) + qD_p \nabla p$$

Continuity equation:

$$\frac{\partial{n}}{\partial{t}} = \frac{1}{q} \nabla \cdot J_n + U_n$$ $$\frac{\partial{p}}{\partial{t}} = \frac{1}{q} \nabla \cdot J_p + U_p$$

Poisson equation:

$$\nabla \cdot (\epsilon \nabla V) = -(p - n + N_D^+ - N_A^-)$$

and a number of boundary conditions.

Is there a package (pref. open source) that would take these equations, in that form, and solve them? Or perhaps is the variational form required by the tools is not as hard? In any case, what are my options?

• FiPy (ctcms.nist.gov/fipy) can probably handle this. – Bill Greene Nov 6 at 14:58
• @BillGreene thank you! I will try to use this first – wintercap Nov 7 at 4:45
• I know it is not your question, but since you mentioned this is for pedagogical purposes: coding a program that does just that was a big part of my master thesis and I considered it an extremely instructive experience. It still provides me with insights today (i'm a phd student) when interpreting results from the commercial software we use at my lab. – Alexis Dec 6 at 17:11