# Numerical Methods

The FDTD algorithm is one in a general class of grid-based differential time-domain numerical modeling methods.

Maxwell’s equations (in partial differential form) are discretized using central-difference approximations to the space and time partial derivatives.

The numerical methods used in FDTD are shown below.

## Finite Difference Equations

Taflove2005, pages 23-26 (especially page 24)

### Second partial space derivative

The finite difference equations for the second order accurate central-difference approximation
to the second partial space derivative: Eqn:A.1

### Second partial time derivative

The finite difference equations for the second order accurate central-difference approximation to the second partial time derivative: Eqn:A.2

### First partial space derivative

The finite difference equations for the second order accurate central-difference approximation
to the first partial space derivative (Taflove2005, page 62):
and Lecture Notes: The FDTD Method – Part I, Dr. Nikolova p.4 (pdf) Eqn:A.3

or Eqn:A.4

### Second partial space derivative with respect to x and y

The finite difference equations for the second order accurate central-difference approximation
to the second partial space derivative with respect to x and y:

Using Ey as an example. Calculate Ey at x=0.5, y=0, z=0 Calculate the Second Partial derivative of Ey (at x=0.5,y=0,z=0) with respect to X and Y

Using Equation A.3 first evaluate with respect to X. Eqn:A.5

And again using Equation A.3 evaluate Equation A.5 with respect to Y. Eqn:A.6 Eqn:A.7

Which gives the final equation (assume dy = dx): Eqn:A.8

## Stencils

```       o x,y+1                      o        o        o
|                            x-1,y+1  |x,y+1   x+1,y+1
|                                     |
x-1,y  |      x+1,y                 x-1,y    |        x+1,y
o------o------o                     o--------o--------o
|x,y                                  |x,y
|                                     |
|                            x-1,y-1  |x,y-1   x+1,y-1
o x,y-1                      o        o        o

5 point (2-D)                          9 point (2-D)
(7 point, 3-D)                      (27 point, 3-D)
```