Quantcast
Channel: Particle Tracing – COMSOL Blog
Viewing all 29 articles
Browse latest View live

Modeling Static Mixers

$
0
0

A mixer that doesn’t move may sound like an oxymoron, but it’s not. Used in various chemical species transport applications, static mixers are inexpensive, accurate, and versatile. Still, there is always room for improvement. Optimizing the design of static mixers calls for computer modeling, but traditional CFD methods may not be the best way to model these mixers. How do these motionless mixers work and how can their performance be simulated?

How Static Mixers Work

Static mixers involve pumping two streams of fluid (liquid or gas) through a pipe containing twisted blades. The different angles of the blades are what prompt the mixing of the fluid. As the fluids are forced up the tube, they bounce off the blades and eventually blend together. Static mixers are used in many different industries, including water treatment, petrochemical, automotive, pharmaceutical, and more.

Static mixer

As this type of mixing produces small losses in pressure it is a great technique for laminar flow mixing. Laminar flow is characterized by low momentum convection and high momentum diffusion. As opposed to turbulent flow, which is less orderly and leads to lateral mixing, laminar flow happens at lower speeds.

Modeling Laminar Static Mixers

In optimizing the design of a static mixer you can look at the problem in two parts. The mixer performance can be evaluated by calculating:

  1. The concentration’s standard deviation
  2. The trajectory of suspended particles through the mixer

Let’s suppose we have a chemical species that is to be dissolved in water at room temperature. First we will use COMSOL Multiphysics and the Chemical Reaction Engineering Module to calculate the concentration’s standard deviation. This step allows us to compute the fluid velocity and pressure as it moves through the tube from inlet to outlet. Here you can visualize the mixing process through a series of cross-sections:

Static mixers: Cross-sectional plot of fluid
Cross-sectional plots of the concentration at different distances from the inlet of the tube.

In the second step, we will need to use the Particle Tracing Module in order to determine the particle trajectory through the tube. This is performed as a separate study, after step 1. Not all particles of the fluid will make it all the way to the outlet of the tube; some will cling to the mixer walls. By running the problem in the Particle Tracing Module we can determine how many particles will be stuck inside the mixer.

Particle position at different times in a static mixer
Plot of the particle position at different points in time. The red and blue particles represent two different fluids.

As mentioned above, when modeling static mixers, traditional CFD methods may not be cut out for the job. This is because of numerical diffusion, which does not emulate the mixing process in that the computer model shows a higher diffusivity than it actually is. This problem is tackled in an article on “Modeling of Laminar Flow Static Mixers” (on page 64) in the 2012 edition of COMSOL News. Here you can see how Veryst Engineering and Nordson EFD went about optimizing this type of mixers. They wound up developing a new modeling tool for their simulations, using both the CFD and Particle Tracing Modules. It’s a rather fascinating case study, so if you’re interested in optimizing mixer designs, I recommend reading the article.

Further Resources


Fluid Flow: Smooth Optical Surface in Minutes

$
0
0

Ultra-precise optical components require blemish-free surfaces that often cannot be achieved by the machining processes that grind these components. Fluid jet polishing (FJP) is a new technology being developed by Zeeko Ltd to replace the hand polishing that was often required. With the help of COMSOL, Zeeko was able to create a product that polishes the optical components in only ten minutes instead of an entire day, and without waveforms.

Jet Polishing: a More Efficient Method for Optical Surface Smoothing

What do space telescopes, orthopedic joints, and digital cameras have in common? They are all products requiring a number of precision processes including milling, grinding, polishing, and finishing. These products must have a completely smooth surface, with blemishes of only a few nanometers in some cases, being acceptable. Up until now, a laborious process of finishing by hand has been required. Zeeko Ltd is a company looking to improve this process, using fluid jet polishing. During FJP, a mixture of water and abrasive particles, called a slurry, is pumped through a nozzle onto a work piece. The technology has many advantages, but could not be fully utilized because of one significant factor: FJP imposed a finish with significant waveform patterns that diminished the optical devices’ operability. The system needed to cut the size of these patterns from more than 10 nm to as close to 1 nm as possible.

Multiphase Modeling

To solve the problem, Dr. Anthony Beaucamp, of Zeeko, turned to COMSOL Multiphysics. He wanted to simulate the fluid-air interface and trace the individual abrasive particles. First, using the k-ω turbulent flow model together with level-set and phase-field methods in the CFD Module, he produced a series of snapshots depicting the slurry flowing from the nozzle, impacting the surface and then flowing away (figure below).

optical surface simulation of slurry
Snapshots of simulation: slurry (red), air (blue), and streamlines (white).

After that, he used the Particle Tracing Module to consider the forces, such as drag, on the individual particles in the slurry. Using the results from these two models, Dr. Beaucamp simulated the effects that a feed-in pump imposes on the system. It is the small variations in fluid pressure arising from the pump that produces the waviness. He then included a feedback control loop, and was able to add pressure stability to the system, see the difference between the blue and the red lines in the below diagram.

pressure stability
Pressure stability with (red curve) and without (blue curve) a feedback loop.

Multiphysics Modeling Assists Zeeko in Saving Manufacturing Companies Time

The model results were used to compute optimal conditions for the slurry delivery system. Results showed that the waviness dropped from 12.5 nm to 1.2 nm, indicating success and the go-ahead to develop the equipment. Manufacturing companies are now using Zeeko technology to finish their products, a process that takes ten minutes, instead of a full day.

Get the full story in COMSOL News 2012.

How to Simulate Particle Tracing in a Laminar Static Mixer

$
0
0

Laminar static mixers are used for the accurate mixing of fluids (both liquid and gas). Unlike a mixer containing moving blades, a static mixer contains twisted stationary blades that are positioned at different angles throughout the cylindrical flow channel of the mixer. When a fluid is pumped through the channel, the alternating directions of the cross-sectional blades cause the fluid to become mixed as it passes along the length of the channel. This mixing technique allows for precise control over the amount of mixing that takes place throughout the process — even in the mixing of very small amounts of fluid. In a recent video, we demonstrated how you can use COMSOL Multiphysics along with the CFD Module and Particle Tracing Module to evaluate the performance of a laminar static mixer.

Simulating CFD and Particle Tracing in a Laminar Static Mixer

In the instructional video below, the basic modeling steps for setting up and solving a laminar static mixer model are shown. In the video, you will learn how to model both the fluid flow through the mixer, as well as the particle trajectories through the mixing channel, and finally how to analyze the mixer’s performance.

In the video, you will see how to model the laminar static mixer in two steps. The first step involves the CFD Module in performing a stationary study to measure the velocity and pressure within the mixer. The second step leverages the Particle Tracing Module and a time-dependent study to track the movement of the particles. In the second step, you evaluate the transmission probability, or transmission coefficient, of the mixer. A transmission coefficient is the ratio of the number of particles that reach the outlet of the channel divided by the number of particles released into the channel, and it is important when evaluating the success of the mixer. In this simulation, 18% of the particles get stuck to the walls of the channel and remain stuck in the mixer. In order to visualize the way the particles mix and flow through the channel, a Poincaré map (shown below) can be used to see how the position of the particles change over time. In this model geometry, the particles are still not completely mixed after reaching the end of the channel, as pockets of red and blue color remain.

Particle tracing in the laminar static mixer using Poincaré maps

Poincaré maps of the particle trajectories at different points in time. The color indicates the particles’ initial positions.

If you want to learn how to set up such a map by defining the color of the particle in relation to their initial position within the channel, follow along with the video above.

Video Transcription

In this example you will learn how to use COMSOL’s Particle Tracing Module, together with the CFD Module, to evaluate the mixing performance of a static mixer, comprised of a small cylindrical flow channel with stationary cross-sectional blades. When a fluid is pumped through the pipe, the mixing blades cut up the flow field, causing the particles traveling through the mixer to displace relative to each other, creating a mixing effect. This model studies the flow in a twisted-blade static mixer and helps analyze the mixing performance using Poincaré maps. We will solve the model in two stages. First, we will define a stationary study, to compute the fluid velocity and pressure. Second, we will define a time dependent study, to track the motion of the particles through the mixer.

Let’s begin by adding the physics. Select Fluid Flow, Single-Phase flow, and add Laminar Flow. Choose Stationary as your study type and click finish.

Import the geometry by right clicking on Geometry 1 and choosing import. Browse to the laminar_mixer_particle.mphbin using the file path seen above. Click Import to view the geometry. Right-click Global Definitions, select Parameters, and enter in the tube radius and mean velocity to be used later on. Define the flow material by adding an undefined Material. Type in 1000 for the density and 1×10-3 for the dynamic viscosity. This corresponds to the density and viscosity of the water.

Let’s define our flow parameters by adding an Inlet to the Laminar Flow node, and selecting boundary 23. Define the flow velocity in U0 as seen, necessary for a fully developed flow profile. Again right-click Laminar flow, add an Outlet, and select boundary 20. In order to ensure accurate particle motion, we will define a mesh that is fine on the mixing blades. Let’s do that by right-clicking on Mesh 1, choosing More Operations, and adding a Free Triangular mesh.

Click the Wireframe Rendering button to more easily see your boundary selections, then enter them using the Paste Selection tool. Right-click on Free Triangular 1 and select Size. Calibrate for Fluid dynamics and use an Extremely Fine mesh. In the Size node, choose Extremely fine again and customize the mesh to change the Resolution of Curvature to 0.15. Add another Free Triangular mesh and this time select the Inlet, boundary 23. From the Free Triangular 2 node, add a Size and Calibrate for Fluid dynamics, this time using an Extra fine mesh. Add a Free Tetrahedral mesh for the remaining geometry and Build All.

Right-click on Study 1 and Compute the model. Two default plots are computed. A velocity slice plot and a contour pressure plot. Now that we have computed the flow velocity in the mixer, we will use it to define the drag force on the particles.

Add the particle tracing interface by right clicking on Model 1 and choosing Add Physics. Select Fluid Flow, then add Particle Tracing for Fluid Flow. Choose the Time Dependent preset for this study, uncheck the Solve for laminar flow check box, and click Finish.

Right-click Particle Tracing for Fluid Flow, to add a Drag Force and add domain 1 to the selection. From the Velocity field list, choose Velocity Field and from the Dynamic Viscosity list choose Dynamic Viscosity. This means that the previously computed velocity field and previously specified fluid viscosity will be used to compute the drag force on the particles.

Define an Inlet for the particles and select boundary 23. From the Initial position list choose Density, then define the Number of particles per release as 3000, and assign the density to be proportional to the laminar flow velocity. This will release more particles where the velocity magnitude is higher and fewer where it is lower.

From the Initial Velocity field list, choose Velocity Field. Now, add an Outlet for the particles and select boundary 20. Click on Particle properties, and define the Particle diameter by changing the diameter to .5 micrometers. In order for COMSOL to use the previously computed velocity field when solving for the particle trajectories, click on Step 1 Time dependent and check the Values of variables not solved for check box. From the Method list choose Solution, and from the Study list choose Study 1 stationary. Click the Range button, and in the dialog box type in 0.2 as the step size and 5 as the end time then click replace.You are now ready to Compute study 2.

Create a new data set to evaluate the transmission probability of the mixer. Right-click on the Particle 1 solution and duplicate it, then right-click on Particle 2 and add a Selection. Choose boundary as the geometric entity level and select the outlet as the boundary. From the Derived values node, add a Global evaluation. For the data set, choose Particle 2 and choose Last as the time selection. Click Replace Expression, then go to Particle Tracing for Fluid Flow, Particle statistics, and select Transmission probability.

Finally, click the Evaluate button. Under the graphics window, in Table 1, you will see that the Transmission probability at the outlet at time 5 is about 80%, meaning that about 20% of the particles remained trapped in the mixer after 5 seconds. Right-click Data set and add a Cut plane. From the Data set list, choose Particle 1, and from the Plane list, choose xz-planes. Type in 0.006 as the y-coordinate and select the Additional parallel planes check box. In the Distances field type in the following distances, and click plot. In the Distances field set the planes to be at 6, 16, 26, 36, and 42 millimeters, and click plot. Now right-click on Results and add a 3D Plot group. Change the data set to Particle 1, and the Legend position to the Bottom and select the Titletype as None. Right-click on 3D Plot Group 4 and add a Poincaré Map.

Now, from the Cut Plane list choose Cut Plane 1, then select the Radius scale factor check box and type in 6×10-5. You can plot the map to preview the distribution. To change the color, right-click on Poincaré Map and choose Color Expression. Type in the following expression to make half the map blue, and half red, and clear the Color legend check box.

Now, right-click on 3D Plot Group 4 and add a Surface. From the Data set, list choose Cut Plane 1 and type 1 into the Expression field. From the Coloring list, choose Uniform and from the Color list, choose Gray.

To visualize the Poincaré Maps individually in a 2D graph, right-click on Results and add a 2D Plot group. Clear the Plot data set edges check box and from the Data set list, choose Particle 1. Right-click on 2D Plot Group 5 and under More plots, add a Phase Portrait.

For the x-axis, manually type in the expression for the x-axis particle position. For the y-axis, manually type in the expression for the y-axis particle position. In the Coloring and style section, select the Radius scale factor check box and type in 3×10-5. Right-click on Phase Portrait 1 and choose Color Expression. Disable the Color legend and in the Expression field type in the following, then click Plot.

To better visualize the mixing performance of this static mixer, right-click on Export and add a player, choose 2D Plot Group 5 as the subject, then click the play button. You can see that at the inlet, the maroon and blue particles are evenly distributed in half. As the particles travel through the twisted mixer, they become more uniformly spread throughout the map.

Learn more about this and similar models at www.comsol.com/laminar-static-mixer.

Additional Resources

COMSOL 4.4 Brings Particle-Field and Fluid-Particle Interactions

$
0
0

The trajectories of particles through fields can often be modeled using a one-way coupling between physics interfaces. In other words, we can first compute the fields, such as an electric field, magnetic field, or fluid velocity field, and then use these fields to exert forces on the particles using the Particle Tracing Module. If the number density of the particles is very large, however, the particles begin to noticeably perturb the fields around them, and a two-way coupling is needed — that is, the fields affect the motion of the particles, and the particle trajectories affect the fields. For example, charged particles act as point sources that affect the electric field around them, and small particles that move through a fluid may drag the fluid with them. Although two-way coupling between particles and fields presents new modeling challenges and is computationally more time-consuming than one-way coupling, new tools available in COMSOL version 4.4 can address many of these challenges by using an efficient, self-consistent approach.

One-Way vs. Two-Way Coupling

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:

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.

Implementing Point Sources

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.

Modeling Steady-State Systems

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.

Creating a Self-Consistent Model of an Electron Beam with COMSOL 4.4

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.

Self-consistent model of an electron beam

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}

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.

Charged Particle Tracing and Particle Tracing for Fluid Flow interfaces

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.

Creating a Solver Loop

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.

Particle field solver sequence

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.

Particle beam divergence

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.

Concluding Thoughts

  • 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.

Red Blood Cell Separation from a Flow Channel

$
0
0

Before conducting certain blood sample analyses, researchers need to separate the red blood cell particles from the blood plasma. Using lab-on-a-chip (LOC) technology, red blood cell separation can be achieved via magnetophoresis, i.e. motion induced by magnetic fields. Since the magnetic permeability of the particles is different from the blood plasma, their trajectory can be controlled within the flow channel of the LOC device and thereby separated out from the fluid.

Blood Plasma and Red Blood Cells

Whole blood consists of red and white blood cells, as well as platelets suspended in a liquid referred to as blood plasma. According to the American Red Cross, plasma is 92% water and makes up 55% of blood volume. The permeability of blood plasma is equal to 1.

Red blood cells make up slightly lower blood volume than blood plasma — about 45% of whole blood. As you probably already know, these types of blood cells contain hemoglobin, which in turn consists of iron that helps transport oxygen throughout the body. The permeability of red blood cells is slightly less than 1, (1 – 3.9e-6). Or to put it in words, red blood cell particles are diamagnetic.

Red Blood Cell Separation via Magnetophoresis in LOCs

