An RF cavity is the equivalent of a laser optical cavity; it acts as a resonant chamber for EM waves in the microwave spectrum rather than visible light. It is an essential component of a maser, and can be solved both analytically and numerically, so we detail how to do so below.

The motivation of using RF cavities

The reason why we need to use a RF cavity in a free-electron maser (indeed, among masers in general) is that the cavity is a resonant cavity, meaning that it causes amplification of EM waves. The precise mechanism behind why this amplification occurs is hard to rigorously explain without solving Maxwell’s equations, but the general effect is that an RF cavity is the crucial component necessary to create a maser beam.

In a resonant cavity that is typical for a laser/maser, two mirrors are placed some distance apart, and joined with a tube made of a optically- or microwave-transparent material (depending on the operating wavelength of the laser/maser). This allows EM waves to be reflected between the metal plates, but not reflect off the walls of the tube, which creates a highly-directional and focused beam.1 This page is not focused on the precise mechanics or engineering of a resonant (optical or RF) cavity; please see Guide to modelling lasers and masers for more information on the topic. Rather, it is focused on describing how to mathematically model and simulate the electromagnetic field inside and outside an RF cavity. Being able to do so will help us design better resonant cavities for high-performance masers.

Note: We will be referring to the RF cavity interchangeably as “RF chamber”, “resonant chamber”, “resonant cavity”, and “resonator”. For our purposes, these are equivalent terminology.

A basic 2D model

Note: Our coordinate conventions are to use to denote the optical axis (direction of propagation of EM waves), and to denote the radial distance away from the optical axis, with 2D coordinate points labelled by . When working in 3D, we use cylindrical coordinates , where are still defined the same way, and denotes the azimuthal (angular) coordinate. These are chosen for consistency with our maser coordinates, as well as the typical coordinates used for describing Gaussian beams.

We consider a RF cavity of total width , aperture (hole) width , and total length , as shown in the below diagram:

Note: The above diagram is a 2D cross-section. The full 3D cavity (which has a cylindrical shape) is not shown.

Basic analytical solution

To make things simpler, to start, we restrict our analysis to two dimensions only. We also initially assume that there are no longitudinal modes of the electric field (at least, for TE modes). That is to say, we only consider the case where the electric field is transverse (perpendicular) to the optical axis, hence there is only the component of the electric field (at least in our 2D model). The components of the electric field obey the Helmholtz equation . In our case, this becomes:

In our chosen coordinates and in two dimensions, the Helmholtz equation takes the form:

In two dimensions, it is possible to solve the problem analytically in a fairly straightforward fashion using separation of variables, with the following assumptions:

  • The left and right walls of the RF cavity (located at and respectively) are perfect conductors, meaning they reflect all incident EM waves and neither leak nor absorb energy
  • The top and bottom walls of the RF cavity (located at and respectively) are perfectly transmissive, meaning they allow EM waves to pass through freely
  • The aperture is so small as to be negligible in size compared to the width of the RF cavity (that is, ), so no energy leaks out the cavity

Note: While it may appear that energy would be needlessly dissipated over the top and bottom walls of the RF cavity, this actually does not happen, since the electromagnetic field quickly becomes zero for .

With all of these idealized assumptions, together with the fact that we are ignoring the third dimension, it suffices to say that the results we will obtain will be highly approximate. However, it will prove to be useful before we tackle the much more complex problem of the 3D case, with a non-negligible aperture and non-trivial energy leakage and absorption.

Here, we will not go through the entire process of separation of variables, since it is quite lengthy and is more of an exercise in mathematics than physics or engineering. It suffices to know that after performing the separation of variables procedure, the general solution of the Helmholtz equation in our 2D Cartesian-like coordinates is given by2:

We now impose boundary conditions to find a specific solution. We want our solution to apply for all and all , and therefore must be zero, or otherwise the solution blows up at . Meanwhile, we impose the requirement that must vanish at the surface of each of the reflective boundary walls (that is, at and ); this comes from the fact that mirrors are typically made of conductive materials (typically metals), and the tangential components of the electric field at the surface of any perfect conductor is zero. Here, is the tangential component, and therefore at both ends of the cavity. To satisfy the boundary condition, must be zero. Now, if we define , we have:

Note: Here, describes the amplitude of the wave as it propagates in space, and depends on the value of . The precise value of can be found through Fourier analysis, but we will not cover this for now.

Meanwhile, to satisfy the boundary condition, we must have . Solving this equation gives us , or alternatively:

Thus, the modes that the cavity can support are directly related to the integer values of and , so they are quantized. Now solving for , we obtain:

We observe that is only real-valued if . This means that the minimum value of is given by the case where , that is:

From dimensional analysis we can tell that has the same units as , and takes the interpretation of a cutoff, prohibiting modes above a certain wavelength3. Indeed, we may define a cutoff wavelength , which is given by:

This is the longest wavelength that the RF cavity permits; it is impossible for any EM wave of a longer wavelength to be present within the cavity. Thus, the RF cavity restricts the possible modes of the electric (and magnetic) fields, allowing us to preferentially select for specific modes. Indeed, if an RF cavity is constructed very carefully to minimize attenuation/losses, then the fundamental mode dominates, and the RF cavity supports EM waves of (almost) purely one wavelength, that being . We can convert this to frequency with , and thus . For instance, a RF cavity would therefore have (in our 2D simplification) a fundamental mode with a wavelength of , and thus a frequency of around 4.

