I'm running a particle tracking problem with a large number of particles. I'd like to be able to compute some statistics for particles which terminate on a specific boundary. I want to use a Post session file to do this but I don't know how to get the list of particles which end on this boundary into a Perl variable. I see how to get this last using the info window on the Particle Track object in an interactive session of Post, but how can I do this in batch or in a session file?

You can use the following approach.

1. Create a Particle Track object which uses the ending location as the filter. Set the maximum number of tracks to be high enough to include all possible tracks.

2. Use the following series of perl commands or Power Syntax to extract the track list into an array which you can loop over:

# get the list of tracks which are displayed and terminate at the specified boundary

! $trackList = getValue( "Particle Track 1", "Tracks Displayed" );

# Tracks Displayed is a comma separated list - we need to break it up into an array

!@tracks = split(/, /, $trackList );

# Loop over all the tracks displayed

! foreach $i ( @tracks) {

# create a single particle track, looping over all tracks which end on the specified boundary

PARTICLETRACK:Particle Track 1
Activate Filter = On
Any All Condition = Match ALL
Apply Instancing Transform = On
Colour = 0.75, 0.75, 0.75
Colour Map = Rainbow
Colour Mode = Variable
Colour Scale = Linear
Colour Variable = Velocity
Colour Variable Boundary Values = Conservative
Culling Mode = No Culling
Domain List = All Domains
Draw Faces = On
Draw Lines = Off
Draw Symbols = Off
Draw Tracks = On
Filter On Diameter = Off
Filter On End = Off
Filter On Start = Off
Filter On Track Selection = On
Font = Sans Serif
Input File = data.txt
Instancing Transform = Default Transform
Lighting = On
Limit Track Option = Up To Current Timestep
Line Width = 1
Max = 0 [s]
Maximum Number of Tracks = 1
Min = 0 [s]
Number of Sides = 8
Option = From Res
Particle Diameter = 7.41698e-005
Particle Diameter Condition = gt
Particle Diameter Condition Two = NA
Particle Diameter Two = 7.41698e-005
Range = Global
Reduction Factor = 1.0
Reduction or Max Tracks = Max Tracks
Show Track Labels = Off
Specular Lighting = On
Surface Drawing = Smooth Shading
Symbol Size = 1.0
Symbol Start Time = 10.0 [s]
Symbol Stop Time = -10.0 [s]
Symbol TimeInterval = 1.0 [s]
Text Colour = 0, 0, 0
Text Height = 0.018
Track Drawing Mode = Line
Track End Distance = 3.40282e+038 [ m ]
Track End Time = 3.40282e+038 [ s ]
Track File Type = CFX4
Track Limit Type = Time
Track Line Width = 2
Track Material = $material
Track Selection = $i
Track Size = 1.0
Track Start Distance = 0 [m]
Track Start Time = 0 [s]
Track Symbol = Ball
Transparency = 0.0
Visibility = On

# now do something- statistics, etc.

# now terminate the loop


Show Form
No comments yet. Be the first to add a comment!