Nonstandard Finite Difference Time Domain Methodology to Simulate Light Propagation in Nonlinear Materials

James B. Cole

University of Tsukuba, Japan
cole@cavelab.cs.tsukuba.ac.jp

Submitted On: July 17, 2023; Accepted On: April 24, 2024

ABSTRACT

We extend the nonstandard (NS) finite difference time domain (FDTD) methodology, originally developed to solve Maxwell’s equations in linear materials, to nonlinear ones. We validate it by computing harmonics generation in a nonlinear dielectric and comparing with theory. The methodology also applies to the quantum electrodynamics that describes the interaction of charged particles with electromagnetic fields, and also to the Ginzburg-Landau model of superconductivity.

Index Terms: Finite difference time domain (FDTD), nonlinear optics, nonlinear susceptibility, nonstandard FDTD, quantum electrodynamics, superconductivity.

I. INTRODUCTION

The conventional or standard (S) finite difference time domain (FDTD) methodology [1] is widely used for linear electromagnetic calculations, but its accuracy is low relative to the computational cost. At wavelength λ for space-step size h, its error scales as (h/λ)4 and in three dimensions its computational also cost scales as (λ/h)4. We [2] have introduced what is called a nonstandard (NS) FDTD methodology [3] for which the error scales as (h/λ)8, but computational cost still scales as (λ/h)4.

Nonlinear problems are generally difficult to solve analytically, but numerical methods also often fail to yield good solutions unless the discretization steps are small, and even then numerical instability can arise. A classic example is the logistic equation, the discrete form of which is a well-known example of deterministic chaos. In this paper we extend the NS-FDTD methodology to solve Maxwell’s equations for nonlinearmaterials.

Although not the topic of this paper, the methodology is also useful to solve certain problems in quantum mechanics. For example, the Hamiltonian of a changed particle (of mass m,charge q) in an electromagnetic field [4] (vector potential A, scalar potential φ) is nonlinear in the form:

H=12m(-i-qA)2+qφ. (1)

II. NONLINEAR OPTICS

In a nonlinear dielectric the electric displacement is D=ε0(E+χ(1)E+χ(2)E2+), where ε0 is the vacuum electric permeability, and E the electric field. We use units in which ε0=1 and the vacuum magnetic permeability is μ0=1/c2 (c=vacuum velocity of light). Retaining only second order nonlinearity, and defining ε=1+χ(1), then D=εE+χ(2)E2. Taking the magnetic susceptibility to be μ0 everywhere, Maxwell’s equations become:

μ0Ht =-×E,
tD =×H, (2)

and the index of refraction is n=ε. In a linear material D=0 implies E=0, but this is not true in a nonlinear one. If, however, χ(2) is small, E=0 is a good approximation [5], and Maxwells equations reduce to a nonlinear wave equation of the form:

(t2-c2ε2)E(x,t)=-χ(2)εt2E(x,t)2. (3)

For simplicity, we first develop the finite difference model of (3) in one dimension, where it reduces to:

(t2-c2n2x2)E(x,t)=-χ(2)n2t2E(x,t)2. (4)

Before proceeding further, we first introduce the nonstandard methodology for the linear wave equation.

III. FINITE DIFFERENCE MODELS FOR THE LINEAR WAVE EQUATION

A. Notation and definitions

Define the partial difference operator (dt) by dtf(x,t)= f(x,t+Δt/2)-f(x,t-Δt/2). Then it is easy to show that dt2=dtdt is given by:

dt2f(x,t)=f(x,t+Δt)+f(x,t-Δt)-2f(x,t). (5)

The second derivative is thus approximated by:

Δt2t2f(x,t)dt2f(x,t). (6)

The operator dx2 is defined analogously to dt2 and:

Δx2x2f(x,t)dx2f(x,t). (7)

We now construct finite difference models of the homogeneous wave equation:

(t2-v2x2)ψ(x,t)=0. (8)

B. Standard finite difference model

