A PN junction is the fundamental building block of nearly every modern semiconductor device, including diodes, transistors, solar cells, and LEDs. In this blog post, we’ll walk through the key physics behind the PN junction and show how to simulate it in COMSOL Multiphysics using the Semiconductor Module. We'll also derive relevant equations and compare the results with theory.
What is a PN Junction?
A PN junction forms when p-type and n-type semiconductors are brought into contact. The p-type region is doped with acceptor atoms (such as boron), creating holes (missing electrons), while the n-type region is doped with donor atoms (such as phosphorus), introducing excess electrons.
When these two regions meet, free electrons from the n-side diffuse into the p-side and recombine with holes. Similarly, holes from the p-side diffuse into the n-side. This process leaves behind fixed ions near the junction: negatively charged acceptor ions on the p-side and positively charged donor ions on the n-side. These immobile ions form the space charge region or depletion region.
Built-In Potential
The diffusion of carriers leads to the formation of an internal electric field that opposes further diffusion. This results in a built-in potential, given by:
$$
V_{bi} = \frac{kT}{q} \ln\left( \frac{N_A N_D}{n_i^2} \right)
$$
Where:
- $V_{bi}$: Built-in potential (V)
- $k$: Boltzmann constant ($1.38 \times 10^{-23}$ J/K)
- $T$: Temperature (K)
- $q$: Elementary charge ($1.6 \times 10^{-19}$ C)
- $N_A$: Acceptor concentration (m$^{-3}$)
- $N_D$: Donor concentration (m$^{-3}$)
- $n_i$: Intrinsic carrier concentration of silicon (typically $1.5 \times 10^{16}$ m$^{-3}$ at 300 K)
Depletion Width
The total width of the depletion region is:
$$
W = \sqrt{ \frac{2 \varepsilon_s}{q} \left( \frac{N_A + N_D}{N_A N_D} \right) V_{bi} }
$$
The depletion widths on each side of the junction are:
$$
x_n = \frac{N_A}{N_A + N_D} W, \quad x_p = \frac{N_D}{N_A + N_D} W
$$
Where $\varepsilon_s$ is the permittivity of silicon ($\varepsilon_s = \varepsilon_0 \cdot \varepsilon_{r}$, with $\varepsilon_r = 11.7$ for silicon).
Carrier Distributions
At equilibrium, carrier concentrations follow:
$$n(x) = n_i \exp\left( \frac{E_F - E_i(x)}{kT} \right)$$
$$ \quad p(x) = n_i \exp\left( \frac{E_i(x) - E_F}{kT} \right)
$$
Where:
- $E_F$: Fermi level (constant at equilibrium)
- $E_i(x)$: Intrinsic energy level, varies with position due to band bending
Electric Field and Potential
Using Poisson's equation:
$$
\frac{d^2 V}{dx^2} = -\frac{\rho(x)}{\varepsilon_s}
$$
Where the space charge density $\rho(x)$ in the depletion region is:
$$
\rho(x) =
\begin{cases}
-qN_D, & -x_n < x < 0 \quad \text{(n-side)} \\
+qN_A, & 0 < x < x_p \quad \text{(p-side)} \\
0, & \text{elsewhere}
\end{cases}
$$
From this, the electric field $E(x)$ and potential $V(x)$ profiles can be derived, showing a linearly varying field and a quadratic potential across the depletion zone.
COMSOL Simulation Setup
In COMSOL Multiphysics:
- A 2D geometry is created with two rectangular domains representing the p and n regions.
- Silicon is selected as the material.
- Acceptor doping ($N_A = 1 \times 10^{23}$ m$^{-3}$) is assigned to the p-side, and donor doping ($N_D = 1 \times 10^{22}$ m$^{-3}$) to the n-side.
- The Semiconductor Equilibrium study is used, solving for carrier distributions and electrostatic potential without applying external bias.
- Boundary conditions are set to insulating or zero charge.
- A fine mesh is applied, particularly at the junction.
Results
The simulation yields:
- Electron concentration: High on the n-side, drops sharply in the depletion region.

- Hole concentration: High on the p-side, drops sharply in the depletion region.
- Electric potential: Increases smoothly from the n-side to the p-side, showing a built-in potential of about 0.7 V—consistent with theoretical expectations.

- Electric field: Peaks near the junction center and drops off outside the depletion region.

The profile of carrier concentration and potential matches textbook results, validating the model.

Industrial Relevance and Applications
So, why do engineers and researchers simulate PN junctions in the first place?
In industry, PN junction simulations are critical for the design, optimization, and validation of semiconductor devices before fabrication. Manufacturing semiconductors is incredibly costly and time-intensive—so companies rely on accurate modeling tools like COMSOL to predict how a device will behave under different operating conditions.
Some key industrial applications include:
- Diode and Transistor Design: Whether it's a basic rectifier diode or an advanced MOSFET, every device begins with PN junction-level analysis to ensure desired switching behavior, efficiency, and response time.
- Photovoltaics (Solar Cells): Understanding the depletion width, built-in field, and recombination zones helps optimize energy conversion efficiency.
- LEDs and Laser Diodes: Simulations help analyze carrier injection and recombination to enhance brightness, color accuracy, and power consumption.
- High-Frequency Devices: In RF and microwave electronics, the geometry and doping profile of junctions impact signal modulation and noise performance.
- Sensor Technologies: PN junctions are the basis for photodiodes and temperature sensors—used in biomedical, automotive, and environmental monitoring sectors.
- Failure Analysis and Reliability Testing: Simulations help identify failure-prone regions like hot spots or electric field peaks that can lead to junction breakdown or thermal issues.
In all these applications, equilibrium simulations are often the first step. They give a baseline understanding of the device’s built-in potential, charge distribution, and internal electric field. From there, engineers build more complex models that include biasing, time-dependence, or external fields.
Conclusion
The PN junction is simple in structure but rich in physical behavior. Simulating it helps in understanding core principles like diffusion, drift, depletion, and built-in potential. Tools like COMSOL Multiphysics® make it possible to visualize these effects clearly and verify theory through numerical methods.This equilibrium analysis lays the groundwork for more advanced studies, such as IV characteristics under bias, transient analysis, or breakdown mechanisms.
Discussions? let's talk here
Check out YouTube channel, published research
All product names, trademarks, and registered trademarks mentioned in this article are the property of their respective owners. The views expressed are those of the author only. COMSOL, COMSOL Multiphysics, and LiveLink are either registered trademarks or trademarks of COMSOL AB.