五月综合激情婷婷六月,日韩欧美国产一区不卡,他扒开我内裤强吻我下面视频 ,无套内射无矿码免费看黄,天天躁,日日躁,狠狠躁

新聞動(dòng)態(tài)

python光學(xué)仿真通過菲涅耳公式實(shí)現(xiàn)波動(dòng)模型

發(fā)布日期:2021-12-23 05:35 | 文章來源:源碼之家

從物理學(xué)的機(jī)制出發(fā),波動(dòng)模型相對于光線模型,顯然更加接近光的本質(zhì);但是從物理學(xué)的發(fā)展來說,波動(dòng)光學(xué)旨在解決幾何光學(xué)無法解決的問題,可謂光線模型的一種升級。從編程的角度來說,波動(dòng)光學(xué)在某些情況下可以簡單地理解為在光線模型的基礎(chǔ)上,引入一個(gè)相位項(xiàng)。

波動(dòng)模型

一般來說,三個(gè)特征可以確定空間中的波場:頻率、振幅和相位,故光波場可表示為:

import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
z = np.arange(15,200)*10 #單位為nm
x = np.arange(15,200)*10
x,z = np.meshgrid(x,z)#創(chuàng)建坐標(biāo)系
E = 1/np.sqrt(x**2+z**2)*np.cos(2*np.pi*np.sqrt(x**2+z**2)/(532*1e-9))
fig = plt.figure()
ax = Axes3D(fig)
ax.plot_surface(x,z,E)
plt.show()

其結(jié)果如圖所示

菲涅耳公式

幾何光學(xué)可以通過費(fèi)馬原理得到折射定律,但是無法獲知光波的透過率,菲涅耳公式在幾何光學(xué)的基礎(chǔ)上,解決了這個(gè)問題。

由于光是一群橫波的集合,故可以根據(jù)其電矢量的震動(dòng)方向,將其分為平行入射面與垂直入射面的兩個(gè)分量,分別用p分量和 s 分量來表示。一束光在兩介質(zhì)交界處發(fā)生折射,兩介質(zhì)折射率分別為 n1​和 n2​,對于 p光來說,其電矢量平行于入射面,其磁矢量則垂直于入射面,即只有s分量;而對于 s光來說,則恰恰相反,如圖所示。

則對于 p 光來說即

對于磁矢量而言,有

我們可以通過python繪制出當(dāng)入射光的角度不同時(shí),其振幅反射率和透過率的變化

import matplotlib.pyplot as plt
import numpy as np
def fresnel(theta, n1, n2):
 theta = theta*np.pi/180
 xTheta = np.cos(theta)
 mid = np.sqrt(1-(n1/n2*np.sin(theta))**2) #中間變量
 rp = (n2*xTheta-n1*mid)/(n2*xTheta+n1*mid)  #p分量振幅反射率
 rs = (n1*xTheta-n2*mid)/(n1*xTheta+n2*mid)
 tp = 2*n1*xTheta/(n2*xTheta+n1*mid)
 ts = 2*n1*xTheta/(n1*xTheta+n2*mid)
 return rp, rs, tp, ts
def testFres(n1=1,n2=1.45):#默認(rèn)n2為1.45
 theta = np.arange(0,90,0.1)+0j
 a = theta*np.pi/180
 rp,rs,tp,ts = fresnel(theta,n1,n2)
 fig = plt.figure(1)
 plt.subplot(1,2,1)
 plt.plot(theta,rp,'-',label='rp')
 plt.plot(theta,rs,'-.',label='rs')
 plt.plot(theta,np.abs(rp),'--',label='|rp|')
 plt.plot(theta,np.abs(rs),':',label='|rs|')
 plt.legend()
 plt.subplot(1,2,2)
 plt.plot(theta,tp,'-',label='tp')
 plt.plot(theta,ts,'-.',label='ts')
 plt.plot(theta,np.abs(tp),'--',label='|tp|')
 plt.plot(theta,np.abs(ts),':',label='|ts|')
 plt.legend()
 plt.show()
if __init__=="__main__":
 testFres()

得到其圖像為

通過python進(jìn)行繪圖,將上面程序中的testFres改為以下代碼即可。

def testFres(n1=1,n2=1.45):
 theta = np.arange(0,90,0.1)+0j
 a = theta*np.pi/180
 rp,rs,tp,ts = fml.fresnel(theta,n1,n2)
 Rp = np.abs(rp)**2
 Rs = np.abs(rs)**2
 Rn = (Rp+Rs)/2
 Tp = n2*np.sqrt(1-(n1/n2*np.sin(a))**2)/(n1*np.cos(a))*np.abs(tp)**2
 Ts = n2*np.sqrt(1-(n1/n2*np.sin(a))**2)/(n1*np.cos(a))*np.abs(ts)**2
 Tn = (Tp+Ts)/2
 fig = plt.figure(2)
 plt.subplot(1,2,1)
 plt.plot(theta,Rp,'-',label='R_p')
 plt.plot(theta,Rs,'-.',label='R_s')
 plt.plot(theta,Rn,'-',label='R_n')
 plt.legend()
 plt.subplot(1,2,2)
 plt.plot(theta,Tp,'-',label='T_p')
 plt.plot(theta,Ts,'-.',label='T_s')
 plt.plot(theta,Tn,'--',label='T_n')
 plt.legend()
 plt.show()

以上就是python光學(xué)仿真通過菲涅耳公式實(shí)現(xiàn)波動(dòng)模型的詳細(xì)內(nèi)容,更多關(guān)于實(shí)現(xiàn)波動(dòng)模型的資料請關(guān)注本站其它相關(guān)文章!

版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。

相關(guān)文章

實(shí)時(shí)開通

自選配置、實(shí)時(shí)開通

免備案

全球線路精選!

全天候客戶服務(wù)

7x24全年不間斷在線

專屬顧問服務(wù)

1對1客戶咨詢顧問

在線
客服

在線客服:7*24小時(shí)在線

客服
熱線

400-630-3752
7*24小時(shí)客服服務(wù)熱線

關(guān)注
微信

關(guān)注官方微信
頂部