Advanced Modeling Tools
The Particle Tracing Module provides a wide range of specialized modeling tools to assist in extracting specific quantities of interest.
Particle Statistics
The particle tracing interfaces define a number of special variables, some of which can only be used during results processing. These variables include information about the overall population of particles in the model.
These variables are categorized as particle statistics and release statistics. Some are described below. The variable names are given assuming that the physics interface is an instance of the Mathematical Particle Tracing interface with tag pt. When using the Charged Particle Tracing interface, for example, replace pt with cpt.
The following variables are defined for each particle:
Particle index pt.pidx. Each particle is assigned a unique index starting from 1 up to the total number of particles. This expression can be used as an input argument to a function. For example, randomnormal(pt.pidx) would sample pseudorandom numbers from a normal distribution with unit variance. The random numbers would be distinct for each particle.
Particle release feature pt.prf. 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. Particles from each release feature are assigned a unique integer corresponding to that feature, starting at 1.
Release time pt.rti. This indicates when each particle first enters the modeling domain. It works for both primary and secondary particles.
Stop time pt.st. 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 pt.Nt. This includes primary and secondary particles, those that have not been released and those that have disappeared.
Total number of particles in selection pt.Nsel. If a selection has been applied to the Particle dataset, the number of particles in that selection can be evaluated.
Transmission probability pt.alpha. Often the transmission probability is the main quantity of interest in a particle tracing model. As with the number of particles in selection pt.Nsel, the Particle dataset should be assigned a selection consisting of a set of domains or boundaries in the model.
Auxiliary Dependent Variables and Residence Time
Auxiliary dependent variables can be used to help keep track of quantities like residence time, particle trajectory length, and integrated shear rate along each particle’s path. 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 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, and so on. 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.
Velocity Reinitialization in Domains
It is possible to stop a particle or change its velocity when a specified logical expression is satisfied, even if the particle is not in contact with a boundary. For example, particles can be made to disappear after a certain amount of time, or to change direction if their z-coordinate exceeds a specified value. These interactions can also cause the emission of secondary particles; for example, a particle can be made to split into two or more smaller particles if its mass exceeds a threshold.
Computing Sum, Average, Maximum, and Minimum
Each particle tracing physics interface defines nonlocal couplings to compute the sum, maximum, minimum, and average of an expression over all particles. For example, when using the Mathematical Particle Tracing interface with default name pt, the expression for the total sum of all particles would be pt.sum(pt.mp), whereas the average particle speed would be pt.ave(pt.V). The couplings can easily be evaluated using the Global Evaluation node, or plotted as a function of time using the Global plot in a 1D Plot Group.