The Mathematical Particle Tracing Interface
The Mathematical Particle Tracing (pt) interface (), found under the Mathematics branch () when adding a physics interface, computes the trajectories of particles through a geometry. The particle motion is usually driven by external fields. The particles can be massless or have their motion determined by Newton’s second law. You can also specify a Hamiltonian or Lagrangian to dictate the motion of the particles.
When this physics interface is added, these default nodes are also added to the Model Builder: Wall and Particle Properties. Then, from the Physics toolbar, add other nodes that implement, for example, boundary conditions and particle release features. You can also right-click Mathematical Particle Tracing to select physics features from the context menu.
Settings
The Label is the default physics interface name.
The Name is used primarily as a scope prefix for variables defined by the physics interface. Refer to such physics interface variables in expressions using the pattern <name>.<variable_name>. In order to distinguish between variables belonging to different physics interfaces, the name string must be unique. Only letters, numbers, and underscores (_) are permitted in the Name field. The first character must be a letter.
The default Name (for the first physics interface in the model) is pt.
Particle Release and Propagation
Use the settings in this section to control how particles are released and how the particle trajectories are stored in the solution.
Formulation
Select a Formulation: Newtonian (the default), Newtonian, first order, Lagrangian, Massless, or Hamiltonian. This selection changes the equations of motion that are solved for the particles. It affects the inputs for the Particle Properties node. For Newtonian or Newtonian, first order a Force node can also be added to the model.
In The Charged Particle Tracing Interface and The Particle Tracing for Fluid Flow Interface, only Newtonian, Newtonian, first order, and Massless are available. Most built-in forces require one of the Newtonian formulations.
 