Lab-on-a-chip devices (LOCs) are very small (picture an area in the millimeter-centimeter range) microfluidic devices consisting of flow channels that perform one or more lab functions on a single chip. LOCs are frequently used in medicine and research for analyzing samples of blood, thanks to the reduced risk of sample contamination made possible by the ability to collect and study very small samples.

Due to their aforementioned magnetic properties, red blood cells may be separated from the plasma via a magnetophoretic approach. If we were to subject the LOC channel to a magnetophoretic force, we could control where the red blood cells and the plasma go within the channels. In other words, because the red blood cells have different permeability, they can be separated from the flow channel.

Suppose we have an LOC containing blood plasma (in this case that’s considered the background fluid) and red blood cell particles in a channel that splits into three branches, or outlets (see image below). The drag force of the background fluid pushes the particles forward along the flow channel. Now suppose we have a permanent magnet on each side of the channel, as such:

Lab-on-a-chip with two neodymium permanent magnets and a flow channel
LOC: Two neodymium permanent magnets and a flow
channel with three outlets and an array of soft iron patches.

The magnetophoretic force of the magnets will push the blood cell particles inward. Combined, the drag force and the magnetophoretic force will simultaneously push the particles toward the center and through the main channel, bypassing the two channel branches. Meanwhile, the blood plasma, which, as mentioned above, has a permeability of 1, is not affected by the magnetic field and simply travels along in the direction of the drag force. This ultimately leads one third of the plasma to flow through each of the channels, while all of the red blood cells are concentrated in the center channel — providing us with a high enough concentration to study.

My colleague John Dunec has created a multiphysics simulation to illustrate the concept:

Red blood cell separation via magnetophoresis
Red blood cell separation: An LOC device, zooming in on the flow channels. The red blood
cell particles travel in the center channel.

The above simulation was created with COMSOL Multiphysics together with the AC/DC, Microfluidics, and Particle Tracing modules. A tutorial on how to run this on your own can be found in the section below.

Further Reading

Acoustic Levitation Puts a Pure Spin on Medicine Fabrication

$
0
0

The need for a contaminant-free space to manufacture medicine has led scientists to try many creative new approaches to improve the process. At Argonne National Lab, creating a device that floats and rotates chemical compounds in thin air was just the answer they were looking for. It meant two important changes: the amount of each chemical necessary could be implemented very precisely and the risk of outside impurities disrupting the results was minimized.

How Sound Alone Can Lift Matter

The researchers at Argonne National Lab (Argonne) turned to multiphysics simulation and trial-and-error prototyping to optimize the effectiveness of their acoustic levitator. When we want to move an object, sound may not be the tool we would typically reach for. So how does it have the power to float or levitate objects in a lab setting? It’s all about combining forces in just the right way to create lift.

When sound vibrations travel through a medium like air, the resulting compression is measurable and real. By combining acoustophoretic force, gravity, and drag, the pressure is just enough to not only lift a material like liquid medicine, but to also allow the medicine to be positioned, rotated, and moved according to the needs of the operator.

Simulation depicting the pressure pockets created by waves between the transducers.
Pressure pockets created by waves between the transducers of the acoustic levitator do the heavy lifting on a particle scale.

Rotating Droplets of Medicine Before They Crystallize

By keeping the droplets in a steady rotation, researchers are able to work on the chemical reactions while the medicine stays liquid and amorphous. This is key for creating a safe, steady environment where medicine will form correctly.

Modeling the Geometry of the Acoustic Levitator

Every material and measurement in the acoustic levitator will change both whether the device works in its final design and how finely it can be adjusted according to the needs of the scientists who use it.

The geometry of the device includes two small piezoelectric transducers that stand like trumpets above and below the working area where medicine is created, like this:

Photo of the acoustic levitator
The acoustic levitator’s wave patterns are controlled by pieces of Gaussian profile foam located on evenly-spaced transducers.

Possibly the most important part of the design is the Gaussian profile foam, which consists of polystyrene and coats the ends of each transducer. This foam works to remove acoustic waves that fall outside the required range. It acts as a filter to maintain even, well-defined standing waves.

Using COMSOL Multiphysics together with the Acoustics Module, CFD Module, and Particle Tracing Module, the team at Argonne modeled the acoustic levitator. Working cohesively with simulation, they were able to narrow down the shape of the acoustic field and location of floating droplets.

Simulation of distribution of the droplets.
The simulation above shows that at T = 0.75 seconds droplets formed from the particles. On the left, the simulation shows the expected particle distribution and on the right, a photograph depicts the actual distribution of the droplets.

Safer, More Accurate Medicine with Acoustic Levitation

As advances in acoustic levitation expand, the ability to work with finer and finer chemical reactions will allow members of the pharmaceutical science community to expand their reach, perhaps discovering many new medicines with life-saving qualities.

Further Reading

New Accumulators Boost Particle and Ray Tracing Functionality

$
0
0

With the release of COMSOL Multiphysics version 5.0, the Particle Tracing Module now includes a series of features called Accumulators, which can be used to couple the results of a particle tracing simulation to other physics interfaces. The accumulated variables may represent any physical quantity and can be defined either within domains or on boundaries, making them extremely flexible. Here, I will explain the different types of accumulators and their applications in particle tracing and ray optics models.

What Are Accumulators?

In particle tracing and ray tracing simulations, we often need to use the particle or ray properties to change a variable that is defined on a set of domains or boundaries. For example, solid particles in a fluid might exert a significant force on the surrounding fluid, and they may also erode the surfaces they hit.

In previous blog posts, I’ve discussed two other cases in greater detail: divergence of an electron beam due to self-potential and thermal deformation of lenses in a high-powered laser system. Each of these phenomena can be modeled using Accumulators or the specialized features that are derived from them.

An Accumulator is a physics feature that communicates information from particles or rays to the underlying finite element mesh. For each Accumulator feature in a model, a corresponding dependent variable, called an accumulated variable, is declared. These accumulated variables can be defined either within a set of domains or on a set of boundaries, and they can represent any physical quantity, making them extremely flexible.

The Accumulator features can be added to any of the physics interfaces of the Particle Tracing Module. They can also be used in the Geometrical Optics interface, available with the Ray Optics Module, and the Ray Acoustics interface, available with the Acoustics Module.

Depending on the physics interface, more specialized versions of the Accumulator may be available for computing specific types of physical quantities. For example, the Particle Tracing for Fluid Flow interface includes a dedicated Erosion boundary condition that includes several built-in models for computing the rate of erosive wear on a surface.

The Accumulators can be divided into three broad categories, which function in the following ways:

  1. Accumulators on boundaries increment a variable defined on a boundary element whenever a particle hits it.
  2. Accumulators on domains project information from each particle to the mesh elements the particle passes through.
  3. Nonlocal accumulators communicate information from a particle’s current position to the location where it was originally released.

We will now investigate each of these varieties in greater detail.

Accumulators on Boundaries

When particles or rays strike a surface, they can affect that surface in a wide variety of ways. For example, a laser can cause a boundary to heat up, sediment particles can erode their surroundings, and sputtering can occur when high-velocity ions strike a wafer in a process chamber. All of these effects require the same basic modeling procedure; we define a variable on the boundary and change its value when particles or rays interact with the boundary.

To begin, let’s consider a simple case in which we want to count the number of times a boundary is hit. We first define a variable, called rpd, for example, which can have a distinct value in every boundary mesh element. Initially, this variable is set to zero in all elements. Every time a particle hits a mesh element on this boundary, we would like to increment the variable on that element by 1.

The values of the accumulated variable on the boundary elements (illustrated as triangles) after one collision are shown below:

A schematic illustrating the impact after one collision.
To implement this in COMSOL Multiphysics, we first set up the particle tracing model, then add a “Wall” node to the boundary for which we want to count collisions. In this case, let’s specify that particles are reflected at this surface by selecting the Bounce wall condition. We then add the Accumulator node as a subnode to this Wall.

The settings shown in the following screenshot cause the accumulated variable (called rpb) to be incremented by 1 (the expression in the Source edit field) every time a particle hits the wall.

The Accumulator boundary settings.
I have created an animation that demonstrates how the number of collisions with each boundary element is counted over the course of the study. Check it out:

 

By changing the expression in the Source edit field, it is possible to increment the accumulated variable using any combination of variables that exist on the particle and on the boundary. For example, the accumulated variable may increase by a different amount based on the velocity or mass of incoming particles. The dependent variable need not be dimensionless. In fact, it can represent any physical quantity.

In addition to the generic Accumulator subnode — which can represent anything — dedicated accumulator-based features are available in the different physics interfaces, including the following:

  • In the Charged Particle Tracing physics interface:
    • Etch (Use this to model physical sputtering of a surface by energetic ions.)
    • Current Density
    • Heat Source
    • Surface Charge Density
  • In the Particle Tracing for Fluid Flow physics interface:
    • Erosion (For computing the total mass removed from the surface or the rate of erosive wear.)
    • Mass Deposition
    • Boundary Load
    • Mass Flux
  • In the Geometrical Optics physics interface:
    • Deposited Ray Power (For computing a boundary heat source using the power of incident rays.)

Accumulators on Domains

We may also want to transfer information from particles to all of the mesh elements they pass through, not just the boundary elements they touch. We can do so by adding an Accumulator node to the physics interface directly, instead of adding it as a subnode to a Wall or other boundary condition.

For example, we can use an Accumulator to reconstruct the number density of particles within a domain. This technique is used in a benchmark model of free molecular flow through an s-bend in which the Free Molecular Flow interface is used to compute the number density of molecules in a rarefied gas.

Here is the geometry of the s-bend:

An image depicting the geometry of the s-bend.

The settings window for the Accumulator is shown below.

Th s-bend settings in COMSOL Multiphysics.

The expression in the Source edit field is a bit more complicated than in the previous case. The source term R is defined as

(1)

R = \frac{J_{\textrm{in}} L}{N_{p}}

where J_{\textrm{in}} (SI unit: 1/(m^2 s)) is the molecular flux at the inlet, L (SI unit: m) is the length of the inlet, and N_{p} (dimensionless) is the number of model particles.

Physically, we can interpret R as the number of real molecules per unit time, per unit length in the out-of-plane direction, that are represented by each model particle. Because this source term acts on the time derivative of the accumulated variable, each particle leaves behind a “trail” in the mesh elements it passes through, which contributes to the number density in those elements.

I have created a second animation in which the number density of molecules is computed using the Accumulator (bottom) and the result is compared to the result of the Free Molecular Flow interface (top). Here it is:

 

We do see some noise in the particle tracing solution because each particle can only make a uniform contribution to the mesh element it is currently in. However, when the number of particles is large compared to the number of mesh elements, it is still possible to obtain an accurate solution.

In addition to the generic Accumulator node, which can represent anything, dedicated accumulator-based features are available in the different physics interfaces, including the following:

  • In the Charged Particle Tracing physics interface:
    • Particle-Field Interaction computes the charge density of particles, which can then be used as a source term to compute the self-potential of a beam of ions or electrons. It is also possible to compute the current density, which can create a significant magnetic field if the beam is relativistic.
  • In the Particle Tracing for Fluid Flow physics interface:
    • Fluid-Particle Interaction computes the body load exerted by particles on the surrounding fluid.
  • In the Geometrical Optics physics interface:
    • Deposited Ray Power generates a heat source term based on the amount of power absorbed by the medium if rays propagate through an absorbing medium.

Nonlocal Accumulators

The third variety of Accumulator is a bit more advanced than the previous two. A Nonlocal Accumulator is used to communicate information from a particle’s current position to the initial position from which it was released. The Nonlocal Accumulator can be added to an “Inlet” node, causing it to declare an accumulated variable on the mesh elements on the Inlet boundary.

The Nonlocal Accumulator can be used in some advanced models of surface-to-surface radiation. In many cases, the Surface-to-Surface Radiation physics interface (available with the Heat Transfer Module) can be used to efficiently and accurately model radiative heat transfer. However, the Surface-to-Surface Radiation interface relies on the assumption that all surfaces reflect radiation diffusely. That is, the direction of reflected radiation is completely independent of the direction of incident radiation. It cannot be used, for example, if some of the radiation undergoes specular reflection at smooth, polished, metallic surfaces.

One approach to modeling radiative heat transfer with a combination of specular and diffuse radiation is to use the Mathematical Particle Tracing interface, as demonstrated in the example of mixed diffuse and specular reflection between two parallel plates.

The incident heat flux on each plate is computed by releasing particles from the plate surface, querying the temperature of each surface the particles hit, and communicating this information back to the point at which the particles are initially released. The below image shows the temperature distribution between the two plates, where the top plate is heated by an external Gaussian source.

Temperature distribution between two parallel plates.

Conclusions and Next Steps

We have seen that Accumulators can be used to model interactions between particles or rays and any field that is defined on the surrounding domains of boundaries. The accumulated variables can represent any physical quantity. The Accumulator is the basic building block that allows for sophisticated one-way or two-way coupling between a particle- or ray-based physics interface and any of the other products in the COMSOL product suite.

The Accumulators and related physics features have too many settings and applications to discuss in detail in a single blog post. To learn more about the many options available, please refer to the User’s Guide for the Particle Tracing Module (for particle tracing physics interfaces), the Ray Optics Module (for the Geometrical Optics interface), or the Acoustics Module (for the Ray Acoustics interface).

If you are interested in learning more about any of these products, please contact us.

Modeling Beam Neutralization with a Charge Exchange Cell

$
0
0

Charge exchange cells are often used as a way to obtain neutralized beams of energetic particles. In this blog post, we introduce a model of a simple charge exchange cell and analyze its neutralization efficiency.

How Does a Charge Exchange Cell Work?

Neutral particle beams of varying energies are an important element in many applications, including medicine, the design of scientific instruments, and materials processing. In the quest to accelerate neutral particles to extremely high velocities, we can turn our attention to the role of a charge exchange cell.

A charge exchange cell refers to an area of high-density gas that is placed in the path of an ion beam. In this region, fast ions from the beam can undergo charge exchange reactions with the background gas. This causes the ions to become neutralized, which in turn creates a neutral particle beam towards the end of the cell.

Let’s break down this process further, beginning with a charge exchange cell filled with neutral argon. As protons are accelerated through this medium, they are able to pick up electrons from the available argon atoms. This combination generates a neutral hydrogen atom, which travels rapidly out of the cell, and a slow-moving argon ion. The probability of capturing electrons, however, is relatively small. Thus, many charged particles can still remain in the beam as it leaves the cell.

So how do we achieve a completely neutral beam through this process? One approach is to use a pair of charged plates to deflect the protons prior to the beam’s arrival at its target. Using simulation, we can investigate the role of the gas cell and charged plates in the neutralization process.

A diagram highlighting the charge exchange cell neutralization process.
The charge exchange cell neutralization process.

Modeling Charge Exchange Reactions

The Charge Exchange Cell model is used to carry out a beam neutralization process analysis. This model requires the Molecular Flow Module and the Particle Tracing Module.

The Charge Exchange Cell model features a cylindrical gas cell within a vacuum system. Neutral argon gas is provided by a shower head ring in the cell’s center. The shower head includes microchannels that control the cell’s neutral gas density, producing a high-pressure area within the instrument’s main vacuum system. The Free Molecular Flow interface is used to compute the number density and the pressure of argon gas within the gas cell.

A model depicting the pressure in the charge exchange cell.
Surface plot of the pressure within the charge exchange cell.

In this example, the electrically charged plates are represented as two blocks. The upper plate has an applied electric potential of 200 V, while the lower plate remains grounded. The Electrostatics interface is used to compute the electric potential between the plates, which can then be used to deflect the ions.

To model the collisions of the incoming ion beam with the neutral gas, the Charged Particle Tracing interface is used. This interface includes an Elastic Collision Force that takes the gas density computed by the Free Molecular Flow interface and uses it to determine the collision frequency.

Neutralization Efficiency

The figure below shows the trajectories of the particles as they travel through the charge exchange cell. The dark gray lines indicate the trajectories of the ions, which have a charge number of 1. The light gray lines indicate the trajectories of the neutral particles, which feature a charge number of 0.

