Table of Contents

Sinusoidal wave (1D FDTD)

A sinusoidal wave is a periodic excitation with a fixed amplitude, frequency, and phase. The command-line program supplies a source callback that adds this value to $E_z$ at each step:

$$ s(n)=A\sin(2\pi f n+\phi) $$

$A$ is the amplitude, $f$ the frequency in cycles per simulation step, and $\phi$ the phase in radians. The argument $n$ comes from Fdtd_EzSimGetTime(), which returns a step counter rather than seconds. The corresponding physical frequency is $f/\Delta t$.

For example, --add-wave=100,1,0.1,0 registers a source at cell 100 with amplitude one, a period of ten steps, and zero phase. Without explicit arguments, the program uses these waveform parameters and places the source at the grid midpoint.

The callback adds its sample after each electric update and before the counter advances. With zero phase, the first sample of a fresh run is zero. Unlike a Gaussian pulse, the source keeps oscillating throughout the run, allowing sustained excitation and interference with waves reflected from boundaries or material interfaces.