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 plot group during results processing.
All of the variables described in this section are preceded by the physics interface identifier: usually pt, cpt, or fpt. For example, the particle index variable defined by The Mathematical Particle Tracing Interface would be called pt.pidx, whereas for The Particle Tracing for Fluid Flow Interface it would be called fpt.pidx. If multiple instances of the physics interface exist, the additional instances are followed by a number, for example, pt and pt2.
The following variables are defined:
Particle index, pidx. 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. Suppose a random function has already been defined with name rn1, which takes 2 input arguments. Then a random force can be constructed with the expression rn1(pidx,t).
Particle release feature, 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. The Particle release feature variable takes a numeric value, starting at 1, which is unique to each release feature.
See Particle Tracing in a Micromixer: Application Library path CFD_Module/Particle_Tracing/micromixer_particle_tracing.
Particle release time, prt. Since particles can be released at arbitrary points in time, it is often useful to visualize at what time a specific particle was released. The Particle release time is only available for primary particles, not those released due to secondary emission.
If the Store particle status data check box is selected in the physics interface Additional Variables section, then the following additional variables are created:
The release time of a given particle rti. This works for secondary particles and thus allows for extraction of the time at which a secondary particle was released.
The final status of the particle 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:
-
-
-
-
-
The status of the particle particlestatus (with no scope). This indicates the current status of each particle. The value is an integer with the same meaning as the final status of the particle. When the Store particle status data check box is cleared, the variable particlestatus exists while computing particle trajectories, so it can be used in weak expressions defined on the particles, but cannot be used during postprocessing.
 
The following variables are global and can therefore be evaluated using the Global Evaluation node under Derived Values. They do not have unique values for each particle.
Total number of particles, Nt. This total includes both primary and secondary particles, and includes particles that have disappeared or have not been released.
Total number of particles in selection, Nsel. If a selection has been applied to the Particle dataset, the number of particles in that selection can be evaluated.
Transmission probability, alpha. Often the transmission probability is the main quantity of interest in a particle tracing model. The transmission probability is usually computed by dividing the total number of particles which reach an outlet by the number of particles released at an inlet. The Transmission probability variable is much more general, and can be used on domains, boundaries, or combinations of both.
Particle Trajectories in a Laminar Static Mixer: Application Library path Particle_Tracing_Module/Fluid_Flow/laminar_mixer_particle
Brownian Motion: Application Library path Particle_Tracing_Module/Verification_Examples/brownian_motion
The following variables are found in the Release statistics plot group during results processing:
Total number of particles released by feature, <tag>.Ntf, where <tag> is the tag of a particle release feature, such as the Release, Inlet, or Release from Grid feature. This global variable is uniquely defined for each release feature, and gives the total number of particles that are released by that feature. This includes particles that have not yet been released and particles that have disappeared or become frozen or stuck due to collisions with walls. It does not include any secondary particles.
Release frequency, <tag>.frel (SI unit: Hz), where <tag> is the tag of a particle release feature. This variable appears when the Particle release specification in The Charged Particle Tracing Interface or The Particle Tracing for Fluid Flow Interface is set to Specify current or Specify mass flow rate respectively, and yields the number of physical particles per model particle per second which must be released in order to generate the user defined Release current magnitude or Mass flow rate, respectively.
Release frequency, frel (SI unit: Hz). This variable also appears when the Particle release specification is set to Specify current or Specify mass flow rate, and is defined for every particle, yielding the release frequency of the feature which produced that particle.
Release current magnitude, <tag>.rc (SI unit: A). This variable is available when the Particle release specification in The Charged Particle Tracing Interface is set to Specify current, and yields the magnitude of the release current at the release feature identified by <tag>.
Mass flow rate, <tag>.mdot (SI unit: kg/s). This variable is available when the Particle release specification in The Particle Tracing for Fluid Flow Interface is set to Specify mass flow rate, and yields the mass flow rate at the release feature identified by <tag>.