Additional information: In purely 2D space, there are only TE (transverse electric) modes in the plane of the cavity; a transverse magnetic field must point out of the plane (into the 3rd dimension) and is thus out of our consideration.

Analytical solution with transmissive losses

In our basic model of a maser RF cavity, we assumed that the aperture was negligible in relation to the rest of the cavity. This, of course, is an over-simplification. We will now consider what happens if we do consider the effects of the aperture.

The physical effect of the aperture is that it allows some portion of the electromagnetic field inside the RF cavity to pass outside the cavity. This is a complex process that is not easily modelled analytically. However, we can model it with the following boundary condition (which we may term a transmissive boundary condition):

Where is the amplitude transmission coefficient, and is a dimensionless number between zero and one that describes what percent of the an electromagnetic wave is allowed to pass outside the RF cavity5. Note that we use the curly letter rather than the Latin letter since is typically used to denote the closely-related power transmission coefficient (the percentage of the power transmitted) defined by:

Where is the power density of the electromagnetic field is proportional to the square of its amplitude. We will not care right now about how exactly one can derive or from first principles, just that it is some known value, and is expressed as the ratio between the electric field’s amplitude at and at . That is:

Where we require that be real-valued, and thus we must take the absolute value, since can be complex-valued. This definition is useless for actually calculating what is from first principles, since it requires knowing at the left and right ends of the cavity, which (by definition) we don’t know. However, it can be experimentally-determined by performing actual measurements, or numerically-determined by performing a curve fit on the results of finite-element simulations (more on that later)6. We will also later discuss a way to calculate it analytically.

Even if we do not assume a specific form of , we can recognize some basic qualitative features. In the limit as , then , meaning that 0% of the microwaves are transmitted (equivalently, 100% of the microwaves are reflected). This would make for excellent amplification, but would also make it impossible to extract any energy out of the interior of the cavity. Meanwhile, in the limit as , meaning that 100% of the microwaves are transmitted (equivalently, none of the microwaves are reflected). This would make the RF cavity equally useless, since all the energy is allowed to pass out of the cavity, and therefore there is no amplification that can happen. But if is somewhere in between - for instance, if is between 5-10% - it can allow for the RF cavity to still effectively amplify the EM field within, while allowing a reasonable amount of power out of the cavity. We will now solve the problem analytically to show this effect, and solve for the wavelengths (and frequencies) permitted by our waveguide.

Note: Assuming azimuthal symmetry holds, the results of this calculation should be a good approximation (at least in theory) to the modes present in a real, three-dimensional RF cavity.

With our new transmissive boundary condition, let us start at our general solution from before, which was given by:

Once again, we want the solution to be value for all , and therefore must be zero for the solution to not blow up as . This gives us:

This time, we don’t use the perfectly reflective boundary conditions on the left and right wall of the cavity (i.e. setting at and ). Instead, we apply our new transmissive boundary condition, giving us (after dropping out common factors):

After simplifying, we obtain:

We can remove the (direct) dependency on and by defining a new constant . Thus, after dividing all sides by , we have:

Now solving for , we have:

We may rewrite in simpler fashion by defining a new dimensionless quantity , such that:

What we see is that is negative until , after which the sign is switched and we have positive . Meanwhile, the first root of is present at . In addition, at , the value of asymptotes and therefore is ill-defined. This tells us that it is impossible for . Finally, if we still assume that the left wall of the cavity (not the right wall!) is sufficiently reflective enough to be near-perfectly-reflective, then it must be the case that at we have , meaning that (or otherwise it would be impossible for this to be the case).

All of these conditions together allow us to find the possible modes. By the requirement that , it necessarily require that , since , and thus . This reduces the problem into finding the roots of such that for these values of , we have - equivalently, to find the roots of . Now recalling that , we can rearrange to find that:

Or equivalently, we have:

Where (that is the roots of ) can be analytically solved for by solving the transcendental equation , and are given by:

Now again by the requirement that the square root be real, it must be the case that:

Therefore, the fundamental wavelength is given by:

For (that is, if 10% of the microwaves were allowed to pass out of the cavity) and , the first few roots of are numerically given by the following table:

ModeRoot ()Fundamental wavelengthFrequency
1st (fundamental)1.4706342.7 cm701.7 MHz
2nd4.8125613.1 cm2.3 GHz
3rd7.753818.1 cm3.7 GHz

Finally, as a consistency check, let us note that occurs in the limit (where the aperture disappears and both the left and right walls of the cavity become perfectly reflective). In this case, we have:

Now setting the requirement that for both the left and right walls of the cavity (that is, at and ), as with before, this requires that . The roots of are , and thus we have:

Therefore, upon taking the requirement that the square root be real-valued, we have:

Upon which taking the fundamental () mode gives us:

This is exactly the result we obtained previously, and shows that our solution is indeed consistent as it reproduces the result of our first derivation in the perfectly reflective, zero-aperture limit.

Analytical 3D model

