Almost all media absorb electromagnetic radiation to some extent. In high-powered laser focusing systems, a medium such as a glass lens may absorb enough energy from the laser to heat up significantly, resulting in thermal deformation and changing the material’s refractive index. These perturbations, in turn, can change the way the laser propagates. With the Ray Optics Module, it is possible to create a fully self-consistent model of laser propagation that includes thermal and structural effects.

To understand how ray trajectories are affected by self-induced temperature changes, consider a collimated beam that strikes a pane of glass at normal incidence. Assume that an anti-reflective coating has been applied to the glass surface so that the rays are not reflected. A typical pane of glass absorbs a very small, but nonzero, fraction of the power transmitted by the beam. If the power is sufficiently low, the temperature change within the glass will be negligible, and the outgoing rays will be parallel to the incoming rays.

However, if a large amount of power is transmitted by the beam, the power absorbed by the pane of glass may substantially alter the temperature of the glass. The glass expands slightly, changing the angle of incidence of the rays and causing the transmitted rays to be deflected from their initially parallel trajectories. In addition, many materials have temperature-dependent refractive indices, and the temperature-induced change in the refractive index can also perturb the ray trajectories. Because the structural deformation and the change in refractive index tend to focus the outgoing rays, this phenomenon is known as *thermal lensing*.

Next, we take a more in-depth look at an application in which thermal and structural effects can significantly perturb ray trajectories.

Consider a basic laser focusing system that consists of two plano-convex lenses. The first lens collimates the output of an optical fiber while the second lens focuses the collimated beam toward a small target.

If the laser beam delivers a small amount of power, then it is straightforward to model the propagation of the beam toward the target by using the *Geometrical Optics* interface and ignoring the temperature change in the lenses. The following image shows the trajectories of the rays in the lens system.

However, even a high-quality glass lens absorbs a small fraction of the electromagnetic radiation that passes through it. If the optical fiber delivers a very large amount of power, then a *thermally induced focal shift* may occur; in other words, the changes in refractive index and lens shape can move the focus of the beam by a significant amount. If it is necessary to focus the laser accurately, then the possibility of thermally induced focal shift must be taken into account when designing the lens system.

In this example, we will observe how the temperature change in the lenses causes the beam to be focused at a location several millimeters away from the target.

To model ray propagation in the thermally deformed lens system, we use the following physics interfaces:

*Geometrical Optics*— To compute the ray trajectories.*Heat Transfer in Solids*— To compute the temperature in the lenses.*Solid Mechanics*— To model the thermal expansion of the lenses.*Moving Mesh*— To deform the finite element mesh in domains adjacent to the lenses.

The physics interfaces and nodes used in this model are shown in the following screenshot.

In addition to the Ray Optics Module, either the Structural Mechanics Module or the MEMS Module is needed to model the thermal expansion of the lenses.

Under the hood, the Ray Optics Module computes the ray trajectories by solving a set of coupled first-order ordinary differential equations,

(1)

\begin{aligned}

\frac{d\mathbf{q}}{dt} &= \frac{\partial \omega}{\partial \mathbf{k}}\\

\frac{d\mathbf{k}}{dt} &= -\frac{\partial \omega}{\partial \mathbf{q}}

\end{aligned}

\frac{d\mathbf{q}}{dt} &= \frac{\partial \omega}{\partial \mathbf{k}}\\

\frac{d\mathbf{k}}{dt} &= -\frac{\partial \omega}{\partial \mathbf{q}}

\end{aligned}

where \mathbf{q} is the ray position, \mathbf{k} is the wave vector, and \omega is the angular frequency. The wave vector and angular frequency are related by

(2)

\omega = \frac{c\left|\mathbf{k}\right|}{n}

where c is the speed of light in a vacuum. In an absorbing medium, the refractive index can be expressed as n-i\kappa, in which n and \kappa are real-valued quantities.

As the rays enter and leave the lenses, they undergo refraction according to Snell’s Law,