An image showing particle trajectories and charge exchange reactions.
Particle trajectories within the model. This image highlights how some ions undergo charge exchange reactions before exiting the cell.

It is also possible to evaluate the total number of particles that hit a certain boundary. By comparing the number of particles that hit the grounded plate to the total number of particles in the model, we can estimate the neutralization efficiency of the gas cell. In this case, the neutralization efficiency is determined to be about 13.8%. Note that this value can vary slightly on different runs of the model because the charge exchange reactions between ions and neutrals occur randomly.

Model Download


Dielectrophoretic Separation

$
0
0

How can you use an electric field to control the movement of electrically neutral particles? This may sound impossible, but in this blog entry, we will see that the phenomenon of dielectrophoresis (DEP) can do the trick. We will learn how DEP can be applied to particle separation and demonstrate a very easy-to-use biomedical simulation app that is created with the Application Builder and run with COMSOL Server™.

Forces on a Particle in an Inhomogeneous Static Electric Field

The dielectrophoretic effect will show up in both DC and AC fields. Let’s first look at the DC case.

Consider a dielectric particle immersed in a fluid. Furthermore, assume that there is an external static (DC) electric field applied to the fluid-particle system. The particle will in this case always be pulled from a region of weak electric field to a region of strong electric field, provided the permittivity of the particle is higher than that of the surrounding fluid. If the permittivity of the particle is lower than the surrounding fluid, then the opposite is true; the particle is drawn to a region of weak electric field. These effects are known as positive dielectrophoresis (pDEP) and negative dielectrophoresis (nDEP), respectively.

The pictures below illustrate these two cases with a few important quantities visualized:

  • Electric field
  • Maxwell stress tensor (surface force density)
  • Surface charge density

An illustration depicting positive dielectrophoresis.
An illustration of positive dielectrophoresis (pDEP), where the particle permittivity is higher than that of the surrounding fluid \epsilon_p > \epsilon_f. At the surface of the particle, the induced surface charge is color-coded with red representing a positive charge and green a negative charge. Yellow represents a neutral charge.

An image showing negative dielectrophoresis.
An illustration of negative dielectrophoresis (nDEP), where the particle permittivity is lower than that of the surrounding fluid \epsilon_p < \epsilon_f.

The Maxwell stress tensor represents the local force field on the surface of the particle. For this stress tensor to be representative of what forces are acting on the particle, the fluid needs to be “simple” in that it shouldn’t behave too weirdly either mechanically or electrically. Assuming the fluid is simple, we can see from the above illustrations that the net force on the particle appears to be in opposite directions between the two cases of pDEP and nDEP. Integrating the surface forces will indeed show that this is the case.

It turns out that if we shrink the particle and look at the infinitesimal case of a very small particle acting like a dipole in a fluid, then the net force is a function of the gradient of the square of the electric field.

Why is the net force behaving like this? To understand this, let’s look at what happens at a point on the surface of the particle. At such a point, the magnitude of the electric surface force density, f, is a function of charge times electric field:

(1)

f \propto \rho E

where \rho is the induced polarization charges. (Let’s ignore for the moment that some quantities are vectors and make a purely phenomenological argument by just looking at magnitudes and proportionality.)

The induced polarization charges are proportional to the electric field:

(2)

\rho \propto \epsilon E

Combining these two, we get:

(3)

f \propto \rho E = \epsilon E^2

But this is just the local surface force density at one point at the surface. In order to get a net force from all these surface force contributions at the various points on the surface, there needs to be a difference in force magnitude between one side of the particle and the other. This is why the net force, \bf{F}, is proportional to the gradient of the square of the electric field norm:

(4)

\mathbf{F} \propto \epsilon \nabla |\mathbf{E}|^2

In the above derivation, we have taken some shortcuts. For example, what is the permittivity in this relationship? Is it that of the particle or that of the fluid or maybe the difference of the two? What about the shape of the particle? Is there a shape factor?

Let’s now address some of these questions.

Force on a Spherical Particle

In a more stringent derivation, we instead use the vector-valued relationship for the force on an electric dipole:

(5)

\mathbf{F} = \mathbf{P} \cdot \nabla \mathbf{E}

where \bf{P} is the electric dipole moment of the particle.

To get the force for different particles, we simply insert various expressions for the electric dipole moment. In this expression, we can also see that if the electric field is uniform, we get no force (since the particle is small, its dipole moment is considered a constant). For a spherical dielectric particle with a (small) radius r_p in an electric field, the dipole moment is:

(6)

\mathbf{P} = 4 \pi r_p^3 k \mathbf{E}

where k is a parameter that depends on the the permittivity of the particle and the surrounding fluid. The factor 4 \pi r_p^3 can be seen as a shape factor.

Combining these, we get:

(7)

\mathbf{F} = 4 \pi r_p^3 k \mathbf{E} \cdot \nabla\mathbf{E} = 2 \pi r_p^3 k \nabla |\mathbf{E}|^2

This again shows the dependency on the gradient of the square of the magnitude of the electric field.

Forces on a Particle in a Time-Varying Electric Field

If the electric field is time-varying (AC), the situation is a bit more complicated. Let’s also assume that there are losses that are represented by an electric conductivity, \sigma. The dielectrophoretic net force, \bf{F}, on a spherical particle turns out to be:

(8)

\mathbf{F} = 2 \pi r^3_p k \nabla |\mathbf{E}_{\textrm{rms}}|^2

where

(9)

k = \epsilon_0 \Re\{ \epsilon_f \} \Re \left\{ \frac{\epsilon_p -\epsilon_f}{\epsilon_p + 2 \epsilon_f} \right\}

and

(10)

\epsilon = \epsilon_{\textrm{real}} -j \frac{\sigma}{2 \pi \nu}

is the complex-valued permittivity. The subscripts p and f represent the particle and the fluid, respectively. The radius of the particle is r_p and \bf{E}_{\textrm{rms}} is the root-mean-square of the electric field. The frequency of the AC field is \nu.

From this expression, we can get the force for the electrostatic case by setting \sigma = 0. (We cannot take the limit when the frequency goes to zero, since the conductivity has no meaning in electrostatics.)

In the expression for the DEP force, we can see that indeed the difference in permittivity between the fluid and the particle plays an important role. If the sign of this difference switches, then the force direction is flipped. The factor k involving the difference and sum of permittivity values is known as the complex Clausius-Mossotti function and you can read more about it here. This function encodes the frequency dependency of the DEP force.

If the particles are not spherical but, say, ellipsoidal, then you use another proportionality factor. There are also well-known DEP force expressions for the case where the particle has one or more thin outer shells with different permittivity values, such as in the case of biological cells. The simulation app presented below includes the permittivity of the cell membrane, which is represented as a shell.

The settings window shows DEP permittivity for a dielectric shell.
The settings window for the effective DEP permittivity of a dielectric shell.

There may be other forces acting on the particles, such as fluid drag force, gravitation, Brownian motion force, and electrostatic force. The simulation app shown below includes force contributions from drag, Brownian motion, and DEP. In the Particle Tracing Module, a range of possible particle forces are available as built-in options and we don’t need to be bothered with typing in lengthy force expressions. The figure below shows the available forces in the Particle Tracing for Fluid Flow interface.

A screenshot highlighting different particle force options.
The different particle force options in the Particle Tracing for Fluid Flow interface.

Dielectrophoretic Separation of Particles

Medical analysis and diagnostics on smartphones is about to undergo rapid growth. We can imagine that, in the future, a smartphone can work in conjunction with a piece of hardware that can sample and analyze blood.

Let’s envision a case where this type of analysis can be divided into three steps:

  1. Extract blood using the hardware, which attaches directly to your smartphone, and compute mean platelet and red blood cell diameter.
  2. Compute the efficiency of separation of the red blood cells and platelets. This efficiency needs to be high in order to perform further diagnostics on the isolated red blood cells.
  3. Use the computed optimum separation conditions to isolate the red blood cells using the hardware attached to your smartphone.

The COMSOL Multiphysics simulation app focuses on Step 2 of the overall analysis process above. By exploiting the fact that blood platelets are the smallest cells in blood and have different permittivity and conductivity than red blood cells, it is possible to use DEP for size-based fractionation of blood; in other words, to separate red blood cells from platelets.

Red blood cells are the most common type of blood cell and the vertebrate organism’s principal means of delivering oxygen (O2) to the body tissues via the blood flow through the circulatory system. Platelets, also called thrombocytes, are blood cells whose function is to stop bleeding.

Using the Application Builder, we created an app that demonstrates the continuous separation of platelets from red blood cells (RBCs) using the Dielectrophoretic Force feature available in the Particle Tracing for Fluid Flow interface. (The app also requires one of the following: the CFD Module, Microfluidics Module, or Subsurface Flow Module and either the MEMS Module or AC/DC Module.)

The app is based on a lab-on-a-chip (LOC) device described in detail in a paper by N. Piacentini et al., “Separation of platelets from other blood cells in continuous-flow by dielectrophoresis field-flow-fractionation”, from Biomicrofluidics, vol. 5, 034122, 2011.

The device consists of two inlets, two outlets, and a separation region. In the separation region, there is an arrangement of electrodes of alternating polarity that controls the particle trajectories. The electrodes create the nonuniform electric field needed for utilizing the dielectrophoretic effect. The figure below shows the geometry of the model.

A schematic of the geometry of the particle separation simulation app.
The geometry used in the particle separation simulation app.

The inlet velocity for the lower inlet is significantly higher (853 μm/s) than the upper inlet (154 μm/s) in order to focus all the injected particles toward the upper outlet.

The app is built on a model that uses the following physics interfaces:

  1. Creeping Flow (Microfluidics Module) to model the fluid flow.
  2. Electric Currents (AC/DC or MEMS Module) to model the electric field in the microchannel.
  3. Particle Tracing for Fluid Flow (Particle Tracing Module) to compute the trajectories of RBCs and platelets under the influence of drag and dielectrophoretic forces and subjected to Brownian motion.

Three studies are used in the underlying model:

  1. Study 1 solves for the steady-state fluid dynamics and frequency domain (AC) electric potential with a frequency of 100 kHz.
  2. Study 2 uses a Time Dependent study step, which utilizes the solution from Study 1 and estimates the particle trajectories without the dielectrophoretic force. In this study, all particles (platelets and RBCs) are focused to the same outlet.
  3. Study 3 is a second Time Dependent study that includes the effect of the dielectrophoretic force.

You can download the model that the app was based on here.

A Biomedical Simulation App

To create the simulation app, we used the Application Builder, which is included in COMSOL Multiphysics® version 5.0 for the Windows® operating system.

The figure below shows the app as it looks like when first started. In this case, we have connected to a COMSOL Server™ installation in order to run the COMSOL Multiphysics app in a standard web browser.

A biomedical simulation app.
A biomedical simulation app running in a standard web browser.

The app lets the user enter quantities, such as the frequency of the electric field and the applied voltage. The results include a scalar value for the fraction of red blood cells separated. In addition, three different visualizations are available in a tabbed window: the blood cell and platelet distribution, the electric potential, and the velocity field for the fluid flow.

The figures below show visualizations of the electric potential and the flow field.

A screenshot showing the microfluidic channel's instantaneous electric potential.
Screenshot showing the instantaneous electric potential in the microfluidic channel.

The magnitude of the fluid velocity.
Screenshot displaying the magnitude of the fluid velocity.

The app has three different solving options for computing just the flow field, computing just the separation using the existing flow field, or combining the two. A warning message is shown if there is not a clean separation.

Increasing the applied voltage will increase the magnitude of the DEP force. If the separation efficiency isn’t high enough, we can increase the voltage and click on the Compute All button, since in this case, both the fields and particle trajectories need to be recomputed. We can control the value of the Clausius-Mossotti function of the DEP force expression by changing the frequency. It turns out that at the specified frequency of 100 kHz, only red blood cells will exit the lower outlet.

The fluid permittivity is in this case higher than that of the particles and both the platelets and the red blood cells experience a negative DEP force, but with different magnitude. To get a successful overall design, we need to balance the DEP forces relative to the forces from fluid drag and Brownian motion. The figure below shows a simulation with input parameters that result in a 100% success in separating out the red blood cells through the lower outlet.

A screenshot shows the successful separation of red blood cells.
Successful separation of red blood cells.

Further Reading

To learn more about dielectrophoresis and its applications, click on one of the links listed below. Included in the list is a link to a video on the Application Builder, which also shows you how to deploy applications with COMSOL Server™.

Windows is either a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.

Different Ways to Count Particles in COMSOL Multiphysics

$
0
0

Many different tools are available for counting particles. Choosing the optimal method depends on the application; specifically, whether you want to use the number of counted particles in equations or during postprocessing. The Particle Tracing interfaces in COMSOL Multiphysics feature three main particle counting options. While these approaches are versatile enough to compute quantities such as charge density and momentum flux, our focus here will be computing the number of particles on a set of domains or boundaries.

Three Particle Counting Approaches

During Postprocessing

When it comes to counting particles, the easiest way to do so is directly within postprocessing, after the solution has been computed. Let’s walk through the steps behind this basic methodology.

First, create a duplicate of the default Particle Data Set, which is automatically generated after computing the solution. Add a Selection to the data set, as illustrated below, and then select the domains or boundaries in which you will count the particles.

Screenshot showing the particle data set duplicate.

Next, add a Global Evaluation node under Derived Values and point to the new Particle Data Set, in this case, Particle 2. You can select specific parameter values or output times in the settings window.

Screen capture showing the Global Evaluation feature in COMSOL Multiphysics.

Choose from the following predefined expressions under the Particle statistics section in the Add/Replace Expression menu:

  • <phys>.alpha — Transmission probability (the number of particles in the selection specified by the Particle Data Set divided by the total number of particles).
  • <phys>.Nsel — Total number of particles in selection (the number of particles in the selection specified by the Particle Data Set).
  • <phys>.Nt — Total number of particles (the total number of particles in the entire model).

Adding expressions to a COMSOL Multiphysics particle counting model.
Evaluating the Global Evaluation node will display the value of the expression in a results table.

Application Library Examples
  • Molecular Flow Module > Industrial Applications > charge exchange cell
  • AC/DC Module > Particle Tracing > quadrupole mass filter

Using Accumulators

If the number of particles or the number density of particles needs to be used in another physics interface, the best option is to use an Accumulator. Accumulators transfer information from particles to the mesh elements in which they reside. They are available on both domains and boundaries and can be accessed from the context menu of any Particle Tracing interface. Upon adding an accumulator to a domain, the following settings are shown:

Screenshot showing the Accumulator settings.

The available options in the Accumulator feature are:

  • Accumulator type: When set to Count, the accumulated variable is simply counted in each mesh element, unaffected by the element size. For Density, the accumulated variable is divided by the volume of the mesh element, allowing you to compute quantities like the number density of particles.
  • Accumulate over: When set to Elements, the accumulated variable is simply the sum of the source terms for all of the particles that reside in the element at a given point in time. When set to Elements and time, the particles leave behind a contribution in the elements that they pass through, based upon how long they were in each element.
  • Source: This is the expression defined on the particle that you want to project onto the underlying mesh. When counting particles, Source is simply set to “1″, but it can be any expression that exists on the particles, such as charge or kinetic energy. It can also depend on variables that are defined in the domain in which the particles are located.
  • Unit: When the unit is selected for the accumulated variable, the required unit for the Source will change accordingly.

To count the total number of particles, you can add an integration component coupling to the domain where the accumulator exists. Boundary accumulators automatically add component couplings on the selected boundaries. In our example, the total number of particles is then given by <integration_operator_name>(pt.count). This can be evaluated using the Global Evaluation node. The number of particles within each mesh element may also be coupled to other physics, since it is a degree of freedom. We can visualize how the particle counting works by plotting particle locations on a plot of the accumulated variable and the underlying mesh.

Image showing the locations of particles.
A plot shows the particle locations (black dots) on top of the underlying mesh (gray lines). The color in each element represents the value of the accumulated variable.

From the plot above, it is clear that the accumulator does indeed count the number of particles within each mesh element. For mesh elements in which there are no particles, the accumulated variable is zero, indicated by the mesh elements (shown in blue). Most mesh elements have one particle, which is highlighted in green. However, one mesh element happens to contain 2 particles (shown in red).

