Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
79 views

Particle Tracing Module: Introduction To

trazado de particulas en comsol multiphysics

Uploaded by

Alfonso Barboza
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

Particle Tracing Module: Introduction To

trazado de particulas en comsol multiphysics

Uploaded by

Alfonso Barboza
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

INTRODUCTION TO

Particle Tracing Module


Introduction to the Particle Tracing Module
© 1998–2017 COMSOL
Protected by U.S. Patents listed on www.comsol.com/patents, and U.S. Patents 7,519,518; 7,596,474; 7,623,991;
8,457,932; 8,954,302; 9,098,106; 9,146,652; 9,323,503; 9,372,673; and 9,454,625. Patents pending.
This Documentation and the Programs described herein are furnished under the COMSOL Software License
Agreement (www.comsol.com/comsol-license-agreement) and may be used or copied only under the terms of the
license agreement.
COMSOL, the COMSOL logo, COMSOL Multiphysics, Capture the Concept, COMSOL Desktop, LiveLink, and
COMSOL Server are either registered trademarks or trademarks of COMSOL AB. All other trademarks are the
property of their respective owners, and COMSOL AB and its subsidiaries and products are not affiliated with,
endorsed by, sponsored by, or supported by those trademark owners. For a list of such trademark owners, see
www.comsol.com/trademarks.
Version: COMSOL 5.3

Contact Information
Visit the Contact COMSOL page at www.comsol.com/contact to submit general inquiries, contact
Technical Support, or search for an address and phone number. You can also visit the Worldwide
Sales Offices page at www.comsol.com/contact/offices for address and contact information.

If you need to contact Support, an online request form is located at the COMSOL Access page at
www.comsol.com/support/case. Other useful links include:

• Support Center: www.comsol.com/support


• Product Download: www.comsol.com/product-download
• Product Updates: www.comsol.com/support/updates
• COMSOL Blog: www.comsol.com/blogs
• Discussion Forum: www.comsol.com/community
• Events: www.comsol.com/events
• COMSOL Video Gallery: www.comsol.com/video
• Support Knowledge Base: www.comsol.com/support/knowledgebase

Part number. CM022702


Contents

Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Main Subject Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Physics Interface Guide by Space Dimension and Preset Study
Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Boundary Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Secondary Particles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Particle Release Mechanisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Modeling Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Special Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Monte Carlo Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Auxiliary Dependent Variables and Residence Time . . . . . . . . . . . 23
Particle Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Particle Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Particle Trajectories Plots. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Poincaré Maps and Phase Portraits. . . . . . . . . . . . . . . . . . . . . . . . . . 26
Particle Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Operations on Particle Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Histograms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Computing Particle Trajectories through a Laminar Static Mixer29

|3
4|
Introduction

Particle tracing provides a Lagrangian description of a problem, in which the


particles are treated as distinct entities instead of a continuous distribution. The
particle trajectories are computed by solving ordinary differential equations using
Newton’s law of motion. Newton’s law of motion requires specification of the
particle mass and all forces acting on the particle. The forces acting on particles can
be divided into two categories, those due to external fields and those due to
interactions between particles. Forces due to external fields are typically computed
from a finite element model, using the physics interfaces available in COMSOL
Multiphysics or other optional add-on modules.
For each particle, a second-order ordinary differential equation is usually solved for
each component of the position vector. This means that three ordinary differential
equations are solved for each particle in 3D and two in 2D. At each time step, the
forces acting on each particle are queried from the external fields at the current
particle position. If particle-particle interaction forces are included in the model
then they are added to the total force. The particle position is then updated, and
the process is repeated until the specified end time for the simulation is reached.
Since the Particle Tracing Module uses a very general formulation for computing
particle trajectories, the physics interfaces can be used to model charged particle
motion in electromagnetic fields, large scale planetary and galactic movement, and
particle motion in laminar, turbulent, and multiphase fluid systems.

Main Subject Areas

C HARGED P ARTICLES
Charged particles in the context of this discussion refers to electrons, individual
ions or small ion clusters in electric and magnetic fields. There are three primary
forces that affect such particles:
• The electric force, which arises either due to a gradient in the electric
potential or due to a time-varying magnetic vector potential. Particles with
negative charge move in the opposite direction to the electric field and
particles with positive charge move in the direction of the electric field. The
electric force performs work on the particles.
• The magnetic force, which does no work on the charged particles but can
significantly alter their trajectory. The magnetic force often results in

|5
“banana” orbits for charged particles, causing them to orbit around
magnetic field lines with a distance proportional to their mass.
• Collisional forces, which do work on the particles. Charged particles can
undergo a variety of collisions with molecules in a gas. If the background
pressure is low, then it is possible to perform a Monte Carlo simulation in
which individual collisions are modeled.
If the number density of charged particle is sufficiently low, the effect of the
particles on the fields can often be neglected. This allows the fields to be computed
independently from the particle trajectories. The fields are then used to compute
the electric, magnetic, and collisional forces on the particles. The fact that the
particle trajectories can be computed in their own study allows efficient and
computationally inexpensive iterative solvers to be used
If the density of charged particles is suitably high, then it may be necessary to
include the Coulomb force that acts between the particles. When particle-particle
interactions are included in a model the computational requirements increase and
scale with the number of particles squared. When including the Coulomb force, it
is often best to start with a small number of particles, solve the model, and then
assess whether or not the effect is important.
Charged particles can acquire significant energy from electric fields, and when they
strike surfaces secondary particles may be ejected. This may be desirable or
undesirable depending on the specific application.

