title 'Wave Guide in Polar Coordinates'
select
autostage=on
stages=4
modes =5
ngrid=5
nodelimit=3000
errlim=staged(0.1, .01, 0.001, 0.0001)
rematrix=on
alias(x) = "X(cm)"
alias(y) = "Y(cm)"
Variables
Hz U
definitions
dr(Hz) = (x/r)*dx(Hz) + (y/r)*dy(Hz) { functional definition of polar derivatives... }
dphi(Hz) = (-y)*dx(Hz) + x*dy(Hz) {... in cartesian coordinates }
wt=(stage)*pi/60
i=sqrt(-1)
Hz01 = 0.50*sin(wt)
Hz02 = 0.50*sin(wt)
source=Hz01+Hz02
scale=staged(1,2,3,4)
a=1/scale
{Source 1 oscillating}
{Source 2 oscillating with small delay}
initial values
Hz=source U=1/(cosh(x-a))^2
equations
Hz: r*dr(r*dr(Hz)) + dphi(dphi(Hz)) + r*r*lambda*Hz +r*r*source =0 {Eigenvalue Problem}
U:div(a*grad(u)) -scale*dy(u) +4 = 0 {burgers equation}
boundaries
Region 1 'outer'
start(-29.5,29.5) value(u)= 1/(cosh(x-a))^2
arc(center=0,0) angle = 360 !nobc(Hz)
Region 2 start(-3.0,0) point natural(Hz) = Hz01+Hz02 value(u) = 1/(cosh(x-a))^2
arc(center = -3.0,0.850) angle =360
Region 3 start(3.0,0) point natural(Hz) = Hz02+Hz01 value(u) = 1/(cosh(x-a))^2
arc(center = 3.0,0.850) angle =360
Region 4 'inner'
start (-12.5,10.0) value(u)= 1/(cosh(x-a))^2 line to (-10.5,10.0) arc(center=0,10) angle= -180 nobc(Hz)
start (12.5,10.0) value(Hz)= Hz02+Hz01 arc(center=0,10) angle= 180 line to close
start (-12.6,8.0) value(Hz) =Hz01+Hz02 line to(-12.6, 24.0) value(Hz)=0 line to(-15.5,24.0) value(Hz)=0 line to(-15.5,8.0) close
start (12.6,8.0) value(Hz) =Hz01+Hz02 line to(12.6, 24.0) value(Hz)=0 line to(15.5,24.0) value(Hz)=0 line to(15.5,8.0) close
Region 5
start(-6.0,4.0) line to(-4.0,4.0) value(Hz) =Hz01+Hz02 line to (3.0,8.0) value(Hz) =Hz01+Hz02 line to (1.0,8.0) close
PLOTS
elevation(Hz) from (-10,10) to (10,10) from (-9,11) to (9,11)
elevation(Hz) from(-10,10) to (10,10) from (-8,12) to (8,12)
elevation(Hz) from( -10,10) to (10,10) ON "outer"
vector(dr(Hz), dphi(Hz))
contour(Hz)
contour(u)
contour(dr(Hz), dphi(Hz))
surface(u)
MONITORS
contour(source) as "Solution"
vector(dr(Hz), dphi(Hz))
end
Why? it was working some moments ago, now it is not. can you fix this oversight?
