# How do you extrapolate frequency data from FDTD simulation time data?

Context: Im a PhD student who plans on doing research in theoretical plasmonics/nanophotonics, so I am studying up on understanding FDTD. I am having a bit of a conceptual issue regarding extrapolating the frequency data out of this time domain based algorithm.

I have been reading through "Electromagnetic Simulation Using the FDTD Method", by Sullivan, which thus far has been a great read, but I am a bit stuck on the section about how to calculate the frequency domain output from FDTD. I understand FDTD propagates E&M equations in time, but often times, and particularly in my research, it is more important to understand how a system reacts to a source of a particular frequency. Sullivan states "One approach would be to use a sinusoidal source and iterate the FDTD program until we observe that a steady state has been reached, and determine the resulting amplitude and phase at every point of interest in the medium." (I understand this is not the standard approach, but I wanted to understand this seemingly more straightforward approach than the short pulse method) In my mind I understand this statement as how you could analyze a systems response to light of a particular frequency, and find at what points the E-field is amplified or dampened, and how much light is transmitted, absorbed, or reflected. But how this data is extrapolated is a bit of a mystery to me.

This is a link of a simulation I ran, with a medium of a particular dielectric constant receiving a source of 400 MHz, 1 cm grid size, after a long amount of time.

How do I extract frequency data from this? Naturally, I think take a fourier transform at each point, but what exactly is this telling me, and what does the amplitude/phase of each frequency point mean, relative to the set frequency of the input source? Should it be over the entire time domain, or just from the steady state? This steady state still very much appears to be a travelling wave, and within the medium, it looks somewhat like a bouncing sinusoid, with an oscillating max amplitude. Is this the data that can be captured in some clear way?

• Why don't you just solve the problem in the frequency domain if you're interested in the frequency dependence? Commented Nov 6, 2023 at 3:28

Naturally, I think take a fourier transform at each point, but what exactly is this telling me, and what does the amplitude/phase of each frequency point mean, relative to the set frequency of the input source? Should it be over the entire time domain, or just from the steady state?

Retrieving the frequency information at each point should not be necessary, as you are already determining that by using a single sinusoidal (as stated by Sullivan), where your pump or injection wavelength/frequency is determined by the initial conditions.

Consider the very nice explanation from Schneider here: https://eecs.wsu.edu/~schneidj/ufdtd/chap3.pdf

Here you can see the core explanation for FDTD, where you are essentially picking "nodes" or points in space in a structure, and using the wave equation in its differential for, determine the behavior of a wave travelling through the medium.

If there is a solution or eigenvalue in your structure that supports a specific wavelength/frequency, then what will happen is that a wave will travel through and depending on the boundary conditions, either cause reflections or transmission of the wave through the material and you will be able to see it in the FDTD. Schneider also adds what he calls "snapshots" of the field, which helps in understanding what is really going on in the method:

What may be counterintuitive is how this can give you the frequency behavior of a structure? In this case, you are expected to more or less "brute force" a solution through individual simulations, where the following can happen:

1. You choose a wavelength/frequency range of interest: For example, for nanophotonic and plasmonic structures, I have seen it typically in the UV-Vis-NIR range (~200nm - ~2000nm, depending on your application of interest). Here you can either choose the step to be relatively large (e.g. 100nm steps). You can refine later if you have a specific cutoff wavelength/frequency in mind (it will depend on your application).
2. You run the FDTD with each wavelength and observe the behavior of the structure. What can happen is two things: a. A steady state is reached and you either see standing waves (e.g. waves travel back and forth) or other periodic, stable behavior. b. A steady state is not reached, this can be due to many reasons, for example, either you are modelling very specific material losses (through the dielectric function, for example), or you have passive elements in your structure that change the steady state of the structure. For example, adding roughness to your model. If none of the above happen, what could also happen is that there is no valid solution for your structure combination and the wavelength of interest. This could be due to strong refractive index mismatching, very lossy metals, or other related issues with the base model.
3. You gather this information and choose a figure of merit for each wavelength and simulation.

The "figure of merit" is important and mostly defined by you as a researcher, as you will be mostly interested in a particular behavior of your structure at each wavelength: Namely, you want to have specific resonance for active materials in your structure, understand the geometric dependence for some materials, improving existing models by changing its parameters, and a larger etcetera. This can only be defined in your problem by what you are trying to solve, but typically you can also get some guidance on what it means for your structures.

The reason why you can retrieve frequency behavior and why I called it "brute-force" is because you are essentially using different excitation sources (namely at different wavelengths) and analyzing one-by-one to determine its behavior on a larger scale. For example, you want to know which wavelengths your structure will be highly resonant for specific active materials, or more generally, find optimization paths for more diverse solution spaces.

This steady state still very much appears to be a travelling wave, and within the medium, it looks somewhat like a bouncing sinusoid, with an oscillating max amplitude. Is this the data that can be captured in some clear way?

That will depend on your interpretation and how you end up plotting your results. For example, it is possible that in your example simulation you are not observing also the reflected wave from the interface in the center (also hard to tell but I would think that is a waveguide-type of structure). Nonetheless, what I have briefly see from the simulation is that the wavelength/frequency you used does travel through the material, but it does not seem to also account for reflections at the interface, therefore it is not possible to know if the wave will have a steady state in that structure.

Nonetheless that can also be added to your model and you can predict the structure behavior better.

This resource is pretty good (and free) if you want a second-opinion or explanation of FDTDs. https://eecs.wsu.edu/~schneidj/ufdtd/

• Thank you! I’ll definitely be using that second opinion from now on, it’s great to be able to cross reference. I really appreciate the detailed response. Commented Nov 6, 2023 at 13:51