Simcenter STAR-CCM+ How to visualize the Lagrangian particle tracks of particles leaving the flow domain through a particular boundary?

2023-11-02T04:35:49.000-0400
Simcenter STAR-CCM+ Simcenter STAR-CCM+ Virtual Reality Teamcenter Share Simcenter Cloud HPC Simcenter STAR-CCM+ Viewer Simcenter STAR-CCM+ Application Specific Solutions

Summary

A track file can be used to visualize the particle tracks of a Lagrangian phase. To gain a deeper understanding of the simulated flow field, you wish to visualize only those particles that leave the flow domain through a particular boundary.


Details

A track file can be used to visualize the particle tracks of a Lagrangian phase. To gain a deeper understanding of the simulated flow field, you wish to visualize only those particles that leave the flow domain through a particular boundary.

This article demonstrates how to extract those particles with an example of a simple channel flow with one inlet and two outlets. The particles leaving the flow domain through the left outlet are highlighted.

tracks.gif

All particles leaving the flow domain through the left outlet are identified using boundary sampling. Thus allowing you to create a xyz internal table of the Track: Parcel Index of all particles leaving the flow domain through this boundary.
The parcel index serves as a unique identifier for each parcel.

This data can be used in a field function to identify the relevant particles in a track file. Using the interpolateTable() function we can look-up if a parcel index is included in the xyz internal table. This field function can then be used to create a data focus of the particle tracks. The data focus can be applied to the scalar displayer to clip the tracks.

 

The workflow is as follows:

  1. The track file is activated from the beginning. If not, repeat the simulation from scratch or from the point in time from which on you would like to visualize the particle tracks.
  2. Boundary sampling is activated in the physical model section of your Lagrangian phase with the default scalar and vectors selected. The boundary of interest is selected as the part.
  3. Run at least one iteration before proceeding and save your simulation file afterwards to write the track file to disk.
  4. Create a xyz Internal Table. Select the boundary sample at the outlet as the input part (for example, Phase 1 @ Region: Outlet). Select Track:Parcel Index as the field function. Rename the table to "PID @outlet1".
  5. Right-click the table to extract it.
  6. Create a field function with the following definition and rename it to "Tracks @outlet1":
  7. interpolateTable(@Table("PID @outlet1"), "Track: Parcel Index", STEP , "Track: Parcel Index", ${TrackParcelId}) == ${TrackParcelId} 
  8. Create a data focus using the new "Tracks @outlet1" field function with a range from 1 to 1.
The interpolateTable() function is normally used to interpolate values from csv tables. Here we use it to find the closest value for the parcel index in the table. Only if this looked up value is the same as the actual parcel index the track is marked with 1.

To run the demo case of this knowledge base article:

  1. Run the simulation (only 11 iterations). Save the simulation afterwards to write the track file to disk.
  2. Extract the table: Tools > Tables > xyz Internal Table, right click: Extract
  3. Open the scene "Particle Track Filtered". Change displayer "tracks left" > Data Focus > Track @outlet1.

II. One Step Further - boundary sampling values on tracks

We can take it one step further and map values from the boundary sampling onto the tracks.

  1. Here we first create two more tables.
    • We extract the "Parcel Index" and "Particle Residence Time" on the Lagrangian particles
    • and we extract the "Track: Parcel Index" and "Track: Particle Residence Time" on the boundary sampling on outlet 1 and outlet 2.
  2. In the following field function we first distinguish between particles leaving the domain (boundary sampling) or particles who are left in the simulation. The letter particles are simply accessed using the normal Lagrangian phase in Simcenter STAR-CCM+.
  3. After we checked where to find the residence time we look it up from either table. Here is the definition used in the field function.
  4. (interpolateTable(@Table("ResTime @LMP"), "Parcel Index", STEP , "Parcel Index", ${TrackParcelId}) == ${TrackParcelId}) ? 
    interpolateTable(@Table("ResTime @LMP"),"Parcel Index" , STEP , "Particle Residence Time", ${TrackParcelId}) : 
    interpolateTable(@Table("BID @BS1&2"),"Track: Parcel Index" , STEP , "Track: Particle Residence Time", ${TrackParcelId})

In the picture below you can see the resulting particle tracks. The tracks are colored by the maximum residence time the particle had either when leaving the domain (boundary sampling in magenta-cyan) or when the calculation stopped (Lagrangian particles in black-white). 

Particle Tracks - Residence Time.png

Note that the provided file was designed for demonstration purposes only. A much finer mesh is required for production cases.

STAR-CCM+ Documentation sections:
User Guide > Modeling Physics > Modeling Multiphase Flow > Using the Lagrangian Multiphase Model > Working with Particle Tracks > Modeling with Boundary Sampling
User Guide > Modeling Physics > Modeling Multiphase Flow > Using the Lagrangian Multiphase Model > Working with Particle Tracks

KB Article ID# KB000034655_EN_US

Contents

SummaryDetails

Associated Components

Design Manager Electronics Cooling In-Cylinder (STAR-ICE) Job Manager Simcenter STAR-CCM+