## Abstract

The pseudospectral time-domain (PSTD) method greatly extends the physical volume of biological tissue in which light scattering can be calculated, relative to the finite-difference time-domain (FDTD) method. We have developed an analogue of the total-field scattered-field source condition, as employed in FDTD, for introducing focussed illuminations into PSTD simulations. This new source condition requires knowledge of the incident field, and applies update equations, at a single plane in the PSTD grid. Numerical artifacts, usually associated with compact PSTD source conditions, are minimized by using a staggered grid. This source condition’s similarity with that used by the FDTD suggests a way in which existing FDTD codes can be easily adapted to PSTD codes.

© 2014 Optical Society of America

## 1. Background

The pseudospectral time-domain (PSTD) method is a computationally efficient numerical method for calculating electromagnetic scattering [1,2]. The method appears to have been used first to solve the acoustic wave equation [3] and has been used widely in fields such as seismic imaging [4] to enable larger scattering volumes to be modelled. In electromagnetic scattering, the PSTD method is closely related to the finite-difference time-domain (FDTD) method with the main difference being how field quantities are spatially sampled. The FDTD method evaluates spatial derivatives using central differences and so field quantities must be sampled at least 10 times per wavelength. The PSTD method evaluates spatial derivatives using the discrete Fourier transform allowing the field sampling to approach two samples per wavelength. The result of this is that, for a problem of dimension *D*, the PSTD method is between 4* ^{D}* and 8

*times more efficient than the FDTD method [1].*

^{D}Being able to model significantly larger computational volumes is particularly important in biomedical optics applications. This is because sub-wavelength features, i.e., those on the sub-cellular scale, can be embedded in volumes with linear dimensions of thousands of wavelengths, i.e., on the tissue scale. The PSTD method has been used to model phenomena arising from scattering by tissue such as enhanced back scattering [5,6], scattering by non-spherical particles [7], and scattering by ensembles of discrete scatterers [8]. To the best of our knowledge, none of these works employed focused illumination. Adapting existing source conditions to this task would require a focused incident field to be specified on a sub-grid occupying between two [9] and 10 [10] planes of points arranged along the nominal direction of beam propagation. The goal of this paper is to develop a method of introducing focused light into a PSTD simulation via points residing on a single plane in the grid. This leads to a straight forward implementation which is very similar to the total-field scattered-field (TFSF) source condition which has been employed for over three decades by the FDTD community [11].

In the remainder of this paper, we discuss the field equivalence principle before giving a very brief introduction to the FDTD and PSTD methods, including the existing source conditions of both methods. We discuss details of evaluating derivatives using the discrete Fourier transform and the relevance of staggered and collocated grids. We then use these results to derive the new PSTD source condition. We conclude with examples of how the new source condition can be employed and an evaluation of the new source condition which demonstrates its efficacy.

## 2. Field equivalence

We briefly introduce the field equivalence principle as it is central to our new source condition. We employ a mathematical derivation of this principle by Stratton and Chu [12] which appears to us to be very clear. We repeat only as much of this work here as is necessary for our purposes. More detailed explanations of the field equivalence principle are given at length elsewhere by others [13–16]. Stratton and Chu employ the following statement of Maxwell’s equations for time harmonic fields of angular frequency *ω* (assuming the exp(−*iωt*) convention):

*ε*and permeability

*μ*has been assumed,

**J**

^{*}is the magnetic current density and

*ρ*

^{*}the magnetic charge density. All other terms take their usual meaning. Neither

**J**

^{*}or

*ρ*

^{*}are required to be included but they make Maxwell’s equations symmetric and allow the equivalence principle to be developed. Perhaps the most widely known result from Stratton and Chu’s paper, developed using only vector identities and equations of continuity, is that the electric field within a closed surface,

*S*, containing no sources or sinks of radiation, is given by:

*x′*,

*y′*,

*z′*) is an interior point of

*S*,

*G*= exp(

*ikr*)/

*r*is the free space Green’s function,

*r*is the distance between (

*x′*,

*y′*,

*z′*) and a point on

*S*, d

*a*is a differential surface element,

**n**is an outward facing surface normal and

**E**and

**H**appearing inside the integral are the electric and magnetic fields on

*S*, respectively. A complementary result is also obtained for the magnetic field. A further important result of Stratton and Chu, which connects Eq. (2) to Eqs. (1), is that exactly the same field will result within

*S*, as illustrated in Fig. 1, if the field incident upon

*S*vanished but the following equivalent current

*surface*densities and charge existed on

*S*:

**J**

*is an equivalent electric surface current density, ${\mathbf{J}}_{s}^{*}$ is an equivalent magnetic surface current density and*

