The following file describes a cubic cavity of 1m side length. The system is excited by an electric field which extends across the whole cavity. The timestep is given by dl/2c, where dl is the node spacing and c is the speed of light.
! 1m * 1m * 1m cavity :MESH 10 10 10 :DL 0.1 :TIMESTEPS 1000 :BOUNDARIES 6 -1.0 'XN' 1 1 1 1 10 10 -1.0 'YN' 1 1 1 10 1 10 -1.0 'ZN' 1 1 1 10 10 1 -1.0 'XP' 10 1 1 10 10 10 -1.0 'YP' 1 10 1 10 10 10 -1.0 'ZP' 1 1 10 10 10 10 :EXCITE 1 'EX' 1.0 1 8 8 10 8 8 :OUTPUT 1 'EX' 2 2 2 :OUTPUT_FILE 'ex1.out' :END
The time domain output looks like this:
In the frequency domain, the output looks like this:
The resonant frequencies of the cavity are given by the peaks in the response. The sin(x)/x ripple around the peaks is due to the truncation of the time series.