Sinusoidal Wave of FDTD
Sinusoidal Wave of FDTD
Sinusoidal Wave of FDTD
№ 2291
Amro Ali
January 1, 2020
Simulation of a wave propagation using Finite
Difference Time domain Modeling (FDTD) by
Matlab
Amro Emad Awad Ali
Abstract— the purposes from this paper are driving and II. SOLVING PROBLEMS (CODE AND RESULTS)
simulating the propagation of a wave by using Finite Difference
For explanation of this issues Matlab (R2015b) has been
Time Domain Modeling Analysis (FDTD), by drive the
corresponding FDTD codes from Maxwell's equation and used. The main idea for solving this problem is developing
simulate these codes in MATLAB. code from Maxwell's differential equations to simulate the
Index Terms—Matlab, Model, Simulation, Maxwell, FDTD. propagation of a sinusoidal wave as a source signal hitting on
a lossy dielectric medium.
This paper is a simulation of how a wave propagates in both space and 𝜕𝐸𝑥 (𝑡) 1 𝜕𝐻𝑦 (𝑡) 𝜎
time by using a clear explanation of maxwell's equations. =− ∙ − 𝐸 (𝑡) (5)
Amro Emad Awad Ali, Riyadh, Saudi Arabia. Studing a master degree in 𝜕𝑡 𝜀0 𝜀𝑟 𝜕𝑧 𝜀0 𝜀𝑟 𝑥
computer and control systems at King Saud University, (e-mail:
[email protected] edu.sa). 𝜕𝐻𝑦 (𝑡) 1 𝜕𝐸𝑥 (𝑡)
=− ∙ (6)
𝜕𝑡 𝜀0 𝜇0 𝜕𝑧
gbx=zeros(KE,1);
Now take the normalization of 𝐸𝑥 (𝑡) in equations (5) and %kc is the number of cell in which asinusoidal
wave originates
(6). kc=10;
%f0 the corresponding frequancy of the wave
𝜕𝐸̃𝑥 (𝑡) 1 𝜕𝐻𝑦 (𝑡) 𝜎 f0=1e9;
=− ∙ − 𝐸̃𝑥 (𝑡) (7) %c0 the speed of light in avacuum
𝜕𝑡 𝜀𝑟 √𝜀0 𝜇0 𝜕𝑧 𝜀0 𝜀𝑟
c0=3e8;
lambdaM=c0/(sqrt(epsr)*f0);
𝜕𝐻𝑦 (𝑡) 1 𝜕𝐸̃𝑥 (𝑡) ddx=lambdaM/10;
=− ∙ (8) dt=ddx./(2*c0);
𝜕𝑡 √𝜀0 𝜇0 𝜕𝑧
ex_low_m2=0;
ex_low_m1=0;
Now take the finite difference approximations for both the T =0;
temporal and spatial derivatives (FDTD code). NSTEPS=400;c=0;
%main FDTD loop
⁄ ⁄ for k=200:KE;
𝐸̃𝑥𝑛+1 2 (𝑘) − 𝐸̃𝑥𝑛−1 2 (𝑘)
gax(k,1)=1/(epsr+(sigma*dt/epsz0));
∆𝑡 gbx(k,1)=sigma*dt/epsz0;
1 𝐻𝑦𝑛 (𝑘 + 1⁄2) − 𝐻𝑦𝑛 (𝑘 − 1⁄2)
=− ∙ end
𝜀𝑟 √𝜀0 𝜇0 ∆𝑥 for m=100:100:400;
𝜎 𝐸̃𝑥 𝑛+1 ⁄ 2
(𝑘) + 𝐸̃𝑥𝑛−1⁄ 2
(𝑘) c=c + 1;
− (9) for n=1:m;
𝜀0 𝜀𝑟 2
T = T + 1;
for k=2:KE;
Where ∆𝑥 is the cell size which is ∆𝑡 = ∆𝑥 ∕ 2𝑐0 then: dx(k)=dx(k)+.5*(hy(k-1)-hy(k));
end
1 ∆𝑡 ∆𝑥⁄2 ∙ 𝑐0 1 source=sin(2*pi*f0*n*dt);
= 𝑐0 ∙ =
√𝜀0 𝜇0 ∆𝑥 ∆𝑥 2 dx(kc)=dx(kc)+source;
%calculate the e field of the FDTD
Now equation (9) becomes:
for k=2:KE;
ex(k)=gax(k,1)*(dx(k)-ix(k));
⁄ ∆𝑡 ∙ 𝜎
𝐸̃𝑥𝑛+1 2 (𝑘) [1 + ] ix(k)=ix(k)+gbx(k,1)*ex(k);
2𝜀0 𝜀𝑟 end
⁄ ∆𝑡 ∙ 𝜎 %absorbing boundary condition added
= 𝐸̃𝑥𝑛−1 2 (𝑘) [1 − ]
2𝜀0 𝜀𝑟 ex(1)=ex_low_m2;
1⁄2 𝑛 ex_low_m2=ex_low_m1;
− [𝐻𝑦 (𝑘 + 1⁄2) − 𝐻𝑦𝑛 (𝑘 − 1⁄2)] (10) ex_low_m1=ex(2);
𝜀𝑟
Or %calulate the h field of the FDTD
for k=1:(KE-1);
hy(k)=hy(k)+.5*(ex(k)-ex(k+1));
∆𝑡 ∙ 𝜎
(1 − ) end
⁄ 2𝜀0 𝜀𝑟 ̃ 𝑛−1⁄2
𝐸̃𝑥𝑛+1 2 (𝑘) = 𝐸 (𝑘) figure(c); plot(ex,'b'); hold on
∆𝑡 ∙ 𝜎 𝑥
(1 + ) xa=[200 200];ya=[-1.5 1.5];
2𝜀0 𝜀𝑟
plot(xa,ya,'r','LineWidth',2,'LineStyle','--
1⁄2 1
− [𝐻𝑦𝑛 (𝑘 + ) ')
∆𝑡 ∙ 𝜎 2 title(['T = ',num2str(n)]);
𝜀𝑟 (1 + )
2𝜀0 𝜀𝑟 ylabel('Propagation of E')
− 𝐻𝑦𝑛 (𝑘 − 1⁄2)] (11) xlabel('FDTD ')
axis([1 KE -2 2])
text(250,-1.15,'Conductivity(sigma)=0.02')
Matlab code has been written for four "T" (100,200,300 and 400) to
text(250,-1.3,'Epsilon=3.8')
show the propagation of the sinusoidal wave across the medium.
text(50,-1.3,'Epsilon=1','color','k')
clear;
hold off
clc;
end
%epsr is the dielectric constant
end
epsr=3.8;
%epsz0 is the permitivity of space
epsz0=8.854223e-12;
%sigma is the conductivity
sigma=0.02;
%KE is the number of cells to be used
KE=400;
dx=zeros(KE,1);
ex=zeros(KE,1);
hy=zeros(KE,1);
ix=zeros(KE,1);
gax=ones(KE,1);
T = 100 T = 400
2 2
1.5 1.5
1 1
Propagation of E
Propagation of E
0.5 0.5
0 0
-0.5 -0.5
-1 -1
Conductivity(sigma)=0.02 Conductivity(sigma)=0.02
Epsilon=1 Epsilon=3.8 Epsilon=1 Epsilon=3.8
-1.5 -1.5
-2 -2
50 100 150 200 250 300 350 400 50 100 150 200 250 300 350 400
FDTD FDTD
Fig. 1. 1-D FDTD sinusoidal wave start propagating from cell 10 in a lossy Fig. 4. 1-D FDTD sinusoidal wave start propagating from cell 10 in a lossy
dielectric material, output at T=100. dielectric material, output at T=400.
T = 200
2
III- Conclusion
1.5
1
One dimension FDTD simulation has been done for a
sinusoidal wave hitting a lossy dielectric material.
From all of the above it can be clearly seen that FDTD is
Propagation of E
0.5
-1
Conductivity(sigma)=0.02
REFERENCES
Epsilon=1 Epsilon=3.8
[1] Dennis M.Sullivan''Electromagnetic Simulation Using The FDTD
-1.5
Method'', Institute of Electrical and Electronics Engineers Inc ,
New York, 2000.
-2
50 100 150 200 250 300 350 400
FDTD
Fig. 2. 1-D FDTD sinusoidal wave start propagating from cell 10 in a lossy
dielectric material, output at T=200.
T = 300
Amro Emad Awad Ali received the
2 B.S.c degree in electrical engineering
(control) from Sudan University of
1.5
science and Technology, Khartoum,
1 Sudan, in 2014. He is currently
performing a postgraduate studies (a
master degree) in electrical engineering
Propagation of E
0.5
-1
Conductivity(sigma)=0.02
Epsilon=1 Epsilon=3.8
-1.5
-2
50 100 150 200 250 300 350 400
FDTD