You can also use accumulators to count the number of particles passing through an interior boundary. To do this, simply add a Wall condition on the boundary that the particles will pass through, setting the Wall condition to Pass through. Add an Accumulator subfeature to the Wall node with the following settings:

Screenshot showing the Accumulator settings in the COMSOL Multiphysics Model Builder.

When a particle passes through the boundary, the accumulator increments the degree of freedom in the corresponding boundary mesh element. This gives the spatial distribution of the number of particles passing through the interior boundary, as depicted in the animation below.

 

It is possible to conveniently plot the total number of particles passing through the boundary as a function of time. Simply add a 1D Plot Group and a Global plot feature. The accumulator creates predefined variables to add up the accumulated variables over all the mesh elements. To get the total number of particles, you can use the Sum of accumulated variable count option.

Image showing the Sum of accumulated variable count option.

The plot below shows the results for the total number of particles that crossed the interior boundary.

Plot comparing the total number of particles crossing over the interior boundary and time.

Note: To learn more about the applications of accumulators, you can refer to this earlier blog post by my colleague Christopher Boucher.

Application Library Examples
  • Molecular Flow Module > Benchmarks > s_bend_benchmark

Particle Counter, New in COMSOL Multiphysics Version 5.2

A Particle Counter is a domain or boundary feature that provides information about particles arriving on a set of selected domains or surfaces from a specified release feature. Such quantities include transmission probability, current, and mass flow rate. The settings for a Particle Counter feature are very simple. Select a Release feature to connect to, or select All release features. You can add Particle Counter features to the model and access their variables without having to recompute the solution. Simply use Study > Update Solution, and the new variables will be automatically generated and immediately available for evaluation.

Screenshot showing how to access the Particle Beam feature in COMSOL Multiphysics.

Each Particle Counter generates the following expressions. Note that the scope is different than the variables that are always available in the Particle statistics plot group, as outlined in the first section.

  • <phys>.<feature>.rL — Logical expression for particle inclusion; can be used in the Filter node of the Particle Trajectories plot, allowing visualization of only the particles that connect a source and a destination.
  • <phys>.<feature>.Nsel — Total number of particles in selection; computes the total number of particles released by a specific release feature in the set of domains or boundaries determined by the Particle Counter selection.
  • <phys>.<feature>.Nfin, — The number of transmitted particles at the final time (the number of particles in the Particle Counter selection at the final solution time).
  • <phys>.<feature>.alpha — Transmission probability (the ratio of the number of particles in the Particle Counter selection divided by the number of particles released by the release feature).

When the Release feature is a Particle Beam feature — a specialized release feature for the Charged Particle Tracing interface — additional variables for the average beam position, velocity, and kinetic energy are generated for the particles that connect the counter to the particle beam.

Application Library Examples
  • Particle Tracing Module > Charged Particle Tracing > sensitive high resolution ion microprobe
  • Particle Tracing Module > Tutorials > brownian motion
  • Particle Tracing Module > Fluid Flow > laminar mixer particle

Summary of Counting Particles in COMSOL Multiphysics

There are three ways to count the number of particles on domains and boundaries. For simple models in which only a single release feature is present, the postprocessing tools might suffice. If you want to plot the number of particles on a domain or boundary, or if you want to use the number of particles in another physics interface, accumulators are the answer. To count particles that only connect a specific release feature to a selection of domains or boundaries, you can use the Particle Counter feature — one of the many new additions in COMSOL Multiphysics version 5.2.

Preventing Airborne Infection with CFD Modeling

$
0
0

Healthcare-associated infections (HAI) affect millions of people around the globe. While the most common cause of HAI is direct contact with the source, airborne bacteria may also play a role in patient infections. To prevent airborne infection and make hospital clean rooms safer, it’s important to design efficient ventilation systems. As an added benefit, efficient ventilation designs also lead to lower energy-related costs. The first step to a better design is CFD modeling.

Healthcare-Associated Infections Are a Global Concern

Healthcare-associated infections are a serious concern for patients admitted to hospitals worldwide, in developed and developing countries alike. According to the World Health Organization (WHO), hundreds of millions of patients are affected globally each year. They further suggest that at any given time, seven out of a hundred patients in developed countries and ten out of a hundred patients in undeveloped countries are infected at least once during their hospital stay. This is in addition to the health reason that brought them into the hospital in the first place. Think about that for a minute.

A photograph of a medical center.
UVa Medical Center” by cvilletomorrow — flickr. Licensed under CC BY 2.0 via Wikimedia Commons.

So why are people getting more sick when seeking treatment and how can we stop it? There are various factors that promote HAI. Perhaps the most obvious culprit is direct contact with the infected source (person, equipment, furniture, etc.). However, as Alireza Kermani of Veryst Engineering pointed out at the COMSOL Conference 2015 in Boston, another culprit may be inefficient ventilation systems. To validate their theory, Veryst turned to CFD software.

Evaluating a Ventilation System Design with CFD Software

Using the COMSOL Multiphysics simulation platform and the CFD Module, Veryst was able to analyze the airflow pattern in a hospital room and investigate how airborne bacteria is dispersed throughout the room.

The clean room model used for evaluation included people (patient and doctor); furniture (bed, wardrobe, and lamp); medical equipment; and a ventilation system (inlet and exhaust). The patient in question is coughing, thus spreading bacteria particles into the room. The model accounts for both forced and natural ventilation, with a ventilation rate of six air change per hour (ACH). This is the ASHRAE standard 170 ventilation rate for healthcare facilities.

A schematic of a hospital clean room.
Layout of the hospital clean room. The room is thermally isolated on three sides and its base. The ceiling and the wall opposite of the wardrobe exchange heat with the outside. Image taken with permission from Veryst’s paper titled “CFD Modeling for Ventilation System of a Hospital Room“.

Veryst included the following heat sources in their model:

  • The bodies of the doctor and patient (60 W/m2)
  • Equipment (100 W/m2)
  • Lamp (200 W/m2)
  • Ventilation inlet (20°C)
  • Outside temperature (5°C)

They found that the average temperature of the clean room was 21°C. Here are their simulation results, depicting air flow and temperature distribution in the hospital room:

A plot of the temperature distribution in a hospital clean room, used to study airborne infection.
A plot of the velocity vectors in a hospital clean room, simulated with COMSOL Multiphysics.

Temperature distribution and velocity vectors in a hospital clean room. Image credit: Veryst.

When designing a ventilation system that is good at preventing airborne infections, it’s also important to make sure that the design does not result in an uncomfortably hot or cold room. Of course, thermal comfort is highly subjective, but there is a way to quantify this qualitative metric. When evaluating the ventilation system design, Veryst relied on the ASHRAE Standard 55-2013 thermal sensation scale for quantifying thermal comfort:

Sensation Predicted Mean Vote (PMV) Value
Hot +3
Warm +2
Slightly warm +1
Neutral 0
Slightly cold -1
Cool -2
Cold -3

ASHRAE thermal sensation scale. An acceptable indoor value is between -0.5 and +0.5. Table adapted with permission from Veryst’s paper titled “CFD Modeling for Ventilation System of a Hospital Room”.

Then, they calculated the PMV and predicted percentage of dissatisfied (PPD) patients for their simulation results and compared them with the scale. They found that with the current design and their assumptions about the patient’s metabolic rate and what (s)he is wearing, 56% of people would be dissatisfied because they would feel cool (PMV = -1.59).

Simulating Bacteria Distribution to Prevent Airborne Infections

Finally, Veryst was able to quantify the percentage of bacteria that is leaving the hospital room through the exhaust of the ventilation system with COMSOL Multiphysics and the Particle Tracing Module.

An image of the CFD modeling simulation results, showing the motion of bacteria particles at different times after a patient coughs.
Plots showing the motion of bacteria particles at 30, 60, 180, and 230 seconds after the patient coughs. The particle color corresponds to velocity (m/s). Taken with permission from Veryst’s paper titled “CFD Modeling for Ventilation System of a Hospital Room”.

As we can see in the plots above, after the patient coughs, the bacteria is spread throughout the room via the ventilation system. Most of the bacteria particles leave the room between 30 and 35 seconds after the cough. However, even after 300 seconds, 8% of the bacteria is still inside the room, which could cause HAI.

 

Animation courtesy of Veryst.

To improve the ventilation system so that less bacteria stays in the room and the system is more energy efficient, while falling inside the acceptable thermal comfort range, you could run further simulations to optimize the design. Get the full details of Veryst’s research in their “CFD Modeling for Ventilation System of a Hospital Room” paper.

Take Your CFD Modeling to the Next Level

  • New to COMSOL?
  • Need some inspiration?
    • Download the .mph files for presolved CFD tutorials from the Application Gallery to get started

Evaluating Static Mixer Performance with a Simulation App

$
0
0

Static mixers are well-established tools in a wide variety of engineering disciplines due to their efficiency, low cost, ease of installation, and minimal maintenance requirements. When evaluating whether a mixer can be used for a certain purpose, it is important to determine whether the resulting mixture is sufficiently uniform. In this blog post, we will discuss the setup of an app designed to quantitatively and qualitatively analyze the performance of a static mixer using the Particle Tracing Module.

The Foundations of the Laminar Static Particle Mixer Designer App

As a starting point for our Laminar Static Particle Mixer Designer app, we will consider the Particle Trajectories in a Laminar Static Mixer tutorial, which you can download from our Application Gallery. This model is designed to evaluate the mixing performance of a static mixer by computing particle trajectories throughout the device. To learn more about this tutorial and about mixer modeling in general, I encourage you to check out these previous blog posts:

The geometry that is used in the tutorial referenced above is the same one that we will use within our app. Shown in the figure below, the model consists of a tube featuring three twisted blades with alternating rotations. The mixing blades are illustrated as gray surfaces, with the outline of the surrounding pipe also depicted. As particles are carried through the pipe by the fluid, they are mixed together by the static mixing blades.

Image depicting the laminar static mixer model's geometry.
The geometry of the laminar static mixer model.

An App Designed to Study the Performance of a Static Mixer

Using our Laminar Static Particle Mixer Designer app, shown below, we can first compute the trajectories of particles as they move throughout the mixer. Then, using some built-in postprocessing tools, we can quantitatively and qualitatively evaluate how the mixer performs.

Image illustrating the Laminar Static Particle Mixer Designer's user interface.
A screenshot of the user interface (UI) of the Laminar Static Particle Mixer Designer.

The app includes a large number of geometry parameters and material properties, with the option to create a mixer that utilizes one, two, or three helical mixing blades. Modifying the number of model particles and postprocessing parameters is also possible through the app’s advanced settings.

 

To better visualize the distribution of different species in the static mixer, we can release particles and compute their trajectories using the Particle Tracing for Fluid Flow interface. The particle positions are computed via a Newtonian formulation of the equations of motion, where the position vector components are calculated by solving a set of second-order equations:

(1)

\frac{d}{dt}\left(m_p\frac{d\mathbf{q}}{dt}\right) = \mathbf{F}_t

where \mathbf{q} (SI unit: m) is the particle position, m_p (SI unit: kg) is the particle mass, and \mathbf{F}_t (SI unit: N) is the total force on the particles. The Newtonian formulation takes the inertia of the particles into account, allowing them to cross velocity streamlines.

In this model, the only force on the particles is the drag force, which is computed using the Stokes’ drag law:

(2)

\begin{aligned}
\mathbf{F}_D &= \frac{1}{\tau_p} m_p \left(\mathbf{u}-\mathbf{v}\right)\\
\tau_p &= \frac{\rho_p d_p^2}{18 \mu}
\end{aligned}

where the following applies:

  • \mathbf{v} (SI unit: m/s) is the particle velocity
  • \mathbf{u} (SI unit: m/s) is the fluid velocity
  • d_p (SI unit: m) is the particle diameter
  • \rho_p (SI unit: kg/m^3) is the particle density
  • \mu (SI unit: kg/(m\cdot s)) is the fluid dynamic viscosity

The Stokes’ drag law is applicable for particles with a relative Reynolds number much less than one; that is,

(3)

\textrm{Re}_r = \frac{\rho \parallel {\mathbf{u}-\mathbf{v}}\parallel d_p}{\mu} \ll 1

where \rho (SI unit: kg/m^3) is the density of the fluid. This is true in the present case. A representative sample of particles in the solution is depicted below. These particles are released at the bottom-right corner of the mixer and flow to the top-left corner. The color expression indicates the initial z-coordinate of the particles at the inlet, and it can be used to visualize the final positions of particles relative to their initial positions in the mixer cross section.

Plot showing the laminar static mixer's particle trajectories.
Plot illustrating particle trajectories in the static mixer.

Quantifying Static Mixer Performance with the Help of the Application Builder

To some extent, we can judge the uniformity of a mixture by observation alone. In this example, the mixing performance can be visualized by creating a phase portrait of the particle positions. In a phase portrait, particles can be plotted in an arbitrary 2D phase space — that is, they can be arranged in a 2D plot in which the axes can be user-defined expressions. Phase portraits are, for example, often used to plot particle position versus momentum in a certain direction, a phase space distribution.

In the following animation, a phase portrait is used to observe the change in the transverse position of each particle as it moves throughout the mixer. Since the pipe is oriented in the y direction, the transverse directions are the x and z directions. The color expression denotes the quadrant that each particle occupied at the initial time; that is, dark blue particles were released with positive x- and z-coordinates, and so on.

 

A phase portrait indicates the transverse position of particles as they move throughout the mixer.

The phase portrait shows, qualitatively, that the particles are mixed together imperfectly at the outlet. There are still regions of higher or lower particle number density, along with clusters of particles of the same color — particles originating in the same quadrant — that can still be seen.

One potential drawback of the phase portrait is that it plots the particles in phase space at equal times, not at equal y-coordinates. This can produce a somewhat misleading visualization of the mixer, as some of the particles may move closer to the mixing blades and therefore potentially reach the outlet much later than other particles. An alternative option is to create a Poincaré map, which plots the intersection points of particles with a plane at a specified location.

In the following image, at each cut plane, the particles are colored according to whether they were released with positive (blue) or negative (red) initial x-coordinates. Once again, we can observe a clustering of red and blue particles at the outlet.

A visual showing a Poincaré map.
A Poincaré map shows the location of particles on a 2D plot.

Quite a lot of information about the mixer performance can be obtained from phase portraits and Poincaré maps, but most of it is too subjective for industrial applications. A human observer can judge approximately whether different species are completely unmixed, partially mixed, or well-mixed, but the lines between these definitions are hazy and difficult to quantify. For example, any observer can see that the previous images include pockets of particles of the same color, but it is much more difficult to assign a numerical value to describe how well-mixed they are.

Fortunately, the Application Builder and Method Editor provide the tools to create specialized, high-end postprocessing routines that can assign numeric values to the performance of a specific mixer geometry. A common metric for evaluating spatial uniformity of particles is the index of dispersion, defined as the ratio of the variance to the mean:

(4)

D=\frac{\sigma^2}{\mu}

The mean and variance are computed by subdividing the outlet into a number of regions, or quadrats, of equal area. Because the outlet is circular, it can be subdivided into N_r annular regions of equal area by drawing concentric circles of radii

r_i = \sqrt{\frac{i}{N_r}} \hspace{1cm} \textrm{for } i=1,2,3\ldots N_r-1

The annular regions can each be partitioned into N_{\phi} domains of equal area by drawing diameters at angles

\phi_j = \frac{2\pi j}{N_{\phi}} \hspace{1cm} \textrm{for } j=0,1,2\ldots N_{\phi}-1

The subdivision produces N_q=N_r N_{\phi} quadrats of equal area. Letting x_i denote the number of particles in the ith quadrat, the average number of particles in each quadrat is

\bar{x}=\frac{1}{N_q}\sum_{i=1}^{N_q} x_i

The variance of the number of particles per quadrat is

\sigma = \frac{1}{N_q}\sum_{i=1}^{N_q} (x_i-\bar{x})^2

The following method (p_computeIndexOfDispersion) is used in the app to compute the index of dispersion.