Writing v¯=vΔt/Δx, and replacing the derivatives in (8) with the FD expressions (6) and (7), gives the conventional or standard (S) finite difference (FD) model of (8):

(dt2-v¯2dx2)ψ(x,t)=0. (9)

General solutions of (8) aref(xvt)where f is arbitrary. Substituting f(xvt) into the S-FD model above, we find:

[dt2-v¯2dx2]f(xvt)=-(1-v¯412)Δx4f(4)(xvt)+. (10)

The right side of (10) is the model error. Although it vanishes for v¯=1, across multiple media in which v varies, maintaining v¯=1 by adjusting Δx or Δt gives rise to large errors on the media boundaries and is thus of limited use in practice.

C. Nonstandard finite difference model

It is, however, possible to construct an exact FD model with respect to harmonic waves, φ(x,t)=ei(kx-ωt),where ω=vk. Writing ω¯=ωΔt, k¯=kΔx, and substituting φ into (9) gives:

[dt2-v¯2dx2]φ=4[-sin2(ω¯/2)+v¯2sin2(k¯/2)]φ. (11)

The right side of (11) can be made to vanish with the substitution v¯v~, where:

v~=sin(ω¯/2)/sin(k¯/2). (12)

Thus, an exact model of the wave equation with respect to harmonic waves is:

(dt2-v~2dx2)ψ(x,t)=0. (13)

This FD model is exact because φ is a solution of both the wave equation (8) and its model (13). This is an example of what is called an NS model [3]. Expanding dt2ψ(x,t) via (5) and solving for ψ(x,t+Δt), we obtain an exact NS FDTD algorithm:

ψ(x,t+Δt)=-ψ(x,t-Δt)+[2+v~2dx2]ψ(x,t). (14)

D. Numerical stability and accuracy

The numerical stability condition [2, 6] for the S- and NS-FDTD algorithms is:

vΔtΔx1. (15)

In the case vΔt/Δx=1, the S- and NS-FD models are equivalent and exact with respect to any waveform. However, whatever the value of 0<vΔt/Δx1, for a supposition different frequencies, the shortest period (Tmin) corresponding to the highest frequency (νmax) must satisfy the Nyquist sampling criterion [7]:

Tmin/Δt>2, (16)

and the minimum wavelength (λmin) must satisfy:

λmin/Δx>2. (17)

E. Wave equation with a source

To iterate the FDTD algorithm, two initial fields are needed. They can be generated by turning on sources at time = 0. The wave equation with a source s(x,t) is:

(t2-v2x2)ψ(x,t)=s(x,t). (18)

Standard finite difference model

Substituting FD expressions of the derivatives in (18) the S-FD model is:

(dt2-v¯2dx2)ψ(x,t)=Δt2s(x,t). (19)

It is interesting to note that while the stability conditions of (15), (16) and (17) still hold, the S-FDTD algorithm for the wave equation with a source is not exact even for vΔt/Δx=1.

Nonstandard finite difference model

To derive the NS-FD model, we examine the analytic solution of (18). Imposing the initial conditions that ψ and its first time derivative vanish for t0, ψ(x,t)|t0= tψ(x,t)|t0=0, the Green’s function that solves (18) is:

G(x-x,t-t)=12vΘ(v[t-t]-|x-x|), (20)

where the step function is defined by Θ(t)=0 for t<0 and Θ(t)=1 for t0. Using (20) it can be shown that the harmonic point source:

s0(x,t)=2vωδ(x)Θ(t)cos(ωt), (21)

generates an outgoing unit sine wave:

ψ0(x,t)=Θ(ωt-k|x|)sin(t-|x|/v). (22)

Modeling δ(x) as δx,0/Δx, where δx,0=1 for x=0 and δx,0=0 for x0, and putting ss0 in (19), the S-FD model becomes:

(dt2-v¯2dx2)ψ(x,t)=2vωΔt2Δxδx,0Θ(t)cos(ωt). (23)

We now postulate the NS-FD model to be:

(dt2-v~2x2)ψ(x,t)=2vωA~δx,0Θ(t)cos(ωt), (24)

