Convolutional PML worse than Split-Field PML ...
its a little bit strange for me, that the C-PML from Gedney is worse than the old and classical PML Algorithms like Split-Field and Uniaxial, even the decay is strange. I think, i implemented something wrong... Please look into the PML Comparison.pdf inside the zip file.
You will find four PML algorithms as MatLab files in the zip, the Split-Field from Berenger, Uniaxial and Convolutional PML from Gedney and the fourth i can't remember from whom it was, the Nearly Perfect PML. The reference and reflection calculation is added as well.
I hope anybody has a clue, what i did wrong. If something in the source file is unclear, please let me know.
Regards Winn
I do not know matlab so I might have misunderstood your code but it is possible
that your grading at the top and the bottom of the array is not correct. If you are
looking at the yee cells at the top and at the bottom then at the top the hfield
should have higher sigmas than the efield while at the bottom the reverse should be true.
First of all, MatLab uses the same array indexing than Fortran or clearly said, the first element is acces via [1]. Second, for my understanding, the first and last conductivity on the electric grid should be infinite due the PEC boundary. And the last conductivity on the magnetic grid should be infinite as well due to his position "behind" the PEC wall. Both conditions are implemented by neglecting the field values during the for-loop-range. I've added the conductivity grading as a plot ... is the grading as you mentioned ?
The grading looks right. I missed the -1 in the line
xhalpha(1,i-1)=alpha_max*(abs(xhlength(1,i)-xdim*delta)/(thickness*delta))^exp_alpha;
more or less arbitrary materials. I have not compared it systematically
with any of the other PMLs.
But since you get identical results for SPML and UPML, as well as NPML
and CPML it seems that your implementation ought to be correct.
It may be that you hit upon an example where PML just happens to be better.
One difference between SPML and CPMLis that the former uses linear discretization
of the decay while CPML uses exponential discretization. It may just be that for
the grading you used the linear discretization is preferable but I find that hard to
believe.
If I find the time I will rewrite your tests in C and have a look this weekend.
Please let me know if you find out the reason for SPMLs superiority.
One last suggestion. CPML's performance ought to improve (relative to SPML)
if you place the source closer to the boundary. If this does not happen then there
might be a bug. If it does then this would support the assumption that your implementation
is correct.