A simple implementation of plane wave method is presented for modeling photonic crystals with arbitrary shaped ‘atoms’. The Fourier transform for a single ‘atom’ is first calculated either by analytical Fourier transform or numerical FFT, then the shift property is used to obtain the Fourier transform for any arbitrary supercell consisting of a finite number of ‘atoms’. To ensure accurate results, generally, two iterating processes including the plane wave iteration and grid resolution iteration must converge. Analysis shows that using analytical Fourier transform when available can improve accuracy and avoid the grid resolution iteration. It converges to the accurate results quickly using a small number of plane waves. Coordinate conversion is used to treat non-orthogonal unit cell with non-regular ‘atom’ and then is treated by standard numerical FFT. MATLAB source code for the implementation requires about less than 150 statements, and is freely available at http://www.lions.odu.edu/~sguox002.
©2003 Optical Society of America
The plane wave method (PWM) is often used for photonic crystal modeling since it can yield accurate and reliable results. This method requires intensive computations for complicated systems, involving thousands of plane waves, and places a high demand on computer resources and time . There is a tradeoff between the computing time and accuracy. In this paper, we present a simple and fast implementation method using MATLAB, utilizing its abundant functions for numerical analysis and graphics. The whole program may have less than 150 statements for performing the calculations and graphical output. However, the computing time and accurately can be much improved. The key point is to obtain the Fourier transform of the unit cell as accurate as possible. For commonly used ‘atoms’ with regular shapes, such as square, rectangular, circular cylinders, cubes and spheres, we use the analytical Fourier transform; there is no need to do a numerical Fast Fourier Transform (FFT), avoiding the step of dividing the space into small grids. The computation time is effectively reduced and accuracy can be improved. For a finite sized supercell, the Fourier transform is obtained using the shift property.
2. Theory of PWM
The PWM is illustrated in several papers [2–5]. Here, we summarize the theory very briefly. Maxwell’s equations in a transparent, time-invariant, source free and non-permeable (µ=µ0) space can be rewritten as Helmholz’s equation:
where ε(r) is the dielectric function, ω is the angular frequency and c is the speed of light in vacuum.
In an infinite periodic photonic crystal, using Bloch’s theorem, a mode in a periodic structure can be expanded as a sum of infinite number of plane waves:
where λ=1, 2, k⃗ is the wave vector of the plane wave, G⃗ is the reciprocal lattice vector, ê represents the two unit axis perpendicular to the propagation direction k⃗ + G⃗. (ê1, ê2, k⃗ + G⃗) are perpendicular to each other. h G,λ is the coefficient of the H component along the axes êλ.
Using the Fourier transform, the dielectric function can be written as:
where Ω is the unit cell and V is the volume of the unit cell.
Finally, Helmholz’s equation can be transformed to an algebraic form :
This is a standard eigenvalue problem and it can be solved using a standard eigen-solver. For 1D and 2D cases, the equation can be simplified.
For simplicity, we assume there is only one kind of ‘atom’ in a photonic crystal and the number of ‘atoms’ in the unit cell or supercell is finite. Once the unit cell or supercell is determined, the set of reciprocal lattice vector G⃗ and unit vectors ê1, ê2 can be calculated easily. The key part is to obtain the Fourier coefficient matrix ε(G⃗ - G⃗′) according to Eq.(3). It is obtained by calculating the Fourier coefficient of a single atom first using analytical or numerical Fourier transform, and then calculating the Fourier coefficients for the supercell using shift property, finally re-arranging to get the coefficients ε(G⃗ - G⃗′) and inversing to get ε-1(G⃗ - G⃗′).
3.1 ‘Atoms’ with regular shape
It is advantageous to use analytical Fourier transform when available. We illustrate this using the 2D photonic crystals with the most commonly used circular cylinder. The same procedure can be followed for other shapes and their Fourier transforms can be found in Ref. .
Assuming the radius of the cylinder is R, the dielectric constant for the cylinder is εa, the background dielectric constant is εb, the lattice structure can be represented by the two lattice basis vector a⃗1 and a⃗2. The area of the unit cell is calculated as A = |a⃗1 × a⃗2|, the Fourier transform of the unit cell is:
where J 1 is the 1st order Bessel function, G is the modulus of G⃗, ƒ is a fraction parameter:
Here the advantage is that in different lattice geometries, the Fourier transform is the same as in Eq. (5) except that the values of ƒ and G are different.
3.2 ‘Atoms’ with arbitrary shape
When atom shape is not regular, only numerical FFT can be used. To use FFT in a non-orthogonal lattice, a non-orthogonal unit cell is first converted to an orthogonal cell using coordinate conversion as illustrated below.
In Cartesian coordinate system, the three basis vectors in real space a⃗1, a⃗2, a⃗3 are:
The dielectric function in the unit cell is ε(r) and the column vector is r⃗ = ma⃗1 + na⃗2 + la⃗3, where m, n and l are coordinates along the basis vectors. In Cartesian coordinates:
So we have:
In Fig. 1 we show how these conversions are applied in the case of two examples: A circular cylinder in a triangular lattice is converted to an oblique elliptical cylinder in a square lattice as shown in Fig.1(a), while Fig.1(b) shows the conversion of an elliptical cylinder in a triangular lattice. The resulting band diagram for a photonic crystal of elliptical atoms illustrated in Fig.1(b) is shown in Fig.1(c) using appropriate material and structural parameters for GaAs. The conversion can be conveniently applied to treat photonic crystal fiber with non-regular shaped ‘atoms’ such as the one with elliptical air holes.
3.3 Shift property of Fourier transform
Assuming the Fourier transform of a single atom ε(r) is known as εG, if ε(r) is shifted by an amount r 0, then its Fourier transform must be multiplied by  which we call shift property here:
Therefore, for a supercell with several atoms in periodic or random positions, the Fourier transform can be obtained using addition and subtraction:
where r⃗ i is the location of ‘atom’ i in the supercell.
Equations (11–12) are especially suitable for supercell method, such as the photonic crystal with defects. We can obtain the accurate Fourier coefficients of the supercell at the required G grid points by doing simple additions and subtractions, requiring only the Fourier coefficients of each single kind of atom. This is especially advantageous for a large supercell with many periodic or random atoms in it.
As an example, we show below how the 3D diamond lattice is worked out:
The diamond lattice is a complex FCC lattice with two spherical atoms in the primitive cell. Assuming the length of the simple cubic side is a, the primitive lattice vector basis are defined as a⃗1 = [0,1,1]a/2,a⃗2 = [1,0,1]a/2,a⃗3 = [1,1,0]a/2. The locations of the two atoms in the primitive cell are chosen as r⃗0 = [-1,-1,-1]a/8 and r⃗1 = [1,1,1]a/8 to keep inversion symmetry. The primitive reciprocal lattice vectors b⃗1,b⃗2,b⃗3 are calculated according to (5) in Appendix B of Ref. .
Using shift property and Fourier transform for a sphere, the Fourier coefficient at the reciprocal lattice grid is expressed as:
where R is the radius of the sphere, V = |a⃗1 · a⃗2 × a⃗3|.
In Fig. 2 we show the band structure for R=√3/8a, εa=13, εb=1 using our simple program with 343 plane waves, which is in excellent agreement with the result in Ref. . In this paper, the set of G is chosen as G⃗=n 1b⃗1 + n 2b⃗ + n 3b⃗3,|ni |≤n and in this example n=3.
4. Convergence, accuracy and stability
We performed the TM/TE band calculation for an ideal triangular lattice with air holes in GaAs. The radius of the air hole is 0.28a, where a is the lattice constant, and the dielectric constant for GaAs is 13.0. All the eigen-frequencies with k-point located at M (see the inset of Fig. 1(c)) are calculated.
Figures 3 and 4 show the convergence for TM and TE modes as a function of the number of plane waves with different mesh resolutions. Two methods are compared: the analytical Fourier transform and FFT with each grid point averaged by a 10×10 submesh. The iteration error is calculated as norm[X(n)- X(n - 1)], where X(n) is the eigen-frequency vector of the first 10 bands for the nth iteration, and the number of plane waves used is N PW=(2n+1)2.
In Fig. 3 and Fig. 4, there exist two converging processes: number of plane waves and mesh resolution. These two processes are almost independent of each other. To achieve accurate results, both convergences must be reached. The iteration errors shown in these two figures are not enough to determine whether the accurate values are achieved, since they represent only one process. When a fine enough mesh and enough number of plane waves are used, the frequencies converge to the accurate values. The mesh grid number does not need to be the same as the number of plane waves as in Ref. , since that makes the computation too large. In our case, the number of plane waves is always much smaller than the grid number.
Analytical method has only one converging process; numerical FFT and mesh formation procedures are not required. Therefore, analytical method has higher accuracy for the same number of plane waves than FFT; it can be faster and save a lot of memory and computation time. It may be advantageous especially for 3D cases when the problem size is large and computation is long. The reason why analytical method converges a little bit slower than FFT with a certain mesh resolution (see the iteration error) is probably due to the Gibbs’ phenomenon in Fourier series.
Also, Figs. 5 and 6 respectively show the convergence for TM and TE with mesh resolution using FFT approach; both of them show some oscillations, leading to difficulty in convergence. The effect of averaging at each grid point using a finite mesh is also shown. The convergence is improved by some degree using averaging.
In addition, we compare our results using analytical Fourier coefficients with those by Hermann et al. , as shown in Table 1. The computing time for their methods is measured on different computers.
The advantage of using analytical Fourier Transform is evident from Table 1. It requires a small number of plane waves, yet produces accurate results, and converges quickly. The method is even better when some very small features exist in the lattice, where FFT needs larger mesh to reflect all the details.
An example of a heavier computation is shown for a defective photonic crystal: a square lattice with alumina rods in air with the center rod absent. The dielectric constant for alumina is 8.9, and the radius of the rod is 0.2a, where a is the lattice constant. A 7×7 supercell is used to approximate the crystal structure. The defect frequency in the band gap at k=(0,0,0) was calculated using different number of plane waves. The Fourier transform of this 7×7 supercell is easily obtained using Eq. (5) and Eqs. (11–12). The calculated defect frequencies are listed in Table 2. The iteration error is calculated as norm[X(n)- X(n - 1)], where X(n) is the eigenfrequency vector of the first 50 bands for the nth iteration. The band structure of a 7×7 supercell is folded 72 times and the defect band is band 49 in this case.
As illustrated in Table 2, the convergence vs for a large supercell is much slower. Much more plane waves are needed than that for the 1×1 ‘supercell’ to achieve the same accuracy and the computing time increases exponentially with the number of plane waves. Analytical method may save plenty of time by eliminating the converging process of grid resolution.
The defect mode fields H or E can be obtained conveniently at the same time using the calculated eigen-vector h G,λ and Eq. (2). Defects with one or more cylinders of different sizes  or dielectric constants can be treated as different ‘atoms’ and their Fourier transform are obtained the same way as Eq. (5) using different R or ε and then added to the supercell according to Eqs. (11–12). Similar mode fields as in Ref.  can be obtained, but are not shown here. Other defects such as waveguides can be treated in the same way.
To reduce the interaction of the neighboring defects, a large supercell is generally needed, but the computation will increase accordingly. The convergence curve of the defect frequency using different supercell size is shown in the Fig. 7. The defect frequency for a point defect should be independent of k-vectors for an infinitely large supercell; however for small supercells, coupling between neighboring defects will lead to a finite width of the defect frequency. For large supercells, the interaction between neighboring defects becomes smaller.
Though plane wave method is quite successful in PBG calculations, it has several limitations. The computation grows exponentially when the problem size increases. For complicated problems, such as 3D PBG calculations, the computation is intensive. A less computationally intensive eigen-solver is critical to reduce computation effectively. A few good eigen solvers like Lanzcos and subspace methods may be able to greatly improve the performance from O(n 3) to O(n 2) or less, a good example is Ref. .
In conclusion, we provide a simple implementation of the plane wave method using MATLAB. Our implementation yields good convergence and accurate results, and the programming effort is minimized. We demonstrated how using analytical Fourier coefficients could improve accuracy and reduce the computation time. The shift property is employed to get the Fourier transform of a supercell, thereby reducing computation and increasing flexibility in treating different problems while maintaining accuracy. Using coordinate conversion, ‘atoms’ with arbitrary shapes can be dealt with easily.
This research is supported by NASA Langley Research Center through NASA-University Photonics Education and Research Consortium (NUPERC).
References and links
1. S. G. Johnson and J. D. Joannopoulos, “Block iterative frequency-domain methods for Maxwell’s equations in a planewave basis,” Opt. Express 8, 173–190 (2001), http://www.opticsexpress.org/abstract.cfm?URI=OPEX-8-3-173 [CrossRef] [PubMed]
2. K. M. Leung, “Plane wave calculation of photonic band structures” in Photonic band gaps and localizations, C. M. Soukoulis. ed. (Plenum Press NY1993).
4. R. D. Meade and A. M. Rappe et a1., “Accurate theoretical analysis of photonic band gap materials,” Phys. Rev. B 48, 8434–8437 (1993). [CrossRef]
6. D. C. Champeney, Fourier transforms and their physical applications (Academic Press, 1973) Chap. 3.
7. Geoge Arfken, Mathematical methods for physicists, 3rd edition, (Academic Press, 1985), Chap. 2.
8. A. J. Ward and J. B. Pendry, “Refraction and geometry in Maxwell’s equations,” J. Mod. Opt. 43, 773–793 (1996) [CrossRef]
9. D. Hermann et al., “Photonic band structure computations,” Opt. Express 8, 167–172 (2001), http://www.opticsexpress.org/abstract.cfm?URI=OPEX-8-3-167 [CrossRef] [PubMed]
10. J. D. Joannopoulos et al., Photonic crystals - Molding the flow of light (Princeton University Press1995).
11. P. R. Villeneuve and S. Fan et al., “Microcavities in photonic crystals: mode symmetry, tunability, and coupling efficiency,” Phys. Rev. B 54, 7837–7842 (1996).