Photomultiplier. A single incident particle enters the modeling domain on the left side. As it strikes the
first electrode, secondary electrons are ejected, which are then accelerated to the second electrode. This
process continues across all 8 stages leading to an exponential growth in the electron density.

6|
If the number density of charged particles is high, the particles may significantly
affect the electric field in the surrounding region. This change in the electric field,
in turn, may perturb the trajectories of the charged particles. Two-way coupling
between charged particles and fields is typically modeled by computing the space
charge density and current density due of particles in the modeling domain, then
using this information to define additional source terms when computing the
fields. When modeling particle-field interactions, the space charge density due to
a single particle is distributed over the element the particle is in, so modeling
particle-field interactions is more accurate when the number of particles is very
large compared to the number of mesh elements in a cross-section of the domain.
If the electric field in the region surrounding the particles is constant, the two-way
coupling between particles and fields can be modeled more efficiently by coupling
a time-dependent solution for the particle trajectories and charge density to a
stationary solution for the electric potential. These two steps can be run in a loop
until a self-consistent solution is reached. This approach can be used to efficiently
model beams of ions or electrons.
To facilitate modeling of particle-field interactions, dedicated multiphysics
interfaces are available for the most common two-way couplings, including the
interaction of charged particle trajectories with electric and magnetic fields. These
multiphysics interfaces can be used with a dedicated study step that automatically
creates an iterative solver loop that solves for the particle trajectories using a Time
Dependent solver while computing all other fields using a Stationary solver.

Relativistic electron beam. The beam electrons (gray) diverge because the outward force exerted by the
electric field (red) is greater in magnitude than the inward force exerted by the magnetic field (blue).

|7
P ARTICLES IN F LUIDS
Motion of microscopic and macroscopic sized particles is typically dominated by
the drag force acting on particles immersed in a fluid. There are two phases in the
system: a discrete phase consisting of bubbles, particles, or droplets, and a
continuous phase in which the particles are immersed. In order for the particle
tracing approach to be valid, the system should be a dilute or dispersed flow. This
means that the volume fraction of the discrete phase should be much smaller than
the volume fraction of the continuous phase, generally less than 1%. When the
volume fraction of the particles is not small, the fluid system is categorized as a
dense flow and a different modeling approach is required.
It is important to realize that with the particle tracing approach, particles do not
displace the fluid they occupy.

Sparse Flow
In a sparse flow, the continuous phase affects the motion of the particles but not
vice versa. This is often referred to as “one–way coupling.” When modeling such
a system, it is usually most efficient to solve for the continuous phase first, then
compute the trajectories of the dispersed phases. For example, in the figure below
the stationary velocity field and pressure were first solved using a stationary study,
and then the particle trajectories were computed in a time-dependent study.

Comet tail plot of particle trajectories through a laminar static mixer (colored). In addition, Poincaré maps
show the deviation of particle trajectories from their initial position (blue & red).

8|
Dilute Flow
In a dilute flow the continuous phase affects the motion of the particles, and the
particle motion in turn disrupts the continuous phase. This is often referred to as
“two–way coupling.” If the fluid flow profile and the mass flow rate of particles do
not change over time, it is often possible to couple a time-dependent solution for
the particle trajectories to a stationary solution for the fluid flow, repeating the two
steps until a self-consistent solution is reached. A dedicated multiphysics interface
and study are available for simulating fluid-particle interactions in this way.
Otherwise, the continuous and dispersed phases must be computed
simultaneously. Thus, the computational demand is significantly higher when
modeling dilute flows than sparse flows. When modeling fluid-particle
interactions, the force exerted by each particle on the fluid is distributed over the
mesh element occupied by the particle. This force may either be applied directly
by using the particle positions to define a source term in the equations for fluid
flow, or indirectly by assigning extra degrees of freedom in each mesh element for
the volume force exerted by the particles.

Dispersed Flow
In addition to the effects mentioned above, particle-particle interactions may also
need to be taken into account. This is often referred to as “four-way coupling.”
Particle–particle interactions can be included in models but the following
limitations apply:
• Hard sphere collisions are not supported. Forces must vary continuously
with respect to the distance between particles as in, for example, the
Coulomb force between charged particles.
• The computation time scales as the number of particles squared. This is
because every particle interacts with every other particle over all distances.
It is possible to apply a cut-off distance for particle-particle interactions, but
the interaction force must still be evaluated for every pair of particles.
• If the particle-particle interaction law is highly nonlinear, it may be necessary
to use a very small time step. This is particularly true if the Lennard-Jones
option is selected.

Modeling Advection and Diffusion


Continuum methods have one major drawback when it comes to modeling the
advection and diffusion of a particulates in a fluid. The higher the Péclet number,
the more numerically unstable the method becomes. The Péclet number is the
ratio of the rate of advection to the rate of diffusion. In general, continuum
methods cannot handle systems where the Péclet number is above around 1000.
In typical microfluidic systems, for 100 nm diameter particles in water at room
temperature, the Péclet number is on the order of 108. Handling such a large

|9
Péclet number with continuum methods is clearly not possible. Particle
trajectories, on the other hand, are computed in a Lagrangian reference frame,
removing the restriction of the Péclet number. The Péclet number can be
anything from 0 to infinity without introducing numerical instabilities. Advection
is added to the particles via the drag force. Diffusion is added to particles by adding
a Brownian force. If the background velocity field is zero then particle motion will
be purely diffusive (zero Péclet number). If the Brownian force is neglected and
the background velocity is nonzero, the motion will be pure advection (infinite
Péclet number).