_{s}*η*an equivalent surface electric charge density. This result is usually referred to as the field equivalence principle.

## 3. The finite-difference time-domain method

It is beyond the scope of this paper to give a detailed account of the FDTD method, particularly as there are many good books on the subject [17, 18]. We present some salient features of the method to illustrate the innovation and significance of the source condition we are introducing. For brevity, we consider a two-dimensional vacuum where all field quantities are assumed to be uniform in the *y* direction. The concepts presented here are readily extended to three-dimensions. By choosing the so-called transverse magnetic (TM) independent subset of Maxwell’s equations, we obtain the following equations which govern the propagation of electromagnetic waves in the computational domain [17]:

*ε*and

*μ*are the electric permittivity and magnetic permeability of free space, respectively, ${J}_{y}^{*}$ is an equivalent source magnetic current density and

*J*and

_{x}*J*are electric source current densities. A set of recurrence relations is obtained from these equations by discretising

_{z}*E*,

_{x}*E*and

_{z}*H*in space and time and approximating temporal and spatial derivatives with central difference equations. The simulation proceeds from an initial condition and ceases when a final condition is reached. The difference equations resulting from Eqs. (4) are [17]:

_{y}*t*and Δ

*are the temporal and spatial grid spacings, respectively, which are subject to restrictions. The indexing used here is such that*

_{xz}*H*(

_{y}*i*,

*k*;

*n*) refers to the value of

_{t}*H*at position (

_{y}*i*Δ

*,*

_{xz}*k*Δ

*) at time*

_{xz}*n*Δ

_{t}*t*. Note also that the field components are offset by half a grid spacing in both space and time.

One way of introducing a field into an FDTD simulation is to begin with an initial source condition [19], where the incident field is used to initialise the FDTD grid before iterations commence. However, the most widely used source condition is the TFSF source condition which makes use of the source terms
${J}_{y}^{*}$, *J _{x}* and

*J*, appearing in Eqs. (5)–(7) to introduce an incident wave at a fictitious surface at each iteration of the FDTD algorithm [11]. This is demonstrated in the left hand diagram in Fig. 2, which shows how a focused illumination could be introduced into the region bounded by the surface

_{z}*S*=

*S*

_{1}∪

*S*

_{2}∪

*S*

_{3}∪

*S*

_{4}. Alternatively, if

*S*

_{1}is sufficiently large such that

*S*

_{2}and

*S*

_{3}are pushed to infinity and

*S*

_{4}is also pushed to infinity, the source condition can be implemented on

*S*

_{1}only since

*S*

_{2},

*S*

_{3}and

*S*

_{4}contribute negligibly to the field in the total field region [20]. This enables a focused illumination to be accurately introduced along a single interface, as in the right hand diagram of Fig. 2 as long as the majority of the focused beam’s energy propagates through

*S*

_{1}. In both cases, the incident field is introduced to the update equations (Eqs. (5)–(7)) via the source magnetic and electric current densities along the surface

*S*, in the left hand case, and along the surface

*S*

_{1}in the right hand case. The region in which the incident field is present is denoted the total field region, whilst that in which only the scattered field is present is the scattered field region.

The implementation of this source condition can be understood by considering the update equation for *H _{y}*(

*i*,

*k*;

_{s}*n*), Eq. (5), in the region of the interface between total and scattered field regions at

_{t}*k*Δ

_{s}*, as depicted for*

_{xz}*i*= 0 in Fig. 2. If Eq. (5) were evaluated directly without accounting for the fact that one

*E*term is a scattered quantity and the other a total quantity, the update equation would be inconsistent. However, since the incident field

_{x}*E*(

_{x,i}*i*,

*k*+ 1/2;

_{s}*n*+ 1/2) is known analytically, an additional update equation can be executed to make the original update equation consistent [17], taking the form:

_{t}*H*(

_{y}*i*,

*k*;

_{s}*n*)

_{t}_{(5)}is the quantity arising from the evaluation of Eq. (5). This can also be interpreted as including a source term ${J}_{y}^{*}\left(i,{k}_{s};{n}_{t}\right)$ in Eq. (5) [11]. The important point to note is that the spatial derivative of

*E*with respect to

_{x}*z*, at

*z*=

*k*Δ

_{s}*, is able to be corrected locally with knowledge of the analytic incident field. In this two-dimensional example, a similar correction must be made to Eq. (6), the update equation for*

_{xz}*E*.

_{x}## 4. The pseudospectral time-domain method

