从弗兰克赫兹实验到量子游戏:用Python模拟电子与原子的‘碰撞’与能级跃迁

发布时间:2026/5/19 17:50:32

从弗兰克赫兹实验到量子游戏:用Python模拟电子与原子的‘碰撞’与能级跃迁 从弗兰克赫兹实验到量子游戏用Python模拟电子与原子的‘碰撞’与能级跃迁量子物理常常给人一种高深莫测的感觉但通过计算机模拟我们可以让这些抽象概念变得触手可及。本文将带你用Python重现弗兰克-赫兹实验的经典场景通过代码模拟电子与原子的相互作用直观展示量子能级的奥秘。1. 实验原理与Python建模基础弗兰克-赫兹实验是量子物理发展史上的里程碑它首次通过实验证实了原子能级的分立性。在实验中电子被加速后与氩原子碰撞当电子能量达到特定阈值时会引发原子的能级跃迁这反映在电流-电压曲线上形成周期性峰值。核心物理概念建模电子加速过程$E eU$其中$U$为加速电压能级跃迁条件$\Delta E E_n - E_1$$E_1$为基态能量非弹性碰撞电子损失能量$\Delta E$原子获得能量$\Delta E$import numpy as np import matplotlib.pyplot as plt # 基本物理常数 e 1.602e-19 # 电子电荷(C) m_e 9.109e-31 # 电子质量(kg) E_excitation 11.61 * e # 氩原子第一激发能(J)2. 电子运动与碰撞模拟实现电子在栅极间的运动遵循经典力学规律但与原子碰撞时则表现出量子特性。我们将分步构建这个混合模型2.1 电子加速与能量计算def electron_energy(voltage): 计算电子在给定电压下获得的动能 return e * voltage def is_excitation_possible(e_energy, thresholdE_excitation): 判断电子能量是否足以激发原子 return e_energy threshold碰撞类型判定表电子能量区间碰撞类型能量交换E E_excitation弹性碰撞电子能量基本不变E ≥ E_excitation非弹性碰撞电子损失E_excitation能量2.2 多电子束流模拟实际实验中观测到的是大量电子的统计行为我们需要模拟电子群体的行为def simulate_electron_beam(vg2_range, num_electrons1000): currents [] for vg2 in vg2_range: excited_count 0 for _ in range(num_electrons): # 考虑电子能量分布的随机性 e_energy electron_energy(vg2 * (0.95 0.1*np.random.random())) if is_excitation_possible(e_energy): excited_count 1 # 到达极板的电子数与电流成正比 currents.append(num_electrons - excited_count) return np.array(currents)3. 完整实验曲线生成与可视化通过系统性地改变加速电压VG2我们可以重现实验中的特征曲线# 参数设置 vg2_values np.linspace(0, 100, 500) # 0-100V扫描 currents simulate_electron_beam(vg2_values) # 可视化 plt.figure(figsize(10,6)) plt.plot(vg2_values, currents, b-) plt.xlabel(Acceleration Voltage VG2 (V)) plt.ylabel(Plate Current (a.u.)) plt.title(Simulated Frank-Hertz Curve) plt.grid(True) # 标记峰值位置 peaks [i for i in range(1, len(currents)-1) if currents[i] currents[i-1] and currents[i] currents[i1]] for p in peaks: plt.annotate(f{vg2_values[p]:.1f}V, (vg2_values[p], currents[p]), xytext(0,10), textcoordsoffset points, hacenter, arrowpropsdict(arrowstyle-)) plt.show()典型输出曲线特征周期性电流峰值间隔约11.6V峰位对应电子能量刚好激发原子后剩余的动能谷值对应电子能量足以激发原子但尚未加速到下一能级4. 高级模拟与教学应用拓展为了让模拟更贴近真实教学场景我们可以增加以下功能4.1 交互式参数调节from ipywidgets import interact interact def interactive_simulation(vg1(0.5, 2.0, 0.1), vp(5.0, 15.0, 0.5), temperature(300, 1000, 50)): # 温度影响电子能量分布 currents simulate_electron_beam(vg2_values, temptemperature) plt.plot(vg2_values, currents) plt.show()4.2 能级跃迁动画演示from matplotlib.animation import FuncAnimation def create_energy_level_animation(): fig, ax plt.subplots() line, ax.plot([], [], ro-) def init(): ax.set_xlim(0, 5) ax.set_ylim(0, 15) return line, def update(frame): # 动态显示电子能量积累和跃迁过程 ydata [0, min(frame/10, 11.61), min(frame/10, 11.61)] line.set_data([1,2,2], ydata) return line, ani FuncAnimation(fig, update, frames150, init_funcinit, blitTrue) plt.close() return ani教学应用建议将模拟代码与理论讲解穿插进行鼓励学生修改参数观察曲线变化通过可视化对比不同原子如汞、氖的激发电位差异

相关新闻