1D electromagnetic simulation


delay it
Electromagnetic pulse propagation (ε = 4 to the right). The Dirichlet boundary conditions Ex = 0 at the right border corresponds to perfect conductor.

Yee's algorithm

Maxwell's curl equations (in MKS system of units) are used
    ε ∂t E = rot H,
    ∂t H = - rot E
.
We make the assumption that the electric feld has only Ex component, magnetic feld is perpendicular (has only Hy component) and that wave travels in the z direction. Hence equations become
    ε ∂t Ex = - ∂z Hy ,
    ∂t Hy = - ∂z Ex
.
Using the central diference approximation in both the spacial and time derivatives, we can express them
(Ex )zt+1 - (Ex )zt   =     (Hy )z+½t+½ - (Hy )z-½t+½
———————— – ————————————
Δt εz Δz
(Hy )z+½t+½ - (Hy )z+½t-½   =     (Ex )z+1t - (Ex )zt
———————————— – ————————
Δt Δz
or
    (Ex )zt+1 = - (a/εz ) [(Hy )z+½t+½ - (Hy )z-½t+½] + (Ex )zt,
    (Hy )z+½t+½ = - a [(Ex )z+1t - (Ey )zt] + (Hy )z+½t+½
,
where a = Δt / Δz.

A simple ABC

a = Δt / Δz = 1/2 is used in this simulation. Therefore in free space the wave moves the distance Δz during two time steps. Then at the left border we can use the value (Ex )1t-2 from the previous time steps for the boundary value (Ex )0t at the current time.

Pulse reflection from a dielectric layer

The Fresnel coefficients for normal incidence reflection and transmission are
r12 =   Er   =   ε1½ - ε2½   =   - 1
—— —————— ——
E ε1½ + ε2½ 3
t12 =   Et   =   2 ε1½   =   2
—— —————— ——
E ε1½ + ε2½ 3
where E, Er , Et are incident, reflected and transmitted wave amplitudes. ε1 = 1 and ε2 = 4. You can test this in the simulation above.
Electromagnetic wave simulation
updated 24 Mar 2014