The PSTD method update equations may be derived in a similar way to the FDTD update equations except that spatial derivatives are evaluated using discrete Fourier transforms rather than central differences [1]. The majority of reported implementations of the PSTD method also differ from the FDTD method by employing a so-called collocated grid in which all field components are sampled on the same computational grid. Recently, however, implementations employing a staggered grid have been reported [5] which we will consider in more detail in Sec. (4.3). The problem of finding a suitable source condition for the PSTD method stems from the spatial derivatives being evaluated globally using the discrete Fourier transform. To understand this further, consider again a two-dimensional TM simulation, as depicted in Fig. 3, where plot (a) shows *H _{y}* along a line of constant

*x*at an instant in time. This computational domain has a total field region for

*z*≥ 0 and a scattered region otherwise. In the FDTD case, the update equation for

*E*(Eq. (6)) implicitly calculates

_{x}*∂H*using central differences resulting in an error at

_{y}/∂z*z*= Δ

*/2, as shown in Fig. 3(b), since the difference equation uses one total field quantity and one scattered field quantity as illustrated in Fig. 2. However, this error can be precisely compensated for with the analytically known incident field using Eq. (8). A similar compensation step is required for the*

_{xz}*H*update equation. The crucial point is that derivatives are evaluated locally.

_{y}The PSTD case is more complex. We show how *∂H _{y}/∂z* is calculated on a collocated grid using discrete Fourier transforms in Fig. 3(c) which contains a non-zero field in the scattered region and artifacts throughout the computational domain. We explain in more detail why the staggered grid is superior to the collocated grid in Sec. (4.3). Focusing on the staggered grid case, Fig. 3(d) shows that

*∂H*is similar to that calculated using central differences but there are two main differences: (1) there are some artifacts around

_{y}/∂z*z*= 0 resulting from the sharp transition between total and scattered fields; and (2) the error at

*z*= Δ

*/2 is now a function of the field everywhere along this particular line of constant*

_{xz}*x*. The consequence of this is that to implement the TFSF source condition within the PSTD method, source update equations must be applied at as many cells adjacent to the interface between total and scattered field regions as is computationally feasible. These updates, however, depend on the field throughout the computational domain, i.e., non-local update equations are required, thus increasing computational and implementation complexity, as well as computer memory requirements.

#### 4.1. Existing source conditions

To the best of our knowledge, there is currently no analogue of the TFSF source condition suitable for application in the PSTD method. As explained in the previous section, spatial derivatives are calculated non-locally and, thus, source conditions introduced at a single point or plane are not naturally compatible with the PSTD method [2,9,10,21]. Since most PSTD implementations employ a collocated grid, the jump discontinuity in the field at the interface between the total and scattered field regions introduces ringing in the spatial derivatives, as shown in Fig. 3(c). Remedies for this include the initial source condition [22] in which an incident pulse is initialised within the computational grid prior to beginning time stepping. This has the disadvantage that sample points must be added to the computational domain to accommodate the initial field. Another alternative is to introduce the incident field over a number of cells, thus, smoothing the field discontinuity which causes ringing in the calculated field. The optimal source patterns for sources spanning between two and six cells have been calculated [21]. Other implementations employ sources spanning between eight and ten [10], four and six [2], and two cells [9], respectively. These are very effective solutions yet entail more complex implementation and additional sample points within the computational domain.

#### 4.2. Discrete Fourier transform operators

In order to develop the PSTD update equations, we define the discrete Fourier and inverse Fourier transforms according to:

*x*is a sequence obtained by sampling a function of a continuous variable. We assume

_{k}*N*to be even since it results in a more computationally efficient evaluation of the discrete Fourier transform and define an index map,

*a*, as

_{n}*, where Δ*

_{xz}*is the spatial sampling period.*

_{xz}#### 4.3. Staggered grids

Although the PSTD method was introduced to the FDTD community by Liu [1], pseudospectral methods were developed before this for applications in acoustic modelling and, no doubt, in many other fields. Some early works on acoustic pseudospectral methods [3, 25, 26] showed that staggered grids offer advantages over collocated grids in terms of numerical accuracy, as has been noted recently [5]. Most early implementations of the PSTD method employed collocated grids [1, 2, 7–10, 22, 27], which are advantageous because electric and magnetic material boundaries coincide, and which is not the case for staggered grids. Since we do not intend to vary the magnetic properties of materials, this is not a disadvantage for our application. Furthermore, it has been shown that spectrally obtained derivatives possess significantly less ringing if they are evaluated on a staggered grid [3, 25, 26]. We now give a brief explanation of this property and simultaneously derive our formula for spectral differentiation. Equation (13) can be used to derive formulae for differentiation on collocated and staggered grids from first principles. In particular, the derivative sampled on a collocated grid, corresponding to samples *x _{k}* may be obtained by evaluating:

*c*and