M ATHEMATICAL P ARTICLE TRACING


Particle tracing is also of interest in cases where the particles are neither charged
nor immersed on a fluid. Mechanical systems may be modeled using a
particle-based approach, with the equations of motion specified by Newton’s
second law, a Lagrangian, or a Hamiltonian. Often it is easier to write down an
expression for the Lagrangian or Hamiltonian for particles rather than deriving the
equations of motion. The Hamiltonian formulation solves for both the particle
position and the particle momentum. Because the Hamiltonian formulation uses
first-order equations, it doubles the number of degrees of freedom needed to
compute the particle trajectories.

10 |
Motion of stars in a galaxy using the user-defined particle-particle interaction option.

Locations of Particle Tracing physics interfaces in the Model Wizard. The options shown are available with
licenses for COMSOL Multiphysics and the Particle Tracing Module. Depending on other licensed
products, the Model Wizard may include options other than those that are shown here.

| 11
Physics Interface Guide by Space Dimension and Preset Study Type

PHYSICS INTERFACE ICON TAG SPACE AVAILABLE PRESET STUDY


DIMENSION TYPE

AC/DC

Particle Tracing

Particle Field Interaction, — 3D, 2D, 2D bidirectionally coupled


Non-Relativistic axisymmetric particle tracing; time
dependent
Particle Field Interaction, — 3D, 2D, 2D bidirectionally coupled
Relativistic (requires the axisymmetric particle tracing; time
AC/DC Module and dependent
Particle Tracing Module)
Charged Particle Tracing cpt 3D, 2D, 2D bidirectionally coupled
axisymmetric particle tracing; time
dependent
Fluid Flow

Particle Tracing

Particle Tracing for Fluid fpt 3D, 2D, 2D bidirectionally coupled


Flow axisymmetric particle tracing; time
dependent
Fluid-Particle Interaction — 3D, 2D, 2D bidirectionally coupled
axisymmetric particle tracing; time
dependent
Droplet Sprays in Fluid — 3D, 2D, 2D bidirectionally coupled
Flow axisymmetric particle tracing; time
dependent
Mathematics

Mathematical Particle pt 3D, 2D, 2D bidirectionally coupled


Tracing axisymmetric particle tracing; time
dependent

12 |
C HARGED P ARTICLE TRACING
The Charged Particle Tracing interface ( ) is found under the AC/DC branch
in the Model Wizard, and can be used to model the trajectories of ions and
electrons. There are predefined features for the electric force, magnetic force, and
various collisions with a rarefied gas, such as elastic collisions and charge exchange
reactions. A dedicated feature for releasing ion and electron beams is also available.
In addition, you can model particle-particle interactions using the Coulomb force.

P ARTICLE F IELD I NTERACTION , N ON -R ELATIVISTIC


The Particle Field Interaction, Non-Relativistic interface ( ) combines the
Charged Particle Tracing interface with the Electrostatics interface. The Electric
Partile Field Interaction Multiphysics node is added automatically. The Particle
Field Interaction, Non-Relativistic interface is used to model beams of charged
particles at non-relativistic speeds. The particles generate a space charge density
term as they propagate through domains. The space charge density is then used as
a source term in the Electrostatics interface, and the resulting electric force on the
particles is computed. When used with the Bidirectionally Coupled Particle
Tracing study step, this interface allows beams of charged particles at constant
current to be simulated in a self-consistent manner.

P ARTICLE F IELD I NTERACTION , R ELATIVISTIC


The Particle Field Interaction, Relativistic interface ( ) combines the Charged
Particle Tracing, Electrostatics, and Magnetic Fields physics interfaces. The
Electric Particle Field Interaction and Magnetic Particle Field Interaction
Multiphysics coupling features are added automatically. The Relativistic
correction is automatically enabled in the Settings window for the Charged
Particle Tracing interface. The Particle Field Interaction, Relativistic interface is
used to model beams of relativistic charged particles.
As the particle speed becomes comparable in magnitude to the speed of light, the
self-induced magnetic force on a particle beam becomes similar in magnitude to
the self-induced electric force, whereas for slower (non-relativistic) beams the
magnetic force is often small enough to be neglected. The particles generate space
charge density and current density terms as they propagate through domains. The
space charge density and current density are then used to compute electric and
magnetic forces, respectively, which are exerted on the particles. Generally the
electric force causes a beam to diverge whereas the magnetic force has a focusing
effect. When used with the Bidirectionally Coupled Particle Tracing study step,
this interface allows beams of relativistic charged particles at constant current to
be simulated in a self-consistent manner. This physics interface requires both the
AC/DC Module and the Particle Tracing Module.

| 13
P ARTICLE TRACING FOR F LUID F LOW
The Particle Tracing for Fluid Flow interface ( ), found under the Fluid Flow
branch in the Model Wizard, computes the motion of particles in a background
fluid. Particle motion can be driven by built-in forces including drag, gravitational,
electric, magnetic, and acoustophoretic forces. User-defined forces can also be
added. It is also possible to compute the particle mass and temperature as well as
particle-particle interactions.

F LUID -P ARTICLE I NTERACTION


The Fluid-Particle Interaction ( ) interface combines the Particle Tracing for
Fluid Flow interface coupled with the Laminar Flow interface. The Fluid Particle
Interaction Multiphysics coupling feature is added automatically. The Fluid
Particle Interaction interface is used to model the motion of particles in a fluid. As
the particles are accelerated or decelerated by the drag force exerted by the fluid,
the corresponding reaction force is applied to the fluid. When used with the
Bidirectionally Coupled Particle Tracing study step, this interface allows the
interaction of streams of particles at constant mass flow rate with the surrounding
fluid to be simulated in a self-consistent manner.