where Δt2/ΔxA~, which is to be determined. Requiring that ψ0 be a solution of both (18), with s=s0, and of (24), we find [3]:

A~=2ωvsin2(ω¯/2)tan(k¯/2). (25)

When a source is abruptly switched on in FDTD calculations it produces extraneous frequency components which give rise to large errors [3]. This is remedied by replacing the step function with a slow switch-on function. A commonly used one is:

Θg(t)=Θ(t)[1-e-β2t2]. (26)

Taking 1/β to be several wave periods suffices to suppress the errors. The NS source model which generates ψ0 in a NS-FDTD calculation is thus:

s~0(x,t)=4sin2(ω¯/2)tan(k¯/2)δx,0Θg(t)cos(ωt). (27)

With A~ given by (25) the NS-FD model (24) is exact. As expected, in the limits Δx0 and Δt0, the NS-FD model reduces to the S-FD one.

The NS-FDTD model of the wave equation with a harmonic point source is thus:

ψ(x,t+Δt)=-ψ(x,t-Δt)+[2+v~2dx2]ψ(x,t)+s~(x,t). (28)

When s~=s~0 the iteration of (28) generates the outgoing unit sine wave given by (22), where k and ω are related by:

sin(ωΔt/2)=v~sin(kΔx/2). (29)

Initialization and iteration

The FDTD calculation is initialized by taking

ψ(x,-Δt)=ψ(x,0)=0, (30)

and switching on the source at t=0 generates the incident field.

The boundary conditions at material interfaces are determined by the wave equation itself, viz. continuity of both the field and its first partial derivative with respect to position. Since null fields obviously satisfy these conditions, and because FDTD derives directly from the wave equation, the generated fields automatically satisfy the boundary conditions as they impinge upon material interfaces when the algorithm is iterated.

F. Multi-frequency NS-FDTD

It might seem that NS-FDTD is applicable only to monochromatic waves, but it is also valid for multiple frequencies. For a fixed value of v~, models (13) and (24) are exact for any angular frequency-wavenumber pair (ωi,ki) related by:

sin(ωiΔt/2)=v~sin(kiΔt/2). (31)

Thus, the NS-FD model is exact with respect to a multi-frequency wave of the form:

φΣ(x,t)=iaiei(kix±ωit), (32)

which is produced by multi-frequency source superposition. For example:

s~Σ(x,t)=4δx,0Θg(t)isin2(ω¯i/2)tan(k¯i/2)cos(ωit) (33)

generates a frequency superposition of unit sine waves. Such a superposition is useful for high accuracy computations of reflection or transmission spectra. The maximum frequency is limited by the time step according to the Nyquist sampling criterion given by (16).

G. Nonstandard model of refractive index

Let k0 be the vacuum wave number and ω0=ck0 be the angular frequency of a light wave. In a medium of refractive index n the wavenumber is k=nk0. From (12) the algorithmic vacuum velocity of light in the NS-model is:

c~=sin(ω¯0/2)/sin(k¯0/2). (34)

In a medium of refractive index n the algorithmic velocity of light is:

v~=sin(ω¯0/2)/sin(nk¯0/2). (35)

Define the nonstandard index of refraction to ben~=c~/v~:

n~=sin(nk¯0/2)sin(k¯0/2). (36)

The nonstandard FDTD algorithm (28) is thus:

ψ(x,t+Δt)=-ψ(x,t-Δt)+[2+c~2n~2dx2]ψ(x,t)+s~(x,t). (37)

Before proceeding to the nonlinear NS-model we introduce a simplified and abbreviated notation. Discretizing space time as x=χΔx, t=τΔt and defining ψ(x,t)=ψχτ,

(τ, χ integers), (37) is compactly rewritten as:

ψχτ+1=-ψχτ-1+[2+c~2n~2dx2]ψχτ+s~χτ, (38)

with the definitions dx2ψχτ=ψχ+1τ+ψχ-1τ-2ψχτ, dt2ψχτ= ψχτ+1+ψχτ-1-2ψχτ (compare with equation 5).

