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?

  • 2
    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

I can not provide you with a solver that will solve the equation for you.

I will, however, provide a warning:

If you want to employ finite element methods, especially so called continuous Galerkin methods, you will need a weak form of the equations. For the equations you have provided that form is not trivial to obtain, but it isn't especially difficult to obtain either. If you opt for finite element methods an do derive the weak form of the equations you should be able to use FEniCS( https://fenicsproject.org/ ) for everything else.

Solving the resulting coupled systems of linear equations is not difficult (use Newton or Newton-Kantorovich methods), but will require some thought if you want to have acceptable execution times. So in summary: A bespoke implementation of a solver will be quite time consuming (you MUST test it) so try to avoid it unless you really wan to understand what can go wrong with your solver.

My background: I have advised a friend (in numerical mathematics) during his master's thesis on how to interpret the numerical results he was obtaining from solving an optimal control problem for the Nernst-Planck-Poisson equation (which is essentially the equation you have provided). He was solving it in 2D though (or 2+1 D if you count time, too) and we were using my C++.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.