- Step through the FDTD algorithm until the transient part of the solution propagates away from the scatterer.
- At this point in time, inside the loop over the time index, begin storing values of Hx, Hy, and Ez at grid samples on the Huygens contour around the scatterer. This could be done using eight arrays (top, borrom, right, left sides of the contour for each of the tangential field components). Continue this for exactly one time cycle of the incident field (1/f/dt time steps). After one time cycle of the fields on the contour have been stored, end the FDTD loop and go to post processing.
- In the post-processing of the code, use the FFT command to transform the time samples of the fields. The third argument of the matlab fft command allows you to select which dimension of an array to transform. Pull out the second sample of each FFT and scale by 2/N. You now have one complex phasor at each point on the contour for Hx, Hy, and Ez.
- Loop over 360 or so scattering angles. For each scattering angle (inside the loop), compute the far-field radiation integral over the Huygens contour using a Riemann sum to approximate the integral. In the radiation integral, the angle phi is the scattering angle, and the point x',y' represents the grid points on the Huygens contour that you are summing over. The value of this integral will be the scattering amplitude at the current scattering angle. Convert the scattering amplitude to scattering width by taking the magnitude squared and multiplying by the appropriate constant. You now have the bistatic scattering width at various angles around the scatterer.
- Compare the scattering width to the analytical solution using Bessel functions derived in the notes.
Top: +Ez sin + eta Hx
Bottom: -Ez sin - eta Hx
Right: +Ez cos - eta Hy
Left: -Ez cos + eta Hy
In the radiation integral, the x' and y' points used to compute the phase term must be the same as the physical points corresponding to the samples of the fields Hx, Hy, and Ez.
In matlab, do not use the apostrophe (') to change column vectors to row vectors or vice versa, because it will conjugate the elements (it is the Hermitian transpose operation). Use period apostrophe (.') instead.