*s*refer to collocated and staggered, respectively, and the ± denotes the derivative being evaluated and interpolated by plus or minus half a spatial sampling step. Equations (18) and (19) can be used to demonstrate a previously published result [25, 26, 28], that derivatives of order one possess substantially less ringing when evaluated on a staggered grid rather than on a collocated grid. To understand this, consider evaluating Eqs. (16) and (17) using discrete convolution, in which case a signal with samples

*x*is differentiated by convolution with the discrete Fourier transforms of ${D}_{n}^{c}$ and ${D}_{n}^{s\pm}$. Figure 4 contains plots of ${D}_{n}^{c}$, ${D}_{n}^{s+}$ and their discrete Fourier transforms for the case of

_{k}*N*= 32. The plots demonstrate the general result that ${D}_{n}^{c}$ possesses a discontinuity at the Nyquist component,

*n*=

*N*/2, whereas ${D}_{n}^{s+}$ is everywhere continuous. This is the reason why $\text{DFT}\left\{{D}_{n}^{c}\right\}$ contains substantial global ringing and the reason why spectrally calculated derivatives of discontinuous signals also possess global ringing. This example demonstrates the general result that first derivatives of discontinuous signals may only be evaluated without global ringing by use of a staggered grid [28].

Equations (15) and (19) allows the PSTD update equations to be derived by evaluating the spatial derivatives in Eqs. (5)–(7) using Eq. (17) instead of central differences. The update equations for the two-dimensional system of Eqs. (5)–(7) are derived in Eqs. (21)–(23) in Sec. (5).

## 5. A new source condition for the PSTD method

So far we have shown why the TFSF source condition is not an effective source condition for the PSTD method. We have given two examples which demonstrate the general result that spectrally evaluated first derivatives possess significantly less ringing when evaluated on a staggered grid [28]. We have also shown that the field equivalence principle provides a physical interpretation for a jump in the value of an electromagnetic field in terms of equivalent current surface densities and charges. The source condition which we introduce here overcomes the problem of defining a discrete form of the field equivalence principle, by inserting an equivalent magnetic current density at a plane but not an equivalent electric current density. In this way, the globally defined derivative does not pose a problem since its behavior in the vicinity of the transition between total and scattered fields does not need to be explicitly accounted for in any other PSTD source update equations.

To proceed, we return to the field equivalence principle expressed in Eqs. (3) and illustrated in Fig. 1. We wish to simulate the scenario depicted in Fig. 1a), where incident light, (**E*** _{i}*,

**H**

*), is focused into a region of interest, bounded by the surface*

_{i}*S*. As has been explained, the equivalence principle allows us to generate the same field, (

**E**

*,*

_{i}**H**

*), within*

_{i}*S*using equivalent surface current densities and surface charge density on

*S*, defined by Eqs. (3), as shown in Fig. 1b). Consider, however, a scenario where the focused field contributes negligibly to

*S*

_{2},

*S*

_{3}and

*S*

_{4}in Fig. 1a). This may be achieved in practice by making

*S*

_{1}large enough such that the incident field is negligible in the vicinity of

*S*

_{2}and

*S*

_{3}whilst moving

*S*

_{4}to infinity where the field is also negligible. We are then left with the scenario depicted in the right hand image of Fig. 2 where

*S*is composed of a single plane. In this case, the surface normal is −

**k̂**, where

**k̂**is the unit vector associated with the

*z*Cartesian coordinate. This gives the equivalent sources on

*S*

_{1}, which, without loss of generality, we assume to be the plane

*z*=

*z*, as:

_{i}*S*

_{1}from below (i.e.,

*z*<

*z*), the electric current and charge densities must vanish as a result of the infinite conductivity, leaving ${\mathbf{J}}_{s}^{*}=-\widehat{\mathbf{k}}\times {\mathbf{E}}_{i}$ as the only non-zero source term. Although we could include a PEC in the PSTD simulation, this is restrictive and may result in other implementation problems, as PEC objects are not well represented in the PSTD method. As an alternative, we employ image theory which enables us to remove the PEC by doubling the magnetic surface current density to give ${\mathbf{J}}_{s}^{*}=-2\widehat{\mathbf{k}}\times {\mathbf{E}}_{i}=2\left({\mathbf{E}}_{i}\cdot \widehat{\mathbf{j}},-{\mathbf{E}}_{i}\cdot \widehat{\mathbf{i}},0\right)$ [14], where

_{i}**î**and

**ĵ**are the Cartesian unit vectors in the

*x*and

*y*directions, respectively. Summarising this result, the electric field in the region

*z*>

*z*will be equal to

_{i}**E**

*if an equivalent magnetic surface current density equal to 2(*

_{i}**E**

*·*

_{i}**ĵ**, −

**E**

*·*

_{i}**î**, 0) flows on

