<style> .markdown-body table{ display: unset; } </style> # 拉塞福散射 > 作者:王一哲 > 日期:2018/5/13 <br /> 拉塞福散射 (Rutherford scattering) 實驗是找到原子核存在的重要證據。將 α 粒子(氦原子核)射向金箔,α 粒子與金原子核之間的靜電力為排斥力,若忽略重力的作用,由於金原子核固定不動,α 粒子所受靜電力通過金原子核,相對於金原子核的角動量守恆。α 粒子與金原子核之間只有靜電力作功,系統力學能守恆。 下圖為拉塞福散射實驗示意圖,當 α 粒子於無窮遠處時速度向右,金原子核與速度方向之間的垂直距離稱為碰撞參數,通常代號為 b。這次的程式目標是改變 b,畫出 α 粒子動能、系統電位能、力學能與時間的關係圖,找出 α 粒子向上偏移的量值。 <img style="display: block; margin-left: auto; margin-right: auto" height="50%" width="50%" src="https://i.imgur.com/Yklys7w.png"> <div style="text-align:center">拉塞福散射實驗示意圖</div> <br /> ## 程式 24-1.拉塞福散射 ([取得程式碼](https://github.com/YiZheWangTw/VPythonTutorial/blob/master/24.%E6%8B%89%E5%A1%9E%E7%A6%8F%E6%95%A3%E5%B0%84/24-1.Rutherford.py)) ([GlowScript 網站動畫連結](http://www.glowscript.org/#/user/yizhe/folder/Public/program/24-1.Rutherford)) ```python= """ VPython教學: 24-1.拉塞福散射 Ver. 1: 2018/4/8 Ver. 2: 2019/9/19 作者: 王一哲 """ from vpython import * """ 1. 參數設定, 設定變數及初始值, 長度單位 nm, 質量單位 amu, 電量單位 e, 時間單位 ns """ r1, m1, q1, c1 = 0.4, 4, 2, color.red # 氦原子核半徑(放大後)、質量、電量、顏色 r2, m2, q2, c2 = 1, 197, 79, color.yellow # 金原子核半徑(放大後)、質量、電量、顏色 v0 = vec(10, 0, 0) # 氦原子核初速度 b, L, k = 1, 40, 1 # 氦原子核初速度與金原子核的垂直距離, 畫面長、寬, 假的靜電力常數 t, dt = 0, 0.001 # 時間, 時間間隔 """ 2. 畫面設定 """ # 產生動畫視窗 scene = canvas(title="Rutherford Scattering", width=800, height=600, x=0, y=0, center=vec(0, 0, 0), background=color.black) # 產生原子核 alpha = sphere(pos=vec(-0.5*L + r1, b, 0), radius=r1, m=m1, q=q1, v=v0, color=c1, make_trail=True) au = sphere(pos=vec(0, 0, 0), radius=r2, m=m2, q=q2, color=c2) # 產生表示速度、加速度的箭頭 arrow_v = arrow(pos=alpha.pos, shaftwidth=0.5*r1, color=color.cyan) arrow_a = arrow(pos=alpha.pos, shaftwidth=0.5*r1, color=color.magenta) # 繪圖部分 gd = graph(title="Energy - Time Plot", width=600, height=450, x=0, y=600, xtitle="t", ytitle="red: K, green: U, blue: E") Kt = gcurve(graph=gd, color=color.red) Ut = gcurve(graph=gd, color=color.green) Et = gcurve(graph=gd, color=color.blue) """ 3. 物體運動部分 """ while(abs(alpha.pos.x) < L/2 and abs(alpha.pos.y) < L/2): rate(500) # 計算氦原子核所受合力, 更新氦原子核加速度、速度、位置 F = k*alpha.q*au.q / alpha.pos.mag2 * alpha.pos.norm() alpha.a = F/alpha.m alpha.v += alpha.a*dt alpha.pos += alpha.v*dt # 更新表示速度、加速度的箭頭 arrow_v.pos = alpha.pos arrow_a.pos = alpha.pos arrow_v.axis = alpha.v arrow_a.axis = alpha.a # 計算氦原子核動能、系統電位能、力學能並繪圖 K = 0.5 * alpha.m * alpha.v.mag2 U = k * alpha.q * au.q / alpha.pos.mag E = K + U Kt.plot(pos=(t, K)) Ut.plot(pos=(t, U)) Et.plot(pos=(t, E)) # 更新時間 t += dt ``` <br /> ### 參數設定 在此設定變數為 r1、m1、q1、c1、r2、m2、q2、c2、v0、b、L、k、t、dt,用途已寫在該行的註解當中。為了使數值設定上較為方便,長度單位為 nm,質量單位為 amu,電量單位為 e,時間單位為 ns,k 的量值假設為1。 <br /> ### 畫面設定 1. 產生動畫視窗。 2. 產生原子核。 3. 產生表示速度、加速度的箭頭。 4. 產生繪圖視窗。 <br /> ### 物體運動 1. 當粒子位於 -L/2 < x < L/2、 -L/2 < y < L/2 之間時動畫持續執行,因此 while 迴圈當中的條件設定為 **(abs(alpha.pos.x) < L/2 and abs(alpha.pos.y) < L/2)**。 2. 計算氦原子核所受合力, 更新氦原子核加速度、速度、位置。 3. 更新表示速度、加速度的箭頭。 4. 計算氦原子核動能、系統電位能、力學能並繪圖。 5. 更新時間。 <br /> ### 模擬結果 手動設定 b 的量值並觀察結果,以下是使用 3 個不同的 b 值得到的結果。 <img style="display: block; margin-left: auto; margin-right: auto" height="80%" width="80%" src="https://i.imgur.com/cPuxLoP.png"> <div style="text-align:center">程式 24-1:b = 1 畫面截圖</div> <br /> <img style="display: block; margin-left: auto; margin-right: auto" height="80%" width="80%" src="https://i.imgur.com/zDIzn6n.png"> <div style="text-align:center">程式 24-1:b = 1 能量 - 時間闗係圖</div> <br /> <img style="display: block; margin-left: auto; margin-right: auto" height="80%" width="80%" src="https://i.imgur.com/bFPIhDy.png"> <div style="text-align:center">程式 24-1:b = 3 畫面截圖</div> <br /> <img style="display: block; margin-left: auto; margin-right: auto" height="80%" width="80%" src="https://i.imgur.com/obdY5iF.png"> <div style="text-align:center">程式 24-1:b = 3 能量 - 時間闗係圖</div> <br /> <img style="display: block; margin-left: auto; margin-right: auto" height="80%" width="80%" src="https://i.imgur.com/Xnu0aaq.png"> <div style="text-align:center">程式 24-1:b = 5 畫面截圖</div> <br /> <img style="display: block; margin-left: auto; margin-right: auto" height="80%" width="80%" src="https://i.imgur.com/Hon0Qor.png"> <div style="text-align:center">程式 24-1:b = 5 能量 - 時間闗係圖</div> <br /> ## 程式 24-2.拉塞福散射, 用 for 迴圈依序代入 b = 0, 1, 2, 3, ..., 10 ([取得程式碼](https://github.com/YiZheWangTw/VPythonTutorial/blob/master/24.%E6%8B%89%E5%A1%9E%E7%A6%8F%E6%95%A3%E5%B0%84/24-2.Rutherford_for.py)) ([GlowScript 網站動畫連結](http://www.glowscript.org/#/user/yizhe/folder/Public/program/24-2.Rutherfordfor)) ```python= """ VPython教學: 24-2.拉塞福散射, 用 for 迴圈依序代入 b = 0, 1, 2, 3, ..., 10 Ver. 1: 2018/4/8 Ver. 2: 2019/9/19 作者: 王一哲 """ from vpython import * """ 1. 參數設定, 設定變數及初始值, 長度單位 nm, 質量單位 amu, 電量單位 e, 時間單位 ns """ r1, m1, q1 = 0.4, 4, 2 # 氦原子核半徑(放大後)、質量、電量 r2, m2, q2, c2 = 1, 197, 79, color.yellow # 金原子核半徑(放大後)、質量、電量、顏色 v0 = vec(10, 0, 0) # 氦原子核初速度 L, k = 40, 1 # 畫面長、寬, 假的靜電力常數 t, dt = 0, 0.001 # 時間, 時間間隔 """ 2. 畫面設定 """ # 產生動畫視窗 scene = canvas(title="Rutherford Scattering", width=800, height=600, x=0, y=0, center=vec(0, 0, 0), background=color.black) # 產生金原子核 au = sphere(pos=vec(0, 0, 0), radius=r2, m=m2, q=q2, color=c2) """ 3. 用 for 迴圈依序代入 b = 0, 1, 2, 3, ..., n """ n = 10 for i in range(0, n+1, 1): # 產生氦原子核 alpha = sphere(pos=vec(-L/2 + r1, i, 0), radius=r1, m=m1, q=q1, v=v0, color=vec((n-i)/n, 0, i/n), make_trail=True) # 產生表示速度、加速度的箭頭 arrow_v = arrow(pos=alpha.pos, shaftwidth=0.5*r1, color=color.cyan) arrow_a = arrow(pos=alpha.pos, shaftwidth=0.5*r1, color=color.magenta) # 物體運動部分 while(abs(alpha.pos.x) < L/2 and abs(alpha.pos.y) < L/2): rate(500) # 計算氦原子核所受合力, 更新氦原子核加速度、速度、位置 F = k*alpha.q*au.q / alpha.pos.mag2 * alpha.pos.norm() alpha.a = F/alpha.m alpha.v += alpha.a*dt alpha.pos += alpha.v*dt # 更新表示速度、加速度的箭頭 arrow_v.pos = alpha.pos arrow_a.pos = alpha.pos arrow_v.axis = alpha.v arrow_a.axis = alpha.a # 更新時間 t += dt # 於 while 迴圈結束時隱藏箭頭 arrow_v.visible = False arrow_a.visible = False # 印出 b - y 數值 print(i, alpha.pos.y - i) ``` <br /> ### 程式設計部分 程式 24-2 和 24-1 很像,以下只說明修改之處。 1. 畫面設定部分只先產生金原子核。 2. 用 for 迴圈依序產生 0, 1, 2, …, 10 作為 b 的量值,將產生粒子及粒子運動部分的 while 迴圈放到 for 迴圈當中。 3. 當 while 迴圈執行完畢使用 arrow_v.visible = False 以及 arrow_a.visible = False 隱藏箭頭。 4. 印出碰撞參數 b 以及鉛直方向偏移量值 y。 <br /> ### 模擬結果 以下是程式 24-2 的執行結果,可以看到當 b = 0 時粒子沿入射方向反彈,除此之外當 b 愈小時鉛直方向偏移量值 y 愈大。 <div style="text-align:center"> | b | y | | -- | -------------------| | 0 | 0.0 | | 1 | 18.541669854502143 | | 2 | 8.15934777838773 | | 3 | 5.290932738798059 | | 4 | 3.903700702382096 | | 5 | 3.07827335437314 | | 6 | 2.5262914670585754| | 7 | 2.1306456411917694| | 8 | 1.8315824334085065| | 9 | 1.597115286538127 | | 10 | 1.4085584194546925| </div> <img style="display: block; margin-left: auto; margin-right: auto" height="80%" width="80%" src="https://i.imgur.com/a7tnUd4.png"> <div style="text-align:center">程式 24-2 畫面截圖</div> <br /> <img style="display: block; margin-left: auto; margin-right: auto" height="80%" width="80%" src="https://i.imgur.com/LUSYO9c.jpg"> <div style="text-align:center">y - b 關係圖</div> <br /> ## 結語 這個動畫的效果看起來比較單調,視覺效果上不像 [PhET](https://phet.colorado.edu/sims/html/rutherford-scattering/latest/rutherford-scattering_zh_TW.html) 的動畫那麼好,有興趣的同學可以自己研究一下如何修改。 <br /> ## VPython官方說明書 1. **canvas**: http://www.glowscript.org/docs/VPythonDocs/canvas.html 2. **sphere**: http://www.glowscript.org/docs/VPythonDocs/sphere.html 3. **arrow**: http://www.glowscript.org/docs/VPythonDocs/arrow.html 4. **graph**: http://www.glowscript.org/docs/VPythonDocs/graph.html --- ###### tags:`VPython`