{'fraction_non_alphanumeric': 0.0374121938914115, 'fraction_numerical': 0.015096829277758373, 'mean_word_length': 4.690812720848056, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Optimized 3D Finite-Difference-Time-Domain Algorithm to Model the Plasmonic Properties of Metal Nanoparticles with Near-Unity Accuracy

: The ﬁnite difference time domain (FDTD) method is a grid-based, robust, and straightfor-ward method to model the optical properties of metal nanoparticles (MNPs). Modelling accuracy and optical properties can be enhanced by increasing FDTD grid resolution; however, the resolution of the grid size is limited by the memory and computational requirements. In this paper, a 3D optimized FDTD (OFDTD) was designed and developed, which introduced new FDTD approximation terms based on the physical events occurring during the plasmonic oscillations in MNP. The proposed method not only required ~52% less memory than conventional FDTD, but also reduced the calculation requirements by ~9%. The 3D OFDTD method was used to model and obtain the extinction spectrum, localized surface plasmon resonance (LSPR) frequency, and the electric ﬁeld enhancement factor ( EF ) for spherical silver nanoparticles (Ag NPs). The model’s predicted results were compared with traditional FDTD as well as experimental results to validate the model. The OFDTD results were found to be in excellent agreement with the experimental results. The EF accuracy was improved by 74% with respect to FDTD simulation, which helped reaching a near-unity OFDTD accuracy of ~99%. The λ LSPR discrepancy reduced from 20 nm to 3 nm. The EF peak position discrepancy improved from ± 5.5 nm to only ± 0.5 nm.


Introduction
Plasmonic properties of MNPs are due to the collective response of electromagnetic radiation induced oscillations in conduction band electrons [1]. In the absence of an external electric field, the electron cloud is symmetrically distributed around the nuclei. When an external electric field, such as the one associated with the electromagnetic spectrum, is applied, the electrons and positively charged nuclei are polarized. This displaces the electron cloud from positively charged nuclei, and, as a result, forms a dipole, which creates a restoring force and oscillates with a certain frequency known as plasmon frequency. It is known as the electromagnetic excitation and oscillation of the conduction electron, which is characterized by the resonance frequency of the MNP, referred to as surface plasmon resonance (SPR) [2]. The oscillations experience a damping force due to electron collisions (characterized by the collision frequency of MNP). SPR is an evanescently confined electromagnetic excitation, which propagates perpendicularly at the interface between a dielectric and a conductor [2]. In small and sub-wavelength MNPs, plasmonic resonance is confined locally, and known as LSPR. This confines the electromagnetic excitation electric field in the subwavelength range and, consequently, induces a remarkable local amplification in electric field intensity. This enhanced electric field strength decay from MNP surface is broadly divided into near-field and far-field response of MNPs. The latter is responsible for macroscopic properties such as the color resulting from the MNP, while the near-field response is more important in controlling and manipulating the optical properties of the MNP, such as in near-field scattering in plasmonic coupling applications [3][4][5][6][7][8].
The strong LSPR in MNPs makes them a good choice for many applications in optical and photonic fields [1,6,. Among the noble metals, the LSPR of gold and silver were the most studied for the following reasons: Their near-field oscillation energy is high due to the very small imaginary part of their dielectric function, which has a direct correlation with the extinction coefficient and the optical absorption of the MNPs. The LSPR frequency of these MNPs can be tuned by their size, shape, and local environment specifications. Their LSPR frequency is in the visible range of the spectrum; hence, the plasmonic properties can be easily excited by solar radiation, unlike other metals' plasma frequency (such as Hg, In, Pb, Cd, and Sn). They are chemically inert, allowing them to be chemically stable. They do not oxidize, while the oxidation in other metals changes their LSPR frequency. They can be coupled with fluorescent molecules to improve their optical properties in luminescent solar concentrators and down shifting layers [25][26][27][28]. Similarly, they can be easily attached to bio molecules using chemical linkers.
Theoretically, evaluating the optical properties and the optical response of MNP requires a well-defined computational strategy. Purcell and Pennypacker introduced a discrete dipole approximation (DDA) method [29] to model the optical properties of MNPs. The number of numerical and theoretical methods have been developed, since then, to solve Maxwell's equations (see Supplementary Materials for more details) in either frequency domain or time domain, such as the boundary element method (BEM), spectral method (SM), finite element method (FEM), methods of moments (MOM), finite volume method (FVM), and the finite difference time domain (FDTD) method, to model the optical properties of MNPs [30][31][32][33].
Among these, the FDTD method is the most used and developed algorithm, and models the optical properties of MNPs in a Yee grid [34]. Researchers have used the FDTD method to estimate and predict the extinction spectra of the MNPs by changing their size, shape, and concentrations [7,16,[35][36][37]. Table 1 summarizes the advantages and disadvantages of conventional FDTD methods [16,30]. The drawbacks listed in Table 1 can have an impact on the accuracy of FDTD simulation, especially in plasmonically enhanced solar devices [25][26][27][28][38][39][40]. The accuracy of FDTD models can be characterized by the Yee grid resolution (N λ ) determining the Yee grid discretization (∆d), which is the size of each grid cell in x, y, and z vectors (see Equation (S6) and Equation (S7) in Supplementary Materials for more details). The grid discretization is also in correlation with the simulation time step (i.e., the time which is required for the electromagnetic wave, with the smallest wavelength, to pass a single grid cell) based on the Courant stability condition [41] (see Equation (S5) in Supplementary Materials for more details). In the absence of these rules in designing the Yee grid, the FDTD algorithm is not able to accurately model the optical properties of MNP. Although N λ of~20 to 30 is enough for low contrast dielectric modelling [42], in plasmonic coupling application, high N λ of~100 to 200 is required to achieve reasonable accuracy due to the high SPR frequency of radiation inside the grid. This creates the spatial ∆d range of only a few nanometers for modelling plasmonic devices under solar radiation conditions. Our developed FDTD model and its predicted results have already been validated for various sizes, shapes, and concentrations of MNP [39,40]. In this paper, a 3D OFDTD model is developed to overcome the disadvantages of traditional FDTD methods. In the OFDTD, a new set of approximation terms is developed considering physical events occurring during the electromagnetic interaction with MNP. Unlike the traditional FDTD, OFDTD requires less calculation and memory to solve Maxwell's equations. OFDTD considers identical material conductivity in the 3D vectors of the Yee grid. In the traditional method, the FDTD calculations are applied to the whole MNP grid. Whereas the OFDTD algorithm bypasses identical and repetitive calculations; even though all iterations are counted in the final simulation results. This results in reducing the required memory and calculations in the simulation. Using the new approximation terms in OFDTD resulted in saving~52% memory, allowing the model to increase the resolution of the Yee grid, which enhanced the modelling performance and output accuracy. The developed OFDTD was used to model the plasmonic effect and optical properties of an isotropic device doped with Ag NPs. The results were compared with the existing FDTD as well as experimental results for validation. The OFDTD predicted output was found to be in very close agreement with experimental results and has achieved higher accuracy in comparison with the FDTD method.  Figure 1 shows the flowchart developed for applying both FDTD and OFDTD algorithms in this study. As can be seen, it is separated into the three stages of pre-processing, main loop, and over-processing. The pre-processing stage is used in order to apply the user inputs (such as dimensions, type, and shape of MNP, and device configuration) and to design the Yee grid, boundary conditions, simulation time step, the constant values such as N λ and ∆d, the total number of iterations of the main loop, the update coefficients terms, and the constitutive relations (see Supplementary Material for more details). The 3D FDTD terms used in Maxwell's equations including m, σ, I, C, E, H, D, , and (see Supplementary Materials for more details about these parameters) are defined as 3D matrices in the model, in which i, j, and k indicate the MNP grid cell location (in the x, y, and z vectors, respectively) in a 3D Yee grid. The size of these 3D matrices is equal to the size of the designed Yee grid, which can be expanded by increasing the resolution and/or the size of the modelled MNP. is MNP permittivity in F/m, and is permeabil- Thereafter, in each iteration of the main loop, Maxwell's equations are solved for the Yee grid. Maxwell's equations are updated based on the leapfrog process, i.e., the magnetic field (H (A/m)) is solved for one time-instant, and the electric field (E (V/m)) is updated at the following time-instant, while the irradiated source field is injected during the updating process. At the end of each iteration, the time domain value of the fields is stored and used in the next time-instant (next iteration).

OFDTD Method Development for Plasmonic Effect Modelling
After implementing the method for the total number of iterations, the algorithm enters the over-processing step, where the power flow and the optical properties of the device (such as reflection, transmission, extinction spectra, and EF) are calculated and exported by transferring the value of fields from time to frequency domain using fast Fourier transform (FFT).
The 3D FDTD terms used in Maxwell's equations including m, σ, I, C, E, H, D, ε, and µ (see Supplementary Materials for more details about these parameters) are defined as 3D matrices in the model, in which i, j, and k indicate the MNP grid cell location (in the x, y, and z vectors, respectively) in a 3D Yee grid. The size of these 3D matrices is equal to the size of the designed Yee grid, which can be expanded by increasing the resolution and/or the size of the modelled MNP. ε is MNP permittivity in F/m, and µ is permeability in H/m, while D is electric flux density (also called dielectric displacement) in C/m 2 . m terms are constitutive relations used as update coefficients in the FDTD main loop. I terms are integration terms of the fields, which are the summation of curl (C) terms of the fields.
The electric field inside the MNP is constant during the SPR oscillations. Conductivity (σ(1/Ω)) is used to apply the amount of electric and magnetic field losses in the MNP and its surrounding area (i.e., in the Yee grid). In physics, by considering an isotropic medium for MNP, magnetic and electric field losses can be considered identical at all x, y, and z vectors. Therefore, in the OFDTD matrix group of σ, all loss terms for H and D fields in x, y, and z were considered identical and called as σ HD xyz i,j,k , i.e.,: This resulted in an identical damping rate (Γ m ) for the MNP in all vectors. The Γ m determined the SPR oscillations and its decay frequency in the polarized direction of MNP. It also characterized MNP permittivity (according to Equation (S10) in Supplementary Materials). Therefore, in OFDTD, the ε terms were also considered to be identical in x, y, and z in the polarized MNP. In addition, the magnetic response of MNP is negligible, i.e., its relative permeability (µ terms) is almost equal to 1 in all vectors. Under the aforementioned isotropic conditions, new ε xyz i,j,k and µ xyz i,j,k matrices can be introduced as: Therefore, the 3D ε r and µ r matrices can be written in isotropic form: By applying these new isotropic terms (i.e., updated σ, ε r , and µ r ), the updated coefficients of the traditional FDTD loop (m terms, which are mentioned in Supplementary Materials) can be optimized and reduced to new isotropic terms for the OFDTD algorithm: Therefore, the 3D ̃ and matrices can be written in isotropic form: By applying these new isotropic terms (i.e., updated , ̃ , and ), the updated coefficients of the traditional FDTD loop (m terms, which are mentioned in Supplementary Materials) can be optimized and reduced to new isotropic terms for the OFDTD algorithm: The reduction in size of the OFDTD terms reduced the memory requirements. Table 2 classifies the achieved OFDTD terms and the matrix groups. As is seen in Equation (4) and Table 2, in the matrix group of , FDTD terms for H and D fields in x, y, and z were replaced with one single alternative 3D matrix ( | , , ) in the OFDTD algorithm. This resulted in a reduction of 84% of the required memory for matrix group. For ̃ matrix group, the three permittivity terms were replaced with a single 3D matrix ( | , , ) in OFDTD, which led to a ~67% deduction in the required memory for the relative permittivity group. The same optimization process was applied for the update coefficient matrix groups (m terms). For example, m0 update coefficients for D and H fields could be replaced with an alternative matrix, | , , , in OFDTD. This has resulted in an 84% deduction in the memory required for these matrix groups. Moreover, during the simulation process, the m0 terms in Equation (4) were calculated only once instead of the six times in Equation (S2) and Equation (S3) (in Supplementary Materials), which could significantly reduce the computational requirements.
The reduction in size of the OFDTD terms reduced the memory requirements. Table 2 classifies the achieved OFDTD terms and the matrix groups. As is seen in Equation (4) and Table 2, in the matrix group of σ, FDTD terms for H and D fields in x, y, and z were replaced with one single alternative 3D matrix ( σ HD xyz i,j,k ) in the OFDTD algorithm. This resulted in a reduction of 84% of the required memory for σ matrix group. For ε r matrix group, the three permittivity terms were replaced with a single 3D matrix ( ε xyz i,j,k ) in OFDTD, which led to a~67% deduction in the required memory for the relative permittivity group. The same optimization process was applied for the update coefficient matrix groups (m terms). For example, m0 update coefficients for D and H fields could be replaced with an alternative matrix, m HDxyz0 i,j,k , in OFDTD. This has resulted in an 84% deduction in the memory required for these matrix groups. Moreover, during the simulation process, the m0 terms in Equation (4) were calculated only once instead of the six times in Equation (S2) and Equation (S3) (in Supplementary Materials), which could significantly reduce the computational requirements.
The estimated rate of the total required memory, which was deducted using the OFDTD algorithm, was calculated by: where MEM Total is the total memory size that is used in the 3D FDTD algorithm, M is the total number of equal matrix groups (which is 10 here), and i is the index of each matrix groups. MEM i is the total memory size required for each matrix group. f OPT i is the optimization factor for the matrix group i, which can be calculated by using the total number of matrices in each matrix group (N G i ): By using the OFDTD, the saving in calculation and memory (∆MEM Total ) can allow the MNP to be modelled with a higher resolution of the Yee grid, resulting in a higher accuracy in the modelling outputs.

Description of Samples and Experimental Measurements
Experimental results [43] were used to validate and compare the performance of the FDTD and OFDTD methods. The preparation of a silver colloidal solution was based on the reduction of silver ions by ascorbic acid in the presence of citrate-stabilized silver seed, additional trisodium citrate, and the capping agent polyvinylpyrrolidone. The color of the Ag NPs was controlled by varying the concentration of the trisodium citrate [44]. Scanning electron microscopy (SEM) image of the sample using spherical Ag NPs (with the diameter of~50 nm) can be seen in Figure 2a, which was obtained using the Hitachi SU6600 FESEM (Trinity College Dublin, Ireland) at an accelerating voltage of 5 kV. UV/Vis extinction spectra of Ag NP particles extracted from water can be seen in Figure 3 (labeled as Reference), which was used as the experimental reference extinction spectrum in this study.   The intensity of the incident electric field was significantly enhanced by EF at the surface boundary of the Ag NP due to the excitation of LSPR. EF is calculated by [45][46][47]: where is the intensity of the incident radiation, is the MNP excitation wavelength, and is the place of the particle with a unit dipole moment of . Figure 4 compares the achieved EF with the theoretical reference data. As can be seen, FDTD and reference results were not matched; however, by using the OFDTD model, EF reached the peak of ≈10.5 at the surface boundary of MNP, which was in very close agreement with the sharp reference EF. The reference graph in Figure 4 was obtained theoretically by using Equation (8), the intensity of incident radiation and electric field distributed in the grid with ∆ = 0.812 nm where maximum modeling accuracy was achieved. In this case, modeling = ~437 nm (comparing with experimental = ~435 nm), which resulted in a nearunity OFDTD accuracy of ~99%. This was the highest OFDTD accuracy, and applying any ∆ below 0.812 nm (applying higher resolution) could not have any further impact on improving the accuracy.  Figure 2b shows the modelled Ag NP in a 3D FDTD Yee grid, where ∆d = 5.56 nm and the total grid size was 10 × 10 × 330. The time step was ∆t = 1.070 × 10 −17 s. Periodic boundary conditions were defined at the x and y axes, while scattering boundary conditions were defined at the z axis by placing perfectly matched layers (PML) at both ends of the grid in the z axis. PML was designed by using the field termination function of:

Results and Discussion
where ∆t is the time step in second, L is the length of the PML in m, and ε 0 ≈ 8.86 × 10 −12 F/m is free-space permittivity. The length of the PML (280 nm) should be designed so that it is able to absorb and terminate the total electrical field striking the absorbing boundary. For achieving a higher accuracy, the resolution of the Yee grid had to be increased, which meant that ∆d had to be reduced. The primary FDTD method was unable to run the simulation for higher resolutions (i.e., grid resolution with ∆d < 5 nm); however, the OFDTD was able to model the MNP in a high resolution (∆d = 0.877 nm), which was 7 times higher than FDTD, as can be seen in Figure 2c. Under this circumstance, the total grid size was 62 × 62 × 1530, and the time step was ∆t = 1.68 × 10 −18 s.
Both FDTD and OFDTD models were implemented in a machine with Core i-5@3.30GHz CPU and 16GB RAM (Trinity College Dublin, Ireland). The modelled samples were illuminated by a Gaussian electric field, which was injected as a plane wave propagated in the z-direction and polarized along the x-y plane. In each time step, the electric field was recorded at the top of the particle where the record plane was placed in the boundary of the study-space and the PML layer. After terminating the irradiation and ending the FDTD main loop, extinction spectra and EF of the Ag NP device were achieved by using FFT and the recorded time-domain electric fields. Figure 3 shows the normalized extinction spectra obtained by the FDTD and OFDTD methods. They were also compared with the experimental extinction spectra for validation purposes. As can be seen, the FDTD model results did not match with the reference data due to low resolution (large ∆d) of the Yee grid. The LSPR peak wavelengths (λ LSPR ) obtained by the FDTD model was at 455 nm while it was reported at 435 nm experimentally. To increase the accuracy, the grid resolution was increased (∆d = 0.877 nm); however, the FDTD method crashed due to high calculations and memory requirements. On the other hand, the OFDTD model could successfully run the simulation with high resolution, where the modeling result (λ LSPR =~438 nm) were found to be in close agreement with the experimental output (λ LSPR =~435 nm), with a~99% accuracy.
The intensity of the incident electric field was significantly enhanced by EF at the surface boundary of the Ag NP due to the excitation of LSPR. EF is calculated by [45][46][47]: where E i is the intensity of the incident radiation, λ ex is the MNP excitation wavelength, and x d is the place of the particle with a unit dipole moment of e p . Figure 4 compares the achieved EF with the theoretical reference data. As can be seen, FDTD and reference results were not matched; however, by using the OFDTD model, EF reached the peak of ≈10.5 at the surface boundary of MNP, which was in very close agreement with the sharp reference EF. The reference graph in Figure 4 was obtained theoretically by using Equation (8), the intensity of incident radiation and electric field distributed in the grid with ∆d = 0.812 nm where maximum modeling accuracy was achieved. In this case, modeling λ LSPR =~437 nm (comparing with experimental λ LSPR =~435 nm), which resulted in a near-unity OFDTD accuracy of~99%. This was the highest OFDTD accuracy, and applying any ∆d below 0.812 nm (applying higher resolution) could not have any further impact on improving the accuracy.  Detailed and statistical modelling results are presented in Table 3. It can be seen that by reducing ∆ from 5.56 nm to 0.877 nm, the number of iterations inside the main loop increased from 1505 to 2743, increasing the simulation time. The results of the FDTD and OFDTD models were similar for low resolution (∆ = 5.56 nm). When high resolution (∆ = 0.877 nm) was used in order to improve the accuracy, the OFDTD model could successfully run the simulation in around 122 h. While this was relatively a long simulation Detailed and statistical modelling results are presented in Table 3. It can be seen that by reducing ∆d from 5.56 nm to 0.877 nm, the number of iterations inside the main loop increased from 1505 to 2743, increasing the simulation time. The results of the FDTD and OFDTD models were similar for low resolution (∆d =5.56 nm). When high resolution (∆d =0.877 nm) was used in order to improve the accuracy, the OFDTD model could successfully run the simulation in around 122 h. While this was relatively a long simulation time, it was acceptable considering OFDTD increased accuracy while the FDTD method crashed and was unable to run the simulation. The experimental results were closely matched with the OFDTD high-resolution results. By using OFDTD, the λ LSPR discrepancy was minimized by 17 nm. The EF peak was 2.73 for the FDTD model and 10.52 (sharp peak) for the OFDTD model. The EF accuracy was improved by 74% with respect to FDTD simulation, which led to a near-unity OFDTD accuracy of~99%. The EF peak position discrepancy was ±0.5 nm for the OFDTD model while it was ±5.5 nm for FDTD. It was observed that the total amount of memory consumed by OFDTD was~52% less than the FDTD model. In addition, the optimization steps used in OFDTD offered a~9% reduction in the simulation time, in comparison with FDTD. It can be observed that there was a small deviation between the OFDTD and experimental results. The reason for this discrepancy is due to the fact that the Lorentz-Drude relative permittivity spectrum (Equation (S10) in Supplementary Materials) was not perfectly matched with the experimental data achieved by Johnson and Christy [48,49] for Ag NPs. Moreover, the MNPs were considered to be monodisperse (with the same shape) in the model, which were periodically distributed; however, in the experiment, there are some limitations to achieve monodispersity in MNP. In addition, they are also randomly distributed inside the device.

Conclusions
Although the FDTD method is an excellent numerical algorithm to solve Maxwell's equations, its required memory, calculation, and accuracy are dependent on the Yee grid properties of the modelled device. Implementation requirements for MNP modelling are high grid resolution and accuracy. By using the developed 3D OFDTD method, new 3D parameters of the model were developed based on the physical events occurring during the plasmonic excitation in MNPs. The identical calculations were bypassed during the simulation and were replaced with a single alternative parameter. Thus, the OFDTD model not only decreased the total required memory by~52%, but it also decreased the simulation time by~9%. This allowed an increase in Yee grid resolution which leads to enhancing the accuracy of the modeling results. The performance of the developed OFDTD method was validated by comparing the simulation and experimental results of a spherical Ag NPs. The traditional FDTD modeling results did not match with the experimental results due to having a low grid resolution. However, for the high-resolution OFDTD model, the extinction spectra and the position of the LSPR wavelength were in very close agreement with the experiment results (~435 nm), which led to the near-unity OFDTD accuracy of~99%.