(3)

n_1 \sin(\theta_1) = n_2 \sin(\theta_2)

where \theta_1 and \theta_2 are the angle of incidence and the angle of refraction, respectively.

The intensity and power of the refracted rays are computed using the Fresnel Equations. In most industrial laser focusing systems, an anti-reflective coating is applied to the surfaces of the lenses to prevent large amounts of radiation from being reflected.

In this example, the anti-reflective coating is modeled by applying a Thin Dielectric Film node to the surfaces of the lenses.

The variables that are used to compute ray intensity are controlled by the “Intensity computation” combobox in the settings window for the *Geometrical Optics* interface. To compute a heat source using the energy lost by the rays, select “Using principal curvatures and ray power”.

The total power transmitted by each ray, Q, remains constant in non-absorbing domains. In a homogeneous, absorbing domain, the power decays exponentially,

(4)

Q(\mathbf{r})=Q(\mathbf{r}_0)\exp\left(-2k_0 \kappa\left|\mathbf{r}-\mathbf{r}_0\right|\right)

where k_0 is the free-space wave number of the ray.

In order to apply the power lost by the rays as a source term in the *Heat Transfer in Solids* interface, it is necessary to add a Deposited Ray Power node to the absorbing domains. This node defines a variable Q_{\textrm{src}} (SI unit: W/m^3) for the volumetric heat source due to ray attenuation in the selected domains. As the rays propagate through the lenses, they contribute to the value of Q_{\textrm{src}},

(5)

\frac{dQ_{\textrm{src}}}{dt} = -\sum_{j=1}^{N_t} \frac{dQ_j}{dt}\delta(\mathbf{r}-\mathbf{q}_j)

where Q_{j} (SI unit: W) is the power transmitted by the ray with index j, N_t is the total number of rays, and \delta is the Dirac delta function. In practice, each ray cannot generate a heat source term at its precise location because the rays occupy infinitesimally small points in space, whereas the underlying mesh elements have finite size, so the power lost by each ray is uniformly distributed over the mesh element the ray is currently in.

The following short animation illustrates how the heat source defined on domain mesh elements (top) is increased as the power transmitted by each ray (bottom) is reduced.

The temperature in the lens, T, can be computed by solving the heat equation,

(6)

\nabla \cdot \left(-k\nabla T\right) = Q_{\textrm{src}}

where k is the thermal conductivity of the medium. A Heat Flux node is used to apply convective cooling at all boundaries that are exposed to the surrounding air,

(7)

-\mathbf{n}\cdot\left(-k\nabla T\right) = h\left(T_{\textrm{ext}}-T\right)

As the temperature changes, it contributes a thermal strain term \epsilon_{\textrm{th}} to the total inelastic strain in the lenses. The thermal strain is defined as

(8)

\epsilon_{\textrm{th}}=\alpha\left(T-T_{\textrm{ref}}\right)

where \alpha is the thermal expansion coefficient, T is the temperature of the medium, and T_{\textrm{ref}} is the reference temperature. The resulting displacement field \mathbf{u} is then computed by the *Solid Mechanics* interface.

If the power transmitted by the beam is very low, then the energy lost by the rays to their surroundings does not noticeably change the temperature of the medium. However, it is still possible for other phenomena, such as external forces and heat sources, to change the shape or temperature of the lenses.

In this case, it is necessary to first compute the displacement field and temperature in the domain, and then compute the ray trajectories. This is considered a *unidirectional*, or one-way, coupling because the temperature change and structural deformation can affect the ray trajectories, but not the other way around.

If the power transmitted by the beam is sufficiently large, then the dissipation of energy in an absorbing medium may generate enough heat to noticeably change the shape of the domain or the refractive index in the medium. In this case, the ray trajectories affect variables, such as temperature, that are defined on the surrounding domain, and these variables in turn affect the ray trajectories. This is considered a *bidirectional*, or two-way, coupling.

