Site Tools


fdtd-openmp-yee-grid

Table of Contents

Yee grid (1D FDTD)

A Yee grid places electric and magnetic samples at different spatial positions. In FDTD OpenMP, $E_z$ lies at integer grid positions, while $H_y$ lies halfway between neighboring electric samples:

$$ x_E[k]=k\Delta x,\qquad x_H[k]=\left(k+\frac12\right)\Delta x $$

The arrays still use integer indices. Hy[k] represents the magnetic sample between Ez[k] and Ez[k + 1]. Its update uses their difference. Conversely, updating Ez[k] uses Hy[k] - Hy[k - 1], the magnetic difference across that electric sample.

Both arrays have the configured grid width. The magnetic loop updates indices from zero through width minus two, while the electric loop updates indices from one through width minus one. The unused endpoint samples supply the finite grid's termination.

This spatial offset lets each derivative be evaluated at the position of the field being updated. The fields are also staggered in time through leapfrog stepping. Spatial and temporal staggering together form the discretization used by both simulation kernels.

fdtd-openmp-yee-grid.md · Last modified: by 127.0.0.1