Now, we will solve the problem in 3D cylindrical coordinates and dispense with the 2D approximation we have used previously. We consider the same cylindrical resonant chamber bounded by two mirrors, but we now consider the case where both have transmissive losses; the power transmission coefficients of the two mirrors are respectively, meaning that and (in percent) of power is lost from the two ends of the resonant chamber, respectively. We treat the electric and magnetic fields of the resonant chamber as a perturbation to the Lorentz force equations (hence the symbol to remind us that it is a perturbation), and we can calculate both from the vector potential of the resonant chamber. (Note that we won’t show the calculation of , the (electric) scalar potential, but the same general approach can be used for it).

Why doesn’t a 2D approximation work? The reason is that the Helmholtz equation contains a Laplacian term (that is, ); the Laplacian takes different forms in different coordinate systems, and thus solutions to the Helmholtz equation in different coordinates are distinct. While our 2D solution might suffice as an approximation to a 2D cross-section of the 3D fields, it is still an approximation and is no substitute for a full 3D treatment.

Why use cylindrical coordinates, not rectangular coordinates? The reason is that if we want to form a microwave beam by carefully letting power out of an RF cavity, we must have azimuthal symmetry. Azimuthal symmetry means that cross-sections of the beam are periodic in (with a period of ); otherwise, the “beam” would not be a beam, so to speak, but a propagating plane wave (with cross-sections of squares or rectangles). Cylindrical coordinates naturally incorporates azimuthal symmetry, making it the ideal coordinate system to work in.

Solving for the vector potential

In this case, it is easiest to first solve for the vector potential and then obtain the fields from it. Recall that upon a choice of gauge (in our case, the Lorenz gauge is a convenient choice) the vector potential obeys a wave equation. Assuming time dependence, such that the wave equation reduces to the Helmholtz equation for the vector potential:

Taking advantage of the cylindrical geometry it is convenient to use cylindrical coordinates. Expanding the Helmholtz equation component-wise, we obtain three scalar PDEs, one for each component of :

The solution will now depend on whether the ends of the resonant chamber are curved or flat mirrors. Curved mirrors offer far superior stability, so they are generally used over flat mirrors. However, it is simpler to analyze the case of flat mirrors7. We will begin with the general treatment and then proceed to the simpler solution for flat mirrors.

First, note that due to azimuthal symmetry (the solution must repeat every ) the angular dependence is simply given by where is an integer. One thus looks for solutions in the form where . Recall the Laplacian in cylindrical coordinates is given by:

Substituting in our ansatz we obtain:

Thus resultingly, we obtain:

Assume . We thus have:

After some rearrangement, we thus obtain two ODEs:

Where as mentioned prior, is an integer. The solution for is evidently a sinusoid, that is:

Where is an arbitrary constant; this solution can be checked by substitution. Meanwhile, we identify the ODE for with the Bessel equation, giving a solution in the form of the Bessel functions of the first kind :

Where is another arbitrary constant. Hence we have:

The general solution for is given by a superposition in the form:

Where are the coefficients of the series. Note that the full vector potential is given by:

Where is the polarization vector of the vector potential, and are (as discussed) the coefficients of the superposition.

As we saw above, the general solution for is a superposition of modes. The modes are parametrized by the integers and ; interestingly, they are not parametrized by wavenumber , as itself is not quantized since we have imposed open boundary conditions along the sides of the resonator (if the resonator had reflective sides, this would not be true and would be quantized). We will now turn our attention to the individual modes.

For this, we will start by computing the electric and magnetic fields from the vector potential. Recall that in the absence of an electric potential, the electric and magnetic fields (which we denote by and respectively) are given by:

Substituting our general form of , we obtain the following series of modes, parametrized by and :

Where we have defined and , and where is the wavevector (the same as the in ) and is understood to be oriented along . Modes admitted by a resonator are classified as TE (transverse-electric), TM (transverse-magnetic), and TEM (transverse-electromagnetic). These types of modes are characterized by the following table (assuming wave propagation along the axis):

Mode typeLongitudinal field
TEM
TE
TM

Note: Here, by “longitudinal field” we mean the component of the fields along the direction of wave propagation (here we choose the axis, hence the longitudinal components are and ). The “transverse field” are the components of the fields perpendicular to the direction of wave propagation (i.e. all the components other than and ).

We will start with the simpler case of a flat mirror to solve for the modes in our cylindrical resonant chamber. Note that the Laguerre-Gaussian modes are the equivalent for curved mirrors, but they are more complex, so we will leave that discussion for later on. We use a perturbative approach in which we first solve for the case of a lossless resonant chamber, and then add in the effects of losses through the mirrors at the ends of the chamber. This approach requires use of a complex-valued wavevector and requires that the two mirrors are “good” conductors to begin with (a reasonable assumption in our case).

TEM modes

TEM modes only exist when a non-trivial solution to Laplace’s equation can be found, where denotes the Laplacian with respect to all the transverse components (i.e. same as the standard Laplacian except without a second derivative w.r.t. ). This requires at least 2 conductors to be present (in our case, the mirrors at the ends of the resonator are our conducting surfaces). Interestingly, this means that (hollow) rectangular waveguides and circular waveguides do not have a TEM mode, since they are made of a single conductor; since every point along a conductor is equipotential, the only solution to Laplace’s equation is .