IV. FINITE DIFFERENCE MODELS OF THE NONLINEAR WAVE EQUATION

A. Standard finite difference model

First construct the S-FD model of (4). For notational clarity suppress the spatial dependence and denote time as a subscript, thus Eτ=E(x,τΔt). Writing c¯=cΔt/Δx, the S-FD model of nonlinear wave equation (4) is:

(dt2-c¯2n2dx2)Eτ=-χ(2)n2[Eτ+12+Eτ-12-2Eτ2]. (39)

The intractability of this model is immediately evident. Since (39) is quadratic in Eτ+1, there are two solutions and it is unclear a priori which one to use.

B. Nonstandard finite difference model

In nonstandard models a term of power m (a positive integer), such as E(x,t)m is modeled as [3, 8]:

Eτm=EτmEτ-1mEτ-m+1m. (40)

The NS-model of E(x,t)2is thus Eτ2=EτEτ-1. Modeling dt2E(x,t)2 as:

dt2Eτ2=Eτ+1Eτ+Eτ-1Eτ-2-2EτEτ-1, (41)

postulate the NS-FD model of (4) to be:

(dt2-c~2n~2dx2)Eτ=-χ(2)n~2
  [Eτ+1Eτ+Eτ-1Eτ-2-2EτEτ-1]+s~τ, (42)

where s~τ is a nonstandard source term that generates the fields. Solving for Eτ+1 we find:

    Eτ+1=
2Eτ[n~2+χ(2)Eτ-1]-Eτ-1[n~2+χ(2)Eτ-2]+c~2dx2Eτn~2+χ(2)Eτ+s~τ. (43)

Whereas the FDTD algorithms for the linear wave equation require two initial fields, the NS-FDTD for nonlinear wave equation requires three. To iterate (4.2) Take E-2=E-1= E0=0, and switch on the source at t=0.

C. Computational model

We take the computational domain to be 0xNΔx. In Fig. 1 the nonlinear dielectric (magenta) is immersed in vacuum (white) and illuminated by a point harmonic source (S) of angular frequency ω0. S is located at x=p>Δx, away from the computational boundary, thus:

s~0(x,t)=4sin2(ω¯0/2)tan(k¯0/2)δx,pΘg(t)cos(ω0t), (44)

where c=ω0/k0. We choose Δt and Δx such that c¯= cΔt/Δx=1, and thus c~=c¯=1. Thus (only) in vacuum, as noted in Section II D, the S-FDTD and NS-FDTD algorithms are equivalent and exact. With the choices above in the vacuum:

Eτ+1=-Eτ-1+[2+dx2]Eτ+s~τ, (45)

where sτ=s0(x,t). Because the boundaries of the computational domain are vacuum and c¯=1, the Mur absorbing boundary [9, 10] is exact, and is given by:

E(0,t+Δt) =E(Δx,t), (46)
E(NΔx,t+Δt) =E(NΔx-Δx,t). (47)

Taking the vacuum wavelength of the incident field be λ0=1200nm, let Δx=λ0/64=18.75nm, which implies the wave period T0=λ0/c. Setting

Δt=T0/64=6.25×10-17sec (48)

gives c¯=c~=1. For this choice, the source simplifies to:

s~0(x,t)=2sin(ω¯0)δx,0Θg(t)cos(ω0t). (49)

images

Figure 1: Computational set-up to simulate propagation and harmonic generation in a non-linear dielectric illuminated by a point harmonic source S located in vacuum. The time dependence of the transmitted field is recorded at point O outside the dielectric.

V. RESULTS AND COMPARISON WITH SEMI-ANALYTIC CALCULATION

Take n= 1.6, χ(2)=0.05, the source amplitude to be 1.1, ω0/2π=1/64Δt, and the source rise time 1/β= 4T0, where T0=2π/ω0.

images

Figure 2: Light from a source (yellow dot) enters the dielctric material (orange line). As the electric field (black curve) traverses the material, harmonics are generated.

