View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
2D FDTD code with TF/SF interface and UPML absorbing borders

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

4.9 | 10 ratings Rate this file 42 Downloads (last 30 days) File Size: 4.78 KB File ID: #41518 Version: 1.1
image thumbnail

2D FDTD code with TF/SF interface and UPML absorbing borders



29 Apr 2013 (Updated )

Simple example implements FDTD + UPML + Total Field/Scattered Field interface

| Watch this File

File Information

The example contains:
1. 2D FDTD algorithm for simultaneously TE and TM modes calculation,
2. Uniaxial PML absorbing border conditions,
3. Total Field/Scattered field (TF/SF) interface for plane EM-waves scattering problems investigations.

Works well for free-form scatterers with constant permittivities, permeabilities and conductivities. Number of materials isn't limited.
For more details see Allen Taflove's "bible".

Required Products MATLAB
MATLAB release MATLAB 8.1 (R2013a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (13)
15 Sep 2016 kick401

how to extract s parameters from this code

25 Jul 2016 Irfan Yousuf

Can this code be used to cloak a square shape?

Comment only
16 Jun 2016 Arnie Chang  
14 Feb 2014 jpadam

jpadam (view profile)

Thanks for the correction of the TE mode, everything works fine now !

05 Feb 2014 Vasily Kozhevnikov

Yes, L in [meters].
UPML FDTD for TE mode needs three Index matrixes due to the fact that in FDTD Ex, Ey and Hz have different space grids. You may apply single Index, but it'll cause distortions at low space resolution.
"My" implementation based on original Gedney's work

Comment only
05 Feb 2014 arnold

arnold (view profile)

great implementation, seems to work well.

L is in meters too, I guess.
I don't get why there are three indices, why should material 2 not be congruent in space for all three, doesn't make sense in my head.

Maybe it'd make sense to add the ability to give complex refractive index, many users of FDTD do optics only and might not be physicists :)

....oh and there is no paper to cite your implementation, so I can give it to my students, is there?

29 Jan 2014 Alexey Borisov  
05 Dec 2013 jpadam

jpadam (view profile)

Really nice and well written script. Ready to study the EM scattering of 2D structures.

However, I think there is a problem in the TE mode. I simulated a cylinder (just removed "&& (L(1)-I*dx<=J*dy", line 63) and observed that the Hz pattern isn't quite symmetric...

Comment only
05 Dec 2013 jpadam

jpadam (view profile)

05 Dec 2013 jpadam

jpadam (view profile)

03 Sep 2013 Ulrich

Ulrich (view profile)

Great, thanks!

29 Jul 2013 Aleksey  
20 Jul 2013 Aleksey  
29 Jan 2014 1.1

TE mode corrected (grid collocation)

Contact us