Assuming the modes are physically-realizable, one can use a shortcut when evaluating the fields for a TEM mode. This is because the transverse components of the electric field (which we’ll denote as ) satisfies , where is the electric potential and follows Laplace’s equation . After imposing boundary conditions on (typically a known voltage on the boundaries or a known gradient of the voltage i.e. electric field on the boundaries) one may solve for , and then take its (negative) gradient to obtain . One may then compute the field as follows:

In linear media, , hence this can be rearranged to:

In this case, we are working with cylindrical coordinates. However, remember that since here we are interested in the transverse Laplacian, we ignore any derivatives w.r.t. , giving us:

Hence Laplace’s equation takes the form:

We assume a solution in the form . Substitution yields:

Where is our separation constant. Upon rearrangement we obtain 2 ODEs:

The former is solved with as before, for any integer . The latter is Euler’s differential equation and solved by:

(Note that here is just the name of the function and has no relation to the magnetic vector potential). We impose the boundary condition that must be bounded at all points in the domain (we confine our domain to where is the radius of the resonant cavity). Since is unbounded as we therefore determine that and , leaving us with . This gives us a series of harmonics for the harmonics of the potential (where we now write the angular part in real-valued terms):

Where is an arbitrary constant. The general form is given by a superposition:

Where are the coefficients in the series. The modes of the transverse electric field can be straightforwardly found by differentiating the potential, since the electric field is just the negative gradient of the potential (that is, ). We note that in cylindrical coordinates (with suppressed) we have:

Hence, the electric field TEM modes are given by:

For the electric field, we let be the amplitude of the field. Then, the first few modes are shown in the table below:

Mode
(fundamental)

The magnetic field components are given by . Computing the cross product gives us:

If we define we obtain:

By definition of being TEM modes, . Thus, we have found all 6 components of the electric and magnetic fields.

TE modes

For the TE modes, we have . This leaves us with the two other components of the electric field to evaluate ( and ). Recall our general solution was:

Where in the case of TE modes in particular, and (for reasons we’ll explain shortly) . For simplicity, we suppress the time dependence and (as before) take the real part of (which is the physically-measurable part), giving us:

Assuming an ideal lossless resonant cavity, then the tangential components of the electric field ( and ) must vanish at the boundaries ( and ); this is the perfect electric conductor (PEC) boundary condition. For this to be satisfied, we must have , which lead to the eigenfrequencies defined by for integer , which are purely real-valued. The resonant wavelengths are therefore given by:

And the resonant frequencies are given by:

Which is exactly the same as our previous analysis of a lossless cavity! If we substitute in , the electric field components for the TE modes are thus given by:

Meanwhile, for a perfect conductor, the magnetic field satisfies , where is the normal vector for the conductor’s surface. Hence, the normal component of the magnetic field (in our case, ) must vanish at the boundaries ( and ). Once again, this leads to the condition that , resulting in the same eigenfrequencies. Since we are dealing with plane-wave solutions (which are present in the case of flat mirrors), and all plane-wave solutions to Maxwell’s equations must satisfy the orthogonality relation 8, the remaining components of the magnetic field must be zero. (This is because the electric field is aligned purely along the plane, hence the magnetic field must purely be aligned along for the orthogonality relation to hold true). Thus the magnetic field components are given by:

Now we consider the effect of realistic lossy boundaries. In this case, becomes complex-valued, and takes the form:

Where is the total attenuation coefficient (not to be confused with the summation index we used for the Bessel functions in the solution) and is the real part of . Physically-speaking, the imaginary part of results in an exponential decay of the waves across the resonator mirrors, as would be expected for lossy boundaries. Moreover, we may write as a sum of its contributions from several different effects:

Where describes the intentional loss due to the transmission of energy through the output coupler (aperture), describes the dielectric loss due to Joule heating (loss of energy through heat), and describes the conductive loss due to our imperfect mirrors (which are not perfect conductors)9. We can assume as long as the RF cavity is filled with air or vacuum (or a similar material with a relative permittivity of ). The conductive loss and coupling loss, however, should not be ignored. Thus, we have:

Where the coupling attenuation coefficient is a function of the transmission coefficient . For a good conductor, the attenuation coefficient is the inverse of its skin depth, and is given by:

where is the conductivity of the conductor, is the permeability of the conductor, and is the angular frequency of the wave. Note that (the transmission coefficient of the fully-reflective mirror, which comes only from conductive losses) can also be written implicitly in terms of via the Fresnel formula (where we assume normal incidence):

Where is the refractive index of the fully-reflective mirror (which has relative permittivity and relative permeability ) and is the refractive index of the medium surrounding the cavity (air or vacuum). For metals, the relative permittivity is in general complex-valued, and takes the form:

Which can be expressed in terms of our aforementioned expression for as:

Note that in the limit of a perfect conductor we have ( also becomes purely real-valued) and , hence and we have a perfectly-reflective mirror.

The output coupling loss is less easy to describe with a single formula, as it depends on the geometry of the output coupler. Nonetheless, we will aim to obtain an analytical expression for the coupling loss in terms of the transmission coefficient . To do this, it is useful to note that the electric field magnitude (for constant and ) is given by:

