I am using Lumerical FDTD solutions to simulate a planewave through a region of space and some of my analysis requires me to know the relation between the simulation mesh step size and the time taken for the simulation to run. The relationship between the simulation time and mesh step size, for 2D simulations, is stated on the Lumerical website as being: $${\rm simulation\: time} \sim A(\lambda/dx)^3$$ where A is the region area, $\lambda$ is the wavelength of the light pulse, and dx is the mesh step size. I have only been able to find this relation in one textbook but neither in this textbook nor in the Lumerical web page does it explain how this relation is derived. Could someone help me understand where this relation came from?

Source of the relation stated above.

  • $\begingroup$ I come from a CFD perspective, but we choose a grid size such that the material cannot advect out in one time step (e.g., a fluid parcel moving at a characteristic speed should not be able to move more than 1 adjacent cell over, otherwise you may end up with negative densities). I suspect there are similar physical arguments here, but my experience is very limited in the E&M side of modeling. $\endgroup$
    – Kyle Kanos
    Commented Dec 22, 2022 at 20:12
  • $\begingroup$ @KyleKanos Yes, FDTD simulations have to obey the Courant condition which states that the light should not be able to propagate any further than one spatial step for each temporal step i.e. c∆t ≤ ∆x. I guess I'm mainly confused as to how this leads to the simulation time relation above, if it does lead to it at all. $\endgroup$
    – Kibble
    Commented Dec 22, 2022 at 20:38
  • $\begingroup$ I guess you purchased this software. If so, you may try asking the question to the technical support of the company. The page you linked shows the author, and you could ask to talk directly to this person. $\endgroup$
    – norio
    Commented Jan 11, 2023 at 0:22

1 Answer 1


Obeying the speed of light and computation time are not exactly the same. FDTD simulations take a long time because the algorithm has to solve maxwell equations for each Yee lattice unite, both for the E and H fields of course. This means multiplying a range of numbers for each cell and that takes up both time and memory in a computer.

The formula you found simply states that the simulation time grows with the size of the simulation space A and the number of grid cells per wavelength to the third power. One thing that may seem counterintuitive is the 3th power in 2D space, and where lambda suddenly comes from.

Basically we have $\frac{A}{(dx/\lambda)^3}$ , which takes the total area and divides it by the number of wavelengths per unit cell. You could write $\frac{A}{dx^3}*{\lambda^3}$ which helps in understanding this. The third power is some sort of space-time like thing, because the number of required timesteps is linked to the Courant condition you mentioned in the comments. So 2 space dimensions + 1 time dimension, et voila.

Now we have the area dived by the unit cell size, which gives N as the total number of cells. This number is then related to wavelength, which I believe relates to the fact that this time domain method needs to run longer to cover a larger wavelength. For interference effects and resonances and wave effects this is important, and this for the 2 space and 1 time dimension.

You could stop your simulation to early, but you will get a very bad non-converged simulation result. That's why in practice, in a good simulation setup, the number of wavelengths per unit cell size matters. Usually one will choose $dx<\lambda$, so remember that this number is larger than 1! But even if your steps dx are small enough (i.e. $dx<\lambda/10$), the total simulation time needs to extend long enough so enough wavelengths are taken into account to capture all interferences and resonances and wave phenomena.

I hope this somewhat helps in the understanding and i have not made a mistake.

  • $\begingroup$ This explanation and even the supposition from the OP does not really make sense to me. Each cell has about the same computational requirement per timestep (evaluate grid values of neighboring cells and combine them). So, per timestep, the computation time of the whole grid should just be proportional to number of cells $N=n\cdot m=A/(dx)^2$, independent of the wavelength. Assume we have chosen Courant number C=1 the total time to reach a quasistatic state (like a standing wave) is the number of steps the wave takes between the boundaries... $\endgroup$
    – oliver
    Commented Feb 7, 2023 at 15:10
  • $\begingroup$ ... and could be roughly estimated by the order of $T\approx \sqrt{n\cdot m}\cdot N=\sqrt{A}/dx \cdot N$, which is also independent of wavelength. So I would arrive at a total computational time of $\approx (\sqrt{A}/dx)^3$. How does this relate to the formula of the OP's reference? $\endgroup$
    – oliver
    Commented Feb 7, 2023 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.