<< Click to Display Table of Contents >> filledguide |
{ FILLEDGUIDE.PDE
This problem models an inhomogeneously filled waveguide.
See discussion in Help section "Electromagnetic Applications | Waveguides".
This problem is taken from Fernandez and Lu,
"Microwave and Optical Waveguide Analysis by the Finite Element Method" page 138.
}
title "Filled Waveguide"
select
modes = 5 { This is the number of Eigenvalues desired. }
ngrid = 30
overshoot = 1e-9 { request very tight Conjugate Gradient convergence }
variables
Hx(0.01) ! some eigenfunctions are zero, so apply a threshold
Hy(0.01) ! ... to avoid infinite regrid
definitions
cm = 0.01 ! conversion from cm to meters
b = 1*cm ! box height
L = 2*b ! box width
epsr ! values will be given by region
epsr1=1
epsr2=1.5
eps0 = 8.85e-12
mu0 = 4e-7*pi
c = 1/sqrt(mu0*eps0) ! light speed
k0b = 4 ! normalized driving frequency
k0 = k0b/b
k02 = k0^2 ! k0^2=omega^2*mu0*eps0
! terms used in equations and BC's
curlh = dx(Hy)-dy(Hx)
divh = dx(Hx)+dy(Hy)
! the solution generates some negative eigenvalues, so we shift the eigenvalues to a range where only the
! positive values appear
shift = 200000
shifted_lambda=lambda+shift
! extract the propagation wave number kz
kz = if(shifted_lambda>0)then sqrt(shifted_lambda) else -sqrt(abs(shifted_lambda))
equations
! Hx equation multiplied by epsr to enforce continuity of Hz
Hx: dx(divh) - dy(curlh) + k02*Hx*epsr - (lambda+shift)*Hx = 0
Hy: dx(curlh/epsr) + dy(divh)/epsr + k02*Hy - (lambda+shift)*Hy/epsr = 0
boundaries
region 1 epsr=epsr1
start(0,0)
natural(Hx) = 0 value(Hy)=0
line to (L,0)
value(Hx) = 0 value(Hy)=0 natural(Hy)=0
line to (L,b)
natural(Hx) = 0 value(Hy)=0
line to (0,b)
value(Hx) = 0 natural(Hy)=0
line to close
region 2 epsr=epsr2
start(b,b)
line to (0,b) to (0,0) to (b,0)
line to close
monitors
contour(Hx) range=(-1,1)
contour(Hy) range=(-1,1)
plots
contour(Hx) range=(-1,1) report(k0) report(kz)
surface(Hx) range=(-1,1) report(k0) report(kz)
contour(Hy) range=(-1,1) report(k0) report(kz)
surface(Hy) range=(-1,1) report(k0) report(kz)
surface(divh) range=(-1,1) as "Hz" report(k0) report(kz)
surface(curlh/epsr) range=(-1,1) as "Ez" report(k0) report(kz)
summary export
font=50 ! lines per page
report lambda
report shift
report shifted_lambda as "Shifted"
report(k0)
report(kz)
report(kz/k0)
end