/*
 * p_computeIndexOfDispersion
 * This method computes the index of dispersion at the outlet.
 * The method is called in p_initApplication and in m_compute.
 */

// Get the x- and z-coordinates of the particles at the outlet
// and store them in matrices qx and qz, respectively.
model.result().numerical().create("par1", "Particle");
model.result().numerical("par1").set("solnum", new String[]{"14"});
model.result().numerical("par1").set("expr", "qx");
model.result().numerical("par1").set("unit", "m");
double[][] qx = model.result().numerical("par1").getReal();
model.result().numerical("par1").set("expr", "qz");
model.result().numerical("par1").set("unit", "m");
model.result().numerical("par1").set("solnum", new String[]{"14"});
double[][] qz = model.result().numerical("par1").getReal();

// Use the "at" operator to get the initial x-coordinates of all particles
// and store them in matrix qx0.
model.result().numerical("par1").set("expr", "at(0,qx)");
model.result().numerical("par1").set("unit", "m");
model.result().numerical("par1").set("solnum", new String[]{"14"});
double[][] qx0 = model.result().numerical("par1").getReal();

// The Particle Evaluation is no longer needed.
model.result().numerical().remove("par1");

double Ra = model.param().evaluate("Ra"); // Radius of the outlet
int Np = qx.length;                      // Number of particles
int Nr = nbrR;                            // Number of subdivisions in the radial direction
int Nphi = nbrPhi;                        // Number of subdivisions per quadrant in the azimuthal direction
int nbrQuad = Nr*4*Nphi;                  // Total number of quadrats (regions)
double deltaPhi = Math.PI/(2*Nphi);       // Angular width of each quadrat
int index = 0;
int ir = 0;
int iphi = 0;
int[] x = new int[nbrQuad]; // Array to store number of points per quadrat

// Begin loop over all particles
for (int i = 0; i < Np; ++i) {
  // Determine which quadrat each particle is in.
  ir = (int) Math.floor((Math.pow(qx[i][0], 2)+Math.pow(qz[i][0], 2))*Nr/Math.pow(Ra, 2));
  iphi = (int) Math.floor(Math.atan2(qz[i][0], qx[i][0])*Math.signum(qz[i][0])/deltaPhi);
  if (Math.signum(qz[i][0]) < 0) {
    iphi = (int) Math.floor((2*Math.PI-Math.atan2(qz[i][0], qx[i][0])*Math.signum(qz[i][0]))/deltaPhi);
  }
  index = 4*Nphi*ir+iphi;
  // Consider only half of the particles when evaluating mixer performance.
  if (qx0[i][0] < 0) {
    x[index] = x[index]+1;
  }
}
// compute the mean
double sum = 0;
for (int i = <0; i < nbrQuad; ++i) {
  sum += x[i];
}
// compute the variance
double xmean = sum/nbrQuad;
sum = 0;
for (int i = 0; i < nbrQuad; ++i) {
  sum += Math.pow(x[i]-xmean, 2);
}
indexOfDispersion = sum/xmean;

The last line of this method returns the index of dispersion. In general, a reduction of the index of dispersion corresponds to an improvement in the uniformity of the particle distribution. With the default parameters in the app, the index of dispersion is approximately 900 when three mixing blades are used, 1200 when two blades are used, and 1400 when only one blade is used. Thus, the index of dispersion quantitatively shows what we can see by looking at the plots: that a larger number of mixing blades produces a more uniform mixture of particles.

Simulation Apps Optimize the Analysis of Static Mixer Performance

Today, we have shown you how the Application Builder can advance your studies of static mixers. By creating an app, you can optimize the overall design workflow by spreading simulation capabilities to a wider audience, with the opportunity to gain a more accurate overview of mixing performance by assigning numerical values to different mixer geometries.

Interested in learning more about how to design simulation apps of your own? Be sure to check out the resources below.

Helpful Resources for Your App-Building Processes

Particle Tracing in a Component of a Quadrupole Mass Spectrometer

$
0
0

Quadrupole mass filters, the key component of quadrupole mass spectrometers, filter ions by their charge-to-mass ratio, only allowing ions with a certain ratio to pass through the device. As such, a high transmission probability for a specific ion through the filter is desirable. However, fringe fields in the mass filter can affect this probability. By using multiphysics simulation, we can take a closer look at quadrupole mass filters and investigate the effect of fringe fields on these devices.

A Short Introduction to Mass Spectrometry

Mass spectrometry is a process that analyzes and sorts ions based on their charge-to-mass ratio. Typical mass spectrometers work by ionizing individual molecules or atoms, then moving and manipulating these ions with an external electric field.

A mass spectrometer’s inherent sensitivity yields itself to many applications, including identifying unknown biological compounds, determining chemical mixture compositions, detecting toxins in food sources, and space exploration. Today, these devices continue to improve, with new mass spectrometry machines able to analyze up to 30 components simultaneously, both in gas and liquid phases.

One type of mass spectrometer, a quadrupole mass spectrometer, allows only ions of a specific charge-to-mass ratio to pass through the device for each given ratio of voltages. This is accomplished with a quadrupole mass filter, a component of the spectrometer that consists of four cylindrical metal rods.

A photo of a quadrupole mass filter, a component of a quadrupole mass spectrometer.
A quadrupole mass filter. Image by Fulvio314 — Own work. Licensed under CC BY-SA 3.0, via Wikimedia Commons.

Today, we will use the Particle Tracing and AC/DC modules in COMSOL Multiphysics to simulate a mass filter and evaluate its performance in a quadrupole mass spectrometer.

Using Multiphysics Modeling to Evaluate a Quadrupole Mass Spectrometer Component

In order for a quadrupole mass spectrometer to successfully analyze a mixture, its mass filter needs to maintain a high transmission probability for a specific ion. This means that the filter must ensure that ions of only a certain charge-to-mass ratio are transmitted through the device.

We can evaluate this ability by modeling a quadrupole mass filter and accounting for the effects of fringe fields located at its entrance and exit. These are important elements to include because fringe fields influence the transmission probability of a specific ion through a mass filter.

Particle trajectories in a quadrupole mass filter.
Simulations showing particle trajectories in a quadrupole mass spectrometer’s mass filter.

We can model the mass filter in two stages:

  1. Compute the DC and AC fields
  2. Calculate the ion trajectories, the motion of which is controlled by these same fields

Let’s start by taking a closer look at the design of our model. First, we use Poisson’s equation to calculate the electric potential, U, for the DC field. Next, we use the conservation of electric currents to compute the AC potential, V, for the AC field. For both of these cases, we apply a positive potential of magnitude on the north and south rods and a negative potential on the east and west rods. Further, to help accelerate the ions into the mass filter, we can apply small DC and AC biases to the ion aperture.

We also use the superposition of the AC and DC fields to build the total electric field that the particles experience when entering the modeling domain. It’s important to note that, because the equations solved for the AC and DC fields are linear, this is a valid assumption. A stationary electric field and one that changes over time both contribute to the total electric field.

Particle Tracing in a Quadrupole Mass Filter

For the next stage of the simulation, we calculate the trajectories of the ions that move through the filter. Ion motion is governed by Newton’s second law. The ions in this tutorial are released both at the simulation start time and at uniformly spaced times during the AC field’s first RF cycle. Over the course of the simulation, particles are released eleven different times between 0 seconds and 0.25 μs. Since the frequency of the AC field is 4 MHz, this ends up being one full RF cycle.

By accurately computing the ion trajectories, including the effects of the fringe fields, we are able to find the ion transmission. In this case, the plot shows that the ion transmission is very high, reaching 100%. This occurs because we choose a very stable operating point on the a-q curve. Here, a and q refer to coefficients in the Mathieu equation, which can be used to compute an approximate solution of ion motion in a quadrupole mass filter. In our study, the ions remain in the quadrupole mass filter for about 140 RF cycles.

Simulation showing particle trajectories in a quadrupole mass filter.
Particle trajectories in a quadrupole mass filter. The z-component of the total force is indicated by the color.

Taking a Look at the Design Elements of the Mass Filter

We can use these simulation results to see the effects of different design elements on the quadrupole mass filter. For instance, in our model, we include a biased plate surrounding the ion aperture. This causes the ions to gain energy as they move through the filter. As we can see in the plot below, the mean energy of these ions is 5 eV over a range of about 3 eV. Such a spread in energy may be due to the small DC and AC bias. Since the AC bias can be either positive or negative, the ions may accelerate or decelerate based on which RF cycle phase they are released in.

A plot depicting the ions' particle kinetic energy distribution as they reach the collector.
The ions’ particle kinetic energy distribution when they reach the collector.

In this blog post, we used multiphysics modeling to accurately analyze a mass filter for use in a quadrupole mass spectrometer. Optimizing quadrupole mass filter designs can aid in the development of even more accurate mass spectrometers in the future.

Learn More About Simulating Spectrometers in COMSOL Multiphysics

Sampling Random Numbers from Probability Distribution Functions

$
0
0

In this blog series, we’ll investigate the simulation of beams of ions or electrons using particle tracking techniques. We’ll begin by providing some background information on probability distribution functions and the different ways in which you can sample random numbers from them in the COMSOL Multiphysics® software. In later installments, we’ll show how this underlying mathematics can be used to accurately simulate the propagation of ion and electron beams in real-world systems.

The Motivation Behind Utilizing Probability Distribution Functions

Energetic beams of ions and electrons are a topic of great interest in the fundamental research of high-energy and nuclear physics. But they are also utilized in a wealth of application areas, including cathode ray tubes, the production of medical isotopes, and nuclear waste treatment. In the accurate computational modeling of beam propagation, the initial values of the particle position and velocity components are of particular importance.

When releasing ions or electrons in a beam for a particle tracing simulation, we’re often required to sample these particles as discrete points in phase space. However, before we delve too deeply into what phase space is and how ions or electrons fit into it, let’s learn more about probability distribution functions and how they can be utilized in COMSOL Multiphysics.

Introduction to Probability Distribution Functions

Let’s start with some definitions. A continuous random variable x is a random variable that can take on infinitely many values. For example, suppose that a point x1 is selected at random along a line segment of length L. Then a second point x2 is selected elsewhere along this line. Assuming that these two points are distinct, we can then select a third distinct point that is also on the line, then a fourth point , and so on, and thus infinitely many distinct points can be obtained. This is illustrated below.

Image depicting distinct points on three lines.

As a side note, the other kind of random variable is called a discrete random variable and can only take on specified values. Think about flipping a coin or drawing a card from a deck; the number of outcomes is finite.

A 1D probability distribution function (PDF) or probability density function f(x) describes the likelihood that the value of the continuous random variable will take on a given value. For example, the probability distribution function

(1)