*S*

_{1}. Another consequence of this approach is that a field will now propagate back into the scattered field region

*z*<

*z*. This field is the mirror image of the incident field and may be removed by subtraction at the conclusion of the PSTD simulation [23].

_{i}It now remains to derive the discrete PSTD source condition update equations. We begin by deriving the PSTD update equations for the two-dimensional system of Eqs. (5)–(7). The first step in deriving the PSTD update equations is to remove the electric source current densities (*J _{x}* and

*J*) from Eqs. (6) and (7) since, as just explained, we have only a magnetic surface current density present. The second step is to recognise that ${J}_{y}^{*}$ in Eq. (5) is non-zero only on the plane

_{z}*S*

_{1}and has value −

**E**

*·*

_{i}**î**. The final step is to express the spatial derivatives implicit in Eqs. (5)–(7) using spectral derivatives. For example,

*∂H*is evaluated in Eq. (6) by the terms (

_{y}/∂z*H*(

_{y}*i*,

*k*;

*n*) −

_{t}*H*(

_{y}*i*,

*k*+ 1;

*n*))/Δ

_{t}*, which may be evaluated spectrally using Eq. (17) as ${\text{IDFT}}_{k}\left\{{D}_{n}^{s+}{\text{DFT}}_{k}\left\{{H}_{y}(i,k;{n}_{t})\right\}\right\}$. Finally, assuming that our source will be introduced at grid index*

_{xz}*k*, the PSTD update equations corresponding to Eqs. (5)–(7) may then be expressed as

_{s}*δ*is the Kronecker delta function. Division of ${J}_{y}^{*}=-2{\mathbf{E}}_{i}\cdot \widehat{\mathbf{i}}$ by Δ

*is necessary to convert from a surface current density to a current density.*

_{xz}It is now possible to observe that the source update term in Eq. (21) is equivalent to an update term:

- The incident electric field,
**E**, ordinarily employed by the FDTD method should be multiplied by two._{i} - The incident magnetic field ordinarily employed by the FDTD method,
**H**, associated with_{i}**E**should be set to 0._{i} **E**should be evaluated at a distance Δ_{i}/2 in the negative_{xz}*z*direction relative to the location at which the field would be evaluated using the TFSF formulation. This is because the new source condition assumes a sheet of magnetic current density centered on the magnetic field component.

The similarity of Eq. (24) with the TFSF condition makes it very easy for existing FDTD codes to be converted to PSTD codes. Further, this source condition may be used in FDTD implementations where it is desired to avoid calculation of the incident magnetic field. This source condition cannot be used on a closed surface, such as *S* in the left hand image of Fig. 2, since erroneous mirror image fields will, in general, propagate into the total field region. Instead, this method is designed to launch a focused incident field or an apertured incident field. This method is very accurate for focused fields if the plane where the source is introduced is sufficiently wide, such that the majority of the energy in the beam propagates through it [20]. The PSTD method is well suited to this source condition since its reduced sampling requirement enables computational volumes with large cross-sectional areas to be modelled.

## 6. Evaluation and analysis

We begin with an example of a focused beam introduced into a volume large enough to model low-numerical aperture optical imaging modalities such as optical coherence tomography. Figure 5a) shows how a beam of numerical aperture 0.056 propagates into a computational volume 93*μ*m wide and 133*μ*m deep, using a *λ*/4 grid spacing and a wavelength of 1325nm. The full aperture of a lens of numerical aperture 0.056 was assumed to focus the beam. The incident beam was calculated using the Richards-Wolf integral [29]. A perfectly matched layer (PML) of 10 cells surrounding the computational volume was used to simulate propagation in free space. The computational grid has 300×300×420 cells. A *λ*/4 grid spacing was used, as the PML performance was found to degrade when using larger grid spacings. This simulation required approximately 12 Gb of memory, which is the principal limitation upon the physical volume which can be modelled. If the FDTD method were used to model the same physical volume using a necessarily finer grid spacing of *λ*/15, over 750 Gb of memory would be required making it unfeasible. Note, however, that our current implementation is far from computationally optimal since we have implemented Berenger’s split fields [17] throughout the entire computational grid for convenience. Remedying this would immediately enable a physical volume 500*μ*m deep to be modelled and increasing the memory use to 24 Gb enables a depth of 1mm to be reached, deep enough to model optical coherence tomography image formation in biological tissue. Note that the memory usage can be further reduced if the complex amplitudes of the field within the computational volume are not required, as is the case when modelling image formation, as only field values at the surface are necessary [20].