In this example, we assume that the laser is operating at constant power, so it is preferable to compute the temperature and displacement field using a Stationary study step. However, the ray trajectories are computed in the time domain.

To set up a bidirectional coupling between the ray trajectories and the temperature and displacement fields, we first create a Stationary study step to model the heating and deformation of the lenses, then add a Ray Tracing study step to compute the ray trajectories. Then, the corresponding solvers are enclosed within a loop using the For and End For nodes. The following image shows the solver sequence that is used to set up a bidirectional coupling between the ray trajectories and the temperature and displacement fields.

The nodes between the For and End For nodes are repeated a number of times that is specified in the settings window for the For node. Furthermore, every time a solver is run, it uses the solution from the previous solver. In this way, it is possible to set up a bidirectional coupling between the two studies and iterate between them until a self-consistent solution is reached.

We now examine the ray trajectories close to the target for two cases: A 1-watt beam and a 3,000-watt beam.

For the 1-watt beam, we observe that the focal point of the beam is extremely close to the target surface. The rays do not converge to a single point due to spherical aberration. For the 3,000-watt beam, we see that the beam has already started to diverge by the time it reaches the target surface. The following image compares the deposited ray power at the target for the two cases.

*Comparison of the deposited ray power for a 3,000-watt beam (left) and 1-watt beam (right). For comparison and visualization purposes, the color expression for deposited power has been normalized and plotted on a logarithmic scale.*

The *Geometrical Optics* interface also includes built-in operators for evaluating the sum, average, maximum, or minimum of an expression over all rays. Using these operators, it is possible to quantify the beam width in a variety of ways. As shown in the plot below, the 3,000-watt beam is focused more than 2 millimeters away from the target surface.

We have seen that the temperature change and the resulting thermal expansion in a high-powered laser system can significantly shift the focal point of the beam. With the Ray Optics Module, it is possible to take thermally induced focal shift into account when designing such systems.

To learn more about computing ray trajectories in thermally deformed lens systems, please refer to the Thermal Lensing in High-Power Laser Focusing Systems model.

]]>

Consider the motion of a group of ions or electrons through electric and magnetic fields. To model the system using a one-way coupling, we first solve for the electric and magnetic fields, typically using a stationary or frequency-domain study step. To compute the trajectories of charged particles in these fields, we can then use the *Charged Particle Tracing* interface, which solves a second-order ODE for each particle’s position:

\frac{d}{dt}\left(m\mathbf{v}\right)= q\left({\mathbf{E} + \mathbf{v}\times\mathbf{B}}\right)

Here, m\mathbf{v} is the particle’s momentum, q is the particle’s charge, \mathbf{E} is the electric field, and \mathbf{B} is the magnetic flux density. This approach relies on the following assumptions:

- The fields are either stationary, change very slowly relative to the motion of the particles, or vary sinusoidally over time.
- The charged particles have a negligibly small effect on the electric and magnetic fields.

Being able to compute the fields using a stationary or frequency-domain study step is a tremendous time saver, since time-dependent studies involving the Particle Tracing Module often require a very large number of time steps. Several examples of one-way coupling between particles and electromagnetic fields are available in the Model Gallery, including the following:

- Magnetic Lens (requires the AC/DC Module)
- Particle Tracing in a Quadrupole Mass Spectrometer (requires the AC/DC Module)
- Quadrupole Mass Filter (requires the AC/DC Module)
- Einzel Lens

Several examples of one-way coupling between fluid velocity fields and particle trajectories are also available, such as the following:

All of these examples follow the same pattern: compute the field using a stationary or frequency-domain study step, then couple the solution to a time-dependent study step for the particle trajectories.

If the particles are numerous enough that they noticeably affect fields in the surrounding domains, we must recompute the fields at each time step to account for the changed positions of the particles. At this point, a two-way coupling between particles and fields is required. Typical examples of systems requiring a two-way coupling are ion and electron beams, electron guns, and sprays of particles entering a crossflow. In these situations, we must often compute the space charge density due to a group of charged particles or the volume force exerted by particles on a fluid.