Figure 2 is a snapshot of the position dependence of E. A time series of the electric field amplitude was collected at an observation point outside the dielectric after the source switched on and the field had completely traversed the dielectric. The data were analyzed with a discrete Fourier transform (DFT). The DFT amplitudes of the harmonic frequencies are shown in Fig. 3.

images

Figure 3: Harmonics generation in a nonlinear dielectric. Time steps from 1300t/Δt1940 were analyzed. The frequency unit is Δt-1=161015Hz.

In Fig. 4 we compare our simulation with a semi-analytic calculation based on the low depletion approximation [1]. The low depletion model assumes that energy is slowly transferred from the fundamental mode to the higher harmonics. This is the usual case when χ(2) is small.

images

Figure 4: Amplitudes first harmonic (black) and second harmonic (blue) with position and in the nonlinear material (orange). Comparison with theory (red) in the low depletion approximation.

VI. EXTENSION TO TWO AND THREE DIMENSIONS

The linear homogeneous wave equation in three dimensions is:

(t2-v22)ψ(x,t)=0, (50)

where x=(x,y,z). Defining dy2 and dz2 by analogy with dx2, define the Laplacian difference operator:

d2=dx2+dy2+dz2. (51)

Taking Δx=Δy=Δz=h:

2f(x)d2h2f(x). (52)

The S-FD model for the three-dimensional wave equation is thus:

(dt2-v¯2d2)ψ(x,t)=0, (53)

where v¯=vΔt/h.

To construct the NS-model, define:

d~2=d2+(16+(k0h)2180)[dx2dy2+dx2dz2+dy2dz2] (54)
+130dx2dy2dz2.

The motivation and derivation of this definition is found in [3]. The NS-FD model of wave equation (50) becomes

(dt2-v~2d~2)ψ(x,t)=0, (55)

where v~ is given by (12) and k¯=kh. The NS-source model remains the same but with Δxh.

Table 1 lists the stability conditions for the S- and NS- algorithms.

Table 1: Stability conditions for the S- and NS- algorithms

Maximum Stable Value
Theoretical/Practical
S-FDTD v¯ NS-FDTD v~
1-D 1/1 1/1
2-D 220.70/0.67 0.86/0.80
3-D 330.57/0.45 0.80/0.70

For S-FDTD, the maximum value of v¯ is given, while for the NS-FDTD algorithm the maximum value of v~ is given. The practical stability limits are somewhat lower due to the termination of the computational boundary. Details of the derivation are found in [2]. The greater stability of NS-FDTD allows the solution of problems using fewer time steps. The advantage over S-FDTD is greatest in three dimensions.

The NS-FD model has been validated against analytic solutions of Mie scattering [11, 12], as depicted in Fig. 5. An infinite plane wave (not shown) is incident from the left and the scattered field intensitycomputed.

images

Figure 5: Mie scattering of an infinite dielectric cylinder (white). Scattered intensity (shades of red) in the exterior was computed using the NS-FDTD and S-FDTD algorithms and compared with Mie theory. Index of refraction = 1.7, vacuum wavelength = 800 nm, cylinder radius = 600 nm, grid spacing = 100 nm.

In the vacuum (black) the wavelength is λ0=800 nm and in the dielectric (white) it is λd=λ0/1.7, thus in the vacuum h/λ0=1/8=0.125, but in the dielectric h/λd=1.7/8= 0.2125, which is just slightly greater that the minimum allowed by the Nyquist criterion for a 2-dimensional (uniform) grid where h/λ must satisfy h/λ<1/(22) 0.3536. Nonetheless the NS-FDTD error remains low. The theoretical error of the NS-FDTD calculation is εNS(kh)8/438840, while that of S-FDTD is εS(kh)4/48.

The three-dimensional NS-FDTD algorithm for the nonlinear dielectric derives from the one-dimensional form (42) with the substitution dx2d~2:

(dt2-c~2n~2d~2)Eτ= (56)
  -χ(2)n~2[Eτ+1Eτ+Eτ-1Eτ-2-2EτEτ-1]+s~τ,