Relativistic Correction
If Newtonian or Newtonian, first order is selected from the Formulation list, the Relativistic correction check box is available but by default it is not selected. If you select the check box, then the formulation is applicable for particles with very high speed, meaning you can take relativistic effects on the particle mass into account. The particle mass mp (SI unit: kg) is then computed as
where mr (SI unit: kg) is the rest mass, v (SI unit: m/s) is the particle velocity, and c = 2.99792458 × 108 m/s is the speed of light in a vacuum.
Store Extra Time Steps for Wall Interactions
Typically, the exact times at which particle-wall interactions occur do not coincide with time steps taken by the solver. This does not actually affect the accuracy of the solution, but it can lead to misleading-looking plots when the boundaries reflect particles, because the particle may appear to change direction at a finite distance from the wall, instead of while hitting the wall.
Select the Store extra time steps for wall interactions check box to plot the solution at extra time steps, in addition to the specified time steps in the output of the time-dependent solver. Typically these additional time steps are close to times at which the particles hit walls.
For an illustration of the effect of the Store extra time steps for wall interactions check box, see Improving Plot Quality in the Modeling Tools section.
Maximum Number of Secondary Particles
Some physics features, such as the Secondary Emission subnode for the Wall boundary condition, release additional particles other than those that are specified by particle release features. These particles are called secondary particles because they are created as a result of an existing particle interacting with a domain or boundary feature. The memory for all secondary particles must be preallocated when beginning the study.
The Maximum number of secondary particles field ensures that sufficient memory for all of the secondary particles is preallocated. It also prevents an inordinate number of particles from being generated by capping them at the number supplied in the field. The default value is 10,000.
If no sources of secondary particles such as Secondary Emission nodes are present, no unreleased secondary particles are created. If at least one feature is capable of emitting secondary particles, degrees of freedom are allocated for the total number of particles entered in the Maximum number of secondary particles text field, even if some of these particles are never released.
Additional Variables
Use the settings in this section to determine what additional information is stored in the solution while computing the particle trajectories, such as information about the status of each particle and the entity that released it.
Store Particle Status Data
By default the Store particle status data check box is not selected. When selected it adds new variables for quantities that cannot necessarily be recovered from the particle trajectory data alone. This is especially true if automatic remeshing has been used in a model. The following variables are created:
The final status of the particle (variable name fs). This indicates the status of a particle at a given point in time. When used during postprocessing, the value always indicates the status of the particle at the last time step. The value is an integer which has one of the following values:
-
-
-
-
-
In addition, the particle status (variable name particlestatus, with no scope) can be used during postprocessing. This variable is always defined while computing the particle trajectories, but its value is only stored if the Store particle status data check box is selected.
To summarize the total number of particles having each final status, the following global variables are also defined.
The global variable names in Table 3-1 all take the unreleased secondary particles into account. For example, suppose an instance of the Mathematical Particle Tracing interface includes 100 primary particles and 100 allocated secondary particles. At the last time step, suppose that 80 of the primary particles have stuck to boundaries and that 40 secondary particles have been emitted, all of which are still active. Then the variable pt.fac, the fraction of active particles at the final time step, would have the value (20 40)/(100 + 100) or 0.3.
The Store particle status data check box should always be selected if Automatic remeshing or Adaptive mesh refinement is used in the study.
Store Particle Release Statistics
By default the Store particle release statistics check box is not selected. When selected it adds a new internal variable called releaseindex to identify the release feature that creates each particle. Every node that is capable of releasing particles, including secondary particles, is associated with a unique positive integer based on its position relative to other nodes in the Model Builder.
When this check box is cleared, the variable <scope>.prf can still be used to identify the release feature that creates each particle, but this variable does not account for secondary particle emission.
Advanced Settings
This section is only shown when Advanced Physics Options are enabled (click the Show More Options button () on the Model Builder toolbar, and select Advanced Physics Options in the Show More Options dialog box).
Wall Accuracy Order
The Wall accuracy order sets the accuracy order of the time stepping used for time steps during which a particle-wall interaction happens:
Order 1 means that a forward Euler step is used to compute the motion both before and after the wall collision.
Order 2 (the default) means that a second-order Taylor method is used to compute the motion before the wall collision. After the collision a second-order Runge-Kutta method is used.
The Wall accuracy order also controls the time stepping that is used when particles are released during a time step taken by the solver.
Reuse Particle Degrees of Freedom
Select an option from the Reuse particle degrees of freedom list: None (the default), All disappeared particles, or Disappeared secondary particles only.
This setting controls how degrees of freedom are allocated for the emitted secondary particles in the model. If None is selected, then no particle degrees of freedom can be recycled; once any particle disappears, the corresponding dependent variables can no longer change.
If All disappeared particles is selected, then the degrees of freedom for any particle that has disappeared can be used later to release a new secondary particle. In this way, it is possible to set up a model in which a very large number of secondary particles are emitted over a long period of time, with the total number of secondary particles released exceeding the Maximum number of secondary particles specified in the Particle Release and Propagation section, as long as the rate of secondary particle emission does not exceed the rate of particle annihilation.
If Disappeared secondary particles only is selected, then only the preallocated secondary particle degrees of freedom can be recycled. Once a primary particle disappears, its degrees of freedom can no longer be used.
For example, consider a model in which 500 particles are released and the Maximum number of secondary particles is 100. If None is selected, then secondary particles can only be released in the model up to 100 times, no matter what happens to any of the particles in the model. If All disappeared particles is selected, then it is possible for more than 100 secondary particles to be active in the model at a later time, as long as some of the primary particles have disappeared in order to make their degrees of freedom available. If Disappeared secondary particles only is selected, then more than 100 secondary particles may be emitted during the course of the simulation, but no more than 100 secondary particles can exist at any one time.
If the option All disappeared particles is selected, then some built-in static variables will not always give correct results. For example, the particle statistics for release time, stop time, and final status, which are generated by selecting the Store particle status data check box in the Additional Variables section, may give incorrect information at some solution times when the degrees of freedom are reused.
Arguments for Random Number Generation
Select an option from the Arguments for random number generation list: Generate unique arguments, Generate random arguments, or User defined. This setting determines how the additional argument to random functions is defined in features such as the Wall boundary condition with the Diffuse scattering wall condition and the Brownian Force in The Particle Tracing for Fluid Flow Interface. Typically the random numbers are functions of the particle index, position, time, and another argument i, which is defined as follows:
For Generate unique arguments the additional argument is based on the position of each node in the Model Builder. As a result, random numbers generated in different nodes are created independently of each other, but the same result can be reproduced by running the same study several times.
For Generate random arguments the additional argument is randomly created.
For User defined the additional argument is defined by a user input in the Settings window each feature. Independent solutions can be obtained by running a parametric sweep for different values of i.
Maximum Number of Wall Interactions per Time Step
Enter a value for the Maximum number of wall interactions per time step. The default value is 1000. If a particle undergoes more than the specified number of boundary interactions or velocity reinitializations in a single time step taken by the solver, the particle will disappear. This is included as a safeguard to prevent particles from getting stuck in infinite loops if the time between successive particle-wall interactions becomes infinitesimally small.
Dependent Variables
The dependent variables (field variables) are the Particle position, Particle position components, Particle momentum, Particle momentum components, Particle velocity, and Particle velocity components. Note that not all of these dependent variables are needed for every formulation of the equations of motion; for example, the field variable names for Particle momentum and Particle momentum components are only used if Hamiltonian is selected from the Formulation list. The names can be changed but the names of fields and dependent variables must be unique within a model.
Rössler Attractor: Application Library path Particle_Tracing_Module/Tutorials/rossler_attractor
Ion Cyclotron Motion: Application Library path: Particle_Tracing_Module/Charged_Particle_Tracing/ion_cyclotron_motion