Particle Tracing
Use a Particle Tracing plot to visualize the trajectory of a massless particle subject to a flow field in 2D () or 3D (). Visualize pathlines (that is, trajectories of particles released in a flow field), which can be time-dependent or static. For time-dependent flows, also use a snapshot in time of the flow field as a static field. The motion of the particles does not affect the flow field. Add a Color Expression or Deformation subnode as needed. Right-click a 2D Plot Group or 3D Plot Group to add these plot types from the More Plots submenu.
Go to Common Results Node Settings for links to information about these sections: Data, Expression, Title, Coloring and Style, Quality (Resolution and Recover only), and Inherit Style. See below for sections specific to this plot: Particle Positioning, Release, Quality (ODE solver settings), and Advanced. For Particle Tracing plots, only Solution data sets are allowed as inputs.
There is an additional setting under Coloring and Style for this plot. The Type of Point Style available includes Comet tail. Comet tail plots provide a convenient way to indicate the direction of travel of particles at a given point in time. The tail of the comet typically points in the opposite direction to the particle velocity — so visually, it is the same as the tail of a comet approaching the sun. See Defining the Coloring and Style for the Comet tail settings.
Particle Positioning
For 3D models, enter the initial position of particles in the x, y, and z fields. For 2D models, enter the Positioning details as described below.
Select a Positioning: Start point controlled or Boundary coordinates. Boundary coordinates are useful, for example, for flow models with one or more inflow boundaries.
If Start point controlled is selected, enter the initial position of particles in the x and y fields.
If Boundary coordinates is selected, select an item from the Named selection list and select an Entry method: Number of points or Boundary parameters.
-
If Number of points is selected, enter the number of grid Points (the default is 10).
-
If Boundary parameters is selected, enter the Relative coordinates.
Release
Under Release, specify when to Release particles: Once (the default), At intervals, or At times. Select:
Once to release particles once at the first available time, typically at time 0 (zero). To delay the release, select the Start time check box and enter a time.
At intervals to release particles at regular intervals starting at the first available time, typically at time 0 (zero). To delay the release, select the Start time check box and enter a time. Enter a Time between releases. The default is 1.
At times to release particles at an arbitrary time point; enter multiple Times to release particles.
Quality (ODE Solver Settings)
Under Quality, also define the ODE solver settings as needed. Go to ODE Solver Settings — Relative Tolerance, ODE Solver Settings — Absolute Tolerance, and ODE Solver Settings — Step Size for details.
Advanced
The Advanced section contains settings that do not normally need to be adjusted.
Under Advanced, also define these settings as needed. Go to Advanced — Termination and Advanced — Instantaneous Flow Field for details.
In the Termination section, edit the Maximum number of steps and Edge tolerance. In the Instantaneous flow field section, edit the Plot static flow field even when time dependent check box, the Time variable default, and the End time active.
ODE Solver Settings — Relative Tolerance
Follow these supplementary instructions for the ODE solver settings section found under the Quality section.
Enter a Relative tolerance for the ODE solver. The default is 0.001.
When solving the second-order ODE for x, the solver first rewrites it as two coupled first-order ODEs: one for the position x and one for the velocity , each with two components in 2D and three components in 3D.
The Relative tolerance value is the relative error tolerance that the ODE solver uses. It applies to all components of the particle’s position and velocity. The solver controls the step size so that the estimated error e in each integration step satisfies
where rtol is the relative tolerance specified, atolpos is the absolute tolerance for the particle’s position components, and atolvel equals the absolute tolerance for the particle’s velocity components.
ODE Solver Settings — Absolute Tolerance
Follow these supplementary instructions for the ODE solver settings section found under the Quality section. Specify the solver’s absolute tolerance. The default is Automatic. To enter different values, select Manual from the Absolute tolerance list and enter a Position. The Position field can contain a single value — it applies to all components of the position and is the absolute tolerance.
ODE Solver Settings — Step Size
Follow these supplementary instructions for the ODE solver settings section found under the Quality section. Specify the solver Step size. The default is Automatic — the COMSOL Multiphysics software uses the initial value of the acceleration (force divided by mass) and the relative and absolute tolerances to determine the initial time step.
The automatic maximum step size is 10% of the total simulation time for time-dependent flows as well as for static flow fields where the end time is manually specified in the Advanced section (in the Plot static flow field even when time dependent>End Time field). For static flow fields where the end time is not set manually, there is no upper limit of the step size. However, in this case, the initial time step is less than or equal to 0.1.
To edit the settings, select Manual from the Step size list and enter values in the Initial time step and Maximum time step fields.
The Maximum time step is the longest time step the solver takes. It has higher priority than the Initial time step; that is, if an initial step size is set larger than the maximum step size, the solver lowers the initial step size to the maximum step size.
Advanced — Termination
Follow these supplementary instructions for the section found under the Advanced section. The Termination section contains settings that determine when to end the particle tracing simulation.
To specify an upper limit of the number of time steps, click to select the Maximum number of steps check box and edit the default (1000). The particle simulation ends after this number of steps.
To specify how close to the geometry boundary the path lines are cut when they exit the geometry, edit the Edge tolerance default (0.001). This is a relative tolerance controlling how close to the geometry boundary the pathlines are cut when they exit the geometry. A lower value cuts the line closer to the geometry boundary.
Advanced — Instantaneous Flow Field
Follow these supplementary instructions for the section found under the Advanced section. To specify if you want to plot an instantaneous flow field, even if the solution is time dependent, select the Plot static flow field even when time dependent check box. This freezes the time selected previously — for example, from a Plot Group page in the Data>Time list — to the value specified and considers this a static flow field.
Edit the Time variable default (partt) if required. Normally it is not necessary to change the default name but the name can be used in expressions as well as for the color when coloring the pathlines according to an expression.
If required, select the End time active check box and enter a value.