The particles used in the physics interfaces of the Particle Tracing Module are treated as point masses in many respects. Although some pre-defined forces, such as the drag force, are size-dependent, the particles are considered infinitesimally small for the purpose of determining when they collide with walls. In addition, particles immersed in a fluid don’t displace any volume of fluid. Because each particle is treated as a point mass, the charge density or volume force due to the presence of a particle reaches a singularity at that particle’s location.

In some instances, you can improve the accuracy of a solution close to a singularity using adaptive mesh refinement; see, for example, Implementing a Point Source Using Poisson’s Equation in the Model Gallery. However, this is not a viable option for managing singularities due to particles for several reasons: there can be a very large number of singularities, the particles are constantly moving, and they generally don’t coincide with nodes of the finite element mesh. Instead, the singularities are avoided by distributing the space charge density or volume force due to each particle over the mesh element the particle is currently in. Although this means that the solution is somewhat mesh-dependent, the error introduced is typically very small if the number of particles is sufficiently large.

In the context of particle-field or fluid-particle interactions, we take *steady-state* to mean that the fields do not change over time. For example, an ion beam would be considered to operate under steady-state conditions if the electric field at any point remains constant, typically as a result of a constant ion flux. A pulsed beam, on the other hand, would not be considered a steady-state system.

A unique feature of steady-state systems is that they allow the particle trajectories and fields to be computed using a self-consistent method that is more efficient than computing the entire solution with a time-dependent study. This method involves the set-up of an iterative loop of different solver types, as we will see in the following example.

To illustrate the available solution techniques for steady-state systems with two-way coupling between particles and fields, consider a beam of electrons that is released into a large, open area at constant user-defined current. In order to model a large, open area, we add an Infinite Element Domain around the exterior of the modeling domain, represented by the highlighted areas in the image below. The circle shown at one end of the cylinder will be used to define an *Inlet* feature for electrons.

We expect that the electrons in the beam will repel each other, causing the beam to become wider as it propagates forward. We will assume that the electrons are non-relativistic, so that the force on the beam electrons due to the beam’s magnetic field is negligibly small compared to the force due to the beam’s electric field. We seek a self-consistent solution to the following equations of motion:

\begin{aligned}

-\nabla \cdot \epsilon_0 \nabla V &= \sum_{i=1}^N q\delta \left({\mathbf{r}}-{\mathbf{q}}_i\right)\\

\frac{d}{dt}\left(m{\mathbf{v}}\right) &= -q\nabla V

\end{aligned}

-\nabla \cdot \epsilon_0 \nabla V &= \sum_{i=1}^N q\delta \left({\mathbf{r}}-{\mathbf{q}}_i\right)\\

\frac{d}{dt}\left(m{\mathbf{v}}\right) &= -q\nabla V

\end{aligned}

The first equation is a Poisson equation for the electric potential, with a space charge density term due to the presence of charged particles. Here, \delta is the Dirac delta function, N is the total number of particles, \mathbf{r} is the position vector of a point in space, and \mathbf{q}_i is the position of the ith particle. The second equation is the equation of motion of a particle subjected to an electric force. Solving both equations of motion in the same time-dependent study would be extremely time-consuming, and would require a very large number of particles to be released at small, regular time intervals to ensure that the desired beam current is maintained.

An alternative solution method involves a physics interface property called the *Release type*, available for the *Charged Particle Tracing* and *Particle Tracing for Fluid Flow* interfaces in COMSOL 4.4. The default setting, *Transient*, is the correct choice for most applications. Changing the *Release type* to “Static” affects the available settings of particle release features, such as the *Inlet*, and changes the way the Particle-Field Interaction and Fluid-Particle Interaction features work.