The main result of Fig. 5a) is that the field is accurately propagated down the grid without ringing, except in the vicinity of the plane where the source is introduced. Figure 5b) shows a line plot of |*E _{x}*| in which the ripples in the vicinity of the plane where the beam is introduced are apparent. These ripples, however, are restricted to a few cells either side of this plane.

We evaluated the new source condition quantitatively by simulating the propagation of a tightly focused beam in free space. We consider this example as tightly focused beams are more sensitive to numerical dispersion than weakly focused beams because they possess a wider angular spectrum of plane waves. Using a more tightly focused beam, such as may be employed in confocal microscopy, allowed us to use a smaller computational grid and, thus, each simulation required less time and the errors due to the PML could be minimized by introducing it where erroneously reflected fields were insignificant, compared with other sources of error. An *x*-polarised plane wave of wavelength 405nm was focused in air by a lens with numerical aperture 0.95. The focused field is calculated using the Richards-Wolf integral [29]. The focused field was introduced into the PSTD grid at a plane some 2*λ* behind the focus of the beam and was temporally modulated by a Gaussian pulse with a spectral width (full-width at half-maximum) of 60nm so as not to spuriously introduce any high-spatial frequency components. The complex amplitude of the field at the center wavelength was evaluated as the simulation proceeded by discrete Fourier transform. Table 1 summarizes the tests which were performed and the base simulation parameters. The base PSTD simulation employed a grid spacing of *λ*/2.5, a transverse simulation size of 30*λ* × 30*λ* and a time step of Δ*t* = 1.8511×10^{−17}s. This time step value is approximately 27 times smaller than the theoretical maximum value of Δ*t* that guarantees stability but was selected on the basis of the results in Fig. 6, which show this value is necessary to minimize errors due to numerical dispersion, as will be discussed later in this section.

The first comparison we present is the magnitude and error of each field component at the plane located 4*λ* behind the focus, with the key simulation parameters summarised in Table 1. These results are plotted in Fig. 7 and demonstrate the accuracy of the source condition and that there is no ringing present in the field calculated using the PSTD method. The field is sampled on a grid of spacing *λ*/2.5 which is too coarse to illustrate all features of the field patterns. Note, however, that this information is readily available using Fourier interpolation.

Close inspection of Fig. 7 reveals what appears to be artifacts in both the analytic and PSTD cases that are more severe in the analytic case. These artifacts appear in the images of |*E _{x}*| as “fringes” which run approximately normal to the contours of equal field magnitude. Detailed investigation revealed that these artifacts arise due to the low resolution at which the images are displayed - not the accuracy of the calculated fields. Furthermore, these visual artifacts are less prominent in the fields calculated using the PSTD method because the high-frequency diffraction rings are not as prominent as in the analytic case. The principal result from this plot is that the PSTD method is able to propagate the focused field accurately based upon a visual comparison with the analytically calculated field.

We proceed now to quantify the accuracy of the field propagated by the PSTD method. We use an error metric for this purpose, which we call relative error, defined as:

*λ*/2. Note that the relative error was calculated for each scenario without re-sampling even though each simulation, having a different grid spacing, samples the field at different locations. Testing, however, showed that any variations arising due to this phenomenon were insignificant compared with the overall trend observed in Fig. 8a), which shows that the estimation of the dominant field component,

*E*, begins to become inaccurate when Δ exceeds approximately

_{x}*λ*/2.5. The next most significant component,

*E*, soon follows whilst

_{z}*E*maintains its accuracy. This result may be understood by reviewing Maxwell’s equations and, in particular, ∇ ×

_{y}**H**+

*iωε*

**E**=

**J**, which may be expressed in the time domain as:

*z*-direction, the nominal direction of propagation of the focused beam and the direction which crosses the plane where the field is introduced. In particular, where the sampling is near the Nyquist rate, any discontinuity in the field is sufficient to cause aliasing which will be more severe the closer the sampling is to the Nyquist rate. Furthermore, noting that the magnetic field components in decreasing order of significance are

*H*,

_{y}*H*and

_{z}*H*, we expect the derivative with the greatest absolute error to be

_{x}*∂H*, which is why

_{y}/∂z*E*exhibits the greatest sensitivity to grid spacing. The most significant term contributing to the

_{x}*E*update equation is

_{z}*∂H*, which introduces an inaccuracy because

_{y}/∂x*H*becomes inaccurate by the same mechanism as

_{y}*E*. The most significant term contributing to

_{x}*E*is

_{y}*∂H*, which becomes inaccurate due to the dependence that

_{z}/∂x*H*has on

_{z}*∂E*. It is, thus, reasonable that the degree of the dependence of each field quantity, upon the least accurately evaluated spatial derivative, determines the overall sensitivity to grid spacing. It is from these results that we conclude a grid spacing of

