Computational Electromagnetics with MEEP: 2D MEEP

Lesson 2: Gaussian Beam Propagation


But I thought we already used Gaussian beams!

No, not that kind of Gaussian pulse, but this kind of Gaussian beam. We have been dealing with pulses that turn on and off like Gaussians, and this has been really useful, because these pulses are very localized both in time and space (so our simulations can end quickly and we only represent a narrow band of frequencies). Now we are dealing with when the beam is physically shaped like a Gaussian. Why? Because Gaussian beams are easy to create in the lab. They are great starting points for coupling light into and out of finite devices, and for doing experiments. But most importantly for this lesson, there are exact closed-form equations that describe how these beams evolve.

The (Focused) Gaussian Beam

First, we want to see how a perfectly focused Gaussian beam propagates. In other words, we are starting with a "perfectly flat" Gaussian beam (the phase is zero across the entire beam). This is exactly what we have at the focus of a Gaussian beam. The beam can be polarized in the x/y plane (if we are propagating on the z-direction, so we'll just take it to be y-polarized. Then, the x-component can be written as a Gaussian:

\begin{equation} E(r) = E_0 * e^{-\frac{r^2}{w_0^2}} \end{equation}

Where \(E_0\) is the field amplitude at the center, \(w_0\) is called the "beam waist", which is the radius after which the field falls to \(1/e\) its initial value, and \(r\) is the distance from the center of the beam. If we plotted the field at \(t=0\), it should look like this:

What is the field amplitude at \(r=3w_0\)?





So all we need to do in MEEP to create this Gaussian beam is use a source, as we have before, but add an amplitude function to give it the right shape. Let's do that now. Let's use a ContinuousSource so that we can see how the beam behaves at a single frequency and run the simulation just to see what happens (full code here).

w0 = 1
def gaussianProfile(vec):
    return np.exp(-np.square((vec.x-sourceLocation.x)/w0))

sources = [mp.Source(mp.ContinuousSource(frequency=frequency, is_integrated=True),
        component = mp.Ey,
        center=sourceLocation,
        size=sourceSize,
        amp_func=tiltFunction
        amp_func=gaussianProfile
        )]

Now, how do we figure out whether the simulation will make sense? Well, for a Gaussian beam, some clever physicists already solved exactly what the fields should be (the equation is a little complicated, see Wikipedia if you are interested.


On the right is a snapshot of what we expect to see (ignoring the PMLs). While our simulation result looks qualitatively similar, it doesn't appear to be decaying as quickly as we would expect. Why is this?

2D vs. 3D

Well, this is a two-dimensional simulation. What does that actually mean? It means that everything is assumed to be infinite along the third dimension. So our gaussian source isn't really gaussian, it's Gaussian along one dimension and infinite along the other. If we were to plot its cross section (imagine looking head-on at the beam from the direction it is propagating) it would look something like this:

An actual Gaussian beam should look like this:




If you found this content helpful, it would mean a lot to me if you would support me on Patreon. Help keep this content ad-free, get access to my Discord server, exclusive content, and receive my personal thanks for as little as $2. :)

Become a Patron!