Engineering Question

1
ECE 452 – Assignment 2
Due at 4 pm, Monday, October 17, 2022
1. The 3D diffusion equation ut u
2   is discretized to second order accuracy O(x
2
, y
2
, z
2
,
t
2
) using the Finite Difference method as
௨೔,ೕ,ೖ
೙శభି௨೔,ೕ,ೖ
೙షభ
ଶ∆௧
=
௨೔శభ,ೕ,ೖ
೙ ିଶ௨೔,ೕ,ೖ
೙ ା௨೔షభ,ೕ,ೖ

∆௫
మ +
௨೔,ೕశభ,ೖ
೙ ିଶ௨೔,ೕ,ೖ
೙ ା௨೔,ೕషభ,ೖ

∆௬మ +
௨೔,ೕ,ೖశభ
೙ ିଶ௨೔,ೕ,ೖ
೙ ା௨೔,ೕ,ೖషభ

∆௭

where 𝑢௜,௝,௞
௡ = 𝑢(𝑖∆𝑥,𝑗∆𝑦, 𝑘∆𝑧, 𝑛∆𝑡). Determine the stability condition of the above discrete
equation.
2. The propagation of electromagnetic waves in 2D is governed by the wave equation
2
2
2
2
2
2
2
2
y
u
x
u
t
u
c
n

,
where n(x, y) is the refractive index of the medium and c = 3 × 108
m/s is the speed of light in
vacuum. We would like to solve the above equation using the Finite Difference Time Domain
(FDTD) method. The computation domain is restricted to a rectangular region of size a × b
and first-order Radiating Boundary Conditions based on the one-way wave equation are
applied to all four boundaries.
(a) Give a FD discretization of the wave equation for an interior node (i, j).
(b) Derive the FD equations for nodes on the left, right, top and bottom boundaries.
(c) Implement the FDTD method in a MATLAB program to solve the above wave equation.
An outline of the program is given at the end of the assignment for your reference.
(d) Use your program to run the following simulations:
Simulation 1:
This is a test run to verify that your program works correctly. Define the computational
domain to be the region 0 ≤ x ≤ 10m, 5m ≤ y ≤ 5m, and set the index of the medium
to be free space everywhere, n(x, y) = 1. Apply a point source located at (2.5m, 0). The
source emits a Gaussian pulse modulating a carrier signal given by:
sin( )
/ 2
( , , ) exp
2
0
t
w
t T
u x y t s s 

 
  ,
2
where  = 2c/ is the frequency,  = 1.0m is the wavelength, w = 8.0fs is the pulse
width, and T0 = 4.0fs is the time offset of the pulse centre. Use grid sizes x = y = 0.05m
and set the time step to the maximum allowable by the CFL stability condition. Initialize
the fields at the first two time steps to 0 (i.e., set 0
1
,
0 ui, j  ui j  ). Run the simulation for
175 time steps and provide the following results:
(i) A 3D plot or a contour plot of the field distribution u(x, y) at time step n = 175. (Use
mesh or surf commands for 3D plot and contour for contour plot)
(ii) A plot of the field u versus x along the line y = 0 at time step n = 175.
Print out and hand in a copy of your MATLAB program.
Simulation 2:
In this simulation we would like to study the diffraction of a plane wave by a single slit.
We consider a plate with a slit of width a = 5m illuminated by a plane wave with
wavelength  = 1.0m, as shown in the figure below. The plate is 0.5m thick and is
assumed to be made of a material of very high refractive index (n = 10) so that it is strongly
reflective. In the simulation, set the computational domain to be  ≤ x ≤ 25m, 15m ≤
y ≤ 15m, with grid sizes x = y = 0.05m. Use a line source located at xs = 1.0m to
generate a plane wave with unit amplitude and wavelength  = 1.0m. The field at a node
on the line source is given by
u(x , y,t) sin( t)
s  
where 14.5m ≤ y ≤ 14.5m (so that the line source does not touch the top and bottom
boundaries). Set the time step to the maximum allowable by the CFL stability condition,
run the simulation and provide the following results:
(i) A 3D plot or a contour plot of the field distribution u(x, y) at t = 90fs.
(ii) Suppose a “screen” is placed at location xo = 20m to image the diffraction pattern of
the field intensity. The field distribution on the screen can be expressed as
u(x , y,t) E(x , y) cos( t) o  o  ,
where E(xo, y) is the envelope of the field. Give a plot of the intensity diffraction
pattern, I(y) = E
2
(xo, y). (The field envelope can be obtained by capturing the maximum
field at each point on the screen over a few periods of oscillation of the wave).
3
(iii)From Fraunhofer’s theory of diffraction, the intensity distribution of light transmitted
through a single slit is given by
2
sin( )
( ) 

 o
I y I ,
where   (a /)sin . The angle  is given by tan  y / L, where L = 10m is the
distance from the plate to the screen. Choosing an appropriate value for Io, plot the
above expression on the same plot obtained in (ii) and compare the numerical
simulation to the theoretical intensity distribution.
25
15
0
1 10
a = 5m
20
0.5m
-15
y (m)
x (m)
line
source plate screen
(n = 10)
n = 1 n = 1

L
4
Outline of the 2D Finite Difference Time Domain Program
% Create and initialize Ny x Nx matrices to store fields at time levels
% n – 1, n, and n + 1:
En_1 = zeros(Ny,Nx); % time level n – 1
En0 = zeros(Ny,Nx); % time level n
En1 = zeros(Ny,Nx); % time level n + 1
% March solution from time step n = 0 to n = nstop:
for n = 1 : nstop,
% Compute interior nodes:
for jj = 2 : Ny-1,
for ii = 2 : Nx-1,
compute En1(jj,ii)
end
end
Compute value of E at source point (xs, ys) at time step n + 1
Compute boundary nodes at time step n + 1
% Store fields at the two most recent time levels:
Un_1 = Un0;
Un0 = Un1;
end

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
\$26
The price is based on these factors:
Number of pages
Urgency
Basic features
• Free title page and bibliography
• Unlimited revisions
• Plagiarism-free guarantee
• Money-back guarantee
On-demand options
• Writer’s samples
• Part-by-part delivery
• Overnight delivery
• Copies of used sources
Paper format
• 275 words per page
• 12 pt Arial/Times New Roman
• Double line spacing
• Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.