_{x}/∂y*λ*/2.5 is optimal for this particular simulation. Figure 8a) also reveals that, whilst a minimum error in

*E*of less than 1% can be obtained, the minimum error which can be obtained in

_{x}*E*and

_{y}*E*is less than 2%. We believe that this is the result of there being less energy in these components which biases the error metric.

_{z}The next test compares how the relative error in *E _{x}* (the principal field component) at particular planes along the

*z*-axis changes with the lateral dimension of the PSTD grid. This is an important parameter since this incident source condition requires the transverse dimension of the grid to be large enough for the majority of the beam’s energy to fall within it. Otherwise, we are implicitly simulating how a focused beam, diffracted by a square aperture, propagates in the grid. The plot in Fig. 8b) shows that the improvement observed by increasing the lateral dimension of the grid diminishes for a grid size of 50

*λ*× 50

*λ*. One minor aspect of this plot is the crossing over of the error lines for the 30

*λ*× 30

*λ*, 40

*λ*× 40

*λ*and 50

*λ*× 50

*λ*cases values of

*z*exceeding 1.5

*μ*m, the cause of which remains a question for future work.

The final simulation compared the relative error in *E _{x}* as Δ

*t*was reduced to below that required for stability. The plot in Fig. 6 shows that a time step in the vicinity of 0.031 times that required for stability (black curve) is necessary to minimize errors due to numerical dispersion, as has been noted by Tseng

*et al.*[30]. These tests demonstrate that all of the three simulation parameters considered must be optimized to obtain a relative error in all field components of less than 2% after several wavelengths of propagation. However, the order of importance of these parameters is: grid spacing, transverse dimension and time step, since any reduction in the relative error by optimizing a less significant parameter will be limited by the more significant parameter(s).

## 7. Conclusions

We have introduced a new source condition for the PSTD method which employs a staggered grid. This source condition is implemented at a single plane in the PSTD simulation and is designed specifically for focused illuminations such as may be encountered in biomedical optics. This new source condition allows beams focused by high and low numerical aperture lenses to be efficiently introduced into computational volumes large enough to model image formation for systems employing such lenses, for example, in high-resolution microscopy and in optical coherence tomography.

We have shown, for a beam focused by a high numerical aperture lens, that the source condition is accurate to within 2% throughout the computational space when optimal parameters are employed. We have shown that a grid spacing not exceeding *λ*/2.5, a time step some 30 times smaller than that required for stability, and a transverse grid size of 50*λ* × 50*λ* should be employed to obtain optimal accuracy.

Finally, we note that this source condition will enable easy incorporation of focused beams into PSTD simulations. It may be employed in the FDTD method also and presents the opportunity to easily convert existing FDTD code into PSTD code. In particular, employing a staggered grid and a source condition compatible with the FDTD method means that the only modification required is that of evaluating the spatial derivatives spectrally rather than using central differences.

## Acknowledgments

P.M. is supported by a Discovery Early Career Research Award from the Australian Research Council ( DE120101331).

## References and links

**1. **Q. Liu, “The PSTD algorithm: A time-domain method requiring only two cells per wavelength,” Microw. Opt. Techn. Lett. **15**, 158–165 (1997). [CrossRef]

**2. **Q. Liu, “Large-scale simulations of electromagnetic and acoustic measurements using the pseudospectral time-domain (PSTD) algorithm,” IEEE T. Geosci. Remote **37**, 917–926 (1999). [CrossRef]

**3. **D. Kosloff and E. Baysal, “Forward modeling by a Fourier method,” Geophysics **47**, 1402–1412 (1982). [CrossRef]

**4. **J. Virieux and S. Operto, “An overview of full-waveform inversion
in exploration geophysics,”
Geophysics **74**, WCC127 (2009). [CrossRef]

**5. **M. Ding and K. Chen, “Staggered-grid PSTD on local Fourier basis and its applications to surface tissue modeling,” Opt. Express **18**, 9236–9250 (2010). [CrossRef] [PubMed]

**6. **S. H. Tseng, Y. L. Kim, A. Taflove, D. Maitland, V. Backman, and J. T. Walsh, “Simulation of enhanced backscattering of light by numerically solving Maxwell’s equations without heuristic approximations,” Opt. Express **13**, 3666–3672 (2005). [CrossRef] [PubMed]

**7. **G. Chen, P. Yang, and G. Kattawar, “Application of the pseudospectral time-domain method to the scattering of light by nonspherical particles,” J. Opt. Soc. Am. A **25**, 785–789 (2008). [CrossRef]