D ROPLET S PRAYS IN F LUID F LOW


The Droplet Sprays in Fluid Flow interface ( ), found under the Fluid Flow
branch in the Model Wizard, is a special case of the Particle Tracing for Fluid Flow
interface that uses default settings and features that are frequently used to model
sprays of liquid droplets. This includes options to specify particle viscosity and
surface tension as well as a dedicated feature for modeling droplet breakup.

M ATHEMATICAL P ARTICLE TRACING


The Mathematical Particle Tracing interface ( ) gives access to the underlying
mathematical formalism on which the Charged Particle Tracing and Particle
Tracing for Fluid Flow interfaces are built. The Mathematical Particle Tracing
interface also allows for specification of particle motion in terms of either a
Lagrangian or Hamiltonian. Often it is easier to write down an expression for the
Lagrangian or Hamiltonian for particles rather than deriving the equations of
motion. The Hamiltonian formulation solves for both the particle position and the
particle momentum, so the number of degrees of freedom is doubled when the
Hamiltonian formulation is activated.

14 |
Boundary Conditions

The following options are available for the boundary conditions for particles when
they make contact with a wall: Bounce, Freeze, Stick, Disappear, Pass through,
Diffuse scattering, Mixed diffuse and specular reflection, and General reflection.
Some of the available options are illustrated in the figure below.

Demonstration of the Bounce, Freeze, Diffuse scattering, and Disappear Wall conditions.

The Freeze option (default) fixes the particle position and velocity at the instant a
wall is struck. So, the particle position no longer changes after contact with the
wall, and the particle velocity remains at the same value as when the particle struck
the wall. This boundary condition is typically used to recover the velocity or
energy distribution of charged particles at the instant contact was made with the
wall.
The Bounce option specularly reflects from the wall such that the particle
momentum is conserved. This option is typically used when tracing microscopic
particles in a fluid.
The Stick option fixes the particle position at the instant the wall is struck. The
particle velocity is set to zero. This can be used if the velocity or energy of the
particles striking a wall is not of interest.
The Disappear option means that the particle is not displayed once it has made
contact with the wall. This option should be used if display of the particle location
after contact with the wall is not of interest.
The Diffuse scattering option bounces particles off a wall according to Knudsen’s
cosine law. That is, the probability a particle bouncing off the surface in a given
direction within a solid angle dω is given by cos(q)dω, where q is the angle

| 15
between the direction of the particle and the wall normal. The total particle
momentum is conserved.
The Pass through option allows particles to cross boundaries unimpeded. By
combining this with other Wall conditions, it is possible to define boundaries that
filter particles based on their properties or with a given probability.
The Mixed diffuse and specular reflection condition is a combination of the
Bounce and Diffuse scattering conditions.
The General reflection option allows an arbitrary velocity to be specified after a
particle makes contact with the wall. This can either be done in Cartesian
coordinates or in the tangent-normal coordinate system. The velocity components
can be functions of the incident particle velocity, energy or any other quantity.
Note that the total momentum of the particle is not necessarily conserved with this
option.
The above boundary conditions for the particles striking the wall can be
conditional based on either an expression or a probability. The Probability option
applies the boundary condition with a certain probability. The Evaluation
expression option only applies the boundary condition if the expression evaluates
to something nonzero.

A conditional Pass through Wall condition can be used to filter particles based on properties such as
particle mass or diameter. Here the interior boundary blocks large particles but allows smaller particles
to pass through unimpeded.

Secondary Particles
Secondary particles can be introduced into the modeling domain when a primary
particle strikes the wall. It is possible to specify the Number of secondary particles
per incident particle as well as their initial velocity. The initial velocity can either
be User defined, Isotropic hemisphere, which releases the secondary particles with

16 |
a constant speed and hemispherical velocity direction with the north pole directed
in the normal direction away from the wall, or Reflection of primary particle.

Particle Release Mechanisms


There are several ways to release particles, either from a grid, by selecting specific
domains, or on specific boundaries. In each case the number of particles and the
release frequency can be specified. There are also specific options available for the
specific release features, described below.

R ELEASE F ROM A GRID


Particles can be released from a grid that can either be regular or graded. In
addition to the initial coordinates of the particles the initial velocity and times to
release the particles can be specified. There are also predefined initial velocity
distributions available to release particles with a Maxwellian, Isotropic spherical,
Isotropic hemispherical, Isotropic conical, or Lambertian distribution function.
Particles can either be placed at all combinations of the initial coordinates or only
at specified combinations of them.

The initial particle coordinates can be a list of values or expressions, like the sine curve shown above. At
each release point, a single particle can be released or particle velocities can be sampled from a
spherical, hemispherical, conical, or Maxwellian distribution.

R ELEASE F ROM A D OMAIN


Particles can be released from a domain according to the mesh associated with the
model geometry or according to an arbitrary expression.

| 17
When the particle release is Mesh based, there is an option to specify the
Refinement factor. The higher this factor, the more particles are released from
within each mesh element. When the particle release is Density based, the release
of particles is weighted according to a user-defined expression. This is the most
flexible option for releasing particles because the weighting function can be an
analytic expression, a random function, or even the solution to a partial differential
equation. The Random option allows the initial position of the particles to be
chosen at random. New random positions are chosen for each release time.