Working with the Static release type requires us to change our interpretation of what the model particles represent. Rather than representing a single particle or group of particles at a specific point in space, each model particle now represents a certain number of particles per unit time. The number of real particles per unit time represented by each model particle is computed so that each Inlet, Release, or Release from Grid feature provides a user-defined charged particle current or mass flow rate (for the *Charged Particle Tracing* and *Particle Tracing for Fluid Flow* interfaces, respectively).

To accompany this new interpretation of the model particles, the space charge density, \rho, due to the presence of charged particles is now computed as:

\frac{d\rho}{dt} = q\sum_{i=1}^N f_{\textrm{rel}}\delta\left({\mathbf{r}}-{\mathbf{q}}_i\right)

Here, f_{\textrm{rel}} is the number of ions or electrons per second represented by each model particle so that the user-defined current is obtained. Similarly, when modeling fluid-particle interactions, the volume force, \mathbf{F}_V, that is exerted by particles on the fluid is computed as:

\frac{d{\mathbf{F}}_V}{dt} = -\sum_{i=1}^N f_{\textrm{rel}}{\mathbf{F}}_D\delta\left({\mathbf{r}}-{\mathbf{q}}_i\right)

where {\mathbf{F}}_{\textrm{D}} is the drag force on the particle. The time derivative on the left-hand side of each equation indicates that instead of creating a contribution to the space charge density at one location in space, each model particle leaves a trail of space charge or volume force along its trajectory, representing the combined effect of all particles that follow that trajectory. As a result, only a single release of model particles at time t=0 is needed to compute the space charge density due to an electron beam operating at constant current.

When computing the space charge density due to a group of particles, a time-dependent solver with a fixed maximum time step is recommended. The maximum time step should be small enough so that, on average, each particle spends several time steps inside each mesh element. In addition, the number of model particles should be large compared to the number of mesh elements in a cross section of the beam. These two guidelines ensure that the particles don’t “miss” any elements inside the beam, thereby creating non-physical gaps in the space charge distribution.

So far, we’ve seen that a single release of particles can be used to compute the space charge density due to a continuous beam of charged particles. However, the resulting space charge density must still be coupled back to a Poisson equation for the electric potential. Changes to the electric potential might in turn perturb the particle trajectories. To reach a self-consistent solution, we can compute the electric potential using a stationary solver, then use this potential to compute the particle trajectories and space charge density using a time-dependent solver, then use the space charge density to recompute the electric potential, and so on. This type of iterative sequence can be implemented in COMSOL by adding *For* and *End For* nodes to the solver sequence. Any solvers in-between these two nodes will be executed a number of times specified by the user in the *For* node settings. New to COMSOL Multiphysics in version 4.4, the *For* and *End For* nodes give the user sophisticated tools to set up two-way coupling between physics interfaces that require different types of solvers.

The self-consistent solution confirms our expectations: the electron beam diverges due to its self potential. In the image below, the lines represent particle trajectories that begin in the background and move to the foreground. The shading of each line represents the model particle’s radial displacement from its original position; the slice plot shows the beam potential; and the arrows show the electric force acting on the beam due to self potential. The result is in close agreement with analytical expressions for the shape of a non-relativistic charged particle beam.

Although the method outlined above is only valid for static fields, it reduces the number of particles required for accurate modeling by several orders of magnitude. The Electron Beam Diverging Due to Self Potential model demonstrates the new *For* and *End For* nodes that can be added to the solver sequence with COMSOL 4.4.

- If the number density of particles is very low, the particles may have a negligibly small effect on electric, magnetic, or fluid velocity fields in the surrounding domain. In this case, computing the field first and then using this field to exert a force on the particles is the most efficient approach.
- To accurately model two-way coupling between particles and fields, use a large number of model particles and specify a fixed maximum time step. You may need to increase the number of particles or reduce the time step further after refining the mesh.
- The Static release type can be used to model a constant charged particle current or mass flow rate.
- If the field is not time-dependent, computing the fields and particle trajectories in separate steps within a solver loop can be much more efficient than including all physics in a single time-dependent study step.