A colorful, user-friendly Python GUI for visualizing the Fermi-Dirac distribution and energy band behavior in semiconductors.
Built with matplotlib & numpy for real-time, interactive scientific education.
-
🎨 Visualizes:
- Valence Band, Conduction Band, and Fermi Level
- Color-coded energy state markers and occupation probability
- Temperature-dependent bandgap shifts
- Dynamic physical descriptions based on user selection
-
🧩 Interactive Controls:
- Temperature Slider: 0 K to 1000 K
- Semiconductor Type: Intrinsic, n-type, p-type (radio buttons)
- Energy Level: Below, at, or above Fermi level
-
📊 Educational & User-Friendly Plot:
- Clean UI with labeled energy levels and bands
- Real-time updates based on user input
- Designed for Jupyter Notebook with
%matplotlib widgetfor full interactivity
- 🐍 Python 3
- matplotlib – for plotting and widgets
- numpy – for computation
- matplotlib.widgets – for GUI elements
def fermi_dirac(E, Ef, T):
#-> Handle the T=0 Kelvin edge case for a perfect step function
if T == 0:
if E < Ef:
return 1.0
elif E > Ef:
return 0.0
else:
#-> At E = Ef, the probability is exactly 0.5
return 0.5
#-> Calculate probability for T > 0 K
return 1 / (1 + np.exp((E - Ef) / (k * T)))- Fermi-Dirac distribution
- Band theory
- Intrinsic and doped semiconductors (n-type & p-type)
-
Install Python 3
Download: python.org -
Install Required Libraries
pip install matplotlib numpy ipympl notebook
This project was inspired by my second-semester course on Semiconductor Physics, especially the fascinating topics related to the Fermi-Dirac distribution.
This project is licensed under the MIT License.
See the LICENSE file for details.
Sanjay Kumar Sakamuri Kamalakar
- Thanks to ChatGPT for code logic and visualization assistance.
- Gratitude to the developers of Python, Matplotlib, NumPy, and Jupyter for their powerful open-source tools.
- Special thanks to my professors and peers for introducing me to the world of semiconductor physics.
If you use this project, please cite it as:
Sakamuri Kamalakar, S. K. (2025). Fermi-Dirac Probability Visualizer (1.0.0). Zenodo. https://doi.org/10.5281/zenodo.15592765
Feel free to reach out to me:
- Email: sksanjaykumar010307@gmail.com
- LinkedIn: linkedin.com/in/sanjay-kumar-sakamuri-kamalakar-a67148214
- ORCID: 0009-0009-1021-2297
This program is a powerful tool for visually demonstrating how conduction and valence bands vary with temperature and semiconductor type.
It is especially helpful for beginners and educators to understand and teach key concepts in semiconductor physics.