The mesh-based release uses the mesh element centers to initialize particle positions (right). A
density-based release can be used to release particles with a user-defined position distribution, such as
a bi-Gaussian distribution (center). The random release gives particles random initial positions on the
selected domains (right).

I NLET
The Inlet feature allows for particles to be released from boundaries. Both release
options for the Release from domain feature are available, as well as an additional
option to release particles uniformly from a selected boundary.

P ARTICLE B EAM
The Charged Particle Tracing interface includes a dedicated feature for releasing
ion and electron beams. You can specify quantities such as the beam emittance and
Twiss parameters to characterize the particle position and velocity distributions.
When the Particle beam is used, quantities such as beam emittance are
automatically computed along the nominal beam trajectory and are available for
postprocessing.

18 |
A beam of electrons is focused by a magnetic lens (left). The beam emittance can then be plotted as
the thickness and color along the nominal beam path (right).

R ELEASE F ROM E DGES AND POINTS


The Release from Edge feature can be used to release particles along edges in a 3D
geometry. Similarly, the Release from Point feature can be used to release particles
from selected points in the geometry.
When releasing particles along edges, particle positions can be mesh-based,
weighted by a user-defined density, or uniformly distributed along the edges.

Using the Release from Edge feature, particles can be released from positions along arbitrary curves,
such as the helix shown above.

| 19
N OZZLE
The Particle Tracing for Fluid Flow interface includes dedicated features for
releasing a spray of droplets as if they were injected by a nozzle.
You can specify the initial speed of the droplets directly, using the mass flow rate,
or based on the injection pressure and ambient pressure.
You can enter the spray angle directly or use a built-in expression to compute it
based on Kelvin-Helmholtz instability analysis.

R ELEASE FROM D ATA F ILE


The Release from Data File feature allows the initial positions of particles to be
specified by selecting columns from an imported text file. The initial velocity can
also be read from the text file. If any Auxiliary Dependent Variable nodes are
present, the initial values of auxiliary dependent variables can also be imported
from the file.

20 |
Modeling Tools

The Particle Tracing Module provides a wide range of specialized modeling tools
to assist in extracting specific quantities of interest.

Special Variables
The particle tracing interfaces define a number of special variables, some of which
can only be used during results processing. These variables can be found in the
Particle statistics list during results processing, as shown below:

An example of variables available from the particle statistics menu and available with the Mathematical
Particle Tracing interface.

The following variables are defined:


• Particle index. Each particle is assigned a unique index starting from 1 up to
the total number of particles. This expression can be passed into a function,
which can create, for example, random forces that are unique for each
particle.
• Particle release feature. If there are multiple release features in a model, it is
useful to be able to visualize how the particles mix together based on their
initial release position. The Particle release feature variable takes a numeric
value, starting at 1, which is unique to each release feature.

| 21
• The release time of a given particle. This works for both primary and
secondary particles and thus allows for extraction of the time at which
particles were released into the modeling domain.
• The time at which a particle stopped at a boundary. Using the difference
between the release time and stop time, it is easy to compute the residence
time of each particle.
There are also variables that are only available during results processing and can
only be evaluated using the Global Evaluation node under Derived Values.
• Total number of particles. The total number of particles released may not be
known in advance, especially in models that include secondary particle
emission.
• Total number of particles in selection. If a selection has been applied to the
Particle data set, the number of particles in that selection can be evaluated.
• Transmission probability. Often the transmission probability is the main
quantity of interest in a particle tracing model. The Transmission probability
variable is available on domains, boundaries, or combinations of both.

Monte Carlo Modeling


It is possible to add forces on particles which are stochastic. In the Particle Tracing
for Fluid Flow interface, the Drag Force and Brownian Force features potentially
include random contributions. When these features are included in a model, it
may be necessary to solve the problem multiple times and take some kind of
statistical average of the results. Each time the model is solved, a new set of
random numbers, which are used to compute the force, should be generated.
The arguments to random number generators can either be generated based on
the position of each physics feature in the Model Builder, randomly generated, or
based on user-defined expressions. This allows, for example, distinct sets of
solution data to be computed by using a parametric sweep over the argument to
the random number generator.
All three particle tracing interfaces contain a velocity Reinitialization feature. This
allows for general purpose Monte Carlo modeling, since the velocity vector can be
discretely changed at each timestep according to some logical expression. It is also
possible to release secondary particles whenever the particle velocity is
reinitialized.
The Charged Particle Tracing interface includes dedicated features based on the
Velocity Reinitialization feature that can be used to model collisions between
particles and a rarefied background gas. The Collisions node is used to introduce
random collisions into the application. The type of collision, such as Elastic or
Ionization, can be specified by adding the appropriate subnodes to the Collisions

22 |
node. If a collision should occur, the charged particle has its velocity vector
reinitialized according to one of the subnodes to the Collisions node. Any number
of collisions can be included in a single application. There are also built-in options
to define variables to count collisions with each background species.

Brownian motion of particles that are released from a single point. They diffuse outwards. Top left t = 0 s,
top right t = 10 s, lower left t = 30 s, and lower right t = 100 s.

Auxiliary Dependent Variables and Residence Time


Auxiliary dependent variables can be used to help keep track of things like
residence time, particle trajectory length, integrated shear rate and so forth. When
an Auxiliary Dependent Variable feature is added to the physics interface a
first-order additional ordinary differential equation (ODE) is solved for each
particle. This equation can be integrated either over time or along the particle
trajectories.
The residence time can also be computed in a different way, by setting the Store
particle status data property to On. This creates variables for the particle release