This result does not depend on the choice of and , since the geometry is axisymmetric. The (electromagnetic) power per unit area is given by:

Where is a constant and is proportional to . Notice that the power density decreases with increasing , with the minimum being at which is exactly where the output coupling mirror is. This makes physical sense: power is being transmitted through the output coupling mirror, and therefore is lost from the cavity, with the greatest loss at the same location where power passes out of the cavity. Now, by definition, the transmission coefficient is given by the following ratio:

Hence substituting we obtain:

Solving for , we obtain the following expression for the attenuation coefficient due to output coupling losses:

Note that an alternative method of calculating the (total) attenuation coefficient, which is more useful in the case of some problems, is to utilize the following formula10:

Where is the power loss per unit length, is the peak power, and the two are respectively given by:

Where is the Poynting vector, are the complex conjugates of the and fields respectively, and the integration is across a cross-section of the cavity. However, this method requires doing integrals and derivatives, so we have elected to use our simpler method.

Finally, we will conclude with an important qualitative observation. While a complex-valued attenuation coefficient does change the amplitude of electromagnetic waves in the cavity, it does not change the resonant frequencies (assuming that the attenuation is not too extreme). The presence of a transmissive boundary in the form of an output coupling mirror only leads to a power decay within the cavity due to the imaginary part of , which is independent of the real part of that tells us what the resonant frequencies are. Therefore, so long as the perturbative assumption holds, the resonant frequencies of a cylindrical cavity with plane waves as the standing modes are given by:

Hence, the resonant frequencies are only dependent on the length of the resonant cavity (at least theoretically-speaking). Adjusting the length of the resonant cavity will change the resonant frequencies, with a longer resonant cavity leading to a higher-frequency fundamental mode, since .

TM modes

For the TM modes, we have . Using the same method we have demonstrated above, we obtain the following solutions for the electric and magnetic fields:

The reason that and are zero is once again because of the orthogonality condition . Finally, the boundary conditions are the same in the TM case, so we end up with the same resonant frequencies, as well as the same attenuation coefficients.

Laguerre-Gaussian modes

We will now briefly mention the solution for curved mirrors. In the case of ideal curved mirrors, the perturbative fields and take the form of Laguerre-Gaussian modes. For the electric field:

Where and are integers, are the generalized Laguerre polynomials, and are respectively defined as:

Here, is the waist radius, and is the width of the main “cone” of radiation within the cavity, and is the wavelength, which can be calculated from the resonant frequency of the mode using the same formulas as we derived for the plane-wave case. The Laguerre-Gaussian mode solutions are far more complex and not as amendable to perturbative analysis, so we will leave our discussion here.

Exact solution for transmission and reflection coefficients

We have previously assumed a known (empirical) value of the (power) transmission coefficient for the output coupling mirror. It is actually possible to derive an exact solution for the transmission coefficient from first principles. Here, we first define for simplicity. Then the power transmitted in terms of the original power of the beam, assuming a cylindrical RF cavity of diameter and aperture radius is given by11:

Where the angle is between the axis (optical axis) and the radial axis (). The expression given is: and are the first two Bessel functions. This exact result comes from integrating over the Airy distribution.

Diagram of the axial conventions used.

From the analytical solution for , we can straightforwardly calculate the power transmission coefficient:

From this, it is not hard to see that in the case of a very small aperture () nearly all light is reflected, whereas in the case of a very large aperture () nearly all light is transmitted, since:

Since the mirror (with the hole in it) has radius while the cavity has length , then through simple trigonometry the angle is then . Thus substituting, and noting the well-known identity , we get:

Alternatively we can express this in terms of the power reflection coefficient , since :

Numerical solution in 2D

To solve the Helmholtz equation numerically, we use the finite element method with the open-source FreeFEM software. This is essential to model physically-realistic cavities that have energy losses. However, in this case, we will not consider such losses in a precise fashion, and find a numerical solution purely based off our simpler model, where we abstract away the precise physics based on a generic transmission coefficient . We interpret as combining the two sources of power losses:

  1. Transmission due to the aperture, which is designed to let out a portion of the microwaves
  2. Transmission due to power leakage from the cavity, which is undesirable but nonetheless present in any realistic RF cavity

We will also leave the 3D cylindrical case and other more complex effects for later, and consider the basic 2D Cartesian case only. While this is certainly a very crude model, this numerical simulation is intended to be for familiarization with the concepts of the finite-element method; we will eventually discuss how to perform a numerical simulation that is physically-meaningful and can yield realistic results.

A crash course in the finite element method

Note: This should eventually be ported to the Elara Handbook.

To speak in broad terms, the finite element method approximates a solution to a PDE as a sum of lots of simple piecewise functions called basis functions7. If we let be the -th basis function, and be a constant coefficient to multiply the basis function by, then the solution can be approximated using the sum of basis functions as:

The goal of the finite element is to find the unknown coefficients that best approximate the true solution of our PDE (the Helmholtz equation). The first step in doing so is to convert the PDE into the variational form (also known as the “weak form”) - essentially, an integral equation that contains the same information as the PDE. We’ll do this in several steps. The first step is to write the PDE in standard form, meaning that we need to move all terms to the left-hand side such that the right-hand side is equal to zero. Luckily, the Helmholtz equation is already in this form:

