# Implementing the finite-difference time-domain (FDTD) method

The finite-difference time-domain (FDTD) method for Maxwell’s equations allows calculating the electromagnetic fields $E$ and $H$ as functions of space and time. Suppose that we have a two-dimensional space grid with points specified by $x=i\Delta x$, $y=j\Delta y$. At the point $i=10$, $j=10$ the electromagnetic field is constant: $E=E_0$, $H=H_0$ for all $t=n\Delta t$. Everywhere else $E=H=0$. From physical considerations it’s clear that this field configuration is constant and cannot propagate in space. But according to FDTD the field in the points around $i=10$, $j=10$ is defined by expressions like $(E(i=10)-E(i=9))/\Delta x$. This means we will get a propagating electromagnetic wave. How can this contradiction be explained?

• Do you mean that the $E = E_0$, $H=H_0$ is imposed at $(i,j)=(10,10)$ as a boundary condition, but $E = H = 0$ elsewhere is an initial condition? – Alex Shpilkin Oct 12 '17 at 18:09
• I meant an initial condition: in the start of calculation ($t=0$) we have plane net ($i=0, 1...20, j=0, 1...20$), and in almost all points of net fields are zero. And only in one point $i=10, j=10$ fields are non-zero. For the next time moment we need to calculate fields for all $i$ and $j$. From formal point of view, field for $i=9, j=10, t=0+dt$ is field in previous time moment $t=0$ plus derivative, such as $(E(i=10)-E(i=9))/dx$, or smth similar. So, for $t=0+dt$ we have nonzero filed not only in one point. It looks like electromagnetic pulse, which spreads in space. – Alexey Kuznetsov Oct 13 '17 at 7:37
• What are these physical considerations that lead you to thinking the field should be constant? – CDCM Oct 13 '17 at 8:35
• It was an artificial example, which is necessary for one point: to understand, how to use FDTD when dependence of field on coordinate is not continuous. When I tried to use method of full and scattered field, I generated plane wave on the board between full field area and scattered field area, and I received not continuous field: zero in the scattered area, and non zero in the full field area. – Alexey Kuznetsov Oct 13 '17 at 9:29

If I understand correctly, $(E(i=10)-E(i=9))/\Delta x$ would be non-zero at $t=0$. But then, qualitatively, and that's enough since you said you oversimplified, that means that the rotational and divergence of $E$, and similarly of $H$, may have a non-zero value at the grid point $(9,10)$. Now look at Maxwell equations: it means the derivatives of $E$ and $H$ may have non-zero values at that grid point. Thus at the next tick $t=\Delta t$, the fields would then have a non-zero value at grid point $(9,10)$. Then rinse and repeat and the grid points will keep populate with non-zero field values.