Description Usage Arguments Details See Also Examples
Beam Shape Coefficient for Transversal Bessel Beam.
1 |
gama |
The transversal component of the wave vector γ. |
kz |
The longitudinal component of the wave vector k_z. |
xo |
The position x at which the expansion is performed. |
yo |
The position y at which the expansion is performed. |
zo |
The position z at which the expansion is performed. |
lmax |
The maximum value of l in the expansion. |
M |
Order of the Bessel Beam. |
s |
Chirality of the Bessel Beam (S=\pm 1). |
TE |
Type of the wave field (TE or TM). |
Calculate the Beam Shape Coefficients for the partial wave expansion in Vector Spherical Wave Functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | lambda=.5e-6 # Propagating wavelength
a<-8*lambda # Size x of the waveguide (Rectangular Wave Guide)
b<-8*lambda # Size y of the waveguide (Rectangular Wave Guide)
l<-6*lambda # Size z of the waveguide (Rectangular Wave Guide)
M<-3 # x wavefield mode
N<-5 # y wavefield mode
S<--1 # Chirality
TM<-FALSE # Mode (TM-TRUE/TE-FALSE)
# Wave Field Parameters
k=2*pi/lambda # Propagating wavenumber
kx<-M*pi/a # x component of the wavevector
ky<-N*pi/b # y component of the wavevector
gama<-sqrt(kx^2+ky^2) # gama component of the wavevector
kz<-sqrt(k^2-gama^2) # z component of the wavevector
#-------------------------------------------------------------------------------
# Geometry of the calculations
#-------------------------------------------------------------------------------
NPX<-4*50+1
NPY<-4*60+1
NPZ<-4*20+1
dx<-2*a/(NPX-1)
dy<-2*b/(NPY-1)
dz<-2*l/(NPZ-1)
x<-seq(-a,a,by=dx)
y<-seq(-b,b,by=dy)
z<-0
#-------------------------------------------------------------------------------
lmax<-80 # Number of partial waves to sum (for some l we have 2l+1 values of m)
#-------------------------------------------------------------------------------
# POSITION AT WHICH THE EXPANSION WILL BE PERFORMED (REFERENCE SYSTEM)
#-------------------------------------------------------------------------------
xo<-yo<-zo<-0
#-------------------------------------------------------------------------------
# CHANGE THE REFERENCE SYSTEM TO THE NEW POSITIONS
#-------------------------------------------------------------------------------
x<-sample(x,1)
y<-sample(y,1)
z<-0
#-------------------------------------------------------------------------------
# BSC CALCULATIONS
#-------------------------------------------------------------------------------
BBZ<-vwfd.bbz(TM,M,S,gama,kz,x+xo,y+yo,z+zo)
BSC<-vswf.bbz(gama,kz,xo,yo,zo,lmax,M,S,TM)
PWE<-vswf.pwe(k,x,y,z,lmax,BSC$GTE,BSC$GTM)
#-------------------------------------------------------------------------------
# VALUES
#-------------------------------------------------------------------------------
cat("Distance x from origin in wavelength (from ",-a/lambda,"to ",a/lambda,"):",x/lambda,"\n")
cat("Distance y from origin in wavelength (from ",-b/lambda,"to ",b/lambda,"):",y/lambda,"\n")
df<-data.frame(
PWE=c(PWE$Em,PWE$Ez,PWE$Ep,PWE$Hm,PWE$Hz,PWE$Hp),
BBZ=c(BBZ$Em,BBZ$Ez,BBZ$Ep,BBZ$Hm,BBZ$Hz,BBZ$Hp),
row.names=c("Em","Ez","Ep","Hm","Hz","Hp")
)
df$DIF<-df$PWE-df$BBZ
print(df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.