Band diagram structure
The diagram consists of three key energy levels rendered in the UI:index.astro
Conduction band (E_c)
The top region represents the conduction band where free electrons can move:- Blue color scheme (
bg-blue-500/20,border-blue-400) - Positioned at the top of the diagram (highest energy level)
- Electrons in this band contribute to electrical conductivity
Valence band (E_v)
The bottom region represents the valence band where electrons are bound to atoms:- Orange color scheme (
bg-orange-500/20,border-orange-400) - Positioned at the bottom of the diagram (lowest energy level)
- Holes in this band can also contribute to conductivity
Band gap
The space between conduction and valence bands represents the forbidden energy gap where no electron states exist in a perfect crystal.Fermi level positioning
The Fermi level (E_f) indicates the energy at which electron occupation probability is 50%. Its position changes based on material type:index.astro
N-type semiconductors
Position:top: 25% (near conduction band)
index.astro
N-type doping occurs when a pentavalent element (5 valence electrons) like phosphorus replaces silicon (4 valence electrons) in the crystal lattice.
P-type semiconductors
Position:top: 75% (near valence band)
index.astro
P-type doping occurs when a trivalent element (3 valence electrons) like aluminum replaces silicon in the crystal lattice.
Intrinsic semiconductors
Position:top: 50% (midgap)
index.astro
Dynamic transitions
The Fermi level position animates smoothly when material type changes:index.astro
transition-all duration-500 classes create a 500ms animation when the top style property changes, providing visual feedback as users select different dopant combinations.
Visual styling
Physical interpretation
The energy band diagram visualizes fundamental semiconductor physics:Carrier concentration
- N-type: Fermi level near E_c → high electron concentration in conduction band
- P-type: Fermi level near E_v → high hole concentration in valence band
- Intrinsic: Fermi level at midgap → equal electron and hole concentrations
Conductivity mechanism
The relative position of E_f determines the dominant charge carriers:Temperature effects
While not animated in the current implementation, in real semiconductors:- Higher temperatures increase intrinsic carrier concentration
- E_f shifts slightly toward midgap as temperature increases
- At very high temperatures, intrinsic carriers can dominate over dopant-contributed carriers
Integration with material determination
The band diagram updates automatically when the user calculates a new material:index.astro
determineMaterial() function analyzes valence electrons (see configuration-calculator) to classify the semiconductor, which then drives the Fermi level visualization.