| 23
time and the particle stop time (the time when a particle left the modeling
domain). The residence time is then simply the difference between the two.

Particle Counters
Particle counters can be added to domains or boundaries in order to provide
information about particles arriving on the set of selected domains or surfaces. It
is possible to analyze the transmission of all particles or only those particles that
are released by a specific feature. The Particle Counter computes quantities such
as the number of particles transmitted, transmission probability, transmitted
current, mass flow rate etc. The feature provides convenient expressions that can
be used in the Filter node of the Particle Trajectories Plot, which allows only the
particles which reach the Particle Counter selection to be visualized.

R e s u l t s P ro c e s s i n g To o l s

Particle Data Set


The Particle data set is automatically created when solving a model containing
one of the Particle Tracing Module physics interfaces, provided that the Generate
default plots option is selected in the Study. Selections may be added to the
Particle data set which allow, for example, the number or fraction of particles in a
given domain or on a given boundary to be computed during results processing.

Particle Trajectories Plots


A Particle Trajectories plot is available in both 2D and 3D . It is created
automatically when a Study solving for a particle tracing interface is computed.
There are options to set the particle trajectories to be rendered as Lines or Tubes.
It is also possible to render the particles as points, comet tails, arrows, or with a
number of ellipses along each trajectory. For models where the number of output
times is small, an interpolation option is available that will create smoother looking
particle trajectory plots.

24 |
The trajectory of an ion in a uniform magnetic field is plotted with no interpolation (left) and with
interpolation (right).

Filters
Visualizing the trajectory of systems with a very large number of particles can
consume a lot of computer resources and often particles obscure one another. It
is possible to filter the type of particle and the number of particles which should
be rendered. To do this, right click the Particle Trajectories plot type and choose
Filter.
The Particle type can be set to render Primary particles, Secondary particles, All,
or a Logical expression.
If particles are obscuring one another or the burden on the graphics card is very
high, the number of particles rendered can be reduced by changing the Particles
to render option. A Fraction of the total number of particles to render or the total
Number of particles to render can be set.

Particle trajectories in a micromixer (left). It is possible to render only a fraction of the particles (middle)
and to plot only the particles that are released by a certain inlet using a logical expression (right).

| 25
P ARTICLE P LOTS
A Particle plot can be used to observe the value of a particle property over
time. Built-in data series operations can be used, for example, to compute the sum
or maximum of an expression over all particles.
Alternatively, the Particle plot can be used to compare two particle properties
against each other for all particles at a set of selected time steps.

Rössler attractor: The three coupled differential equations of a Rössler system are solved for a number of
different initial conditions. The average particle speed is plotted as a function of time. The color expression
indicates the average z-coordinate.

Poincaré Maps and Phase Portraits


Poincaré maps are available in both 2D and 3D . This plot type is useful to
visualize the particle trajectories in a plot that represents the position of the
particles in a section that is usually transversal to the particle trajectories. The
Poincaré map represents the particle trajectories in a space dimension that is one
dimension lower than the original particle space.

26 |
The Phase Portrait can be found under More Plots in the context menu.

Phase portraits are available as a 2D plot type under More Plots. Use a Phase
Portrait plot to visualize large data sets of particle trajectories. The traditional use
of a phase portrait is to plot the particle position on the x-axis and the particle
velocity on the y-axis. Each dot in the xy-plane represents a particle.

Particle Evaluation
Information about expressions and variables along particle trajectories can be
written to the Results Table using the Particle Evaluation option under
Derived Values. Once the data has been written to the results table it can be
manipulated and plotted accordingly. There are options to only write data to the
table for a fraction or a specific number of particles.

| 27
Operations on Particle Data
It is possible to set the source data set for the Integration , Average ,
Maximum , and Minimum to be a Particle data set. This allows
operations to be performed on the particle data set, to compute average particle
velocity, maximum energy, and so on.

Histograms
Statistical information about the behavior of the particles is often best visualized
with a histogram. The histogram sorts the value of a variable into a specified
number of bins. The most obvious application of the histogram is that it allows for
visualization of the velocity and energy distribution function of a set of particles.

Information about the ion energy distribution function in a plasma can be visualized using a 2D
Histogram.

28 |
Computing Particle Trajectories through a Laminar Static
Mixer

This section takes you through the modeling stages of computing particle
trajectories based on a computed velocity field. In static mixers, also called
motionless or in-line mixers, a fluid is pumped through a pipe containing
stationary blades. This mixing technique is particularly well suited for laminar flow
mixing because it generates only small pressure losses in this flow regime. This
example studies the flow in a twisted-blade static mixer. It evaluates the mixing
performance by calculating the trajectory of suspended particles through the
mixer.

M o d e l W i z a rd

Note: These instructions are for the user interface on Windows but apply, with
minor differences, also to Linux and Mac.
1 To start the software, double-click the COMSOL icon on the desktop. When
the software opens, you can choose to use the Model Wizard to create a new
COMSOL model or Blank Model to create one manually. For this tutorial, click
the Model Wizard button.
If COMSOL is already open, you can start the Model Wizard by selecting
New from the File menu and then click Model Wizard .
The Model Wizard guides you through the first steps of setting up an
application. The next window lets you select the dimension of the modeling
space.

| 29
2 In the Select Space Dimension window click the 3D button .
3 In the Select Physics tree under Fluid Flow>Single-Phase Flow, click Laminar
Flow .
4 Click Add then click the Study button.
5 In the tree under Preset Studies, click Stationary .
6 Click the Done button.