The next step is to multiply every term of the Helmholtz equation with a test function , and integrate the entire left-hand side. A test function is a simple function that has a well-known form, such as a polynomial. This results in:

Where denotes the domain in which we’re solving the Helmholtz equation over. Now, the crucial part of the finite element method is that we have to write this integral equation as two terms: one integrated over the domain , and one integrated over the boundary of the domain, which we denote as . To do this, we use integration by parts. Recall that the integration by parts formula in one variable says that:

The multivariable version of integration by parts takes the form:

Here, we apply integration by parts to our term . Let and . Then, we have and . So using the formula, we get:

Substituting this result back into the integral equation we got previously, we have:

We can combine the two integrals over and multiply by so that we have the simplified result in a specific order, where bilinear (that is, nonlinear) terms come first, and linear terms come after:

This is the most general variational form of the Helmholtz equation. The boundary term (the integral over ) is the one we’re most interested in, because it depends on our choice of boundary conditions (more on that in the next section). Note that in the finite element world it is common to use the following condensed notation12:

This comes from the mathematical notation for functional analysis, where the inner product of two functions is denoted or , and expands to the following integrals:

The reason we need to do all this work to get the variational form is that finite element software (like FreeFEM, which we use) can convert this to a matrix equation to solve for using the methods of numerical linear algebra. And since integrals are well-defined even over discontinuous or non-smooth domains (unlike partial derivatives), the variational form used by the finite element method means that you can solve PDEs on very complex geometries, including those with sharp corners, holes, and edges, which are commonly encountered in real-life objects; in such cases, the partial derivatives in the so-called strong form (original differential form) are ill-defined.

Setting up boundary conditions

In our simplified model, we aim to solve for the region and , where . To start, we have the transmissive boundary condition from before, where is a constant:

In practice, it is easier to set to a fixed value and then set based on the transmissive boundary condition. We can set an order-of-magnitude estimate by assuming that the interior electric field is sourced from some spatially and temporally-varying potential source , where . Therefore, we have:

Therefore, the amplitude of the electric field at is given by:

Making a basic order-of-magnitude approximation for the frequency/wavelength (which can always be refined later), we arrive at a figure for about for and a power source.

Having placed boundary conditions for the left and right walls, we now need to consider the top and bottom sides of the RF cavity. This is a more complex situation since these regions are open boundaries that allow microwaves to pass unimpeded and radiate away to ; it is in fact this particular property that allows our RF cavity to be any use at all for use in a maser.

To accurately model outgoing waves that radiate to infinity, we must use the Sommerfeld radiation condition, which, in dimensions, takes the form:

Where is the magnitude of the radial vector pointing from the origin of the coordinate system (and is always positive). For instance, the two- and three-dimensional variants of the Sommerfeld radiation condition take the form:

The requirement for this to be exact, of course, is that the domain is infinitely-large. Of course, we know that simulating infinite domains computationally is impractical. However, we can approximate this boundary condition by surrounding our RF cavity in a large circular region of radius (shown below), where (the circular region is much larger than the RF cavity). Thus, we can say that ; it may seem preposterous, but our assumption that means that the circular domain can be effectively treated as infinite.

Note: the same general idea can easily be extended into 3D: the only difference is that the circular boundary will need to be changed into a spherical boundary.

We note that since only the top and bottom sides of the RF cavity permit the unimpeded passage of outgoing waves, that is, along the axes, we must modify the 2D condition to selectively choose the axis, rather than the general distance . Thus, we have:

If the domain is very large, it is possible to approximate the radiative boundary condition with simpler periodic boundary conditions. See the visualization here for a numerical simulation using periodic boundary conditions (this simulation assumes ). Indeed, one can approximate the 2D Sommerfeld radiation condition up to first-order with13:

The solutions to this differential equation over slices of constant are sinusoids, by inspection; thus this approximation results in plane-waves propagating far away from the sides of the cavity. We will now numerically demonstrate how to compute the electric field. First, recall that our weak form was given by:

We now apply our boundary conditions on the third term, which describes an integral performed over the boundaries of the domain the problem is to be solved over. We incorporated the transmissive boundary conditions by setting and to fixed values with and . These do not affect the boundary term since by nature of being constant values (formally, by being a Dirichlet boundary condition) the gradient of the electric field is zero. However, our open boundaries at and do factor in, since they specify a non-vanishing derivative of the electric field at the aforementioned boundaries. Note that since we are considering a 2D domain , the boundary of our 2D domain is a 1D curve, so integrals over are surface integrals while integrals over are line integrals. Thus adding the appropriate integral notations, we have:

Therefore, the weak form of the Helmholtz equation for our chosen boundary conditions (and with the integrals fully written-out) is thus given by:

Where here, we simulate only the interior field (that is, the field inside the RF cavity itself); we may also simulate both the interior and exterior fields with the circular domain method described previously, but we will omit it for simplicity.

Simulation results

The FreeFEM code for the simulation can be found in freefem/dev/lasers/solve-Efield.edp. The result is shown below:

