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

4.88889
4.9 | 12 ratings Rate this file 43 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

by

 

29 Apr 2013 (Updated )

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

| Watch this File

File Information
Description

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 (17)
15 Dec 2016 josef vahab

Thanks for the code, its great.
I tried to use incident plane wave but with Gaussian profile for the amplitude (zero at the sides and maximum at the center). Thus, I multiplied Hy_1D and Ez_1D incident waves by exp(-abs((1:nx_b)'-nx_b/2)*dx). But, It creates lots of scatterings from the boundaries (absence of any scaterrer) and also the amplitude doesn't vary the way I expect. Anyone has idea about this? Thanks a lot.

15 Dec 2016 Vasily Kozhevnikov

Thank you for the comments! Yes, it works only for normal incidence. I have the code for arbitrary angle of incidence both for TE and TM waves.
If you like my codes - consider the donation. I will help me to post new free codes.

Comment only
04 Dec 2016 Jimmy Ling

15 Nov 2016 josef vahab

Thanks for the code. I think it works for only normal incident wave. I'm trying to have oblique incident wave, but I couldn't realize how can I change the incident angle. Does anyone knows how it can be done?
Thanks

Comment only
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 http://dx.doi.org/10.1109/8.546249

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

Updates
29 Jan 2014 1.1

TE mode corrected (grid collocation)

Contact us