Global Definitions and Definitions

1 On the Home toolbar click Parameters .


Note: On Linux and Mac, the Home toolbar refers to the specific set of controls
near the top of the Desktop.
2 In the Settings window locate the Parameters section.
3 In the table, enter the following settings:

Geometr y

The mixer geometry is quite complicated so start by importing it from a file.


1 On the Home toolbar click Import .
2 In the Settings window Import section. Click Browse.
3 Browse to the application library folder and double-click the file
laminar_mixer_particle.mphbin. The location of the files used in this
exercise varies based on your installation. For example, if the installation is on
your hard drive, the file path might be similar to C:\Program
Files\COMSOL\COMSOL53\Multiphysics\applications\.
4 Click Import. The geometry is imported to the Graphics window.
5 Click the Wireframe Rendering button on the Graphics toolbar. The
geometry appears in the Graphics window as shown below.

30 |
Mate rials

1 On the Materials toolbar click Blank Material .


2 In the Settings window for Material locate the Material Contents section. In the
table, enter the following settings:

P hy s i c s I n t e r fa c e s

Now add an expression for the inflow velocity which is parabolic.


1 On the Physics toolbar click Boundaries and choose Inlet .
2 Select Boundary 23 only.
Note: To add geometric entities to a selection, click on them in the Graphics
window. Alternatively, Click Paste Selection and enter a list of numbers
corresponding to the entities to select. Here, Boundary 23 is at the end of the
modeling domain where the y-coordinate reaches its maximum value.

| 31
3 In the Settings window for Inlet locate the Velocity section. In the U0 text field,
type 2*(1-(x^2+z^2)/Ra^2)*u_av.
Note: The boundary condition, which was just added, is rather complicated but
necessary to get a fully developed flow profile. The CFD, Microfluidics, and
Plasma Modules all have a special Laminar Inflow boundary conditions that
ensures laminar flow. It is not necessary to enter a complicated expression for the
velocity profile, just the average velocity of flowrate.
4 On the Physics toolbar click Boundaries and choose Outlet .
5 Select Boundary 20 only. This is the surface opposite Boundary 23 which was
selected for the Inlet boundary condition.

Me sh

The mesh needs to be quite fine to ensure that the particle motion is accurate
through the modeling domain. In this case, take care to ensure that the mesh is
fine on the mixing blades.
1 In the Model Builder right-click Mesh 1 and choose More Operations>Free
Triangular .
2 Select Boundaries 5, 16–18, and 53–55 only.
3 Right-click Free Triangular 1 and choose Size .
4 In the Settings window for Size locate the Element Size section.
- From the Calibrate for list, choose Fluid dynamics.
- From the Predefined list, choose Extremely fine.
5 Click the Size node above the Free Triangular node.
6 In the Settings window for Size locate the Element Size section.
- From the Predefined list, choose Extremely fine.
- Click the Custom button.
- Locate the Element Size Parameters section. In the Curvature factor text
field, type 0.15. The curvature factor is used to refine the mesh on curved
surfaces while allowing the mesh to be somewhat coarser on planar surfaces.
7 Right-click Mesh 1 and choose More Operations>Free Triangular .
8 Select Boundary 23 only.

32 |
9 Right-click Free Triangular 2 and choose Size .
- In the Settings window for Size locate the Element Size section. From the
Calibrate for list, choose Fluid dynamics.
- From the Predefined list, choose Extra fine.
10Right-click Mesh 1 and choose Free Tetrahedral .
11Click Build All .

Study

1 On the Home toolbar click Compute .

M o d e l W i z a rd

Now that the fluid velocity has been computed, add a physics interface and a new
study to compute the particle trajectories.
1 On the Home toolbar click Add Physics .
2 Go to the Add Physics window. In the Add Physics tree under Fluid Flow
expand Particle Tracing and click Particle Tracing for Fluid Flow .
3 Find the Physics interfaces in study subsection. In the Solve column, deactivate
Study 1 by clicking on the check box containing the green check . The check
box will be cleared indicating that this physics interface is not solved in
Study 1. This subsection then looks like the following:

4 Click the Add to Component button.


5 On the Home toolbar click Add Study .
6 Go to the Add Study window. Find the Studies subsection. In the tree under
Preset Studies, click Time Dependent .
7 Find the Physics interface in study subsection. In the table, click on the green
check next to the Laminar Flow interface so that this subsection looks like
the following:

8 Click the Add Study button.

| 33
9 On the Home toolbar click the Add Physics and Add Study buttons to
remove the corresponding windows from view.

P hy s i c s I n t e r fa c e s

1 On the Physics toolbar click Domains and choose Drag Force .


2 Select Domain 1 only.
3 In the Settings window for Drag Force locate the Drag Force section.
- The default Drag law is Stokes. There are other drag laws available, such as
Schiller-Naumann, but Stokes drag is appropriate in this case because the
particles are small enough that their velocities relative to the moving fluid
remain very small, so their relative Reynolds number is much less than 1.
- From the u list, choose Velocity field (spf/fp1).
- From the μ list, choose Dynamic viscosity (spf/fp1).
The goal is to release particles so that they are more dense where the magnitude
of the velocity field is higher. To do this you use the Density option for the
particles’ Initial Position.
4 On the Physics toolbar click Boundaries and choose Inlet .
5 Select Boundary 23 only.
6 In the Settings window for Inlet locate the Initial Position section.
- From the Initial position list, choose Density.
- In the N text field, type 3000.
- In the ρ text field, type spf.U.
- Locate the Initial Velocity section. From the u list, choose Velocity field (spf).
7 On the Physics toolbar click Boundaries and choose Particle Counter .
Note: The Particle Counter is used to compute the transmission probability of
particles through the mixer. Alternatively, it is possible to compute the
transmission probability in postprocessing by assigning a Selection to the
Particle data set.
8 Select Boundary 20 only.
9 In the Settings window for Particle Counter locate the Particle Counter section.
10From the Release feature list, choose Inlet 1.
11In the Model Builder under Particle Tracing for Fluid Flow, click Particle
Properties 1 .