f(x) = \left\{
\begin{array}{cc}
0 & x\leq 0\\
1 & 0 < x < 1\\
0 & 1\leq x
\end{array}
\right.

describes a variable x that has a uniform chance to take on any value in the open interval (0, 1) but has no chance of having any other value. This PDF, a uniform distribution, is plotted below.

Plot depicting a uniform distribution.

Probability distribution functions can also be applied for discrete random variables, and even for variables that are continuous over some intervals and discrete elsewhere. An alternative way to interpret such a random variable is to treat it as a continuous random variable for which the PDF includes one or more Dirac delta functions. This blog series will only consider continuous random variables.

The PDF is normalized if

\int_{-\infty}^{\infty} f(x)dx = 1

In other words, the total probability that the variable x takes on a value somewhere in the range (-∞, ∞) is unity.

A cumulative distribution function (CDF) F(x) is the likelihood that the value of the continuous random variable lies in the interval (-∞, x). The PDF and CDF are related by integration,

F(x) = \int_{-\infty}^{x} f(x^\prime) dx^\prime

From the above definition, it is clear that if the probability distribution function is normalized, then

\textrm{lim}_{x \rightarrow \infty} F(x) = 1

The PDF from Eq.(1) and the corresponding CDF are plotted below. It is clear that the PDF, as written, is normalized.

Graph comparing a uniform and uniform, cumulative distribution.

Sampling from a 1D Distribution

Selecting a value at random from a uniform distribution is usually quite easy. In most programming languages, routines to generate uniformly distributed random numbers are readily available. However, suppose that we have a much more arbitrary distribution like the one shown below.

Graph showing an arbitrary distribution.

The random number takes on values in the interval (0, 1), and the PDF is normalized because the CDF ends up at 1. However, the distribution is clearly not uniform; for example, the random number is much more likely to be in the range (0.2, 0.3) than the range (0.7, 0.8). Simply using a built-in routine that samples uniformly distributed random numbers from the interval (0, 1) would not be correct. Therefore, we must consider alternative ways to sample random numbers from this arbitrary-looking PDF.

This brings us to one of the most fundamental methods for sampling values from a probability distribution function, inverse transform sampling. Let U be a uniformly distributed random number between zero and one. (In other words, U follows the distribution function given by Eq.(1).) Then to sample a random number with a (possibly nonuniform) probability distribution function f(x), do the following:

  1. Normalize the function f(x) if it isn’t already normalized.
  2. Integrate the normalized PDF f(x) to compute the CDF, F(x).
  3. Invert the function F(x). The resulting function is the inverse cumulative distribution function or quantile function F-1(x). Because we’ve already normalized f(x), we could also clarify by calling this the inverse normal cumulative distribution function, or simply the inverse normal CDF.
  4. Substitute the value of the uniformly distributed random number U into the inverse normal CDF.

To summarize, F-1(U) is a random number with a probability distribution function f(x) if . Let’s look at an example in which this method is used to sample from a nonuniform probability distribution function.

Example 1: The Rayleigh Distribution

The Rayleigh distribution appears quite frequently in the equations of rarefied gas dynamics and beam physics. It is given by

(2)

f(x) = \left\{
\begin{array}{cc}
0 & x<0 \\
\frac{x}{\sigma^2} \exp\left(-\frac{x^2}{2\sigma^2}\right) & x\geq 0
\end{array}
\right.

where σ is a scale factor yet to be specified. We can verify that the Rayleigh distribution, as written above, is normalized,

\begin{aligned}
\int_{0}^{\infty} \frac{x}{\sigma^2} \exp\left(-\frac{x^2}{2\sigma^2}\right)dx
&= \lim_{x \rightarrow \infty} \left.-\exp\left(-\frac{x^\prime^2}{2\sigma^2}\right)\right|^x_0\\
&= 1-\lim_{x \rightarrow \infty}\exp\left(-\frac{x^2}{2\sigma^2}\right)\\
&= 1
\end{aligned}

The cumulative distribution function is

\begin{aligned}
F(x)
&=\int_{0}^{x} \frac{x^\prime}{\sigma^2} \exp\left(-\frac{x^\prime^2}{2\sigma^2}\right)dx^\prime\\
&= \left.-\exp\left(-\frac{x^\prime^2}{2\sigma^2}\right)\right|^x_0\\
&= 1-\exp\left(-\frac{x^2}{2\sigma^2}\right)
\end{aligned}

For σ = 1, the normalized Rayleigh distribution and its cumulative distribution function are plotted below. For larger values of x, it is apparent that the CDF approaches unity.

Graph plotting a Rayleigh distribution against a Rayleigh, cumulative distribution.

To compute the inverse normal CDF, set y = F(x) and solve for x:

\begin{aligned}
y &= F(x)\\
y &= 1-\exp\left(-\frac{x^2}{2\sigma^2}\right)\\
\exp\left(-\frac{x^2}{2\sigma^2}\right) &= 1-y\\
-\frac{x^2}{2\sigma^2} &= \log\left(1-y\right)\\
x &= \sigma \sqrt{-2 \log\left(1-y\right)}
\end{aligned}

Now substitute the uniformly distributed random number U for the variable y,

x = \sigma \sqrt{-2 \log\left(1-U\right)}

Since U is uniformly distributed in the interval (0, 1) and because its value has not yet been determined, we can further simplify this expression by noting that U and 1 – U follow exactly the same probability distribution function. Thus, we arrive at the final expression for the sampled value of x,

(3)

x = \sigma \sqrt{-2 \log U}

Next, we’ll discuss how Eq.(3) can be used in a COMSOL model to sample values from the Rayleigh distribution.

Note that when computing the inverse normal CDF, it is not always possible to do so analytically. There is not always a closed-form analytical solution for the integral of any function, and it is not always possible to write an expression for the inverse of the cumulative distribution function. The Rayleigh distribution has intentionally been used here because its inverse normal CDF can be derived without the need for numerical or approximate methods.

Random Sampling in COMSOL Multiphysics®

We can use the results of the above analysis to sample from an arbitrary 1D distribution, such as the Rayleigh distribution, in COMSOL Multiphysics. To begin, let’s consider the built-in tools for sampling from specific types of distribution.

There are several ways to define pseudorandom numbers (we’ll talk more the meaning of “pseudorandom” later on) in COMSOL Multiphysics. You can use the Random function feature, available from the Global Definitions and Definitions nodes, to define a pseudorandom number with a uniform or normal distribution. When a Uniform distribution is used, specify the Mean and Range. For a mean value μu and a range σu, the PDF is

f(x) = \left\{
\begin{array}{cc}
0 & x \leq \mu_u-\frac{\sigma_u}{2}\\
\frac{1}{\sigma_u} & \mu_u-\frac{\sigma_u}{2} < x < \mu_u + \frac{\sigma_u}{2}\\
0 & \mu_u + \frac{\sigma_u}{2} \leq x\\
\end{array}
\right.

An example of a uniform distribution with a mean of 1 and range of 1.5 is shown below.

Screenshot depicting the Uniform Distribution setting in COMSOL Multiphysics.

When a Normal, or Gaussian, distribution is used, specify the Mean and Standard Deviation. For a mean value of μn and standard deviation of σn, the PDF is

f(x) = \frac{1}{\sigma_n \sqrt{2\pi}} \exp\left(-\frac{\left(x-\mu_n \right)^2}{2\sigma_n^2}\right)

An example of a normal distribution with a mean of 1 and standard deviation of 1.5 is shown below. As with the uniform distribution, the curve is jagged and unpredictable. Unlike the uniform distribution, the points along the curve are very dense close to the line y = 1 and fall off gradually from there.

Screen capture displaying the Normal Distribution settings.

For the default settings, in which the mean is 0 and the range or standard deviation is 1, the two distributions are compared below.

Plot comparing a normal distribution and a uniform distribution.
Comparison of the uniform PDF with the unit range and the Gaussian PDF with the unit standard deviation.

Instead of using the Random function feature, you can also use the built-in functions random and randomnormal in any expression. The random function is a uniform distribution with a mean of 0 and range of 1; the randomnormal function is a normal distribution with a mean of 0 and standard deviation of 1.

Remembering that for Eq.(3) we need a number U that is sampled uniformly from the interval (0, 1), we have two options:

  1. Use the Random function feature with a mean of 0.5 and range of 1.
  2. Use the built-in random function and add 0.5.

In the following case, we’ll assume that the second approach is used, although both are feasible.

Random Numbers, Pseudorandom Numbers, and Seeding

We’ve mentioned that the above methods are used to generate pseudorandom numbers. Pseudorandom means that the random number is generated in a deterministic way from an initial value or seed. For the built-in random function, the seed is the argument (or arguments) to the function. In comparison, truly random numbers cannot be generated by a program alone but require some natural source of entropy — that is, a natural process that is inherently unpredictable and unrepeatable, such as radioactive decay or atmospheric noise.

There are several reasons why it is more convenient to work with pseudorandom numbers than truly random numbers. Their reproducibility can be used to troubleshoot Monte Carlo simulations because the same result can be obtained by running a simulation several times in a row with the same seed, making it easier to identify changes elsewhere in the model. Because they don’t require a natural entropy source, which can only harvest a finite amount of entropy in the environment in a finite time, pseudorandom numbers are less likely than truly random numbers to increase the required simulation time.

In exchange for the convenience of pseudorandom numbers, some extra precautions must be taken. The pseudorandom number is different for distinct values of the seed, but the same seed will repeatedly produce the same number. To see this in any COMSOL model, create a Global Evaluation node and repeatedly evaluate the built-in random function with a constant seed, say random(1). The output will have no obvious relationship with the number 1 (so in that sense, it would seem “random”), but the value will stay the same if the expression is evaluated multiple times (and thus the distribution of values doesn’t appear random). This is illustrated below.

Screenshot highlighting a Global Evaluation node that uses a constant seed.

If a different seed is used every time the random number is evaluated, you’ll get different results each time the random number is evaluated. See the table in the following screenshot, in which the time is used as an input argument to the random function, and compare it to the previous evaluation.

Screen capture illustrating a Global Evaluation node that uses a changing seed.

Monte Carlo simulations of particle systems often involve large groups of particles that are released with random initial conditions and subjected to random forces. Some examples of random phenomena involving groups of particles include:

Clearly, if each particle gets the same pseudorandom numbers, then the simulation will be completely nonphysical. In the case of ions interacting with a background gas, for example, each ion would undergo collisions with the gas molecules or atoms at exactly the same times as all of the other ions. To remedy this, any random numbers involved in the particle simulation must be given seeds that are unique for each particle.

One approach is to use the particle index, an integer that is unique for each particle, as part of the seed. The particle index variable is <scope>.pidx, where <scope> is a unique identifier for the instance of the physics interface. For the Mathematical Particle Tracing interface, the particle index is usually pt.pidx. The function random(pt.pidx) will give a different pseudorandom number for each particle.

A further complication arises when particles are subjected to random forces throughout their entire lifetime. For example, if a random number is used to determine whether a collision with a gas molecule occurs, you wouldn’t want to use the same random number for a given particle at each time — then the particle could only undergo a collision at every single time step or not at all! The solution is to define a random number seed that uses multiple arguments: at least one argument that is distinct among particles and one that is distinct among different simulated times. Additional arguments may be needed if the simulation requires multiple pseudorandom numbers to be sampled independently of each other. A typical use of the random function could then take a form such as random(pt.pidx,t,1), where the final argument 1 can be replaced with other numeric values if additional independent pseudorandom numbers are needed.

Results: Rayleigh Distribution

Let’s go back to the original problem of sampling from the Rayleigh distribution. Suppose that we have a particle population and want to sample one number per particle so that the resulting values follow the Rayleigh distribution. In this example, we’ll use Eq.(2) with σ = 3. In a COMSOL model, define the following variables:

Name Expression Description
rn 0.5+random(pt.pidx) Random argument
sigma 3 Scale parameter
val sigma*sqrt(-2*log(rn)) Value sampled from Rayleigh distribution

Note that the last line is just Eq.(3). The following plot is a histogram of the value of rn for a population of 1000 particles. The smooth curve is the exact Rayleigh distribution, which has been defined using an Analytic function feature.

Graph plotting the histogram of sampled values against the exact Rayleigh distribution.

For curves with many fine details, a larger number of particles may be needed to accurately capture the probability distribution function.

Note About Interpolation Functions

If a probability distribution function is entered into COMSOL Multiphysics as an Interpolation function feature, instead of an Analytic or Piecewise function, then you can use built-in features to automatically define a random function that samples from the specified PDF.

Suppose we have an interpolation function that linearly interpolates between the following data points:

x f(x)
0 0
0.2 0.6
0.4 0.7
0.6 1.2
0.8 1.2
1 0

The following screenshot shows how this data can be entered into the Interpolation function. By selecting the Define random function check box in the settings window for the Interpolation function feature, you can automatically define a function rn_int1 that samples from this distribution. In the Graphics window, the histogram plot shows a random sampling of 1000 data points, and the continuous curve is the interpolation function itself. The extra factors 20 and 0.74 are included to correct for the number of bins and normalize the interpolation function, respectively.

Screen capture illustrating the Interpolation function feature settings and Graphics window in COMSOL Multiphysics.

The Power of Probability Distribution Functions

So far we’ve seen how probability distribution functions, cumulative distribution functions, and their inverses are related. We’ve also discussed several techniques for sampling from both uniform and nonuniform probability distribution functions in COMSOL models. In the next post in our Phase Space Distributions in Beam Physics series, we’ll start explaining the physics of ion and electron beams and how an understanding of probability distribution functions is essential to accurately modeling beam systems.

References

  1. Humphries, Stanley. Charged particle beams. Courier Corporation, 2013.
  2. Davidson, Ronald C., and Hong Qin. Physics of intense charged particle beams in high energy accelerators. Imperial college press, 2001.

Phase Space Distributions and Emittance in 2D Charged Particle Beams

$
0
0

Previously in our Phase Space Distributions in Beam Physics series, we introduced probability distribution functions (PDFs) and various ways to sample from them in the COMSOL Multiphysics® software. Such knowledge of PDFs is necessary to understand how ion and electron beams propagate within real-world systems. In this installment, we’ll discuss the concepts of phase space and emittance as they apply to the release of ions or electrons in beams.

Ion and Electron Beams

A beam of ions or electrons is a group of particles with about the same kinetic energy that move in about the same direction. The total kinetic energy of each particle is usually much greater than the particle’s thermal energy at ordinary temperatures, giving the beam a good degree of directionality.

We’ll begin by examining a charged particle beam in 2D. Let the positive z-axis denote the direction of beam propagation (the axial direction) and the x-axis denote the direction perpendicular to the direction of propagation (the transverse direction). If this convention seems strange at first, remember that we’ll eventually discuss beams in 3D, and then it will be convenient to indicate the two transverse directions by x and y.

As mentioned earlier, a beam is characterized by a group of particles that have nearly the same direction and energy — emphasis on the word “nearly”! No real-world beam will have perfectly uniform velocities for all particles. In fact, almost all of the interesting mathematics involved in beam release and propagation relates to the small variations in position and velocity among the beam particles.

We can characterize the shape of a beam by the beam envelope, which indicates the outermost extents of the beam particles and gives us an idea of the beam’s shape. If the beam has a sharp cutoff — that is, the number density of particles in the beam abruptly decreases to zero at a well-defined location — the beam envelope may simply be a curve or surface that encompasses all of the particle trajectories. Very often, though, the density of beam particles decreases gradually out to a very large distance, so that there’s no clear border where the beam ends and the surrounding empty space begins. In that case, a beam envelope can be defined as the curve or surface that contains a sufficiently high percentage of the beam particles; 95% is quite common. A beam is converging if its envelope becomes smaller as the beam propagates forward; diverging if the beam envelope becomes larger; and at a waist if the beam has just finished converging and is about to start diverging. This is illustrated below.

A diagram of a beam.

Comparing Laminar and Nonlaminar Beams

The next plot shows some representative particle trajectories in a simple 2D beam. For now, space charge effects and external forces are neglected. Coordinate axis labels are shown to indicate the axial and transverse directions. We’ll treat this as an ideal sheet beam — that is, the beam extends infinitely in the out-of-plane (y) direction. The lines indicate the paths of beam electrons, with arrows indicating their velocities. The color expression along each line is the change in the x-coordinate, or transverse position, of an electron, also called its transverse displacement.

A plot showing the representative particle trajectories for a nonlaminar beam.

Note that the origin has been chosen so that the x-coordinates are measured from the center of the beam. It’s typically convenient to measure transverse particle positions from a point along the center line or nominal trajectory. The rate of change of the transverse position is the transverse velocity vx.

In the previous image and the following ones, the transverse displacement and velocity are rather exaggerated so they are easier to see. In practice, they are usually extremely small compared to the displacement and velocity along the beam axis.

The beam shown above is called a laminar beam because it has the following properties:

  1. There’s a one-to-one correspondence between transverse position and velocity. At any transverse position, the beam particles are not crossing paths. The one exception is for converging beams, where all particles will cross at exactly the same point.
  2. The transverse position and velocity are linearly proportional.

The latter of these properties is important because it prevents the initial property from being violated later on. See the following diagram of a converging beam in which the transverse position and velocity have a quadratic relationship instead of a linear one. Even though no trajectories are crossing initially (at z = 0), they cross at a later point. At any one of these intersection points, there are multiple transverse velocity values possible for a single transverse position, and thus the first property is violated.

A converging nonlaminar beam.

In contrast, for a laminar beam, the particles never cross, unless the beam is converging so that all trajectories cross at a single point, as shown below.

Plot showing particles crossing at a single point in a laminar beam.

In practice, there is usually a distribution of transverse velocity values at any transverse position. Particle trajectories are constantly crossing each other. Thus, real-world beams are nonlaminar, and the laminar beam discussed earlier is just an idealization. A more realistic transverse velocity distribution for a nonlaminar beam is illustrated below.

Realistic transverse velocity distribution for a nonlaminar beam.

To better understand the difference between laminar and nonlaminar beams, let’s look at their phase space distributions. Phase space distributions can take on many forms, but here we’ll examine the particles as points in a 2D space in which the axes are transverse position and velocity. (We could alternatively use position and momentum as the two axes. This changes the distribution’s dimensions but doesn’t fundamentally change its shape.) Plotting these phase space distributions in COMSOL Multiphysics is easy using the Phase Portrait plot type.

First, let’s examine the phase portrait for a laminar beam. The following plot is taken at a releasing boundary, at the time t = 0.

Phase portrait for a laminar beam.

As expected, the points form a straight line that passes through the origin. (Remember that, by definition, the transverse position and velocity in a laminar beam have a linear relationship.) The next plot is a phase portrait for the nonlaminar beam.

A phase portrait plot for a nonlaminar beam.

The points no longer lie in a line but instead form a vaguely shaped cloud in phase space centered about the origin. The points seem randomly placed and there isn’t any obvious relationship between their positions. To get a clearer idea of the phase space distribution, let’s consider the same beam but with a much larger sample size of 1000 particles.

Phase portrait plot for a nonlaminar beam with a sample size of 1000 particles.

Now it has become much clearer; the particles form a phase space ellipse. Because the ellipse is thickest at the center, particles positioned closer to the beam axis have a larger velocity spread as compared to particles near the beam envelope’s edge. Such ellipse-shaped distributions are extremely common in beam physics, although the proportions and orientation of the ellipse and the exact placement of particles relative to it can vary. As was the case when describing the beam envelope, the phase space ellipse may either have a sharp cutoff or gradual decrease in number density. In the latter case, an ellipse can be defined so that it encloses some arbitrary fraction of the beam particles, say 95%.

In practice, most charged particle beams are paraxial, meaning that the transverse velocity components are very small relative to the longitudinal velocity. In the paraxial limit, we can describe each particle by its transverse position x and inclination angle . (It’s fair to call this quantity an angle because in the paraxial limit.) The distribution of x and x’ values of particles in the beam is the trace space distribution, and the ellipse that encompasses this distribution is the trace space ellipse.

Evolution of Phase Space Ellipses

The ellipse shown in the previous image was approximately symmetric about the x-axis and vx-axis. However, this isn’t always the case; as the beam propagates, the ellipse changes shape even in the absence of any forces, simply because the expressions along the two axes are related to each other. Particles with positive transverse velocity (vx > 0) will move to the right (the +x direction) in phase space because, by definition, . Similarly, particles with negative transverse velocity will move to the left. The following animation shows the evolution of a phase space ellipse over time for a drifting beam without space charge effects.

 

When the ellipse has reflection symmetry about the x-axis and vx-axis, we say that it’s upright. An upright phase space ellipse corresponds to a waist along the beam trajectory.

Introduction to Beam Emittance

In beam physics, it’s often more convenient to work in trace space (the x-x’ plane) than the x-vx or x-px plane. This is partly because the inclination angle x’ is much more useful for visualizing the shape of the beam than the transverse velocity or momentum. A trace space ellipse (an ellipse drawn in the x-x’ plane to encompass the particles in trace space) has the general form

\gamma x^2 + 2\alpha x x' + \beta x'^2 = \varepsilon

where the parameters γ, β, and α, called the Twiss parameters or Courant-Snyder parameters, are not all independent but are instead related by the Courant-Snyder condition,

(1)

\gamma \beta -\alpha^2 = 1

The quantity is also called the Courant-Snyder invariant.

Altogether, the parameters γ, β, α, and ε describe the shape, size, and orientation of the trace space ellipse as follows:

  • γ is most often written in terms of the other parameters using Eq. (1). It describes the proportions of the beam. As γ increases with ε held constant, the beam occupies a smaller region of space (narrower range of x values) but a wider velocity spread (wider range of x’ values).
  • α describes the tilt of the trace space ellipse. For an upright ellipse, this corresponds to a beam waist, α = 0. The beam is converging if α > 0 and diverging if α < 0.
  • β, also called the amplitude function or betatron function, describes the proportions of the beam. As β increases with ε held constant, the beam occupies a larger region of space (wider range of x values) but a narrower velocity spread (smaller range of x’ values).
  • ε describes the size of the trace space ellipse. It’s also called the emittance. Since we’re talking about the transverse position and momentum, we can be more specific by calling this the transverse emittance.

Although beam emittance describes the size of the ellipse, there are several different conventions as to how the emittance and ellipse area are actually related. By one convention, the emittance is the product of the lengths of the semimajor and semiminor axes of the ellipse, with the result that A = 4πε. This is illustrated in the following diagram, which further shows how the Twiss parameters are related to the ellipse proportions and orientation.

Diagram depicting how the Twiss parameters are related to the ellipse proportions and orientation.

It’s also extremely common to multiply the reported emittance by 4, so that A = πε. In some resources, the division by π is also omitted, so that A = ε. When entering or reading the reported beam emittance, it’s extremely important to keep track of which convention is used.

Statistical Interpretations of Emittance

So far, we’ve seen that the beam emittance is an indication of the phase space area covered by the beam. However, in addition to this geometric interpretation, it’s possible to define a statistical interpretation in which the emittance is described in terms of averages over the ensemble of particles.

The root-mean-square emittance (or RMS emittance) can be defined as

(2)

\varepsilon = \sqrt{\left<\left{(x -(x))}^2\right>
\left<\left{(x' -(x'))}^2\right>
- \left<\left{(x- (x))\left(x' -(x'))\right>^2}

where the angle brackets represent arithmetic means, i.e.,

(x) = \frac{1}{N}\sum_{i=1}^{N} x_i

As in the geometrical definition of emittance, it’s extremely common to multiply the expression for RMS emittance by 4:

(3)

\varepsilon = 4\sqrt{\left<\left(x -(x))^2\right>
\left<\left(x' -(x'))^2\right>
- \left<\left(x- (x))\left(x'-(x')\right)\right>^2}

