FDTD problem with 2d diffraction
I need your help. I'm currently working on a 2d FDTD simulation, I'm trying to simulate diffraction. MY grid is 200x200, on the 100th line I added a PEC wall with sigma= 10e6. This works very correctly, reflecting everything back.
But if I "cut a hole" in this wall to simulate diffraction, the simulation goes wrong. There's nothing reflected, all waves vanished from the simulation domain, there are some "glitch" waves in the hole. I'm uploading my code, please help out a poor fellow.
Thank you, anyway.
ps: sorry for my english.
Hey guys,
I played with the simulation, and it seems ok when there's a continuos space with different epsilon, sigma. I tried to vary the epsilon in the way to simulate a lens or something, and the results were bad, too.
It seems that my code works if i define a continous space with different material parameters, else, it doesn't.
What am I doing wrong?
In general such problems may be caused by (in decreasing order of probability)
a) a bug in the code
b) a misunderstanding of how FDTD is set up
c) cosmic rays flipping random bits
In your case it is a)
for i = 100, and j = 80,..120
you let the god of randomness decide the conductivity in your model
For some reason the word g.o.d is blanked out above I don't know why.