34 |
12In the Settings window for Particle Properties locate the Particle Properties
section. In the dp text field, type 5E-7[m].

Study 2

1 In the Model Builder expand the Study 2 node and click Step 1: Time
Dependent .
2 Expand the Values of Dependent Variables section. From the Settings list,
choose User controlled.
3 From the Method list, choose Solution.
4 From the Study list, choose Study 1, Stationary.
5 Locate the Study Settings section. Click the Range button .
6 Go to the Range dialog box.
- In the Step text field, type 0.2.
- In the Stop text field, type 5.

| 35
7 Click the Replace button. The Settings window should look like this:

8 On the Home toolbar click Compute .

Results

By default you end up in the settings window for the Particle Trajectories (fpt)
node when the study is complete.
1 In the Settings window for Particle Trajectories Locate the Color Legend
section.
2 From the Position list, choose Bottom.
3 In the Model Builder expand the Particle Trajectories (fpt) node then click
Particle Trajectories 1 .

36 |
4 In the Settings window for Particle Trajectories locate the Coloring and Style
section.
- Find the Line style subsection. From the Type list, choose Line.
- Find the Point style subsection. From the Type list, choose None.
5 In the Model Builder expand the Results>Particle Trajectories (fpt)>Particle
Trajectories 1 node and click Color Expression 1 .
6 In the Settings window for Color Expression click Replace Expression in
the upper-right corner of the Expression section. From the menu, choose
Model>Component 1>Laminar Flow>Velocity and pressure>spf.sr – Shear rate.
7 Click the Plot button .
8 Click Zoom Extents in the Graphics toolbar.

Now evaluate the transmission probability using the Particle Counter that was
created earlier.
1 On the Results toolbar click Global Evaluation .
2 In the Settings window for Global Evaluation locate the Data section.
- From the Data set list, choose Study 2/Solution 2 (sol2).
- From the Time selection list, choose Last.

| 37
3 Click Replace Expression in the upper-right corner of the Expression
section. From the menu, choose Model>Component 1>Particle Tracing for
Fluid Flow>Particle Counter 1>fpt.pcnt1alpha – Transmission probability.
4 Click the Evaluate button . The transmission probability should be
about 0.8.

Poincaré Plot
One useful way of visualizing how particles mix is to use a Poincaré plot. The
Poincaré plot places a colored dot for each particle at the location at which the
particle passes through a cut plane (known as a Poincaré section).
1 On the Results toolbar click Cut Plane .
2 In the Settings window for Cut Plane locate the Data section. From the Data
set list, choose Particle 1.
3 Locate the Plane Data section.
- From the Plane list, choose xz-planes.
- In the y-coordinates text field, type 0.006.
- Select the Additional parallel planes check box.
- In the Distances text field, type 0.006 0.016 0.026 0.036 0.042.
4 Click the Plot button .
The cut planes will be shown in the Graphics window.

Poincaré Map
1 On the Home toolbar click Add Plot Group and choose 3D Plot
Group .
2 In the Settings window for 3D Plot Group locate the Data section. From the
Data set list, choose Particle 1.
3 Locate the Color Legend section. From the Position list, choose Bottom.
4 On the 3D Plot Group 4 toolbar, click More Plots and choose Poincaré
Map .
5 Click Poincaré Map 1 . In the Settings window for Poincaré Map locate the
Data section. From the Cut plane list, choose Cut Plane 1.
6 Locate the Coloring and Style section.
- Select the Radius scale factor check box.
- In the associated text field, type 6E-5.
7 Click the Plot button .
8 Right-click Poincaré Map 1 and choose Color Expression .

38 |
9 In the Settings window for Color Expression locate the Expression section. In
the Expression text field, type at(0,qx<0).
10Locate the Coloring and Style section. Clear the Color legend check box.

Surface Plot
1 Click 3D Plot Group 4 and on the 3D Plot Group 4 toolbar click
Surface .
2 In the Settings window for Surface locate the Data section. From the Data set
list, choose Cut Plane 1.
3 Locate the Expression section. In the Expression text field, type 1.
4 Locate the Coloring and Style section.
- From the Coloring list, choose Uniform.
- From the Color list, choose Gray.
5 Click the Go to Default 3D View button on the Graphics toolbar.
6 Click the Plot button .

In the above figure, the location of the particles at 6 Poincaré sections are shown.
The color represents the location of the particle at its initial position. So, particles
marked as red had an initial position of x < 0 and particles marked as blue had an
initial position of x > 0. The at() operator is used to mark the particles with the
color of their initial position. The first Poincaré section (the one furthest to the

| 39
left in the above figure) clearly indicates which particles start with coordinates of
x < 0. As the particles begin to follow the flow field, they begin to mix together.
By the end of the mixer, the particles have not mixed completely—there are still
significant pockets of only red and only blue particles.

40 |

You might also like