where Eτ stands for the x-, y-, or z-component of E(x,τΔt).

VII. SUMMARY AND CONCLUSIONS

We introduced a high precision finite difference time domain algorithm derived from a nonstandard finite difference model to simulate electromagnetic propagation in nonlinear dielectrics. We validated the results of our simulation against an analytic calculation based on the low depletion approximation [5].

This NS-methodology can also be applied to other nonlinear problems, such as quantum electrodynamics in magnetic fields, and to higher order nonlinearities.

We introduced our methodology in one-dimension and extended it to two and three dimensions and have verified its high accuracy and numerical stability [2].

REFERENCES

[1] K. S. Kunz and R. J. Luebbers, The Finite Difference Time Domain Method for Electromagnetics. Boca Raton: CRC Press, 1993.

[2] J. B. Cole and S. Banerjee, Computing the Flow of Light, Bellingham: SPIE Press, 2017.

[3] R. Mickens, Advances in the Applications of Nonstandard Finite Difference Difference Schemes, Singapore: World Scientific, 2005.

[4] E. Merzbacher, Quantum Mechanics, 2nd ed. Hoboken: John Wiley, 1970.

[5] R. W. Boyd, Nonlinear Optics, 3rd ed. Cambridge, MA: Academic Press, 2008.

[6] J. Strikwerda, Finite Difference Schemes and Partial Differential Equations, 2nd ed. Philadelphia: SIAM, 2004.

[7] J. R. Pierce, An Introduction to Information Theory: Symbols, Signalsand Noise, 2nd ed. New York: Dover Publications, 1980.

[8] A. Kiran Güçoğlu, The Solution of Some Differential Equations by Nonstandard Finite Difference Method, MS Dissertation, İzmir Institute of Technology, Türkiye, 2005.

[9] B. Engquist and A. Majda, “Absorbing boundary conditions for the numerical simulation of waves,” Mathematics of Computation, vol. 31, pp. 629–651, 1977.

[10] G. Mur, “Absorbing boundary conditions for the finite- difference approximation of the time domain electromagnetic field equations,” IEEE Transactions on Electromagnetic Compatibility, vol. 23, pp. 377–382, 1981.

[11] J. A. Stratton, Electromagnetic Theory. New York: McGraw-Hill Book Company, 1941.

[12] P. W. Barber and S. C. Hill, Light Scattering by Particles: Computational Methods, World Scientific, Singapore, 1990.

BIOGRAPHIES

images

James B. Cole graduated from the University of Maryland, PhD particle physics. After a post-doctoral fellowship (US National Research Council) at the NASA-Goddard Space Flight Center, he was a research physicist at several US National Laboratories, before joining the faculty of University of Tsukuba (Japan).

After returning to the US, he was a senior research fellow of the National Academy of Sciences, and is now a corporate research physicist. He specializes in mathematical models and high precision algorithm development for applications to computational optics and photonics, quantum mechanics, and machine learning. He is one of the pioneers of the methodology of nonstandard finite differences, and has published numerous papers and a book on the subject.

ABSTRACT

I. INTRODUCTION

II. NONLINEAR OPTICS

III. FINITE DIFFERENCE MODELS FOR THE LINEAR WAVE EQUATION

A. Notation and definitions

B. Standard finite difference model

C. Nonstandard finite difference model

D. Numerical stability and accuracy

E. Wave equation with a source

F. Multi-frequency NS-FDTD

G. Nonstandard model of refractive index

IV. FINITE DIFFERENCE MODELS OF THE NONLINEAR WAVE EQUATION

A. Standard finite difference model

B. Nonstandard finite difference model

C. Computational model

images

V. RESULTS AND COMPARISON WITH SEMI-ANALYTIC CALCULATION

images

images

images

VI. EXTENSION TO TWO AND THREE DIMENSIONS

images

VII. SUMMARY AND CONCLUSIONS

REFERENCES

BIOGRAPHIES