the pressure amplitude can be obtained by setting the time step to give an integer number of time steps per period, and then recording the acoustic pressure over an integer number of periods in steady state. This allows the pressure amplitude at the driving frequency (and the harmonics if the simulation is nonlinear) to be obtained from the amplitude spectrum of the pressure time signals.</p>

<pre class="codeinput">
<span class="comment">% calculate the time step using an integer number of points per perio