We see some notable features from the simulation. First, the radiation pattern rapidly decays away to infinity and doesn’t stay collimated. This suggests that it would be better to add waveguide to the aperture instead of a bare opening as the output coupler of a maser. Second, as we would expect, the field is zero almost everywhere but the interior of the RF cavity and right in front and around the aperture. Indeed, this is not very different from visible light in a dark room with a small hole in it (see camera obscura).

Note: The code does have some issues right now, including the fact that it is necessary to hard-code a value of the electric field at the aperture (here it is set to ) when in theory there should be no physical requirement for this.

The simulation also gives reference values of the electric field strengths for us to compare experimental results against, and thus improve our models. A physically-sound but impractical idea is to put a square plate in front of the maser, with lots of tiny wires crisscrossing the plate. Then, we can measure the voltage across each of the wires at regular intervals to get an approximate idea of the voltage across the entire plate (or we can interpolate numerically). Once we know the voltage we can then figure out the power density (intensity) of the EM waves and compare this against the simulation. The much more practical method is to place a sensitive antenna (or series of antennas) in front of the maser. The antenna(s) can then measure the microwave beam from the maser, much like a radio telescope, allowing us to have an accurate “picture” of how the beam spreads.

Numerical solution in 3D

Note: This section is quite outdated; the numerical solution will use the actual geometry with a PML. See https://pyoomph.readthedocs.io/en/latest/tutorial/spatial/helmholtz.html or equivalent for (Py)MFEM.

Having considered a simplified 2D simulation, we now turn our attention to simulating a realistic cylindrical resonator in 3D. This problem is quite complex and some aspects of it can only be solved numerically, but we will find that analytical methods can get us a long way.

Note: Finite element simulations should be added, with streamline plots and/or vector field plots of both the electric field and magnetic field, as well as the radiation pattern plot (magnitude of the Poynting vector)

To start we can start by once again assuming azimuthal symmetry implicitly, which reduces the 3D problem to a 2D problem, where we use the coordinates to denote the transverse (perpendicular to optical axis) and longitudinal (parallel to optical axis) directions, so and . The total electric field is then given by .

A typical laser cavity has a 100% reflective mirror on its left end (at ) and a partially-reflective mirror with reflectivity at its right end (it is a bit different for masers but we’ll discuss that later). The electric field satisfies the Helmholtz equation , which are essentially the time-independent Maxwell equations. When expanded into vector form, this gives us two PDEs to solve:

As mentioned, the longitudinal field runs along the optical axis (that is, ), while the transverse field runs perpendicular to it (that is, ). We assume that the left end (at ) of the laser cavity has a perfectly-reflective mirror, such that (the tangential component of the electric field is zero, which is true for all perfect conductors). This is equivalent1 to the following boundary condition:

Where in this case we have . Now, we examine the right side of the laser cavity (at ). For this side, we have a partially-transparent mirror. This means that the mirror will reflect some light and also transmit some light (we assume no absorption here).

There are several different approaches to this. The first method, and a fairly naive one14, is to start with the general form of a scattered (plane) wave:

Where is the reflection coefficient and is the reflectance, or essentially the percentage of light that is reflected. We now consider a generalized mixed boundary condition:

Substituting our solution in, we have:

Thus, we have:

This result is very interesting since it tells us that in order for a physically-meaningful reflection coefficient ( would violate conservation of energy). Now, the particular values of to make this equation true for a certain value of are actually arbitrary. For simplicity, we can set so that we can reduce one of our constants, giving us (for different and than previously):

Now, let us presume that , since again the choice of our constants is arbitrary so long as our equation is fulfilled, which also requires that . Thus we have:

The solution can be found using the quadratic formula:

Where we take the negative root since we know that . This gives us an explicit expression for in terms of . Our mixed boundary condition is then:

Finally, we obtain our boundary condition:

Where the electric field at the boundary is then given by:

For instance, for a reflective mirror and using light, substituting in and gives us . We note that in the special case of (that is, all light is reflected), we have:

This is the Dirichlet boundary condition that we would expect for a perfectly-reflective boundary in one dimension. Meanwhile, in the case of (that is, all light is transmitted), we have:

Which describes outgoing plane waves , as we would expect. This is a very crude method and a realistic simulation would most likely use a partially-absorbent boundary condition to model the fact that the mirror at absorbs some light.

Note: in addition to what has been mentioned, realistic laser cavities typically use parabolic/spherical mirrors instead of flat mirrors, so the domain will be curved at either end, making things much more complicated.

Meanwhile, the sides of the laser cavity are usually glass or some other optically-transparent material, making it an open boundary (also called a radiative boundary). This can be modelled by a perfectly-matched layer that allows light to freely pass through. While counterintuitive, this is what maintains the strong directionality of the light along the transmission axis () and keeps it as a beam rather than dispersing.

However, a PML requires a bit of work to implement, so it is often easier to just use the first-order approximation of the Sommerfeld radiative boundary condition:

Putting everything together, we arrive at the following boundary conditions for the electric field inside a laser cavity (although it can be generalized to the outside field as well):

  • The aperture has a Sommerfeld-like radiative boundary condition
  • The two “mirrors” of the RF cavity (really, they’re just metal plates and don’t have to be polished) have a reflective (homogeneous Dirichlet) boundary condition
  • The rest of the RF cavity (including the “tube” connecting the two mirrors) also has a Sommerfeld-like radiative boundary condition; this represents a material transparent to microwaves