**8. **S. H. Tseng, J. H. Greene, A. Taflove, D. Maitland, V. Backman, and J. T. Walsh, “Exact solution of Maxwell’s
equations for optical interactions with a macroscopic random
medium,” Opt. Lett. **29**, 1393–1395
(2004). [CrossRef] [PubMed]

**9. **T. -W. Lee and S. C. Hagness, “A compact wave source condition for the pseudospectral time-domain method,” IEEE Antenn. Wirel. Pr. **3**, 253–256 (2004). [CrossRef]

**10. **X. Gao, M. Mirotznik, and D. Prather, “A method for introducing soft sources in the PSTD algorithm,” IEEE T. Antenn. Propag. **52**, 1665–1671 (2004). [CrossRef]

**11. **D. Merewether, R. Fisher, and F. Smith, “On implementing a numeric Huygen’s source scheme in a finite difference program to illuminate scattering bodies,” IEEE T. Nucl. Sci. **27**, 1829–1833 (1980). [CrossRef]

**12. **J. A. Stratton and L. J. Chu, “Diffraction theory of electromagnetic waves,” Phys. Rev. **56**, 99–107 (1939). [CrossRef]

**13. **P. Petre and T. Sarkar, “Planar near-field to far-field transformation using an equivalent magnetic current approach,” IEEE T. Antenn. Propag. **40**, 1348–1356 (1992). [CrossRef]

**14. **C. Balanis, *Advanced Engineering Electromagnetics* (John Wiley and Sons, 1989).

**15. **H. Levine and J. Schwinger, “On the theory of electromagnetic wave diffraction by an aperture in an infinite plane conducting screen,” Commun. Pur. Appl. Math. **3**, 355–391 (1950). [CrossRef]

**16. **R. Harrington, *Time-Harmonic Electromagnetic Fields* (McGraw-Hill, 1961).

**17. **A. Taflove and S. Hagness, *Computational Electrodynamics, Third Edition* (Artech House, 2005).

**18. **A. Taflove, A. Oskooi, and S. Johnson, eds., *Advances in FDTD Computational Electrodynamics. Photonics and Nanotechnology* (Artech House, 2013).

**19. **K. Yee, “Numerical solution of initial boundary value problems involving Maxwell’s equations in isotropic media,” IEEE T. Antenn. Propag. **14**, 302–307 (1966). [CrossRef]

**20. **P. Török, P. R. T. Munro, and E. E. Kriezis, “High numerical aperture vectorial
imaging in coherent optical microscopes,”
Opt. Express **16**, 507–523
(2008).

**21. **Z. Lin and L. Thylen, “An analytical derivation of the optimum source patterns for the pseudospectral time-domain method,” J. Comput. Phys. **228**, 7375–7387 (2009). [CrossRef]

**22. **Q. Li, Y. Chen, and C. Li, “Hybrid PSTD-FDTD technique for scattering analysis,” Microw. Opt. Techn. Lett. **34**, 19–24 (2002). [CrossRef]

**23. **A. Oskooi and S. G. Johnson, “Electromagnetic wave source conditions,” in *Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology*, A. Taflove, A. Oskooi, and S. G. Johnson, eds. (Artech House, 2013), pp. 65–100.

**24. **V. Čížek, *Discrete Fourier Transforms and Their Applications* (Adam Hilger, 1986).

**25. **T. Özdenvar and G. A. McMechan, “Causes and reduction of numerical artefacts in pseudo-spectral wavefield extrapolation,” Geophy. J. Int. **126**, 819–828 (1996). [CrossRef]

**26. **H. -W. Chen, “Staggered-grid pseudospectral viscoacoustic wave field simulation in two-dimensional media,” J. Acoust. Soc. Am. **100**, 120–131 (1996). [CrossRef]

**27. **C. Liu, R. L. Panetta, and P. Yang, “Application of the pseudo-spectral time domain method to compute particle single-scattering properties for size parameters up to 200,” J. Quant. Spectrosc. Ra. **113**, 1728–1740 (2012). [CrossRef]

**28. **G. J. P. Corrêa, M. Spiegelman, S. Carbotte, and J. C. C. Mutter, “Centered and staggered Fourier derivatives and Hilbert transforms,” Geophysics **67**, 1558–1563 (2012). [CrossRef]

**29. **B. Richards and E. Wolf, “Electromagnetic diffraction in optical systems ii. Structure of the image field in an aplanatic system,” P. R. Soc. A **253**, 358–379 (1959). [CrossRef]

**30. **S. H. Tseng, J. H. Greene, A. Taflove, D. Maitland, V. Backman, and J. T. Walsh, “Exact solution of Maxwell’s equations for optical interactions with a macroscopic random medium: addendum,” Opt. Lett. **30**, 56–57 (2005). [CrossRef] [PubMed]