In COMSOL Multiphysics, we take extra precautions to ensure that the definition of the emittance is made clear by referring to Eq. (2) as the 1-rms emittance and Eq. (3) as the 4-rms emittance. If the trace space ellipse is positioned so that its center lies at the origin of the x-x’ plane, then ) and Eq. (2) can be simplified to

\varepsilon_{1,\textrm{rms}} = \sqrt{(x^2)(x'^2) -(xx')^2}

where subscripts have been used to indicate more clearly that this is the 1-rms emittance. Similarly, it’s possible to write statistical definitions of the Twiss parameters (again using the simplifying assumption ):

\begin{aligned}
\gamma &= \frac{(x'^2)}{\varepsilon_{1,\textrm{rms}}} \\
\beta &= \frac{(x^2)}{\varepsilon_{1,\textrm{rms}}} \\
\alpha &= -\,\frac{(xx')}{\varepsilon_{1,\textrm{rms}}}
\end{aligned}

From the statistical definitions of the Twiss parameters, it’s much clearer that α is positive when most of the particles lie in the 2nd and 4th quadrants of trace space, which means that the beam is converging.

The advantage of the statistical interpretation of beam emittance is that it removes the ambiguity of drawing an ellipse around an arbitrary phase space distribution to find its area. A disadvantage is that if there is no obvious cutoff distance, then a small number of particles a great distance away from the beam center can considerably skew the emittance and Twiss parameters. Sometimes these particles, such as those found at the end of Gaussian “tails”, are intentionally excluded from the statistical definition of beam emittance.

Interpretations of Beam Emittance

A lower value of the beam emittance is associated with some combination of the following beam properties:

  • Smaller beam size (reduced range of x values)
  • Smaller velocity spread (reduced range of x’ values)

It’s typically desirable to reduce beam emittance whenever possible. However, most processes tend to either keep the emittance constant or increase it. Several techniques for beam cooling, or emittance reduction, are available, but delving too deeply into beam cooling methods is beyond the scope of this series.

Why are we so concerned with reducing beam emittance? Among other reasons, we must remember that fundamental research in particle physics has driven the development of particle accelerators to a large degree, especially in extremely high-energy applications. To make particles undergo collisions at extremely high energy, it’s often necessary to make two beams of particles intersect each other, rather than having one beam interact with a stationary target. However, the collision cross section for two intersecting beams is much smaller than the collision cross section for a single beam interacting with a stationary target.

A technical aim of modern accelerators is therefore to fit as many energetic particles into a narrow space as possible to maximize the collision probability. Higher emittance either means that the particles are spread over a large area or that there are big differences among the particle velocities that will cause them to occupy a large area later on. Either one of these outcomes is detrimental to the frequency of collisions between the intersecting beams.

Extending to the 3D Environment

So far, we’ve explored what particle beams are, how to distinguish between laminar and nonlaminar beams, and how the phase space distribution in a nonlaminar beam is tied to the concept of transverse beam emittance. We’ve learned that real-world beams typically occupy some finite-sized area in phase space or trace space, and that the emittance is a figure-of-merit that is usually proportional in some way to the phase space area. Furthermore, we’ve seen two different ways to interpret beam emittance: geometrically, as in a phase space area, or statistically, in terms of the averages over beam particles and their inclination angles.

We have, however, only discussed ideal sheet beams in 2D. When extending to 3D, we’ll have to consider emittance in two orthogonal transverse directions. Real-world beams also have some distribution of velocity in the axial direction, which gives rise to the longitudinal emittance.

Next, we’ll look at phase space distributions in particle beams in 3D for the first time and learn how to sample from phase space distributions to reproduce some of the phase space ellipses we’ve seen thus far.

Learn More About Particle Tracing Modeling in COMSOL Multiphysics®

References

  1. Humphries, Stanley. Charged Particle Beams. Courier Corporation, 2013.
  2. Davidson, Ronald C., and Hong Qin. Physics of intense charged particle beams in high energy accelerators. Imperial college press, 2001.

Sampling from Phase Space Distributions in 3D Charged Particle Beams

$
0
0

In the previous installment of this series, we explained two concepts needed to model the release and propagation of real-world charged particle beams. We first introduced probability distribution functions in a purely mathematical sense and then discussed a specific type of distribution — the transverse phase space distribution of a charged particle beam in 2D. Now, let’s combine what we’ve learned and find out how to sample the initial positions and velocities of 3D beam particles from this distribution.

Reviewing 2D Phase Space Distributions and Ellipses

To start, let’s briefly review phase space distributions and ellipses in 2D, both of which are fully explained in the previous post in the Phase Space Distributions in Beam Physics series. The particles in real-world nonlaminar charged particle beams occupy a region in phase space that is often elliptical in shape. The equation for this phase space ellipse in 2D depends on the beam emittance ε and Twiss parameters,

(1)

\gamma x^2 + 2\alpha x x' + \beta x'^2 = \varepsilon

where x and x’ are the transverse position and inclination angle of the particle, respectively. The Twiss parameters are further related by the Courant-Snyder condition,

(2)

\gamma \beta -\alpha^2 = 1

The actual positions of particles in the ellipse can vary. Two of the most common distributions of phase space density are a uniform density within the ellipse and a Gaussian distribution with a maximum at the ellipse’s center, both of which are illustrated below. The blue curve in each case is the phase space ellipse described in Eq.(1), where ε is the 4-rms transverse emittance. For the Gaussian distribution, note that some particles still lie outside the ellipse. Since the Gaussian distribution decreases gradually without reaching exactly zero, there is always a chance that a few particles will lie outside the ellipse, no matter how large it is drawn. When using the 4-rms emittance to define the ellipse in Eq.(1), about 86% of the particles lie inside the ellipse.

Two images comparing a uniform and Gaussian distribution.
Comparison of a uniform and Gaussian distribution.

Let’s consider a simpler case in which the probability of finding a particle at any point in phase space is constant inside the ellipse and zero outside of it. For this problem, substituting Eq.(2) into Eq.(1) and solving for x’ yields

(3)

x' = -\frac{\alpha x}{\beta} \pm \frac{\sqrt{\varepsilon \beta -x^2}}{\beta}

The probability distribution function is then

(4)

f(x,x') = \left\{
\begin{array}{cc}
C & -\frac{\alpha x}{\beta} -\frac{\sqrt{\varepsilon \beta -x^2}}{\beta} < x' < -\frac{\alpha x}{\beta} + \frac{\sqrt{\varepsilon \beta -x^2}}{\beta}\\
0 & \textrm{otherwise}
\end{array}\right.

where the constant C depends on the size of the ellipse. The probability g(x) of the particle having a given x-coordinate is

g(x) = \int_{-\infty}^{\infty} f(x,x')dx'

Considering the locations where Eq.(3) can take on real values, we get

g(x) = \left\{
\begin{array}{cc}
2C \frac{\sqrt{\varepsilon \beta -x^2}}{\beta} & -\sqrt{\varepsilon \beta} < x < \sqrt{\varepsilon \beta}\\
0 & \textrm{otherwise}
\end{array}\right.

Or, more simply,

(5)

g(x) \propto \frac{\sqrt{\varepsilon \beta -x^2}}{\beta}, \qquad -\sqrt{\varepsilon \beta} < x < \sqrt{\varepsilon \beta}

Suppose we have a population of model particles that we want to sample using the probability distribution function given by Eq.(4). More specifically, we’d like to first sample the initial transverse positions of the particles according to Eq.(5) and then assign appropriate inclination angles so that the particles lie within the phase space ellipse. One way to accomplish this is to compute a cumulative distribution function starting from Eq.(5) and then use the method of inverse random sampling. Another possible method is using Eq.(5) to define the density of particles, which we can enter directly into the Inlet and Release features in the particle tracing interfaces. In this case, the normalization is done automatically.

Screenshot depicting the particle inlet settings in COMSOL Multiphysics.
Screenshot showing how to input the particle density in the Inlet feature.

Still, the most convenient approach is using the Particle Beam feature available in the Charged Particle Tracing physics interface. The Particle Beam feature automatically distributes the particles in phase space, allowing you to specify the location of the beam center, emittance, and Twiss parameters.

The settings for the Particle Beam feature.
Screenshot showing how to input the particle density in the Particle Beam feature.

Simulating Charged Particle Beams in 3D

So far, we’ve only considered charged particle beams as idealized sheet beams where the out-of-plane (y) component of the transverse position and velocity can be ignored. However, real beams propagate in 3D space and only extend a finite distance in both transverse directions. Thus, in order to get a complete picture of a beam, we must consider two orthogonal transverse directions x and y as well as the inclination angles and .

A schematic illustrating a particle beam propagating in 3D space.
Particle beam propagating in 3D space.

The reason why simulating the release of particle beams in 3D is more complicated than in 2D is that the degrees of freedom for the two transverse directions are often coupled in real-world beams. For example, suppose two particles are released at the same transverse position i.e., the same x- and y-coordinates. Let’s say that one of these particles has a very large inclination angle in the x direction (x’) and the other particle has a very small inclination angle in the x direction. The particle with the large inclination angle in the x direction is more likely to have a small inclination angle in the y direction and vice versa. Hence, we can’t just sample from two different distributions for x’ and y’ because the value of each one affects the probability distribution of the other.

To phrase this problem in a more abstract sense: Instead of considering the two transverse directions as separate 2D phase space ellipses, we actually need to think about the transverse particle motion using distributions of phase space in four dimensions! Since we’re used to seeing objects only in 2D or 3D, distributions with more than three space dimensions are much harder to visualize.

This is where the Particle Beam feature is most useful. It includes settings for sampling the initial particle positions and inclination angles from a variety of built-in 4D transverse phase space distributions. Some common distributions are the Kapchinskij-Vladimirskij (KV) distribution, waterbag distribution, parabolic distribution, and Gaussian distribution. First, let’s consider the simplest distribution, the KV distribution, and then visualize the other distributions in this group.

Mathematically, the KV distribution considers the beam particles to be uniformly distributed on an infinitesimally thin, 4D hyperellipsoid in phase space. It’s written as

\left(\frac{x}{r_x} \right)^2
+\left(\frac{r_x x' -r'_x x}{\varepsilon_x} \right)^2
+\left(\frac{y}{r_y} \right)^2
+\left(\frac{r_y y' -r'_y y}{\varepsilon_y} \right)^2 = 1

where rx and ry are the maximum extents of the beam in the x and y directions, εx and εy are the beam emittances associated with the two transverse directions, and r’x and r’y are the inclination angles at the edge of the beam envelope.

Because it is more difficult to visualize 4D probability distribution functions than functions of lower dimensions, it is often convenient to visualize the distribution indirectly by plotting its projection onto lower dimensions. An interesting property of the KV distribution is that its projection onto any 2D plane is an ellipse of uniform density. The projections onto six such planes are shown below. The projections of the 4D hyperellipsoid onto the x-x’ and y-y’ planes are tilted because nonzero values have been specified for the Twiss parameter α in each transverse direction.

The KV distribution projected onto six 2D planes.
The KV distribution projected onto six 2D planes.

Compare the distributions shown above to the following alternatives.

The waterbag, parabolic, and Gaussian distributions projected onto six 2D planes.

We see that the projection onto any 2D plane forms an ellipse-shaped distribution in all cases, but the ellipses are only uniformly filled in the KV distribution.

Concluding Thoughts on Modeling Charged Particle Beams

Even as this blog series on modeling charged particle beams comes to a close, we have only scratched the surface of the intricate and highly technical field of beam physics. While we’ve discussed transverse phase space distributions in 3D, we haven’t examined longitudinal emittance or the related phenomenon of bunching. We also haven’t categorized the phenomena that causes emittance to increase, decrease, or remain constant as the beam propagates.

This series is meant to be an introduction to the way in which random or pseudorandom sampling from probability distribution functions plays an important role in capturing the real-world physics of high-energy ion and electron beams. For a more comprehensive overview of beam physics, references 1-3 provide an excellent starting point. More technical details about each of the 4D transverse phase space distributions described above, including algorithms for sampling pseudorandom numbers from these distributions, can be found in references 4-7. To learn more about how these concepts apply in the COMSOL Multiphysics® software, browse the resources featured below or contact us for guidance.

Check Out Other Resources on Particle Tracing Simulations

References

  1. Humphries, Stanley. Principles of charged particle acceleration. Courier Corporation, 2013.
  2. Humphries, Stanley. Charged particle beams. Courier Corporation, 2013.
  3. Davidson, Ronald C., and Hong Qin. Physics of intense charged particle beams in high energy accelerators. Imperial college press, 2001.
  4. Lund, Steven M., Takashi Kikuchi, and Ronald C. Davidson. “Generation of initial Vlasov distributions for simulation of charged particle beams with high space-charge intensity.” Physical Review Special Topics — Accelerators and Beams, vol. 12, N/A, November 19, 2009, pp. 114801 12, no. UCRL-JRNL-229998 (2007).
  5. Lund, Steven M., Takashi Kikuchi, and Ronald C. Davidson. “Generation of initial kinetic distributions for simulation of long-pulse charged particle beams with high space-charge intensity.” Physical Review Special Topics — Accelerators and Beams, 12, no. 11 (2009): 114801.
  6. Batygin, Y. K. “Particle distribution generator in 4D phase space.” Computational Accelerator Physics, vol. 297, no. 1, pp. 419-426. AIP Publishing, 1993.
  7. Batygin, Y. K. “Particle-in-cell code BEAMPATH for beam dynamics simulations in linear accelerators and beamlines.” Nuclear Instruments and Methods in Physics Research. Section A: Accelerators, Spectrometers, Detectors and Associated Equipment 539, no. 3 (2005): 455-489.

Benchmark Model Shows Reliable Results for Inertial Focusing Analysis

$
0
0

Inertial focusing is a useful technique for various applications, particularly within the medical field. Ensuring its effectiveness requires accurately describing the migration of particles as they flow through a channel. Version 5.3 of the COMSOL Multiphysics® software gives you the tools to generate reliable results that agree with experimental data on inertial focusing. Our new benchmark model highlights these capabilities.

The Power of Inertial Focusing

In the 1960s, G. Segré and A. Silberberg observed a surprising effect: When carried through a laminar pipe flow, neutrally buoyant particles congregate in a ring-like structure with a radius of about 0.6 times the pipe radius. This correlates to a distance from the parallel walls of around 0.2 times the width of the flow channel. The reason for this behavior, as they would discover decades later, could be traced back to the forces that act on particles in an inertial flow.

Today, we use the term inertial focusing to describe the migration of particles to a position of equilibrium. This technique is widely used in clinical and point-of-care diagnostics as a way to concentrate and isolate particles of different sizes for further analysis and testing.

A photograph of a medical diagnostic test that uses inertial focusing.
Many types of medical diagnostics use inertial focusing for testing and analysis. Image in the public domain, via Wikimedia Commons.

In order for inertial focusing to be effective in these and other applications, accurately analyzing the migration patterns of the particles is a key step. A new benchmark example from the latest version of COMSOL Multiphysics — version 5.3 — highlights why the COMSOL® software is the right tool for obtaining reliable results.

Accurately Model the Migration of Particles in Inertial Focusing

For this example, we consider the particle trajectories in a 2D Poiseuille flow. To account for relevant forces, we use derived expressions from a similar migration of particles in a 2D parabolic flow inside of two parallel walls (see Ref. 2 in the model documentation). Built-in corrections for both the lift and drag forces allow us to account for the presence of these walls in the simulation analysis.

Note: Lift and drag forces make up the total force acting on neutrally buoyant particles inside a creeping flow. By definition, the gravitational and buoyant forces cancel out one another.

We assume that the lift force acts only perpendicular to the direction of the fluid velocity. It is also assumed that the spherical particles are small in comparison to the width of the channel and that they are rotationally rigid.

To compute the velocity field, we use the Laminar Flow physics interface. This is then coupled to the Particle Tracing for Fluid Flow interface via the Drag Force node. Thanks to the Laminar Inflow boundary condition, we can automatically compute the complete velocity profile at the inlet boundary. For the laminar flow of a Newtonian fluid inside two parallel walls, it is known that the profile will be parabolic. This means that we could have directly entered the analytic expressions for fluid velocity. However, we opt to use the Laminar Flow physics interface in this case, as it demonstrates the workflow that is most appropriate for a general geometry.

Now let’s move on to the results. First, we can look at the fluid velocity magnitude in the channel. As expected, the velocity profile is parabolic. Note that the aspect ratio of the geometry is 1000:1, so the channel is very long compared to its height. The plot uses an automatic view scale to make the results easier to visualize.

A COMSOL plot of the parabolic fluid velocity profile within a channel.
The parabolic fluid velocity profile within a channel that is bound by two parallel walls.

We can then shift our attention to the trajectories of the neutrally buoyant particles. Note that in the plot below, the color expression represents the y-component of the particle velocity in mm/s. The results indicate that all of the particles are close to equilibrium positions at distances of about 0.3 D on either side of the center of the channel. (D represents the width of the channel). It does, however, take longer for particles released near the center of the channel to reach these positions. Their initial force is weaker as they are released in the area where the velocity gradient is smallest. From the plots, we can see that the particles converge at heights that are 0.2 and 0.8 times the width of the channel. These findings show good agreement with experimental observations.

A graph plotting the trajectory of particles inside a channel.

 

The trajectory of particles inside the channel.

The last two plots show the average and standard deviation of the normalized distance between the particles and the center of the channel. These results verify that the equilibrium distance from the center of the channel is in fact around 0.3 D.

A plot of the average of the normalized distance between the particles and channel center in COMSOL Multiphysics®.
A graph plotting the standard deviation between particles and the center of a channel.

The average (left) and standard deviation (right) of the normalized distance between the particles and center of the channel.

Generating Reliable Results for Inertial Focusing Studies

In order to effectively use inertial focusing for medical and other applications, you need to first understand the behavior of particles as they migrate through a channel to positions of equilibrium. With COMSOL Multiphysics® version 5.3, you can perform these studies and generate reliable results. This accurate description of inertial focusing serves as a foundation for analyzing and optimizing designs that rely on this technique.

Now it’s your turn! Give our new benchmark model a try:

Interested in learning about further updates in version 5.3 of COMSOL Multiphysics? You can get the full scoop in our 5.3 Release Highlights.

Accurately Analyze Turbomolecular Pumps with COMSOL Multiphysics®

$
0
0

Studying vacuum system designs can be difficult, since some analysis methods only work when the relative speed of the gas molecules is very large compared to the velocity of the enclosing walls. This is not the case for turbomolecular pumps, which we can model and analyze using a Monte Carlo approach and the Rotating Frame feature in the COMSOL Multiphysics® software. Let’s check out one example below.

Taking a Look Inside Turbomolecular Pumps

Vacuum technology is found in many high-tech applications, including semiconductor processing, mass spectrometry, and materials processing. This technology creates low-pressure environments by using vacuum pumps to remove air molecules from enclosed vacuum chambers.

One type of vacuum pump is a turbomolecular pump, which consists of a bladed molecular turbine. The blades of modern turbomolecular pumps rotate extremely quickly, reaching speeds as high as 90,000 rpm.

A photograph of a turbomolecular pump.
A turbomolecular pump.

The momentum transfer from the rotating blades to the gas molecules compresses the gas, which is moved from the inlet to the outlet by the blades. As a result, the pump is able to generate and maintain a high vacuum on the inlet side of the blades. This pumping process is more efficient in the free molecular flow range, since the gas particles mostly collide with the rotor and not with each other.

We can better understand and design turbomolecular pumps by modeling them with COMSOL Multiphysics. But first, we need to figure out the best way to do so.

Simulating a Turbomolecular Pump with the Particle Tracing Module

Instead of focusing on the whole turbomolecular pump, our model geometry depicts part of a single turbomolecular pump stage (a row of blades). Using the model, we calculate gas molecule trajectories in the empty space between the blades. This enables us to assume sector symmetry in the modeling domain.

A schematic showing the model geometry for one sector of one stage of a turbomolecular pump.
Model geometry of one sector of one stage of a turbomolecular pump. Gray represents the space between two blades, green represents the blade walls, and black represents the rotor root.

While we don’t use it here, one way to solve the model equations and calculate the pump’s performance in a free molecular flow regime is with the Free Molecular Flow interface from the Molecular Flow Module. This interface is an efficient option and is useful in cases where the molecules of extremely rarefied gases move significantly faster than any object in the modeling domain. However, in turbomolecular pumps, the speed of the gas molecules is comparable with the blade speed. As such, we need a different approach for this problem.

A screenshot of the Model Builder in COMSOL Multiphysics® with the turbomolecular pump model open.
The turbomolecular pump example model.

We use a Monte Carlo approach and the Rotating Frame feature (new to the Particle Tracing Module in version 5.3 of COMSOL Multiphysics®) to automatically apply the fictitious Coriolis and centrifugal forces to the particles. This enables us to compute the particle trajectories within a noninertial frame of reference that moves along with the blades.

This method provides accurate results on how the blade velocity ratio affects the pumping characteristics, such as the maximum compression ratio, transmission probability, and maximum speed factor. We base these characteristics on the transmission probability of argon atoms from the inlet to the outlet and vice versa.

For more information on how we created this model, including the geometric parameters and assumptions, check out the documentation for the turbomolecular pump tutorial.

Analyzing Particle Trajectories in a Turbomolecular Pump

Let’s begin by computing the transmission probabilities for particles propagating in the forward (inlet to outlet) and reverse (outlet to inlet) directions. As expected, when the blades are at rest, these probabilities are about equal. This is because there is no distinction between the two directions.

However, when the rotation of the blades begins to increase, the particles are more likely to be transported forward through the pump, as the walls successfully transfer momentum to the argon atoms. This corresponds to an increasing compression ratio.

A plot of the particle transmission in the forward direction.
A graph plotting the reverse direction of the particle trajectories in the turbomolecular pump.

The fraction of particles transmitted in the forward direction (left) and the reverse direction (right) as a function of blade velocity ratio.

We also investigate how the compression ratio and speed factor are affected by the blade velocity ratio. To produce enough compression and speed, pumps use multiple bladed structures comprised of several disks and different types of blades. Blades close to the inlet have a high pumping speed and low compression ratio, while blades close to the outlet have the opposite characteristics.

When the velocity of these blades increases, as seen in the plots below, the maximum compression and speed factor increase. This confirms that the two blade types work together to enhance the performance of the pump.

A plot of the maximum compression ratio affected by blade velocity.
A graph plotting how the blade velocity affects the maximum speed factor.

The effect of blade velocity on the maximum compression ratio (left) and maximum speed factor (right).

This example highlights the new modeling features that enable you to more easily analyze turbomolecular pumps. Try it yourself by clicking on the button below.

Learn More About Particle Tracing in COMSOL Multiphysics®

Focusing on Einzel Lenses with Particle Tracing Simulation

$
0
0

Einzel lenses are used to focus charged particle beams in cathode ray tubes (CRTs). To properly analyze an einzel lens, we need to study the charged particles in the lens subject to appropriate electrical excitation. Here, we discuss one such example that uses the Particle Tracing Module, an add-on product to the COMSOL Multiphysics® software.

Taking a Look at Einzel Lenses

Walking into a video game tournament for the first time, I was surprised by the number of CRT televisions in the room. Why use box TVs instead of the current flat-screen versions? When I asked my brother — who had participated in these tournaments before — he told me that CRT TVs are better for displaying certain games, as they deliver the desired response time and frames per second. This advantage makes CRT TVs popular in the gaming community.

A photograph of a CRT television.
A CRT television. Image by Daniel Oines — Own work. Licensed under CC BY 2.0, via Flickr Creative Commons.

Unlike newer models, these televisions rely on CRTs, which are vacuum tubes that control how electron beams reach a screen. To focus charged particle beams, some CRTs use einzel lenses. These lenses are also found in ion propulsion systems as well as ion and electron beam experiments.

The focusing ability of an einzel lens depends on the following factors:

  • Initial particle energy
  • Initial beam collimation
  • Voltage at each electrode

To accurately study these factors in einzel lens designs, we can use particle tracing simulation.

Particle Tracing in an Einzel Lens with COMSOL Multiphysics®

This einzel lens example consists of three cylinders aligned on the same axis. Of these cylinders, the middle one maintains a fixed voltage, while the outer two cylinders are grounded.

The electrons studied with this model have an initial kinetic energy of 20 keV. Their speed is an appreciable fraction of the speed of light. As such, relativistic effects are taken into account.

We can solve this model by using two different studies and interfaces. The first is a stationary study that uses the Electrostatics interface to calculate the electric potential and 3D electrostatic field. We then use the corresponding electric fields to exert an electric force on the modeled electrons. Second, a time-dependent study and the Charged Particle Tracing interface can be used to determine the electron particle trajectories.

In the next section, we see the results of these studies.

Simulation Results

Let’s take a look at the area around the electrodes (cylinders, in this case) where the beam is focused. In the left image below, we see the equipotential surfaces that surround the electrodes. We can also study the electric potential and fringe fields by looking at a cross section near the electrodes (shown in the right image below).

A plot of the electric potential isosurfaces in COMSOL Multiphysics®.
Simulation results showing the electric potential and fringe fields around electrodes.

The isosurfaces of the electric potential (left) and electric potential and fringe fields (right) around the electrodes.

Expanding the view helps to visualize the electron trajectories through the einzel lens. As shown below, the particles reduce their speed as they approach the lens. When passing through the lens, they begin to accelerate again, eventually reaching their initial speeds.

A graph plotting the electron trajectories in an einzel lens.
A plot of the electron trajectories and isosurfaces of the electric potential.

The left image shows the electron trajectories in an einzel lens. The colors seen here represent the ratio of the particle kinetic energy to the initial kinetic energy. The right image shows the electron trajectories and the isosurfaces of the electric potential.

Next, we examine the nominal beam trajectory of the electrons through the einzel lens. We also account for a common measurement of the area taken up by a charged particle beam in transverse phase space: hyperemittance.

An image showing the nominal beam trajectory in an einzel lens.
The nominal beam trajectory. Here, the color expression depicts the beam hyperemittance.

With particle tracing modeling, we are able to better analyze einzel lenses and can use these results to improve our designs. Try the einzel lens example yourself by clicking on the button below.

Further Reading

Analyzing an Electrodynamic Ion Funnel with COMSOL Multiphysics®

$
0
0

Within mass spectrometers, plasmas are often used to ionize a sample and an inert background gas. Before the ions produced in the plasma are sent into the mass filter, which determines the sample’s chemical composition, they must be focused into a beam with a suitably small radius. One way to focus ions is with an ion funnel. Focusing ions is a critical stage of the overall design, so it’s important to have a fundamental understanding of the funnel’s operating principles.

Improving Mass and Ion Mobility Spectrometry with Ion Funnels

Ion funnels consist of a stack of ring electrodes that have decreasing inner diameters. Due to a combination of RF and DC potentials as well as the presence of a background gas, these devices can focus ion beams by confining ions radially and moving them toward the narrow end of the funnel. In doing so, the funnel can transport ions between the ion source and mass filter with minimal ion losses.

An image of an ion funnel simulated using COMSOL Multiphysics®.
Simulation of an ion funnel.

Ion funnels can be used to inject ions into quadrupole mass filters and ion mobility spectrometers, enabling them to separate and analyze mixtures of ionized gases. These devices have a wide variety of applications, such as:

Of course, before ion funnels can be put to use, we need to gain insight into their design and functionality.

Studying an Ion Funnel with the AC/DC and Particle Tracing Modules

In this example, we analyze the focusing effect of an ion funnel that combines RF and DC potentials. The model contains a set of insulated ring-shaped electrodes that are exposed to an RF potential and have adjacent electrodes out of phase. In addition, there is a neutral argon buffer gas within the funnel. To model the interaction of the ions and neutral background gas, we use the Collisions node with an Elastic subnode and the Monte Carlo collision setting.

The RF potential radially confines the ions, and a DC bias directs them toward the increasingly narrow electrodes. The superposition of these two fields enables the funnel to focus the ions, sending them through the funnel and counteracting the thermal dispersion and Coulombic repulsion effects.

To create this model, we use three different interfaces in the COMSOL Multiphysics® software:

  1. The Electrostatics interface to compute the DC fields
  2. The Electric Currents interface to compute the AC fields
  3. The Charged Particle Tracing interface to model ion movement through the funnel. This interface accounts for the interaction of the AC and DC fields and neutral particles in the gas, although the interactions between the ions themselves are not taken into account as their density is suitably low.

Examining the Simulation Results

The simulation results for the ion funnel show that the positive ions are successfully moved from the wider end of the funnel to the narrow end via the gradual DC bias. To keep the ions inside the funnel, the AC voltage is kept out of phase between the adjacent electrodes. As seen below, this results in a very large electric potential gradient near the electrodes.

A plot of the combined electric potential for the electrodynamic ion funnel.
The combined electric potential of the electrodynamic ion funnel when time = 0.

Using this model, we also investigate the ion trajectories in the funnel. These trajectories show that the ions are confined to the increasingly small area. Due to this confinement, the ions can be efficiently transported to another device, such as a mass filter.

A graph plotting the positive ion trajectories in the funnel.
Positive ion trajectories in the electrodynamic ion funnel.

Moving on, let’s take a closer look at the ions located at the narrow end of the funnel. While the ions are released along the positive x-axis, they become uniformly distributed around the z-axis when they reach the end of the funnel.

Simulation results showing the coordinates of the ions at the narrow end of the ion funnel.
The x- and y-coordinates of the ions at the narrow end of the funnel. In this plot, blue indicates particles still in the funnel and red indicates particles that have exited the funnel. Note that these results may differ from the former two plots because the Collisions node uses random numbers to decide if a collision takes place at every time step.

Want to try this ion funnel example? Access the model documentation and associated MPH-files via the button below.

Viewing all 29 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>