In this case, it is easier to use cylindrical coordinates , where is the optical axis (direction of propagation) and are the radial and polar angles respectively. We again assume our cavity to have length . Our boundary conditions for the Helmholtz equation thus correspond mathematically to:

Where our domain is given by , and we want to pick a suitably large simulation domain (where and , roughly) to be able to see both the near-field and the far-field behavior of the beam. Our first two boundary conditions encode the fact that the electromagnetic waves in the cavity must reflect off the two mirrors at each end of the cavity. Meanwhile, our last two boundary conditions encode the fact that the electromagnetic waves must pass freely through the tube connecting the two mirrors, as well as the aperture (output coupler) at the end of the cavity. Our last boundary condition enforces azimuthal symmetry since we expect our solution to be symmetric with respect to . While it may appear that energy would be needlessly dissipated over the sides of the maser, this actually does not happen, since the electromagnetic field quickly becomes zero for .

Note: This means that the resultant electric field will be complex-valued; we take only the real part for a physically-meaningful solution.

Maser gain analysis

Lastly, we don’t just want to see what the beam’s wave profile; we also want to know how well the maser amplifies light15. The corresponding quantity of interest to us in the numerical simulation, which describes this amplification, is called the gain of the maser. The gain compares the output power of the maser to that of an isotropic (point-source) radiator. It is usually measured in decibels (dB), which are a logarithmic unit, and it can be written as:

Where (in cylindrical coordinates we have ), is the input power used to drive the maser, the power of the maser is given by , and is just the Poynting vector. The input power , where and are the driving current and voltage used to power the maser respectively. If we substitute our analytical solution, we find that:

Where here, is the maximum intensity of the beam. Thus the gain is approximately:

If we assume that the initial intensity is equal to the input power (that is, we assume that the maser is 100% efficient mechanically-wise), this gives us:

Note that our result is independent of angle and also independent of . However, this is not entirely accurate, as again we are using a simplified solution as opposed to the physically-accurate solution (the Gaussian beam, where ). For a Gaussian beam, the gain becomes:

Where we used the fact that for . This result can be simplified and written explicitly, up to some constants, to:

It is easy to see that in the limit as , we have . Thus, at its source, a (perfect) Gaussian beam would have effectively infinite gain, which corresponds to infinite amplification of light (once again, here “amplification” means “concentration of energy” not “increasing energy”). Of course, as increases, the gain of the beam decreases; at some finite distance, (meaning that the Gaussian beam has diverged to the point that it is effectively isotropic and no longer performs useful amplification of light). A minimally-divergent Gaussian beam (whose profile does not change much as increases) would thus have very high gain; a highly-divergent Gaussian beam would have very low gain. Therefore, decreasing the divergence of a Gaussian beam is absolutely fundamental to improving its amplification and thus its efficiency.

Footnotes

  1. This is due to the transverse and longitudinal reflections interfering with each other, leading to the buildup of undesired non-Gaussian modes in the RF cavity. In simplified terms, any off-optical-axis reflections will interfere with the desirable on-axis reflections, causing power to be dispersed and the beam to lose directionality. 2

  2. From Wolfram Mathworld’s article article on solving the Helmholtz equation in cartesian coordinates. Owing to our coordinate conventions, we make the substitutions .

  3. This follows the derivation in Pozar, Microwave Engineering (4th ed.) in Chapter 3.2.

  4. For more information, see the Wikipedia article on RF waveguides

  5. This was inspired by the boundary conditions described in Freund & Antonssen’s Principles of Free Electron Lasers (4th ed.), ch. 9.1-9.4 as well as the discussion on the transmission coefficient in hole-coupled free-electron lasers from Varro et. al., Free Electron Lasers ,Ch. 3, pg. 68

  6. Directly based off Varro et. al., Free Electron Lasers ,Ch. 3, pg. 68

  7. This is only a basic overview of the finite element method - more details and a much more comprehensive guide to the finite element method can be found on the COMSOL software blog. 2

  8. Please see https://farside.ph.utexas.edu/teaching/em/lectures/node48.html for the proof.

  9. See Yeap et. al., Propagation in Lossy Rectangular Waveguides (2011)

  10. See Cheng (1989), Field and Wave Electromagnetics, Addison Wesley, 0-20152-820-7

  11. See Zen & Ohgaki (2021), J. Opt. Soc. Am. A. The specific equation we reference is eq. 2.

  12. This comes from the form shown in the documentation for the pyoomph library. Note that we swap the order of the inner products, but this does not affect the results since the inner product is commutative.

  13. Taken from an oomph library example for solving the Helmholtz equation with the finite element method.

  14. This is a simplified form of the solution given on Wolfram Mathworld’s article on solving the Helmholtz equation in cylindrical coordinates. In particular, we choose so that the solution does not blow up (become infinite) at and at .

  15. Technically-speaking, a maser (or laser) doesn’t amplify light; at least, not in the sense of producing more (radiant) energy than the energy used to power it. Rather, “amplification” is a rough term that describes the fact that a maser concentrates light so that it is amplified in one particular direction, while reduced in all other directions.